]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Remove cmd_cfunc_ftype
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
5fed81ff
TT
12017-11-07 Tom Tromey <tom@tromey.com>
2
3 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
4 (go32_pde, go32_pte, go32_pte_for_address): Constify.
5 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
6 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
7 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
8 (parse_int_arg, show_thread_default_detach_sc_cmd)
9 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
10 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
11 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
12 (show_task_pause_cmd, set_task_detach_sc_cmd)
13 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
14 (set_noninvasive_cmd, set_thread_pause_cmd)
15 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
16 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
17 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
18 * windows-nat.c (display_selectors): Constify.
19 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
20 non-const "cfunc".
21 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
22 (cmd_cfunc_eq): Likewise.
23 (struct cmd_list_element): Likewise.
24 (do_cfunc): Remove.
25 (cli_user_command_p): Update.
26 * command.h (add_cmd): Remove non-const overload.
27 (cmd_cfunc_ftype): Remove typedef.
28 (cmd_cfunc_eq): Remove non-const overload.
29 * value.c (show_values): Constify.
30 * thread.c (thread_apply_all_command): Constify.
31 * symfile.c (load_command): Constify.
32 * source.c (directory_command): Constify.
33 * maint.c (maintenance_internal_error)
34 (maintenance_demangler_warning, maintenance_space_display)
35 (maintenance_print_architecture, maintenance_translate_address)
36 (maintenance_info_selftests, maintenance_internal_warning):
37 Constify.
38 * breakpoint.c (disable_trace_command, enable_trace_command):
39 Constify.
40 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
41 Constify.
42 (add_auto_load_safe_path): Constify.
43 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
44 * top.h (show_commands): Constify.
45 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
46 * sparc64-tdep.c (adi_examine_command): Constify.
47 (adi_assign_command): Constify.
48
1d12d88f
TT
492017-11-07 Tom Tromey <tom@tromey.com>
50
51 * frame.h (info_locals_command, info_args_command): Constify.
52 * auto-load.h (auto_load_info_scripts): Constify.
53 * inferior.h (registers_info): Constify.
54 * copying.c: Rebuild.
55 * copying.awk: Constify generated commands.
56 * auto-load.c (auto_load_info_scripts)
57 (info_auto_load_gdb_scripts): Constify.
58 * cli/cli-decode.c (struct cmd_list_element): Take a
59 cmd_const_cfunc_ftype.
60 * command.h (add_info): Take a cmd_const_cfunc_ftype.
61 * tui/tui-win.c (tui_all_windows_info): Constify.
62 * python/py-auto-load.c (info_auto_load_python_scripts):
63 Constify.
64 * cli/cli-cmds.c (show_command): Remove non-const overload.
65 * tracepoint.c (info_tvariables_command, info_scope_command):
66 Constify.
67 (info_static_tracepoint_markers_command): Constify.
68 * thread.c (info_threads_command): Constify.
69 (print_thread_info_1): Constify.
70 * target.c (info_target_command): Constify.
71 * symtab.c (info_sources_command, info_functions_command)
72 (info_types_command): Constify.
73 (info_variables_command): Remove non-const overload.
74 * symfile.c (info_ext_lang_command): Constify.
75 * stack.c (info_frame_command, info_locals_command)
76 (info_args_command): Constify.
77 (backtrace_command): Remove non-const overload.
78 * source.c (info_source_command, info_line_command): Constify.
79 * solib.c (info_sharedlibrary_command): Constify.
80 * skip.c (info_skip_command): Constify.
81 * ser-go32.c (info_serial_command): Constify.
82 * reverse.c (info_bookmarks_command): Constify.
83 * printcmd.c (info_symbol_command, info_address_command)
84 (info_display_command): Constify.
85 * osdata.c (info_osdata_command): Constify.
86 * objc-lang.c (info_selectors_command, info_classes_command):
87 Constify.
88 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
89 * memattr.c (info_mem_command): Constify.
90 * macrocmd.c (info_macro_command, info_macros_command): Constify.
91 * linux-fork.c (info_checkpoints_command): Constify.
92 * infrun.c (info_signals_command): Constify.
93 * inflow.c (info_terminal_command): Constify.
94 * inferior.c (info_inferiors_command): Constify.
95 (print_inferior): Constify.
96 * infcmd.c (info_program_command, info_all_registers_command)
97 (info_registers_command, info_vector_command)
98 (info_float_command): Constify.
99 (registers_info): Constify.
100 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
101 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
102 Constify.
103 * f-valprint.c (info_common_command): Constify.
104 * dcache.c (info_dcache_command): Constify.
105 (dcache_info_1): Constify.
106 * darwin-nat-info.c (info_mach_tasks_command)
107 (info_mach_task_command, info_mach_ports_command)
108 (info_mach_port_command, info_mach_threads_command)
109 (info_mach_thread_command, info_mach_regions_command)
110 (info_mach_regions_recurse_command, info_mach_region_command)
111 (info_mach_exceptions_command): Constify.
112 (get_task_from_args): Constify.
113 * cp-support.c (info_vtbl_command): Constify.
114 * breakpoint.c (info_watchpoints_command)
115 (info_tracepoints_command): Constify.
116 (info_breakpoints_command): Remove non-const overload.
117 * avr-tdep.c (avr_io_reg_read_command): Constify.
118 * auxv.c (info_auxv_command): Constify.
119 * ada-tasks.c (info_tasks_command): Constify.
120 (info_task): Constify.
121 * ada-lang.c (info_exceptions_command): Constify.
122
0b39b52e
TT
1232017-11-07 Tom Tromey <tom@tromey.com>
124
125 * solib.h (no_shared_libraries): Constify.
126 * frame.h (return_command): Constify.
127 * cli/cli-cmds.h (quit_command): Constify.
128 * top.h (quit_command, execute_command): Constify.
129 * target.h (flash_erase_command): Constify.
130 * inferior.h (set_inferior_args, attach_command): Constify.
131 * tracepoint.h (start_tracing, stop_tracing): Constify.
132 * breakpoint.h (break_command, tbreak_command)
133 (hbreak_command_wrapper, thbreak_command_wrapper)
134 (rbreak_command_wrapper, watch_command_wrapper)
135 (awatch_command_wrapper, rwatch_command_wrapper)
136 (get_tracepoint_by_number): Constify.
137 * symtab.c (info_variables_command, rbreak_command)
138 (symtab_symbol_info): Constify.
139 (info_variables_command): Add non-const overload.
140 * top.c (dont_repeat_command): Constify.
141 * breakpoint.c (ignore_command, commands_command)
142 (condition_command, tbreak_command, hbreak_command)
143 (thbreak_command, clear_command, break_command)
144 (info_breakpoints_command, watch_command, rwatch_command)
145 (awatch_command, trace_command, ftrace_command, strace_command)
146 (trace_pass_command, break_range_command, dprintf_command)
147 (agent_printf_command, get_tracepoint_by_number)
148 (watch_maybe_just_location, trace_pass_command): Constify.
149 (info_breakpoints_command): Add non-const overload.
150 * tracefile.c (tsave_command): Constify.
151 * infcmd.c (attach_command, disconnect_command, signal_command)
152 (queue_signal_command, stepi_command, nexti_command)
153 (finish_command, next_command, step_command, until_command)
154 (advance_command, jump_command, continue_command, run_command)
155 (start_command, starti_command, interrupt_command)
156 (run_command_1, set_inferior_args, step_1): Constify.
157 * inferior.c (add_inferior_command, remove_inferior_command)
158 (clone_inferior_command): Constify.
159 * linux-fork.c (checkpoint_command, restart_command): Constify.
160 * windows-nat.c (signal_event_command): Constify.
161 * guile/guile.c (guile_repl_command, guile_command): Constify.
162 * printcmd.c (x_command, display_command, printf_command)
163 (output_command, set_command, call_command, print_command)
164 (eval_command): Constify.
165 (non_const_set_command): Remove.
166 (_initialize_printcmd): Update.
167 * source.c (forward_search_command, reverse_search_command):
168 Constify.
169 * jit.c (jit_reader_load_command, jit_reader_unload_command):
170 Constify.
171 * infrun.c (handle_command): Constify.
172 * memattr.c (mem_command): Constify.
173 * stack.c (return_command, up_command, up_silently_command)
174 (down_command, down_silently_command, frame_command)
175 (backtrace_command, func_command, backtrace_command_1): Constify.
176 (backtrace_command): Add non-const overload.
177 * remote-sim.c (simulator_command): Constify.
178 * exec.c (set_section_command): Constify.
179 * tracepoint.c (tdump_command, trace_variable_command)
180 (tstatus_command, tstop_command, tstart_command)
181 (end_actions_pseudocommand, while_stepping_pseudocommand)
182 (collect_pseudocommand, teval_pseudocommand, actions_command)
183 (start_tracing, stop_tracing): Constify.
184 * value.c (init_if_undefined_command): Constify.
185 * tui/tui-stack.c (tui_update_command): Constify.
186 * tui/tui-win.c (tui_refresh_all_command)
187 (tui_set_tab_width_command, tui_set_win_height_command)
188 (tui_set_focus_command, tui_scroll_forward_command)
189 (tui_scroll_backward_command, tui_scroll_left_command)
190 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
191 (tui_set_win_height): Constify.
192 * tui/tui-layout.c (tui_layout_command): Constify.
193 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
194 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
195 (proc_untrace_sysexit_cmd): Constify.
196 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
197 (threadset_test_cmd, threadlist_update_test_cmd)
198 (threadalive_test): Constify.
199 * objc-lang.c (print_object_command): Constify.
200 * command.h (add_com): Constify.
201 * cli/cli-dump.c (restore_command): Constify.
202 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
203 (help_command, complete_command, shell_command, edit_command)
204 (list_command, disassemble_command, make_command)
205 (apropos_command, alias_command): Constify.
206 * cli/cli-script.c (document_command, define_command)
207 (while_command, if_command, validate_comname): Constify.
208 * cli/cli-decode.c (struct cmd_list_element): Change type of
209 "fun".
210 * target.c (do_monitor_command, flash_erase_command): Constify.
211 * regcache.c (reg_flush_command): Constify.
212 * reverse.c (reverse_step, reverse_next, reverse_stepi)
213 (reverse_nexti, reverse_continue, reverse_finish)
214 (save_bookmark_command, goto_bookmark_command)
215 (exec_reverse_once): Constify.
216 * python/python.c (python_interactive_command, python_command):
217 Constify.
218 * typeprint.c (ptype_command, whatis_command, whatis_exp):
219 Constify.
220 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
221 * gcore.c (gcore_command): Constify.
222
85c4be7c
TT
2232017-11-07 Tom Tromey <tom@tromey.com>
224
225 * printcmd.c (x_command): Call set_repeat_arguments.
226 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
227 * top.c (repeat_arguments): New global.
228 (set_repeat_arguments): New function.
229 (execute_command): Handle repeat_arguments.
230 (show_commands): Calls set_repeat_arguments.
231 * command.h (set_repeat_arguments): Declare.
232
022643b4
TT
2332017-11-07 Tom Tromey <tom@tromey.com>
234
235 * stack.c (backtrace_command): Use std::string.
236 (backtrace_command_1): Make "count_exp" const.
237
5614fb77
TT
2382017-11-07 Tom Tromey <tom@tromey.com>
239
240 * source.c (directory_switch, mod_path, add_path): Constify.
241 * defs.h (add_path, mod_path, directory_switch): Constify.
242 * mi/mi-cmd-env.c (env_mod_path): Constify.
243
6be9a197
TT
2442017-11-07 Tom Tromey <tom@tromey.com>
245
246 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
247 (run_command_1, continue_command, step_1, jump_command)
248 (signal_command, until_command, advance_command, finish_command)
249 (attach_command): Update.
250
c2252c0d
TT
2512017-11-07 Tom Tromey <tom@tromey.com>
252
253 * command.h (set_cmd_cfunc): Don't declare.
254 * cli/cli-decode.c (set_cmd_cfunc): Now static.
255
1ee870c5
TT
2562017-11-07 Tom Tromey <tom@tromey.com>
257
258 * stack.c (select_frame_command): Constify.
259 * cli/cli-decode.c (add_com_suppress_notification): Constify.
260 * command.h (add_com_suppress_notification): Constify.
261
ee7ddd71
TT
2622017-11-07 Tom Tromey <tom@tromey.com>
263
264 * breakpoint.c (stop_command): Constify.
265 * cli/cli-decode.c (struct cmd_list_element): Constify.
266 * command.h (add_abbrev_prefix_cmd): Constify.
267
95e95a6d
PA
2682017-11-07 Pedro Alves <palves@redhat.com>
269
270 * breakpoint.c (extract_bp_kind): New enum.
271 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
272 factored out from ...
273 (extract_bp_number_and_location): ... here.
274 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
275
cc638e86
PA
2762017-11-07 Pedro Alves <palves@redhat.com>
277
278 * breakpoint.c (extract_bp_number_and_location): Change return
279 type to void. Throw error instead of warning.
280 (enable_disable_command): Adjust.
281
d0fe4701
XR
2822017-11-07 Xavier Roirand <roirand@adacore.com>
283 Pedro Alves <palves@redhat.com>
284
285 * breakpoint.c (map_breakpoint_number_range): New, factored out
286 from ...
287 (map_breakpoint_numbers): ... here.
288 (find_location_by_number): Change parameters from string to
289 breakpoint number and location.
290 (extract_bp_number_and_location): New function.
291 (enable_disable_bp_num_loc)
292 (enable_disable_breakpoint_location_range)
293 (enable_disable_command): New functions, factored out ...
294 (enable_command, disable_command): ... these functions, and
295 adjusted to support ranges.
296 * NEWS: Document enable/disable breakpoint location range feature.
297
635dc5b2
LM
2982017-11-06 Luis Machado <luis.machado@linaro.org>
299
300 * MAINTAINERS (Write After Approval): Update my e-mail address.
301
556e5da5
PA
3022017-11-06 Pedro Alves <palves@redhat.com>
303
304 * gnu-nat.c (gnu_terminal_init): Delete.
305 (gnu_target): Don't install gnu_terminal_init.
306 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
307 (child_terminal_init): ... this function.
308
d1928160
PA
3092017-11-06 Pedro Alves <palves@redhat.com>
310
311 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
312 sgtty.h.
313 * config.in, configure: Regenerate.
314
6aa899ce
PA
3152017-11-06 Pedro Alves <palves@redhat.com>
316
317 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
318 (async_init_signals): Adjust.
319 (handle_stop_sig): Rename to ...
320 (handle_sigtstp): ... this.
321 (async_stop_sig): Rename to ...
322 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
323 SIGTSTP path.
324 * event-top.h: Move signal.h include to the top. Check SIGTSTP
325 instead of STOP_SIGNAL thoughout.
326 (handle_stop_sig): Rename to ...
327 (handle_sigtstp): ... this.
328 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
329
a94799ac
PA
3302017-11-06 Pedro Alves <palves@redhat.com>
331
332 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
333 longer set flags twice in row.
334
726e1356
PA
3352017-11-06 Pedro Alves <palves@redhat.com>
336
337 * Makefile.in (SER_HARDWIRE): Update comment.
338 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
339 * common/gdb_termios.h: Delete file.
340 * common/job-control.c: Include termios.h and unistd.h instead of
341 gdb_termios.h.
342 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
343 check.
344 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
345 Remove sgtty code.
346 * configure.ac: No longer check for termio.h and sgtty.h.
347 * configure: Regenerate.
348 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
349 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
350 Replace PROCESS_GROUP_TYPE references with pid_t references
351 throughout.
352 (gdb_getpgrp): Delete.
353 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
354 (child_terminal_inferior): Remove comment. Remove sgtty code.
355 (child_terminal_ours_1): Use tcgetpgrp directly instead of
356 gdb_getpgrp. Use serial_set_tty_state instead aof
357 serial_noflush_set_tty_state. Remove sgtty code.
358 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
359 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
360 (inferior_process_group): Now returns pid_t.
361 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
362 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
363 * ser-event.c (serial_event_ops): Update.
364 * ser-go32.c (dos_noflush_set_tty_state): Delete.
365 (dos_ops): Update.
366 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
367 * ser-pipe.c (pipe_ops): Update.
368 * ser-tcp.c (tcp_ops): Update.
369 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
370 HAVE_TERMIOS checks.
371 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
372 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
373 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
374 assume termios.
375 (hardwire_noflush_set_tty_state): Delete.
376 (hardwire_print_tty_state, hardwire_drain_output)
377 (hardwire_flush_output, hardwire_flush_input)
378 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
379 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
380 code, and assume termios.
381 (hardwire_ops): Update.
382 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
383 * serial.c (serial_noflush_set_tty_state): Delete.
384 * serial.h (serial_noflush_set_tty_state): Delete.
385 (serial_ops::noflush_set_tty_state): Delete.
386
1cfb73db
UW
3872017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
388
389 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
390 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
391 (COMMON_OBS): Remove doublest.o and dfp.o.
392 Do not build target-float.c (instead of doublest.c)
393 with -Wformat-nonliteral.
394
395 * doublest.c: Remove file.
396 * doublest.h: Remove file.
397 * dfp.c: Remove file.
398 * dfp.h: Remove file.
399
400 * target-float.c: Do not include "doublest.h" and "dfp.h".
401 (DOUBLEST): Move here from doublest.h.
402 (enum float_kind): Likewise.
403 (FLOATFORMAT_CHAR_BIT): Likewise.
404 (FLOATFORMAT_LARGEST_BYTES): Likewise.
405 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
406 (floatformat_precision): Likewise.
407 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
408 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
409 Likewise.
410 (host_float_format, host_double_format, host_long_double_format):
411 Likewise.
412 (floatformat_to_string, floatformat_from_string): Likewise.
413 (floatformat_to_doublest): Likewise. Also, inline the original
414 convert_floatformat_to_doublest.
415 (floatformat_from_doublest): Likewise. Also, inline the original
416 convert_floatformat_from_doublest.
417
418 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
419 (MAX_DECIMAL_STRING): Move here from dfp.c.
420 (match_endianness): Likewise.
421 (set_decnumber_context, decimal_check_errors): Likewise.
422 (decimal_from_number, decimal_to_number): Likewise.
423 (decimal_to_string, decimal_from_string): Likewise. Make static.
424 (decimal_from_longest, decimal_from_ulongest): Likewise.
425 (decimal_to_longest): Likewise.
426 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
427 (decimal_convert): Likewise.
428
b07e9c46
UW
4292017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
430
431 * doublest.c: Do not include "gdbtypes.h".
432 (extract_typed_floating): Remove.
433 (store_typed_floating): Remove.
434 (convert_typed_floating): Remove.
435 * doublest.h (struct type): Remove.
436 (DOUBLEST_PRINT_FORMAT): Remove.
437 (DOUBLEST_SCAN_FORMAT): Remove.
438 (extract_typed_floating): Remove.
439 (store_typed_floating): Remove.
440 (convert_typed_floating): Remove.
441
442 * dfp.c (decimal_from_doublest): Remove.
443 (decimal_to_doublest): Remove.
444 * dfp.h: Do not include "doublest.h".
445 (decimal_from_doublest): Remove.
446 (decimal_to_doublest): Remove.
447
448 * value.c: Do not include "doublest.h" and "dfp.h".
449 (value_as_double): Remove.
450 (unpack_double): Remove.
451 (value_from_double): Remove.
452 (value_from_decfloat): Remove.
453 * value.h: Do not include "doublest.h".
454 (value_as_double): Remove.
455 (unpack_double): Remove.
456 (value_from_double): Remove.
457 (value_from_decfloat): Remove.
458
3b2ca824
UW
4592017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
460
461 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
462 (i386_extract_return_value): Use target_float_convert.
463 (i386_store_return_value): Likewise.
464 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
465 (i387_value_to_register): Likewise.
466 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
467 (ia64_register_to_value): Use target_float_convert.
468 (ia64_value_to_register): Likewise.
469 (ia64_extract_return_value): Likewise.
470 (ia64_store_return_value): Likewise.
471 (ia64_push_dummy_call): Likewise.
472 * m68k-tdep.c: Include "target-float.h".
473 (m68k_register_to_value): Use target_float_convert.
474 (m68k_value_to_register): Likewise.
475 (m68k_svr4_extract_return_value): Likewise.
476 (m68k_svr4_store_return_value): Likewise.
477 * ppc-sysv-tdep.c: Include "target-float.h".
478 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
479 (do_ppc_sysv_return_value): Likewise.
480 (ppc64_sysv_abi_push_freg): Likewise.
481 (ppc64_sysv_abi_return_value_base): Likewise.
482 * rs6000-aix-tdep.c: Include "target-float.h".
483 (rs6000_push_dummy_call): Use target_float_convert.
484 (rs6000_return_value): Likewise.
485 * rs6000-lynx178-tdep.c: Include "target-float.h".
486 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
487 (rs6000_lynx178_return_value): Likewise.
488 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
489 (rs6000_register_to_value): Use target_float_convert.
490 (rs6000_value_to_register): Likewise.
491 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
492 (arm_extract_return_value): Use target_float_convert.
493 (arm_store_return_value): Likewise.
494 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
495 (sh_register_convert_to_virtual): Use target_float_convert.
496 (sh_register_convert_to_raw): Likewise.
497 * sh64-tdep.c: Include "target-float.h".
498 (sh64_extract_return_value): Use target_float_convert.
499 (sh64_register_convert_to_virtual): Likewise.
500 (sh64_register_convert_to_raw): Likewise. Fix argument types.
501
14ad9311
UW
5022017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
503
504 * target-float.c (floatformat_to_host_double): New function.
505 (floatformat_from_host_double): Likewise.
506 (target_float_to_host_double): Likewise.
507 (target_float_from_host_double): Likewise.
508 * target-float.h (target_float_to_host_double): Add prototype.
509 (target_float_from_host_double): Likewise.
510
511 * guile/scm-value.c: Include "target-float.h".
512 (gdbscm_value_to_real): Use target_float_to_host_double.
513 Handle integer source values via value_as_long.
514 * guile/scm-math.c: Include "target-float.h". Do not include
515 "doublest.h", "dfp.h", and "expression.h".
516 (vlscm_convert_typed_number): Use target_float_from_host_double.
517 (vlscm_convert_number): Likewise.
518
519 * python/py-value.c (valpy_float): Use target_float_to_host_double.
520 (convert_value_from_python): Use target_float_from_host_double.
521
50eff16b
UW
5222017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
523
524 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
525 (cast_from_fixed): Likewise.
526 (ada_scaling_type): New function.
527 (ada_delta): Return value instead of DOUBLEST. Perform target
528 arithmetic instead of host arithmetic.
529 (scaling_factor): Rename to ...
530 (ada_scaling_factor) ... this. Make non-static. Return value instead
531 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
532 (ada_fixed_to_float): Remove.
533 (ada_float_to_fixed): Remove.
534 * ada-lang.h (ada_fixed_to_float): Remove.
535 (ada_float_to_fixed): Remove.
536 (ada_delta): Return value instead of DOUBLEST.
537 (ada_scaling_factor): Add prototype.
538
539 * ada-typeprint.c: Include "target-float.h".
540 (print_fixed_point_type): Perform target arithmetic instead of
541 host arithmetic.
542 * ada-valprint.c: Include "target-float.h".
543 (ada_val_print_num): Perform target arithmetic instead of
544 host arithmetic for fixed-point types.
545
66c02b9e
UW
5462017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
547
548 * target-float.c: Include <math.h>.
549 (floatformat_binop): New function.
550 (floatformat_compare): Likewise.
551 (target_float_binop): Likewise.
552 (target_float_compare): Likewise.
553 * target-float.h: Include "expression.h".
554 (target_float_binop): Add prototype.
555 (target_float_compare): Likewise.
556
557 * valarith.c: Do not include "doublest.h" and "dfp.h".
558 Include "common/byte-vector.h".
559 (value_args_as_decimal): Remove, replace by ...
560 (value_args_as_target_float): ... this function. Handle both
561 binary and decimal target floating-point formats.
562 (scalar_binop): Handle both binary and decimal FP using
563 value_args_as_target_float and target_float_binop.
564 (value_equal): Handle both binary and decimal FP using
565 value_args_as_target_float and target_float_compare.
566 (value_less): Likewise.
567 (value_pos): Handle all scalar types as simple copy.
568 (value_neg): Handle all scalar types via BINOP_SUB from 0.
569 * dfp.c (decimal_binop): Throw error instead of internal_error
570 when called with an unsupported operation code.
571
f69fdf9b
UW
5722017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
573
574 * target-float.c (target_float_to_string): New function.
575 (target_float_from_string): New function.
576 * target-float.h (target_float_to_string): Add prototype.
577 (target_float_from_string): Add prototype.
578
579 * valprint.c: Include "target-float.h". Do not include
580 "doublest.h" and "dfp.h".
581 (print_floating): Use target_float_to_string.
582 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
583 (printf_floating): Use target_float_to_string.
584 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
585 (print_i387_value): Use target_float_to_string.
586 * mips-tdep.c: Include "target-float.h".
587 (mips_print_fp_register): Use target_float_to_string.
588 * sh64-tdep.c: Include "target-float.h".
589 (sh64_do_fp_register): Use target_float_to_string.
590
591 * parse.c: Include "target-float.h". Do not include
592 "doublest.h" and "dfp.h".
593 (parse_float): Use target_float_from_string.
594 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
595 (define_symbol): Use target_float_from_string.
596 * gdbarch-selftests.c: Include "target-float.h".
597 (register_to_value_test): Use target_float_from_string.
598
70100014
UW
5992017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
600
601 * Makefile.c (SFILES): Add target-float.c.
602 (HFILES_NO_SRCDIR): Add target-float.h.
603 (COMMON_OBS): Add target-float.o.
604 * target-float.h: New file.
605 * target-float.c: New file.
606
607 * doublest.c (floatformat_classify): Fix detection of float_zero.
608
609 * gdbtypes.c (is_floating_type): New function.
610 * gdbtypes.h (is_floating_type): Add prototype.
611
612 * value.c: Do not include "floatformat.h".
613 (unpack_double): Use target_float_is_valid.
614 (is_floating_value): New function.
615 * value.h (is_floating_value): Add prototype-
616
617 * valarith.c: Include "target-float.h".
618 (value_logical_not): Use target_float_is_zero.
619
620 * python/py-value.c: Include "target-float.h".
621 (valpy_nonzero): Use target_float_is_zero.
622
ab4b1c46
TT
6232017-11-04 Tom Tromey <tom@tromey.com>
624
625 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
626
454dafbd
TT
6272017-11-04 Tom Tromey <tom@tromey.com>
628
629 * breakpoint.c (set_momentary_breakpoint): Return
630 breakpoint_up.
631 (until_break_command): Update.
632 (new_until_break_fsm): Change argument types to
633 breakpoint_up.
634 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
635 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
636 Remove.
637 * infcmd.c (finish_forward): Update.
638 * breakpoint.h (set_momentary_breakpoint)
639 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
640 (make_cleanup_delete_breakpoint): Remove.
641 (struct breakpoint_deleter): New.
642 (breakpoint_up): New typedef.
643 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
644 (insert_exception_resume_breakpoint): Update.
645 (insert_exception_resume_from_probe): Update.
646 (insert_longjmp_resume_breakpoint): Update.
647 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
648 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
649 * infcall.c (call_function_by_hand_dummy): Update
650
331b71e5
TT
6512017-11-04 Tom Tromey <tom@tromey.com>
652
653 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
654
9f584b37
TT
6552017-11-04 Tom Tromey <tom@tromey.com>
656
657 * linux-tdep.c (linux_core_info_proc_mappings): Use
658 gdb::def_vector.
659 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
660 "size" argument.
661 (linux_corefile_thread): Update.
662 (linux_make_corefile_notes): Remove unused variable.
663
779bc38e
TT
6642017-11-04 Tom Tromey <tom@tromey.com>
665
666 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
667 gdb::byte_vector.
668
ed2b3126
TT
6692017-11-04 Tom Tromey <tom@tromey.com>
670
671 * objfiles.c (do_free_objfile_cleanup): Remove.
672 * compile/compile-object-load.c (compile_object_load): Update.
673 * objfiles.h (make_cleanup_free_objfile): Remove.
674
7f6743fd
TT
6752017-11-04 Tom Tromey <tom@tromey.com>
676
677 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
678 (adi_read_versions): Change "tags" to "gdb_byte *".
679 (adi_print_versions): Likewise.
680
c80049d3
TT
6812017-11-04 Tom Tromey <tom@tromey.com>
682
683 * breakpoint.c
684 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
685 from start_rbreak_breakpoints.
686 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
687 * breakpoint.h (class scoped_rbreak_breakpoints): New.
688 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
689 * symtab.c (do_end_rbreak_breakpoints): Remove.
690 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
691
167b0be1
TT
6922017-11-04 Tom Tromey <tom@tromey.com>
693
694 * cp-namespace.c (reset_directive_searched): Remove.
695 (cp_lookup_symbol_via_imports): Use scoped_restore.
696 * cp-support.c (reset_directive_searched): Remove.
697 (make_symbol_overload_list_using): Use scoped_restore.
698 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
699 (reset_directive_searched): Remove.
700
5eae7aea
TT
7012017-11-04 Tom Tromey <tom@tromey.com>
702
703 * symfile.c (find_separate_debug_file_by_debuglink): Use
704 unique_xmalloc_ptr.
705
c6bcad5f
TT
7062017-11-04 Tom Tromey <tom@tromey.com>
707
708 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
709 type of "info".
710 (compute_stack_depth): Likewise.
711 (do_compile_dwarf_expr_to_c): Use std::vector.
712
20dcd8ca
TT
7132017-11-04 Tom Tromey <tom@tromey.com>
714
715 * compile/compile-object-load.c (link_callbacks_einfo): Use
716 std::string.
717
33c7c59d
TT
7182017-11-04 Tom Tromey <tom@tromey.com>
719
720 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
721 Use scoped_free_pendings.
722 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
723 scoped_free_pendings.
724 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
725 (xcoff_initial_scan): Likewise.
726 * buildsym.c (reset_symtab_globals): Update comment.
727 (scoped_free_pendings): Rename from really_free_pendings.
728 (prepare_for_building): Update comment.
729 (buildsym_init): Likewise.
730 * buildsym.h (class scoped_free_pendings): New class.
731 (really_free_pendings): Don't declare.
732
67fa57cf
UW
7332017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
734
735 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
736 output when converting a zero value to a special byteorder format.
737
f26ae15b
YQ
7382017-11-02 Yao Qi <yao.qi@linaro.org>
739
740 * frame.c (do_frame_register_read): Remove aspace.
741 * jit.c (jit_frame_sniffer): Likwise.
742 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
743 * regcache.c (regcache::regcache): Pass nullptr.
744 (regcache_print): Caller updated.
745 * regcache.h (regcache::regcache): Remove one constructor
746 parameter aspace.
747
6c6e9412
YQ
7482017-11-02 Yao Qi <yao.qi@linaro.org>
749
750 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
751
8b86c959
YQ
7522017-11-02 Yao Qi <yao.qi@linaro.org>
753
754 * breakpoint.c (insert_single_step_breakpoints): Update.
755 * frame.c (struct frame_info) <aspace>: Add const.
756 (frame_save_as_regcache): Add const.
757 (get_frame_address_space): Return const address_space *.
758 * frame.h (get_frame_address_space): Update declaration.
759 * infrun.c (struct step_over_info) <aspace>: Add const.
760 (set_step_over_info): Make aspace const.
761 (displaced_step_prepare_throw): Change variable const.
762 (resume): Likewise.
763 (proceed): Likewise.
764 (adjust_pc_after_break): Likewise.
765 (save_waitstatus): Likewise.
766 (handle_signal_stop): Likewise.
767 (keep_going_pass_signal): Likewise.
768 * jit.c (jit_frame_sniffer): Add const.
769 * mips-tdep.c (mips_single_step_through_delay): Likewise.
770 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
771 * record-full.c (record_full_wait_1): Likewise.
772 * regcache.c (regcache::regcache): Change parameter to const.
773 * regcache.h (regcache::regcache): Likewise.
774 (regcache::aspace): Return const address_space *.
775 (regcache) <m_aspace>: Add const.
776
a01bda52
YQ
7772017-11-02 Yao Qi <yao.qi@linaro.org>
778
779 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
780 * frame.c (create_sentinel_frame): Likewise.
781 * infrun.c (displaced_step_prepare_throw): Likewise.
782 (resume): Likewise.
783 (thread_still_needs_step_over_bp): Likewise.
784 (proceed): Likewise.
785 (do_target_wait): Likewise.
786 (adjust_pc_after_break): Likewise.
787 (handle_syscall_event): Likewise.
788 (save_waitstatus): Likewise.
789 (handle_inferior_event_1): Likewise.
790 (handle_signal_stop): Likewise.
791 (keep_going_pass_signal): Likewise.
792 * linux-nat.c (status_callback): Likewise.
793 (save_stop_reason): Likewise.
794 (resume_stopped_resumed_lwps): Likewise.
795 * record-full.c (record_full_exec_insn): Likewise.
796 (record_full_wait_1): Likewise.
797 * regcache.c (get_regcache_aspace): Remove.
798 * regcache.h (get_regcache_aspace): Remove.
799
d999647b
YQ
8002017-11-02 Yao Qi <yao.qi@linaro.org>
801
802 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
803 (init_regcache_descr): Use gdbarch_num_regs.
804 (regcache::regcache): Likewise.
805 (regcache::get_register_status): Likewise.
806 (regcache::assert_raw_regnum): Likewise.
807 (regcache::cooked_read): Likewise.
808 (regcache::cooked_read_value): Likewise.
809 (regcache::cooked_write): Likewise.
810 (regcache::dump): Likewise.
811 (regcache::num_raw_registers): New method.
812 * regcache.h (class regcache) <num_raw_registers>: New.
813
4e888c28
YQ
8142017-11-02 Yao Qi <yao.qi@linaro.org>
815
816 * regcache.c (regcache::assert_regnum): New method.
817 (regcache::invalidate): Call assert_regnum.
818 (regcache::raw_update): Likewise.
819 (regcache::raw_write): Likewise.
820 (regcache::raw_read_part): Likewise.
821 (regcache::raw_write_part): Likewise.
822 (regcache::raw_supply): Likewise.
823 (regcache::raw_supply_integer): Likewise.
824 (regcache::raw_supply_zeroed): Likewise.
825 (regcache::raw_collect): Likewise.
826 (regcache::raw_collect_integer): Likewise.
827 * regcache.h (regcache::assert_regnum): Declare.
828
2e1b49b3
YQ
8292017-11-02 Yao Qi <yao.qi@linaro.org>
830
831 * regcache.c (regcache::dump): Remove code.
832
6c5218df
YQ
8332017-11-02 Yao Qi <yao.qi@linaro.org>
834
835 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
836 Remove.
837 <sizeof_cooked_register_status>: Remove.
838 (init_regcache_descr): Update.
839 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
840 (regcache::save): Likewise.
841 (regcache::dump): Likewise.
842
dcc31d28
JB
8432017-11-01 James Bowman <james.bowman@ftdichip.com>
844
845 * ft32-tdep.c (ft32_fetch_instruction): New function.
846 (ft32_analyze_prologue): Use ft32_fetch_instruction().
847
3a87ae65
SM
8482017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
849
850 * cli/cli-script.c (execute_control_command): Rename to ...
851 (execute_control_command_1): ... this.
852 (execute_control_command): New function.
853
09b847f3
SM
8542017-10-31 Simon Marchi <simon.marchi@ericsson.com>
855
856 * tracepoint.c (tfind_command): Remove const_cast.
857
f871c485
MG
8582017-10-30 Mike Gulick <mgulick@mathworks.com>
859
860 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
861
b020ff80
SM
8622017-10-30 Simon Marchi <simon.marchi@ericsson.com>
863
864 * common/common-utils.h (in_inclusive_range): New function.
865 * arm-tdep.c (arm_record_extension_space): Use
866 in_inclusive_range.
867 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
868 * cris-tdep.c (cris_spec_reg_applicable): Use
869 in_inclusive_range.
870
1b81856f
PA
8712017-10-30 Pedro Alves <palves@redhat.com>
872 Simon Marchi <simon.marchi@ericsson.com>
873
874 * remote.c (remote_set_syscall_catchpoint): Build a std::string
875 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
876
31b833b3
PA
8772017-10-30 Pedro Alves <palves@redhat.com>
878
879 * common/common-utils.c (string_appendf, string_vappendf): New
880 functions.
881 * common/common-utils.h (string_appendf, string_vappendf): New
882 declarations.
883 * unittests/common-utils-selftests.c (string_appendf_func)
884 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
885 (string_vappendf_tests): New functions.
886 (_initialize_common_utils_selftests): Register "string_appendf" and
887 "string_vappendf tests".
888
4a250334
PA
8892017-10-30 Pedro Alves <palves@redhat.com>
890
891 * unittests/common-utils-selftests.c (format_func): New typedef.
892 (string_printf_tests, string_vprintf_tests): Tests factored out
893 and merged to ...
894 (test_format_func): ... this new function.
895 (string_printf_tests, string_vprintf_tests): Reimplement on top of
896 test_format_func.
897
16c5c17e
SM
8982017-10-29 Simon Marchi <simon.marchi@ericsson.com>
899
900 * darwin-nat.c: Remove include of gdb.h.
901
7ca51576
SM
9022017-10-29 Simon Marchi <simon.marchi@ericsson.com>
903
904 * xtensa-xtregs.c: Fix formatting issues.
905
c1342859
SM
9062017-10-29 Simon Marchi <simon.marchi@ericsson.com>
907
908 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
909
484d8d36
MD
9102017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
911
912 PR python/21213
913 * python/py-infthread.c (thpy_get_inferior): Increment reference
914 of inferior before returning it.
915
b5540b5f
SM
9162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
917
918 * unittests/common-utils-selftests.c (format): Add
919 ATTRIBUTE_PRINTF.
920
5a9dcda1
SM
9212017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
922
923 * xml-syscall.c (struct syscall_desc): Add constructor.
924 <name>: Change type to std::string.
925 (syscall_desc_up): New typedef.
926 (syscall_desc_p): Remove typeder.
927 (DEF_VEC_P(syscall_desc_p)): Remove.
928 (struct syscall_group_desc): Add constructor.
929 <name>: Change type to std::string.
930 <syscalls>: Change type to std::vector.
931 (syscall_group_desc_up): New typedef.
932 (syscall_group_desc_p): Remove typedef.
933 (DEF_VEC_P(syscall_group_desc_p)): Remove.
934 (struct syscalls_info) <syscalls>: Change type to std::vector of
935 unique_ptr.
936 <groups>: Likewise.
937 <my_gdb_datadir>: Change type to std::string.
938 (syscalls_info_up): New typedef.
939 (allocate_syscalls_info): Remove.
940 (syscalls_info_free_syscalls_desc): Remove.
941 (syscalls_info_free_syscall_group_desc): Remove.
942 (free_syscalls_info): Remove.
943 (make_cleanup_free_syscalls_info): Remove.
944 (syscall_group_create_syscall_group_desc): Adjust.
945 (syscall_group_add_syscall): Adjust.
946 (syscall_create_syscall_desc): Adjust.
947 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
948 (init_syscalls_info): Adjust.
949 (syscall_group_get_group_by_name): Adjust.
950 (xml_get_syscall_number): Adjust.
951 (xml_get_syscall_name): Adjust.
952 (xml_list_of_syscalls): Adjust.
953 (xml_list_syscalls_by_group): Adjust.
954 (xml_list_of_groups): Adjust.
955
45461e0d
SM
9562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
957
958 * probe.h: Don't include gdb_vecs.h.
959 (DEF_VEC_P (probe_p)): Remove.
960 (find_probes_in_objfile): Return an std::vector.
961 * probe.c (find_probes_in_objfile): Likewise.
962 * breakpoint.c (breakpoint_objfile_data)
963 <longjmp_probes>: Change type to std::vector.
964 <exception_probes>: Likewise.
965 (free_breakpoint_probes): Don't manually free vectors.
966 (create_longjmp_master_breakpoint): Adjust.
967 (create_exception_master_breakpoint): Adjust.
968 * solib-svr4.c (svr4_create_probe_breakpoints): Change
969 parameter type, adjust.
970 (svr4_create_solib_event_breakpoints): Adjust.
971
43dce439
SM
9722017-10-27 Simon Marchi <simon.marchi@ericsson.com>
973
974 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
975 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
976 with new.
977 (free_breakpoint_probes): Rename to ...
978 (free_breakpoint_objfile_data): ... this, and call delete on
979 bp_objfile_data..
980
6a1b9516
SM
9812017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
982
983 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
984 (loaded_script_ptr): Remove typedef.
985 (DEF_VEC_P (loaded_script_ptr)): Remove.
986 (struct collect_matching_scripts_data): Add constructor.
987 <scripts_p>: Change type to (pointer to) std::vector.
988 (collect_matching_scripts_data): Adjust.
989 (sort_scripts_by_name): Make suitable for std::sort.
990 (print_scripts): Don't sort vector, adjust to std::vector.
991 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
992
593e3209
SM
9932017-10-27 Simon Marchi <simon.marchi@ericsson.com>
994
995 * symfile.c (filename_language): Make struct, not typedef. Add
996 constructor.
997 <ext>: Change type to std::string.
998 (DEF_VEC_O (filename_language)): Remove.
999 (filename_language_table): Change type to std::vector.
1000 (add_filename_language): Adjust.
1001 (set_ext_lang_command): Adjust.
1002 (info_ext_lang_command): Adjust.
1003 (deduce_language_from_filename): Adjust.
1004 (class scoped_restore_filename_language_table): Remove.
1005 (test_filename_language): Use scoped_restore.
1006 (test_set_ext_lang_command): Use scoped_restore, adjust to
1007 std::vector change.
1008
32fa66eb
SM
10092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1010
1011 * symfile.c: Include selftest.h.
1012 (class scoped_restore_filename_language_table): New.
1013 (test_filename_language): New test.
1014 (test_set_ext_lang_command): New test.
1015 (_initialize_symfile): Register tests.
1016
4a27f119
KS
10172017-10-27 Keith Seitz <keiths@redhat.com>
1018
1019 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1020 in the bp_location, falling back to find_pc_sect_function when
1021 needed.
1022 (add_location_to_breakpoint): Save sal->symbol.
1023 * breakpoint.h (struct bp_location) <symbol>: New field.
1024 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1025 * symtab.h (struct symtab_and_line) <symbol>: New field.
1026
a43f3893
PF
10272017-10-26 Patrick Frants <osscontribute@gmail.com>
1028
7453e6b2 1029 PR gdb/13669
a43f3893
PF
1030 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1031 to rewind obstack.
1032
23cc4e1b
PA
10332017-10-26 Pedro Alves <palves@redhat.com>
1034
1035 * remote.c (remote_async_terminal_ours_p): Delete.
1036 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1037 Remove references to 'remote_async_terminal_ours_p'.
1038
6abc18bb
YQ
10392017-10-26 Yao Qi <yao.qi@linaro.org>
1040
1041 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1042
bd522513
YQ
10432017-10-26 Yao Qi <yao.qi@linaro.org>
1044
1045 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1046 aspace const.
1047 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1048 Likewise.
1049 * breakpoint.c (bpstat_check_location): Remove cast.
1050 (breakpoint_hit_catch_fork): Make aspce const.
1051 (breakpoint_hit_catch_solib): Likewise.
1052 (breakpoint_hit_catch_exec): Likewise.
1053 (breakpoint_hit_ranged_breakpoint): Likewise.
1054 (breakpoint_hit_watchpoint): Likewise.
1055 (base_breakpoint_breakpoint_hit): Likewise.
1056 (bkpt_breakpoint_hit): Likewise.
1057 (dprintf_breakpoint_hit): Likewise.
1058 (tracepoint_breakpoint_hit): Likewise.
1059 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1060
accd0bcd
YQ
10612017-10-26 Yao Qi <yao.qi@linaro.org>
1062
1063 * breakpoint.c (breakpoint_location_address_match): Change
1064 "struct address_space *" to "const address_space".
1065 (breakpoint_location_address_range_overlap): Likewise.
1066 (breakpoint_here_p): Likewise.
1067 (breakpoint_in_range_p): Likewise.
1068 (moribund_breakpoint_here_p): Likewise.
1069 (bp_location_inserted_here_p): Likewise.
1070 (software_breakpoint_inserted_here_p): Likewise.
1071 (hardware_breakpoint_inserted_here_p): Likewise.
1072 (hardware_watchpoint_inserted_in_range): Likewise.
1073 (bpstat_check_location): Likewise.
1074 (bpstat_stop_status): Likewise.
1075 (breakpoint_address_match): Likewise.
1076 (breakpoint_address_match_range): Likewise.
1077 (breakpoint_location_address_match): Likewise.
1078 (breakpoint_location_address_range_overlap): Likewise.
1079 (insert_single_step_breakpoint): Likewise.
1080 (breakpoint_has_location_inserted_here): Likewise.
1081 (single_step_breakpoint_inserted_here_p): Likewise.
1082 (pc_at_non_inline_function): Likewise.
1083 * breakpoint.h (bpstat_stop_status): Update declaration.
1084 (breakpoint_here_p): Likewise.
1085 (breakpoint_in_range_p): Likewise.
1086 (moribund_breakpoint_here_p): Likewise.
1087 (breakpoint_inserted_here_p): Likewise.
1088 (software_breakpoint_inserted_here_p): Likewise.
1089 (hardware_breakpoint_inserted_here_p): Likewise.
1090 (breakpoint_has_location_inserted_here): Likewise.
1091 (single_step_breakpoint_inserted_here_p): Likewise.
1092 (hardware_watchpoint_inserted_in_range): Likewise.
1093 (breakpoint_address_match): Likewise.
1094 (insert_single_step_breakpoint): Likewise.
1095 (pc_at_non_inline_function): Likewise.
1096 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1097 * record.c (record_check_stopped_by_breakpoint): Likewise.
1098 * record.h (record_check_stopped_by_breakpoint): Likewise.
1099 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1100
ac7936df
YQ
11012017-10-25 Yao Qi <yao.qi@linaro.org>
1102
1103 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1104 regcache->arch () instead get_regcache_arch.
1105 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1106 Likewise.
1107 (aarch64_fbsd_store_inferior_registers): Likewise.
1108 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1109 (store_gregs_to_thread): Likewise.
1110 (fetch_fpregs_from_thread): Likewise.
1111 (store_fpregs_to_thread): Likewise.
1112 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1113 (aarch64_store_return_value): Likewise.
1114 (aarch64_software_single_step): Likewise.
1115 * aix-thread.c (aix_thread_wait): Likewise.
1116 (supply_reg32): Likewise.
1117 (supply_sprs64): Likewise.
1118 (supply_sprs32): Likewise.
1119 (fill_gprs64): Likewise.
1120 (fill_gprs32): Likewise.
1121 (fill_sprs64): Likewise.
1122 (fill_sprs32): Likewise.
1123 (store_regs_user_thread): Likewise.
1124 (store_regs_kernel_thread): Likewise.
1125 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1126 (alphabsd_store_inferior_registers): Likewise.
1127 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1128 (alpha_store_return_value): Likewise.
1129 (alpha_deal_with_atomic_sequence): Likewise.
1130 (alpha_next_pc): Likewise.
1131 (alpha_software_single_step): Likewise.
1132 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1133 (amd64bsd_store_inferior_registers): Likewise.
1134 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1135 Likewise.
1136 (amd64_linux_store_inferior_registers): Likewise.
1137 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1138 (amd64_collect_native_gregset): Likewise.
1139 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1140 (amd64obsd_collect_uthread): Likewise.
1141 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1142 (amd64_collect_fpregset): Likewise.
1143 (amd64_supply_fxsave): Likewise.
1144 (amd64_supply_xsave): Likewise.
1145 (amd64_collect_fxsave): Likewise.
1146 (amd64_collect_xsave): Likewise.
1147 * arc-tdep.c (arc_write_pc): Likewise.
1148 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1149 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1150 (arm_fbsd_store_inferior_registers): Likewise.
1151 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1152 (store_vfp_regs): Likewise.
1153 (arm_linux_fetch_inferior_registers): Likewise.
1154 (arm_linux_store_inferior_registers): Likewise.
1155 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1156 (arm_linux_sigreturn_next_pc): Likewise.
1157 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1158 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1159 (fetch_register): Likewise.
1160 (store_register): Likewise.
1161 * arm-tdep.c (arm_is_thumb): Likewise.
1162 (displaced_in_arm_mode): Likewise.
1163 (bx_write_pc): Likewise.
1164 (arm_get_next_pcs_addr_bits_remove): Likewise.
1165 (arm_software_single_step): Likewise.
1166 (arm_extract_return_value): Likewise.
1167 (arm_store_return_value): Likewise.
1168 (arm_write_pc): Likewise.
1169 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1170 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1171 (bsd_uthread_store_registers): Likewise.
1172 * core-regset.c (fetch_core_registers): Likewise.
1173 * corelow.c (get_core_registers): Likewise.
1174 * cris-tdep.c (cris_store_return_value): Likewise.
1175 (cris_extract_return_value): Likewise.
1176 (find_step_target): Likewise.
1177 (find_step_target): Likewise.
1178 (cris_software_single_step): Likewise.
1179 * ctf.c (ctf_fetch_registers): Likewise.
1180 * darwin-nat.c (cancel_breakpoint): Likewise.
1181 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1182 * frv-tdep.c (frv_extract_return_value): Likewise.
1183 * ft32-tdep.c (ft32_store_return_value): Likewise.
1184 (ft32_extract_return_value): Likewise.
1185 * go32-nat.c (fetch_register): Likewise.
1186 (go32_fetch_registers): Likewise.
1187 (go32_store_registers): Likewise.
1188 (store_register): Likewise.
1189 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1190 (h8300_store_return_value): Likewise.
1191 * hppa-linux-nat.c (fetch_register): Likewise.
1192 (store_register): Likewise.
1193 (hppa_linux_fetch_inferior_registers): Likewise.
1194 (hppa_linux_store_inferior_registers): Likewise.
1195 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1196 (i386_darwin_store_inferior_registers): Likewise.
1197 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1198 (gnu_store_registers): Likewise.
1199 * i386-linux-nat.c (fetch_register): Likewise.
1200 (store_register): Likewise.
1201 (supply_gregset): Likewise.
1202 (fill_gregset): Likewise.
1203 (i386_linux_fetch_inferior_registers): Likewise.
1204 (i386_linux_store_inferior_registers): Likewise.
1205 (i386_linux_resume): Likewise.
1206 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1207 Likewise.
1208 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1209 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1210 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1211 (i386obsd_collect_uthread): Likewise.
1212 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1213 (i386_supply_gregset): Likewise.
1214 (i386_collect_gregset): Likewise.
1215 (i386_supply_fpregset): Likewise.
1216 (i386_collect_fpregset): Likewise.
1217 (i386_mpx_bd_base): Likewise.
1218 * i386-v4-nat.c (supply_fpregset): Likewise.
1219 (fill_fpregset): Likewise.
1220 * i387-tdep.c (i387_supply_fsave): Likewise.
1221 (i387_collect_fsave): Likewise.
1222 (i387_supply_fxsave): Likewise.
1223 (i387_collect_fxsave): Likewise.
1224 (i387_supply_xsave): Likewise.
1225 (i387_collect_xsave): Likewise.
1226 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1227 (ia64_linux_store_registers): Likewise.
1228 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1229 (ia64_extract_return_value): Likewise.
1230 (ia64_store_return_value): Likewise.
1231 (find_func_descr): Likewise.
1232 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1233 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1234 (inf_ptrace_store_registers): Likewise.
1235 * infrun.c (use_displaced_stepping): Likewise.
1236 (displaced_step_prepare_throw): Likewise.
1237 (resume): Likewise.
1238 (proceed): Likewise.
1239 (do_target_wait): Likewise.
1240 (adjust_pc_after_break): Likewise.
1241 (handle_inferior_event_1): Likewise.
1242 (handle_signal_stop): Likewise.
1243 (save_infcall_suspend_state): Likewise.
1244 (restore_infcall_suspend_state): Likewise.
1245 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1246 * jit.c (jit_frame_prev_register): Likewise.
1247 * linux-nat.c (save_stop_reason): Likewise.
1248 (linux_nat_wait_1): Likewise.
1249 (resume_stopped_resumed_lwps): Likewise.
1250 * linux-record.c (record_linux_sockaddr): Likewise.
1251 (record_linux_msghdr): Likewise.
1252 (record_linux_system_call): Likewise.
1253 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1254 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1255 (lm32_store_return_value): Likewise.
1256 * m32c-tdep.c (m32c_read_flg): Likewise.
1257 (m32c_pseudo_register_read): Likewise.
1258 (m32c_pseudo_register_write): Likewise.
1259 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1260 (m32r_linux_collect_gregset): Likewise.
1261 * m32r-tdep.c (m32r_store_return_value): Likewise.
1262 (m32r_extract_return_value): Likewise.
1263 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1264 (m68kbsd_collect_fpregset): Likewise.
1265 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1266 * m68k-linux-nat.c (fetch_register): Likewise.
1267 (old_fetch_inferior_registers): Likewise.
1268 (old_store_inferior_registers): Likewise.
1269 (store_regs): Likewise.
1270 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1271 (m68k_svr4_store_return_value): Likewise.
1272 * m88k-tdep.c (m88k_store_arguments): Likewise.
1273 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1274 (mi_cmd_data_write_register_values): Likewise.
1275 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1276 (mips_fbsd_store_inferior_registers): Likewise.
1277 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1278 (mips_fbsd_supply_gregs): Likewise.
1279 (mips_fbsd_collect_fpregs): Likewise.
1280 (mips_fbsd_collect_gregs): Likewise.
1281 (mips_fbsd_supply_fpregset): Likewise.
1282 (mips_fbsd_collect_fpregset): Likewise.
1283 (mips_fbsd_supply_gregset): Likewise.
1284 (mips_fbsd_collect_gregset): Likewise.
1285 * mips-linux-nat.c (supply_gregset): Likewise.
1286 (fill_gregset): Likewise.
1287 (supply_fpregset): Likewise.
1288 (fill_fpregset): Likewise.
1289 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1290 (mips_fill_gregset): Likewise.
1291 (mips_supply_fpregset): Likewise.
1292 (mips_fill_fpregset): Likewise.
1293 (mips64_supply_gregset): Likewise.
1294 (micromips_linux_sigframe_validate): Likewise.
1295 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1296 (mipsnbsd_fetch_inferior_registers): Likewise.
1297 (mipsnbsd_store_inferior_registers): Likewise.
1298 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1299 (mipsnbsd_supply_gregset): Likewise.
1300 (mipsnbsd_iterate_over_regset_sections): Likewise.
1301 (mipsnbsd_supply_reg): Likewise.
1302 (mipsnbsd_supply_fpreg): Likewise.
1303 * mips-tdep.c (mips_in_frame_stub): Likewise.
1304 (mips_dummy_id): Likewise.
1305 (is_octeon_bbit_op): Likewise.
1306 (micromips_bc1_pc): Likewise.
1307 (extended_mips16_next_pc): Likewise.
1308 (mips16_next_pc): Likewise.
1309 (deal_with_atomic_sequence): Likewise.
1310 * moxie-tdep.c (moxie_process_readu): Likewise.
1311 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1312 * nto-procfs.c (procfs_store_registers): Likewise.
1313 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1314 (ppcfbsd_store_inferior_registers): Likewise.
1315 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1316 (fetch_altivec_register): Likewise.
1317 (get_spe_registers): Likewise.
1318 (fetch_spe_register): Likewise.
1319 (fetch_altivec_registers): Likewise.
1320 (fetch_all_gp_regs): Likewise.
1321 (fetch_all_fp_regs): Likewise.
1322 (store_vsx_register): Likewise.
1323 (store_altivec_register): Likewise.
1324 (set_spe_registers): Likewise.
1325 (store_spe_register): Likewise.
1326 (store_altivec_registers): Likewise.
1327 (store_all_gp_regs): Likewise.
1328 (store_all_fp_regs): Likewise.
1329 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1330 (ppc_linux_collect_gregset): Likewise.
1331 (ppc_canonicalize_syscall): Likewise.
1332 (ppc_linux_record_signal): Likewise.
1333 (ppu2spu_prev_register): Likewise.
1334 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1335 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1336 (ppcobsd_store_registers): Likewise.
1337 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1338 Likewise.
1339 (ppc_ravenscar_generic_store_registers): Likewise.
1340 * procfs.c (procfs_fetch_registers): Likewise.
1341 (procfs_store_registers): Likewise.
1342 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1343 (ravenscar_store_registers): Likewise.
1344 (ravenscar_prepare_to_store): Likewise.
1345 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1346 * record-full.c (record_full_wait_1): Likewise.
1347 (record_full_registers_change): Likewise.
1348 (record_full_store_registers): Likewise.
1349 (record_full_core_fetch_registers): Likewise.
1350 (record_full_save): Likewise.
1351 (record_full_goto_insn): Likewise.
1352 * regcache.c (regcache_register_size): Likewise.
1353 (get_regcache_arch): Remove.
1354 (regcache_read_pc): Likewise.
1355 * regcache.h (get_regcache_arch): Remove.
1356 * remote-sim.c (gdbsim_fetch_register): Likewise.
1357 (gdbsim_store_register): Likewise.
1358 * remote.c (fetch_register_using_p): Likewise.
1359 (send_g_packet): Likewise.
1360 (remote_prepare_to_store): Likewise.
1361 (store_registers_using_G): Likewise.
1362 * reverse.c (save_bookmark_command): Likewise.
1363 (goto_bookmark_command): Likewise.
1364 * rs6000-aix-tdep.c (branch_dest): Likewise.
1365 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1366 (fetch_register): Likewise.
1367 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1368 (ppc_collect_reg): Likewise.
1369 (ppc_collect_gregset): Likewise.
1370 (ppc_collect_fpregset): Likewise.
1371 (ppc_collect_vsxregset): Likewise.
1372 (ppc_collect_vrregset): Likewise.
1373 (ppc_displaced_step_hw_singlestep): Likewise.
1374 (rs6000_pseudo_register_read): Likewise.
1375 (rs6000_pseudo_register_write): Likewise.
1376 * s390-linux-nat.c (supply_gregset): Likewise.
1377 (fill_gregset): Likewise.
1378 (s390_linux_fetch_inferior_registers): Likewise.
1379 * s390-linux-tdep.c (s390_write_pc): Likewise.
1380 (s390_software_single_step): Likewise.
1381 (s390_all_but_pc_registers_record): Likewise.
1382 (s390_linux_syscall_record): Likewise.
1383 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1384 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1385 (shnbsd_store_inferior_registers): Likewise.
1386 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1387 (sh_extract_return_value_fpu): Likewise.
1388 (sh_store_return_value_nofpu): Likewise.
1389 (sh_corefile_supply_regset): Likewise.
1390 (sh_corefile_collect_regset): Likewise.
1391 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1392 (sh64_store_return_value): Likewise.
1393 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1394 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1395 (sparc_store_inferior_registers): Likewise.
1396 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1397 (sparc_ravenscar_prepare_to_store): Likewise.
1398 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1399 (sparc_analyze_control_transfer): Likewise.
1400 (sparc_step_trap): Likewise.
1401 (sparc_software_single_step): Likewise.
1402 (sparc32_gdbarch_init): Likewise.
1403 (sparc_supply_rwindow): Likewise.
1404 (sparc_collect_rwindow): Likewise.
1405 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1406 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1407 (sparc64nbsd_collect_gregset): Likewise.
1408 (sparc64nbsd_supply_fpregset): Likewise.
1409 (sparc64nbsd_collect_fpregset): Likewise.
1410 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1411 (sparc64_supply_gregset): Likewise.
1412 (sparc64_collect_gregset): Likewise.
1413 (sparc64_supply_fpregset): Likewise.
1414 (sparc64_collect_fpregset): Likewise.
1415 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1416 * spu-tdep.c (spu_unwind_sp): Likewise.
1417 (spu2ppu_prev_register): Likewise.
1418 (spu_memory_remove_breakpoint): Likewise.
1419 * stack.c (return_command): Likewise.
1420 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1421 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1422 * tracefile.c (trace_save_ctf): Likewise.
1423 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1424 (do_windows_store_inferior_registers): Likewise.
1425 (windows_resume): Likewise.
1426 * xtensa-linux-nat.c (fill_gregset): Likewise.
1427 (supply_gregset_reg): Likewise.
1428 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1429 (xtensa_register_read_masked): Likewise.
1430 (xtensa_supply_gregset): Likewise.
1431 (xtensa_extract_return_value): Likewise.
1432 (xtensa_store_return_value): Likewise.
1433
edd079d9
UW
14342017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1435
1436 * doublest.c (floatformat_from_string): New function.
1437 * doublest.h (floatformat_from_string): Add prototype.
1438
1439 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1440 (OP_FLOAT): ... this.
1441 * expression.h: Do not include "doublest.h".
1442 (union exp_element): Replace doubleconst and decfloatconst by
1443 new element floatconst.
1444 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1445 (ada_evaluate_subexp): Likewise.
1446 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1447 OP_DOUBLE and OP_DECFLOAT.
1448 * expprint.c (print_subexp_standard): Likewise.
1449 (dump_subexp_body_standard): Likewise.
1450 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1451
1452 * parse.c: Include "dfp.h".
1453 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1454 (write_exp_elt_floatcst): New function.
1455 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1456 and OP_DECFLOAT.
1457 (operator_check_standard): Likewise.
1458 (parse_float): Do not accept suffix. Take type as input. Return bool.
1459 Return target format buffer instead of host DOUBLEST.
1460 Use floatformat_from_string and decimal_from_string to parse
1461 either binary or decimal floating-point types.
1462 (parse_c_float): Remove.
1463 * parser-defs.h: Do not include "doublest.h".
1464 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1465 (write_exp_elt_floatcst): Add prototype.
1466 (parse_float): Update prototype.
1467 (parse_c_float): Remove.
1468
1469 * c-exp.y: Do not include "dfp.h".
1470 (typed_val_float): Use byte buffer instead of DOUBLEST.
1471 (typed_val_decfloat): Remove.
1472 (DECFLOAT): Remove.
1473 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1474 (parse_number): Update to new parse_float interface.
1475 Parse suffixes and determine type before calling parse_float.
1476 Handle decimal and binary FP types the same way.
1477
1478 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1479 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1480 (parse_number): Update to new parse_float interface.
1481 Parse suffixes and determine type before calling parse_float.
1482
1483 * f-exp.y: Replace dval by typed_val_float.
1484 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1485 (parse_number): Use parse_float instead of atof.
1486
1487 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1488 (parse_go_float): Remove.
1489 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1490 (parse_number): Call parse_float instead of parse_go_float.
1491 Parse suffixes and determine type before calling parse_float.
1492
1493 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1494 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1495 (parse_number): Update to new parse_float interface.
1496 Parse suffixes and determine type before calling parse_float.
1497
1498 * m2-exp.y: Replace dval by byte buffer val.
1499 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1500 (parse_number): Call parse_float instead of atof.
1501
1502 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1503 (lex_number): Call parse_float instead of strtod.
1504 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1505 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1506 Use write_exp_elt_floatcst.
1507 (unit_testing): Remove static variable.
1508 (rust_type): Do not check unit_testing.
1509 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1510
1511 * ada-exp.y (type_float, type_double): Remove.
1512 (typed_val_float): Use byte buffer instead of DOUBLEST.
1513 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1514 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1515
cc628f3d
AH
15162017-10-25 Alan Hayward <alan.hayward@arm.com>
1517
1518 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1519 * arch/aarch64.h: New file.
1520
09a7c6aa
UW
15212017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1522
1523 * dfp.h (decimal_from_string): Use const reference for argument.
1524 * dfp.c (decimal_from_string): Likewise.
1525
8ba0dd51
UW
15262017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1527
1528 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1529 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1530 * mips-tdep.c (mips_print_fp_register): Likewise.
1531
16e812b2
UW
15322017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1533
1534 * common/format.h (enum argclass): Replace decfloat_arg by
1535 dec32float_arg, dec64float_arg, and dec128float_arg.
1536 * common/format.c (parse_format_string): Update to return
1537 new decimal float argument classes.
1538
1539 * printcmd.c (printf_decfloat): Rename to ...
1540 (printf_floating): ... this. Add argclass argument, and use it
1541 instead of parsing the format string again. Add support for
1542 binary floating-point values, using floatformat_to_string.
1543 Convert value to the target format if it doesn't already match.
1544 (ui_printf): Call printf_floating instead of printf_decfloat,
1545 also for double_arg / long_double_arg. Pass argclass.
1546
1547 * dfp.c (decimal_to_string): Add format string argument.
1548 * dfp.h (decimal_to_string): Likewise.
1549
1550 * doublest.c (floatformat_to_string): Add format string argument.
1551 * doublest.h (floatformat_to_string): Likewise.
1552
fdf0cbc2
UW
15532017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1554
1555 * doublest.c (floatformat_precision): New routine.
1556 (floatformat_to_string): Likewise.
1557 * doublest.c (floatformat_to_string): Add prototype.
1558
1559 * printcmd.c (print_scalar_formatted): Only call print_floating
1560 on floating-point types.
1561 * valprint.c: Do not include "floatformat.h".
1562 (generic_val_print_decfloat): Remove.
1563 (generic_val_print): Call generic_val_print_float for both
1564 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1565 (print_floating): Use floatformat_to_string. Handle decimal float.
1566 (print_decimal_floating): Remove, merge into floatformat_to_string.
1567 * value.h (print_decimal_floating): Remove.
1568
1569 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1570
5033013f
UW
15712017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1572
1573 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1574
a664f67e
SM
15752017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * memattr.h: Don't include vec.h.
1578 (struct mem_attrib): Initialize fields.
1579 <unknown>: New static method.
1580 (struct mem_region): Add constructors, operator<, initialize
1581 fields.
1582 * memattr.c: Include algorithm.
1583 (default_mem_attrib, unknown_mem_attrib): Remove.
1584 (user_mem_region_list): New global.
1585 (target_mem_region_list, mem_region_list): Change type to
1586 std::vector<mem_region>.
1587 (mem_use_target): Now a function.
1588 (target_mem_regions_valid): Change type to bool.
1589 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1590 (require_user_regions): Adjust.
1591 (require_target_regions): Adjust.
1592 (create_mem_region): Adjust.
1593 (lookup_mem_region): Adjust.
1594 (invalidate_target_mem_regions): Adjust.
1595 (mem_clear): Rename to...
1596 (user_mem_clear): ... this, and adjust.
1597 (mem_command): Adjust.
1598 (info_mem_command): Adjust.
1599 (mem_enable, enable_mem_command, mem_disable,
1600 disable_mem_command): Adjust.
1601 (mem_delete): Adjust.
1602 (delete_mem_command): Adjust.
1603 * memory-map.h (parse_memory_map): Return an std::vector.
1604 * memory-map.c (parse_memory_map): Likewise.
1605 (struct memory_map_parsing_data): Add constructor.
1606 <memory_map>: Point to std::vector.
1607 (memory_map_start_memory): Adjust.
1608 (memory_map_end_memory): Adjust.
1609 (memory_map_end_property): Adjust.
1610 (clear_result): Remove.
1611 * remote.c (remote_memory_map): Return an std::vector.
1612 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1613 Remove.
1614 (target_debug_print_mem_region_vector): New.
1615 * target-delegates.c: Regenerate.
1616 * target.h (mem_region_vector): New typedef.
1617 (to_memory_map): Return mem_region_vector.
1618 (target_memory_map): Return an std::vector.
1619 * target.c (target_memory_map): Return an std::vector.
1620 (flash_erase_command): Adjust.
1621
6e17c565
SM
16222017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1623
1624 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1625 Change type to std::string.
1626 (memory_map_start_property): Adjust.
1627 (memory_map_end_property): Adjust.
1628
cfba9872
SM
16292017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1630
1631 * infrun.h: Include common/byte-vector.h.
1632 (struct displaced_step_closure): New struct.
1633 (struct buf_displaced_step_closure): New struct.
1634 * infrun.c (displaced_step_closure::~displaced_step_closure):
1635 Provide default implementation.
1636 (displaced_step_clear): Deallocate step closure with delete.
1637 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1638 (aarch64_displaced_step_closure): ... this, extend
1639 displaced_step_closure.
1640 (aarch64_displaced_step_data) <dsc>: Change type to
1641 aarch64_displaced_step_closure.
1642 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1643 unique_ptr.
1644 (aarch64_displaced_step_fixup): Add cast for displaced step
1645 closure.
1646 * amd64-tdep.c (displaced_step_closure): Rename to ...
1647 (amd64_displaced_step_closure): ... this, extend
1648 displaced_step_closure.
1649 <insn_buf>: Change type to std::vector<gdb_byte>.
1650 <max_len>: Remove.
1651 (fixup_riprel): Change type of DSC parameter, adjust to type
1652 change of insn_buf.
1653 (fixup_displaced_copy): Change type of DSC parameter.
1654 (amd64_displaced_step_copy_insn): Instantiate
1655 amd64_displaced_step_closure.
1656 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1657 to type change of insn_buf.
1658 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1659 parameter DSC.
1660 (arm_linux_copy_svc): Likewise.
1661 (cleanup_kernel_helper_return): Likewise.
1662 (arm_catch_kernel_helper_return): Likewise.
1663 (arm_linux_displaced_step_copy_insn): Instantiate
1664 arm_displaced_step_closure.
1665 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1666 (displaced_read_reg): Change type of parameter DSC.
1667 (branch_write_pc): Likewise.
1668 (load_write_pc): Likewise.
1669 (alu_write_pc): Likewise.
1670 (displaced_write_reg): Likewise.
1671 (arm_copy_unmodified): Likewise.
1672 (thumb_copy_unmodified_32bit): Likewise.
1673 (thumb_copy_unmodified_16bit): Likewise.
1674 (cleanup_preload): Likewise.
1675 (install_preload): Likewise.
1676 (arm_copy_preload): Likewise.
1677 (thumb2_copy_preload): Likewise.
1678 (install_preload_reg): Likewise.
1679 (arm_copy_preload_reg): Likewise.
1680 (cleanup_copro_load_store): Likewise.
1681 (install_copro_load_store): Likewise.
1682 (arm_copy_copro_load_store) Likewise.
1683 (thumb2_copy_copro_load_store): Likewise.
1684 (cleanup_branch): Likewise.
1685 (install_b_bl_blx): Likewise.
1686 (arm_copy_b_bl_blx): Likewise.
1687 (thumb2_copy_b_bl_blx): Likewise.
1688 (thumb_copy_b): Likewise.
1689 (install_bx_blx_reg): Likewise.
1690 (arm_copy_bx_blx_reg): Likewise.
1691 (thumb_copy_bx_blx_reg): Likewise.
1692 (cleanup_alu_imm): Likewise.
1693 (arm_copy_alu_imm): Likewise.
1694 (thumb2_copy_alu_imm): Likewise.
1695 (cleanup_alu_reg): Likewise.
1696 (install_alu_reg): Likewise.
1697 (arm_copy_alu_reg): Likewise.
1698 (thumb_copy_alu_reg): Likewise.
1699 (cleanup_alu_shifted_reg): Likewise.
1700 (install_alu_shifted_reg): Likewise.
1701 (arm_copy_alu_shifted_reg): Likewise.
1702 (cleanup_load): Likewise.
1703 (cleanup_store): Likewise.
1704 (arm_copy_extra_ld_st): Likewise.
1705 (install_load_store): Likewise.
1706 (thumb2_copy_load_literal): Likewise.
1707 (thumb2_copy_load_reg_imm): Likewise.
1708 (arm_copy_ldr_str_ldrb_strb): Likewise.
1709 (cleanup_block_load_all): Likewise.
1710 (cleanup_block_store_pc): Likewise.
1711 (cleanup_block_load_pc): Likewise.
1712 (arm_copy_block_xfer): Likewise.
1713 (thumb2_copy_block_xfer): Likewise.
1714 (cleanup_svc): Likewise.
1715 (install_svc): Likewise.
1716 (arm_copy_svc): Likewise.
1717 (thumb_copy_svc): Likewise.
1718 (arm_copy_undef): Likewise.
1719 (thumb_32bit_copy_undef): Likewise.
1720 (arm_copy_unpred): Likewise.
1721 (arm_decode_misc_memhint_neon): Likewise.
1722 (arm_decode_unconditional): Likewise.
1723 (arm_decode_miscellaneous): Likewise.
1724 (arm_decode_dp_misc): Likewise.
1725 (arm_decode_ld_st_word_ubyte): Likewise.
1726 (arm_decode_media): Likewise.
1727 (arm_decode_b_bl_ldmstm): Likewise.
1728 (arm_decode_ext_reg_ld_st): Likewise.
1729 (thumb2_decode_dp_shift_reg): Likewise.
1730 (thumb2_decode_ext_reg_ld_st): Likewise.
1731 (arm_decode_svc_copro): Likewise.
1732 (thumb2_decode_svc_copro): Likewise.
1733 (install_pc_relative): Likewise.
1734 (thumb_copy_pc_relative_16bit): Likewise.
1735 (thumb_decode_pc_relative_16bit): Likewise.
1736 (thumb_copy_pc_relative_32bit): Likewise.
1737 (thumb_copy_16bit_ldr_literal): Likewise.
1738 (thumb_copy_cbnz_cbz): Likewise.
1739 (thumb2_copy_table_branch): Likewise.
1740 (cleanup_pop_pc_16bit_all): Likewise.
1741 (thumb_copy_pop_pc_16bit): Likewise.
1742 (thumb_process_displaced_16bit_insn): Likewise.
1743 (decode_thumb_32bit_ld_mem_hints): Likewise.
1744 (thumb_process_displaced_32bit_insn): Likewise.
1745 (thumb_process_displaced_insn): Likewise.
1746 (arm_process_displaced_insn): Likewise.
1747 (arm_displaced_init_closure): Likewise.
1748 (arm_displaced_step_fixup): Add cast for closure.
1749 * arm-tdep.h: Include infrun.h.
1750 (displaced_step_closure): Rename to ...
1751 (arm_displaced_step_closure): ... this, extend
1752 displaced_step_closure.
1753 <u::svc::copy_svc_os>: Change type of parameter DSC.
1754 <cleanup>: Likewise.
1755 (arm_process_displaced_insn): Likewise.
1756 (arm_displaced_init_closure): Likewise.
1757 (displaced_read_reg): Likewise.
1758 (displaced_write_reg): Likewise.
1759 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1760 Adjust.
1761 * i386-tdep.h: Include infrun.h.
1762 (i386_displaced_step_closure): New typedef.
1763 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1764 i386_displaced_step_closure.
1765 (i386_displaced_step_fixup): Adjust.
1766 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1767 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1768 and unique_ptr.
1769 (ppc_displaced_step_fixup): Adjust.
1770 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1771 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1772 and unique_ptr.
1773 (s390_displaced_step_fixup): Adjust.
1774
b392b304
SM
17752017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1776
1777 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1778 Remove declarations.
1779
d5833c62
TT
17802017-10-20 Tom Tromey <tom@tromey.com>
1781
1782 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1783 std::vector.
1784 (gdb_bfd_record_inclusion): Update.
1785 (bfdp): Remove typedef.
1786
06d5bbc8
TT
17872017-10-20 Tom Tromey <tom@tromey.com>
1788
1789 * gdb_bfd.c (gdb_bfd_ref): Use new.
1790 (struct gdb_bfd_data): Add constructor, destructor, and member
1791 initializers.
1792 (gdb_bfd_unref): Use delete.
1793
2712ce2e
TT
17942017-10-20 Tom Tromey <tom@tromey.com>
1795
1796 * exec.c (exec_file_attach): Use new_bfd_ref.
1797 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1798 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1799 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1800 new_bfd_ref.
1801 * gdb_bfd.h (new_bfd_ref): New function.
1802
fcc8fb2f
PA
18032017-10-20 Pedro Alves <palves@redhat.com>
1804
1805 * main.c (captured_command_loop): Add attribute noinline.
1806
4c2287b0
SM
18072017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1808
1809 * interps.c (struct interp_factory): Add constructor.
1810 (interp_factory_p): Remove typedef.
1811 (DEF_VEC_P(interp_factory_p)): Remove.
1812 (interpreter_factories): Change type to std::vector.
1813 (interp_factory_register): Adjust.
1814 (interp_lookup): Adjust.
1815 (interpreter_completer): Adjust.
1816
3d415c26
TT
18172017-10-19 Tom Tromey <tom@tromey.com>
1818
1819 * break-catch-syscall.c (catch_syscall_completer): Use
1820 std::string, gdb::unique_xmalloc_ptr.
1821
395423c4
TT
18222017-10-19 Tom Tromey <tom@tromey.com>
1823
1824 * infcall.c (call_function_by_hand_dummy): Use std::string.
1825
54f70bc1
TT
18262017-10-19 Tom Tromey <tom@tromey.com>
1827
1828 * mi/mi-main.c (mi_cmd_execute): Update.
1829 * top.h (prepare_execute_command): Return scoped_value_mark.
1830 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1831 Add move constructor.
1832 * top.c (prepare_execute_command): Return scoped_value_mark.
1833 (execute_command): Update.
1834
63929e84
PA
18352017-10-19 Pedro Alves <palves@redhat.com>
1836
1837 * xml-support.c (xml_fetch_content_from_file): Check fread's
1838 return.
1839
a75868f5
PA
18402017-10-19 Pedro Alves <palves@redhat.com>
1841
1842 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1843 async.
1844 (handle_error_fd): New function.
1845 (ser_base_async): Add/delete an event loop file handler for
1846 error_fd.
1847
2edf834e
PA
18482017-10-19 Pedro Alves <palves@redhat.com>
1849
1850 * xml-support.c (xml_fetch_content_from_file): Don't read in
1851 chunks. Instead use fseek to determine the file's size, and read
1852 it in one go.
1853
c8ba13ad
KS
18542017-11-18 Keith Seitz <keiths@redhat.com>
1855
1856 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1857 types.
1858 Add whitespace to front of type name.
1859
37534686
KS
18602017-10-18 Keith Seitz <keiths@redhat.com>
1861
1862 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1863 DW_AT_accessibility.
1864
28c7c158
YQ
18652017-10-18 Yao Qi <yao.qi@linaro.org>
1866
1867 * features/tic6x-c62x-linux.c: Remove.
1868
30f0b101
TT
18692017-10-17 Tom Tromey <tom@tromey.com>
1870
1871 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1872 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1873 (do_mixed_source_and_assembly): Likewise.
1874
57e12da9
TT
18752017-10-17 Tom Tromey <tom@tromey.com>
1876
1877 * regcache.c (regcache::xfer_part): Remove assertion.
1878
7b700999
PA
18792017-10-17 Pedro Alves <palves@redhat.com>
1880
1881 * xml-support.c (xml_fetch_content_from_file): Call
1882 unique_ptr::release() instead unique_ptr::get() when passing
1883 through xrealloc.
1884
d3037ba6
YQ
18852017-10-17 Yao Qi <yao.qi@linaro.org>
1886
1887 * regcache.c (regcache::xfer_part): Remove parameters read and
1888 write, add parameter is_raw. All callers are updated.
1889
83d5a34d
KS
18902017-10-16 Keith Seitz <keiths@redhat.com>
1891
1892 * c-typeprint.c (enum access_specifier): Moved here from
1893 c_type_print_base.
1894 (output_access_specifier): New function.
1895 (c_type_print_base): Consider typedefs when assessing
1896 whether access labels are needed.
1897 Use output_access_specifier as needed.
1898 Output access specifier for typedefs, if needed.
1899 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1900 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1901 fields.
1902 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1903 accessor macros.
1904
87028b87
TT
19052017-10-16 Tom Tromey <tom@tromey.com>
1906
1907 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1908 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1909 * target.c (target_fileio_read_stralloc): Update.
1910 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1911 * target.h (target_fileio_read_stralloc): Return
1912 unique_xmalloc_ptr.
1913
b7b030ad
TT
19142017-10-16 Tom Tromey <tom@tromey.com>
1915
1916 * xml-syscall.c (xml_init_syscalls_info): Update.
1917 * xml-support.c (xinclude_start_include): Update.
1918 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1919 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1920 (xml_fetch_content_from_file): Likewise.
1921 * osdata.c (get_osdata): Update.
1922 * target.h (target_read_stralloc, target_get_osdata): Return
1923 unique_xmalloc_ptr.
1924 * solib-aix.c (solib_aix_get_library_list): Update.
1925 * solib-target.c (solib_target_current_sos): Update.
1926 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1927 * xml-tdesc.c (fetch_available_features_from_target): Update.
1928 (target_fetch_description_xml): Update.
1929 (file_read_description_xml): Update.
1930 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1931 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1932 (remote_pid_to_exec_file): Update.
1933 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1934 (target_get_osdata): Likewise.
1935
b80406ac
TT
19362017-10-16 Tom Tromey <tom@tromey.com>
1937
1938 * remote.c (remote_register_number_and_offset): Use std::vector.
1939 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1940 (putpkt_binary): Use gdb::def_vector.
1941 (compare_sections_command): Use gdb::byte_vector.
1942
a90ecff8
TT
19432017-10-16 Tom Tromey <tom@tromey.com>
1944
1945 * ppc-linux-nat.c (hwdebug_insert_point): Use
1946 gdb::unique_xmalloc_ptr, XDUP.
1947
2dc0e219
TT
19482017-10-16 Tom Tromey <tom@tromey.com>
1949
1950 * probe.c (parse_probes): Use std::string.
1951 (info_probes_for_ops, enable_probes_command)
1952 (disable_probes_command): Remove cleanups.
1953
b05628f0
TT
19542017-10-16 Tom Tromey <tom@tromey.com>
1955
1956 * buildsym.c (block_compar): Remove.
1957 (end_symtab_get_static_block): Use std::vector.
1958
a79b1bc6
SM
19592017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1960
1961 * memrange.h (struct mem_range): Define operator< and operator==.
1962 (mem_range_s): Remove.
1963 (DEF_VEC_O (mem_range_s)): Remove.
1964 (normalize_mem_ranges): Change parameter type to std::vector.
1965 * memrange.c (compare_mem_ranges): Remove.
1966 (normalize_mem_ranges): Change parameter type to std::vector,
1967 adjust to vector change.
1968 * exec.c (section_table_available_memory): Return vector, remove
1969 parameter.
1970 (section_table_read_available_memory): Adjust to std::vector
1971 change.
1972 * remote.c (remote_read_bytes): Adjust to std::vector
1973 change.
1974 * tracepoint.h (traceframe_available_memory): Change parameter
1975 type to std::vector.
1976 * tracepoint.c (traceframe_available_memory): Change parameter
1977 type to std::vector, adjust.
1978 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1979 std::vector change.
1980 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1981 unittests/memrange-selftests.c.
1982 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1983 * gdb/unittests/memrange-selftests.c: New file.
1984
63f0e930
PA
19852017-10-16 Pedro Alves <palves@redhat.com>
1986
1987 * elfread.c (probe_key_free): Rename range-for variable.
1988 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1989 (find_probe_by_pc, collect_probes): Rename range-for variable.
1990
c40c7bfc
YQ
19912017-10-16 Yao Qi <yao.qi@linaro.org>
1992
1993 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1994 * features/tic6x-c62x.c: Remove.
1995 * features/tic6x-c64x-linux.c: Remove.
1996 * features/tic6x-c64x.c: Remove.
1997 * features/tic6x-c64xp-linux.c: Remove.
1998 * features/tic6x-c64xp.c: Remove.
1999 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2000 initialize_tdesc_tic6x_*_linux functions.
2001 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2002 initialize_tdesc_tic6x_* functions.
2003
df27ae6a
YQ
20042017-10-16 Yao Qi <yao.qi@linaro.org>
2005
2006 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2007 tic6x-c62x.
2008 * regformats/tic6x-c62x.dat: Remove.
2009 * regformats/tic6x-c64x.dat: Remove.
2010 * regformats/tic6x-c64xp.dat: Remove.
2011
86766165
SM
20122017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2015 (the !HAVE_LIBEXPAT version).
2016
824dfcc3
SM
20172017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2018
2019 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2020 const.
2021
2098b393
SM
20222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2023
2024 * target.h: Include tracepoint.h.
2025 (enum trace_find_type): Move to tracepoint.h.
2026 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2027 * tracepoint.h: Don't include target.h
2028 (enum trace_find_type): Move from target.h.
2029 (parse_traceframe_info): Return a unique ptr.
2030 * tracepoint.c (current_traceframe_info): Change type to unique
2031 ptr.
2032 (free_traceframe_info): Remove.
2033 (clear_traceframe_info): Don't manually free
2034 current_traceframe_info.
2035 (free_result): Remove.
2036 (parse_traceframe_info): Return a unique ptr.
2037 (get_traceframe_info): Adjust to unique ptr.
2038 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2039 * remote.c (remote_traceframe_info): Return a unique ptr.
2040 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2041 ptr.
2042 * target-debug.h (target_debug_print_traceframe_info_up): New
2043 macro.
2044 * target-delegates.c: Regenerate.
2045
4cdd21a8
SM
20462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2047
2048 * memrange.h (struct mem_range): Add constructors.
2049 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2050 std::vector<mem_range>.
2051 * tracepoint.c (free_traceframe_info): Don't manually free
2052 vector.
2053 (traceframe_info_start_memory): Adjust to vector change.
2054 (traceframe_available_memory): Likewise.
2055 * tracefile-tfile.c (build_traceframe_info): Likewise.
2056 * ctf.c (ctf_traceframe_info): Likewise.
2057
d0d292a2
SM
20582017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2059
2060 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2061 std::vector<int>.
2062 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2063 (traceframe_info_start_tvar): Adjust to vector change.
2064 (parse_traceframe_info): Allocate with new.
2065 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2066 vector change.
2067 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2068 change.
2069 tfile_traceframe_info): Allocate with new.
2070 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2071 change.
2072
8d3c73ef
SM
20732017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * tracepoint.c (traceframe_info): Rename to...
2076 (current_traceframe_info): ...this.
2077 (clear_traceframe_info): Adjust.
2078 (get_traceframe_info): Adjust.
2079
b129dcac
SM
20802017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * nat/linux-osdata.c: Include algorithm.
2083 (compare_processes): Remove.
2084 (struct pid_pgid_entry): New struct.
2085 (linux_xfer_osdata_processgroups): Use std::vector instead of
2086 XNEWVEC.
2087
af5bf4ad
SM
20882017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2089
2090 * objfiles.h: Don't include symfile.h.
2091 (struct partial_symbol): Remove forward-declaration.
2092 (struct objfile) <global_psymbols, static_psymbols>: Change type
2093 to std::vector<partial_symbol *>.
2094 * objfiles.c (objfile::objfile): Don't memset those fields.
2095 (objfile::~objfile): Don't free those fields.
2096 * psympriv.h (struct psymbol_allocation_list): Remove
2097 forward-declaration.
2098 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2099 to std::vector.
2100 (start_psymtab_common): Change parameters to std::vector.
2101 * psymtab.c: Include algorithm.
2102 (require_partial_symbols): Call shrink_to_fit.
2103 (find_pc_sect_psymbol): Adjust to vector change.
2104 (match_partial_symbol): Likewise.
2105 (lookup_partial_symbol): Likewise.
2106 (psym_relocate): Likewise.
2107 (dump_psymtab): Likewise.
2108 (recursively_search_psymtabs): Likewise.
2109 (compare_psymbols): Remove.
2110 (sort_pst_symbols): Adjust to vector change.
2111 (start_psymtab_common): Likewise.
2112 (end_psymtab_common): Likewise.
2113 (psymbol_bcache_full): De-constify return value.
2114 (add_psymbol_to_bcache): Likewise.
2115 (extend_psymbol_list): Remove.
2116 (append_psymbol_to_list): Adjust to vector change.
2117 (add_psymbol_to_list): Likewise.
2118 (init_psymbol_list): Likewise.
2119 (maintenance_info_psymtabs): Likewise.
2120 (maintenance_check_psymtabs): Likewise.
2121 * symfile.h (struct psymbol_allocation_list): Remove.
2122 * symfile.c (reread_symbols): Adjust to vector change.
2123 * dbxread.c (start_psymtab): Change type of parameters.
2124 (dbx_symfile_read): Adjust to vector change.
2125 (read_dbx_symtab): Likewise.
2126 (start_psymtab): Change type of parameters.
2127 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2128 (create_partial_symtab): Likewise.
2129 (add_partial_symbol): Likewise.
2130 (write_one_signatured_type): Likewise.
2131 (recursively_write_psymbols): Likewise.
2132 * mdebugread.c (parse_partial_symbols): Likewise.
2133 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2134 (scan_xcoff_symtab): Adjust to vector change.
2135 (xcoff_initial_scan): Likewise.
2136
3ec5942f
SM
21372017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2140
2399fe6a
YQ
21412017-10-13 Yao Qi <yao.qi@linaro.org>
2142
2143 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2144 Remove s390x-*-expedite, add s390x-expedite.
2145
4bf3f4a8
YQ
21462017-10-13 Yao Qi <yao.qi@linaro.org>
2147
2148 * features/s390-gs-linux64.c: Regenerated.
2149 * features/s390x-gs-linux64.c: Regenerated.
2150
9e86da07
TT
21512017-10-13 Tom Tromey <tom@tromey.com>
2152
2153 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2154 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2155 delete.
2156 * symfile.c (symbol_file_add_with_addrs): Use new.
2157 (symbol_file_add_separate): Update comment.
2158 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2159 * jit.c (jit_object_close_impl): Use new.
2160 (jit_unregister_code): Use delete.
2161 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2162 (~objfile): Rename from free_objfile.
2163 (free_objfile_separate_debug, do_free_objfile_cleanup)
2164 (free_all_objfiles, objfile_purge_solibs): Use delete.
2165 * objfiles.h (struct objfile): Add constructor and destructor.
2166 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2167 (allocate_objfile, free_objfile): Don't declare.
2168 (struct objstats): Add initializers.
2169
c2508e90
SM
21702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2171
2172 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2173 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2174 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2175 * gdbarch.h: Regenerate.
2176 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2177 Adjust comment.
2178 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2179 (i386_displaced_step_fixup): Adjust comment.
2180 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2181
a900ff72
TT
21822017-10-12 Tom Tromey <tom@tromey.com>
2183
2184 * prologue-value.h (pv_area::store_would_trash): Return bool.
2185 (pv_area::find_reg): Likewise.
2186 * prologue-value.c (pv_area::store_would_trash): Return bool.
2187 (pv_area::find_reg): Likewise.
2188
f7b7ed97
TT
21892017-10-12 Tom Tromey <tom@tromey.com>
2190
2191 * s390-linux-tdep.c (s390_store, s390_load)
2192 (s390_check_for_saved, s390_analyze_prologue): Update.
2193 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2194 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2195 * prologue-value.h (class pv_area): Move from prologue-value.c.
2196 Change names of members. Add constructor, destructor, member
2197 functions.
2198 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2199 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2200 (pv_area_fetch, pv_area_scan): Don't declare.
2201 * prologue-value.c (struct pv_area::area_entry): Now member of
2202 pv_area.
2203 (struct pv_area): Move to prologue-value.h.
2204 (pv_area::pv_area): Rename from make_pv_area.
2205 (pv_area::~pv_area): Rename from free_pv_area.
2206 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2207 (clear_entries, find_entry, overlaps, store_would_trash, store)
2208 (fetch, find_reg, scan): Now member of pv_area.
2209 Remove "area" argument. Update.
2210 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2211 Update.
2212 * mn10300-tdep.c (push_reg, check_for_saved)
2213 (mn10300_analyze_prologue): Update.
2214 * mep-tdep.c (is_arg_spill, check_for_saved)
2215 (mep_analyze_prologue): Update.
2216 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2217 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2218 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2219 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2220 Update.
2221 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2222 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2223
466eecee
SM
22242017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2225
2226 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2227 * linux-nat.c (linux_nat_delete_thread): New variable.
2228 (lwp_free): Invoke linux_nat_delete_thread if set.
2229 (linux_nat_set_delete_thread): New function.
2230 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2231 thread delete callback.
2232 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2233 (_initialize_arm_linux_nat): Assign thread delete callback.
2234 * s390-linux-nat.c (s390_delete_thread): New function.
2235 (_initialize_s390_nat): Assign thread delete callback.
2236 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2237 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2238 function.
2239 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2240 declaration.
2241 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2242 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2243
f71c8822
TT
22442017-10-09 Tom Tromey <tom@tromey.com>
2245
2246 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2247 std::string.
2248 * tui/tui-layout.c (enum tui_status): Use std::string.
2249
981a3fb3
TT
22502017-10-11 Tom Tromey <tom@tromey.com>
2251
2252 * gdbthread.h (thread_command): Constify.
2253 * inferior.h (detach_command): Constify.
2254 * top.h (set_history, show_history): Constify.
2255 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2256 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2257 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2258 * printcmd.c (set_command): Constify.
2259 (non_const_set_command): New function.
2260 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2261 * breakpoint.c (enable_command, disable_command, delete_command)
2262 (catch_command, tcatch_command, set_breakpoint_cmd)
2263 (show_breakpoint_cmd): Constify.
2264 * macrocmd.c (macro_command): Constify.
2265 * infcmd.c (unset_command, kill_command, detach_command)
2266 (info_proc_cmd): Constify.
2267 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2268 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2269 (info_auto_load_cmd): Constify.
2270 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2271 (unset_tdesc_cmd): Constify.
2272 * ada-lang.c (set_ada_command, show_ada_command)
2273 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2274 * guile/guile.c (set_guile_command, show_guile_command)
2275 (info_guile_command): Constify.
2276 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2277 Constify.
2278 * skip.c (skip_command): Constify.
2279 * compile/compile.c (_initialize_compile): Constify.
2280 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2281 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2282 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2283 (maint_btrace_pt_show_cmd): Constify.
2284 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2285 Constify.
2286 * python/python.c (user_show_python, user_set_python): Constify.
2287 * mips-tdep.c (set_mips_command, show_mips_command)
2288 (set_mipsfpu_command): Constify.
2289 * record-btrace.c (cmd_record_btrace_start)
2290 (cmd_set_record_btrace, cmd_show_record_btrace)
2291 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2292 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2293 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2294 Constify.
2295 * symfile.c (overlay_command): Constify.
2296 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2297 * cli/cli-logging.c (set_logging_command, show_logging_command):
2298 Constify.
2299 * cli/cli-dump.c (dump_command, append_command)
2300 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2301 (tekhex_dump_command, binary_dump_command)
2302 (binary_append_command): Constify.
2303 * cli/cli-decode.c (struct cmd_list_element): Change type of
2304 "fun".
2305 * cli/cli-cmds.c (info_command, show_command, set_debug)
2306 (show_debug): Constify.
2307 (show_command): Add non-const overload.
2308 * top.c (set_history, show_history): Constify.
2309 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2310 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2311 * target.c (target_command): Constify.
2312 * sparc64-tdep.c (info_adi_command): Constify.
2313 * record-full.c (cmd_record_full_start): Constify.
2314 (set_record_full_command): Constify. Fix typo.
2315 (show_record_full_command): Constify.
2316 * thread.c (thread_command, thread_apply_command): Constify.
2317 * memattr.c (dummy_cmd): Constify.
2318 * value.c (function_command): Constify.
2319 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2320 * probe.c (info_probes_command): Constify.
2321 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2322 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2323 (show_thread_cmd, set_thread_default_cmd)
2324 (show_thread_default_cmd): Constify.
2325 (check_empty): Constify.
2326 * tracepoint.c (tfind_command): Constify.
2327 * cp-support.c (maint_cplus_command): Constify.
2328 * windows-tdep.c (info_w32_command): Constify.
2329 * record.c (cmd_record_start, set_record_command)
2330 (show_record_command, info_record_command, cmd_record_goto):
2331 Constify.
2332 * ravenscar-thread.c (set_ravenscar_command)
2333 (show_ravenscar_command): Constify.
2334 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2335 Constify.
2336 (add_internal_problem_command): Remove casts.
2337 * arc-tdep.c (maintenance_print_arc_command): Constify.
2338 * valprint.c (set_print, show_print, set_print_raw)
2339 (show_print_raw): Constify.
2340 * maint.c (maintenance_command, maintenance_info_command)
2341 (maintenance_print_command, maintenance_set_cmd)
2342 (maintenance_show_cmd, set_per_command_cmd)
2343 (show_per_command_cmd, maintenance_check_command): Constify.
2344 * language.c (set_check, show_check): Constify.
2345 * typeprint.c (show_print_type, set_print_type): Constify.
2346 * go32-nat.c (go32_info_dos_command): Constify.
2347
fdf44873
TT
23482017-10-11 Tom Tromey <tom@tromey.com>
2349
2350 * breakpoint.c (prepare_re_set_context): Remove.
2351 (breakpoint_re_set_one): Update. Don't use cleanups.
2352 (breakpoint_re_set): Use scoped_restore, std::string, and
2353 scoped_restore_current_language.
2354
81b1e71c
TT
23552017-10-11 Tom Tromey <tom@tromey.com>
2356
2357 * breakpoint.c (commands_command_1): Use std::string.
2358 (cleanup_executing_breakpoints): Remove.
2359 (bpstat_do_actions_1): Use scoped_restore.
2360 (bpstat_check_watchpoint): Use std::string.
2361 (decode_static_tracepoint_spec): Likewise.
2362 (break_range_command): Likewise.
2363 (watch_command_1): Likewise.
2364 (compare_breakpoints): Change argument types.
2365 (clear_command): Use std::vector.
2366 (cleanup_executing_breakpoints): Remove.
2367 (update_global_location_list): Use unique_xmalloc_ptr.
2368 (strace_command): Remove unused declaration.
2369
4f9d9906
JB
23702017-10-11 John Baldwin <jhb@FreeBSD.org>
2371
2372 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2373 * NEWS: Mention new FreeBSD/arm native configuration.
2374 * configure.host: Add arm*-*-freebsd*.
2375 * configure.nat: Likewise.
2376 * arm-fbsd-nat.c: New file.
2377
7176dfd2
JB
23782017-10-11 John Baldwin <jhb@FreeBSD.org>
2379
2380 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2381 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2382 * NEWS: Mention new FreeBSD/arm target.
2383 * configure.tgt: Add arm*-*-freebsd*.
2384 * arm-fbsd-tdep.c: New file.
2385 * arm-fbsd-tdep.h: New file.
2386
fe220226
MR
23872017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2388
2389 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2390 `gdbarch_elfcore_write_linux_prpsinfo'.
2391 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2392 method.
2393 (elf_internal_linux_prpsinfo): Remove declaration.
2394 * gdbarch.h: Regenerate.
2395 * gdbarch.c: Regenerate.
2396
a2f63b2e
MR
23972017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2398
2399 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2400 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2401
458ca1d0
PA
24022017-10-11 Pedro Alves <palves@redhat.com>
2403
2404 * breakpoint.c (reattach_breakpoints): Delete.
2405 * breakpoint.h (reattach_breakpoints): Delete.
2406
905014d7
SM
24072017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * symfile.c (registered_sym_fns): Make struct, not typedef.
2410 (DEF_VEC_O (registered_sym_fns)): Remove.
2411 (symtab_fns): Change type to std::vector.
2412 (add_symtab_fns): Adjust.
2413 (find_sym_fns): Adjust.
2414
56d704da
AK
24152017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2416
2417 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2418 * arc-tdep.h (arc_arch_is_em): New function.
2419 (arc_arch_is_hs): Likewise.
2420
7fa29be9
EB
24212017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2422
2423 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2424 parentheses in the declaration.
2425 (macro_lookup_inclusion): Likewise.
2426 (macro_lookup_definition): Likewise.
2427 * p-lang.h (pascal_builtin_types): Likewise.
2428 * tui/tui-data.c (tui_win_list): Likewise.
2429 * tui/tui-data.h (tui_win_list): Likewise.
2430 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2431
d9b477e3
KB
24322017-10-11 Mark Rages <markrages@gmail.com>
2433
2434 * target-memory.c (block_boundaries): Fix for block address not
2435 aligned on block size.
2436
65630365
PA
24372017-10-10 Pedro Alves <palves@redhat.com>
2438 Tom Tromey <tom@tromey.com>
2439
2440 * breakpoint.c (struct captured_breakpoint_query_args)
2441 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2442 (print_breakpoint): New.
2443 * breakpoint.h (print_breakpoint): Declare.
2444 * common/common-exceptions.h (enum return_reason): Remove
2445 references to catch_exceptions.
2446 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2447 Delete.
2448 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2449 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2450 * gdb.h: Delete.
2451 * gdbthread.h (thread_select): Declare.
2452 * mi/mi-cmd-break.c: Don't include gdb.h.
2453 (breakpoint_notify): Use print_breakpoint.
2454 * mi/mi-cmd-catch.c: Don't include gdb.h.
2455 * mi/mi-interp.c: Don't include gdb.h.
2456 (mi_print_breakpoint_for_event): New.
2457 (mi_breakpoint_created, mi_breakpoint_modified): Use
2458 mi_print_breakpoint_for_event.
2459 * mi/mi-main.c: Don't include gdb.h.
2460 (mi_cmd_thread_select): Parse the global thread ID here. Use
2461 thread_select instead of gdb_thread_select.
2462 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2463 of using gdb_list_thread_ids.
2464 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2465 FILEIO_ENOSYS here.
2466 (remote_fileio_request): Use TRY/CATCH instead of
2467 catch_exceptions.
2468 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2469 (symbol_file_add_from_memory_wrapper): Delete.
2470 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2471 * thread.c: Don't include gdb.h.
2472 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2473 (thread_alive): Use thread_select.
2474 (do_captured_thread_select): Delete, parts salvaged as ...
2475 (thread_select): ... this new function.
2476 (gdb_thread_select): Delete.
2477
bf469271
PA
24782017-10-10 Pedro Alves <palves@redhat.com>
2479 Tom Tromey <tom@tromey.com>
2480
2481 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2482 and reverse logic.
2483 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2484 No longer macros. Instead ...
2485 (enum wp_check_result): They're now values of this new
2486 enumeration.
2487 (watchpoint_check): Change return type to wp_check_result and
2488 parameter type to bpstat.
2489 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2490 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2491 catch_errors. Reverse logic of watchpoint_check call.
2492 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2493 pointer as parameter.
2494 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2495 * common/common-exceptions.c (throw_exception_sjlj): Update
2496 comments to avoid mentioning catch_errors.
2497 * exceptions.c (catch_errors): Delete.
2498 * exceptions.h: Update comments to avoid mentioning catch_errors.
2499 (catch_errors_ftype, catch_errors): Delete.
2500 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2501 (hook_stop_stub): Delete.
2502 (restore_selected_frame): Change return type to void, and
2503 parameter type to const frame_id &.
2504 (restore_infcall_control_state): Use TRY/CATCH instead of
2505 catch_errors.
2506 * main.c (captured_command_loop): Return void and remove
2507 parameter. Remove references to catch_errors.
2508 (captured_main): Use TRY/CATCH instead of catch_errors.
2509 * objc-lang.c (objc_submethod_helper_data)
2510 (find_objc_msgcall_submethod_helper): Delete.
2511 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2512 catch_errors.
2513 * record-full.c (record_full_message): Return void.
2514 (record_full_message_args, record_full_message_wrapper): Delete.
2515 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2516 instead of catch_errors.
2517 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2518 parameter type to int.
2519 * solib-darwin.c (open_symbol_file_object): Ditto.
2520 * solib-dsbt.c (open_symbol_file_object): Ditto.
2521 * solib-frv.c (open_symbol_file_object): Ditto.
2522 * solib-svr4.c (open_symbol_file_object): Ditto.
2523 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2524 * solib.c (update_solib_list): Use TRY/CATCH instead of
2525 catch_errors.
2526 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2527 Change type.
2528 * symmisc.c (struct print_symbol_args): Remove.
2529 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2530 (print_symbol): Change type.
2531 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2532 and remove parameters.
2533 (catch_errors): New.
2534 (get_windows_debug_event): Adjust.
2535
1a56bfa5
TT
25362017-10-09 Tom Tromey <tom@tromey.com>
2537
2538 * mi/mi-main.c (free_splay_tree): Remove.
2539 (list_available_thread_groups): Use splay_tree_up.
2540 * common/gdb_splay_tree.h: New file.
2541
0c478e2d
TT
25422017-10-09 Tom Tromey <tom@tromey.com>
2543
2544 * mi/mi-main.c (do_nothing): Remove.
2545 (list_available_thread_groups): Update.
2546
cbd2b4e3
PA
25472017-10-09 Pedro Alves <palves@redhat.com>
2548
2549 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2550 reading registers when switching context.
2551
a181c0bf
JB
25522017-10-09 John Baldwin <jhb@FreeBSD.org>
2553
2554 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2555 (fbsd_convert_siginfo): Likewise.
2556 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2557
6e66f753
SM
25582017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2559
2560 * configure.ac (try_guile_versions): Remove guile-2.2.
2561 * configure: Regenerate.
2562
890e9790
TT
25632017-10-09 Tom Tromey <tom@tromey.com>
2564
2565 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2566 (COMPILE.pre): Use $(CXX).
2567
109483d9
PA
25682017-10-09 Pedro Alves <palves@redhat.com>
2569
2570 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2571 Use bool.
2572 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2573 * cp-support.h (cp_remove_params): Now returns a
2574 gdb::unique_xmalloc_ptr.
2575 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2576 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2577 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2578 returning a gdb::unique_xmalloc_ptr.
2579 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2580 * stack.c (find_frame_funname): Adjust to cp_remove_params
2581 returning a gdb::unique_xmalloc_ptr.
2582
791afaa2
TT
25832017-10-08 Tom Tromey <tom@tromey.com>
2584
2585 * dwarf2read.c (dwarf2_get_dwz_file): Use
2586 gdb::unique_xmalloc_ptr.
2587 (find_slot_in_mapped_hash): Likewise.
2588 (dwarf2_physname): Likewise.
2589 (create_dwo_unit_in_dwp_v1): Use std::string.
2590 (create_dwo_unit_in_dwp_v2): Likewise.
2591 (lookup_dwo_cutu): Likewise.
2592 (inherit_abstract_dies): Use std::vector.
2593 (read_array_type): Likewise.
2594 (dwarf_decode_macros): Remove unused declaration.
2595 (unsigned_int_compar): Remove.
2596 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2597 (psymtabs_addrmap_cleanup): Remove.
2598
30a9c02f
TT
25992017-10-08 Tom Tromey <tom@tromey.com>
2600
2601 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2602 * frame.h (frame_cleanup_after_sniffer): Declare.
2603 (frame_prepare_for_sniffer): Return void.
2604 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2605 type of argument.
2606 (frame_prepare_for_sniffer): Return void.
2607
757325a3
TT
26082017-10-08 Tom Tromey <tom@tromey.com>
2609
2610 * utils.h (make_cleanup_value_free): Remove.
2611 * utils.c (do_value_free, struct cleanup): Remove.
2612 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2613 Use gdb_value_up.
2614 * value.h (struct value_deleter): New.
2615 (gdb_value_up): New typedef.
2616
b9c04fb2
TT
26172017-10-08 Tom Tromey <tom@tromey.com>
2618
2619 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2620 (make_cleanup_free_search_symbols): Remove.
2621 (search_symbols): Return std::vector.
2622 (symbol_search::compare_search_syms): Now member of
2623 symbol_search. Change arguments.
2624 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2625 (symtab_symbol_info, rbreak_command): Update.
2626 * symtab.h (struct symbol_search) <next>: Remove.
2627 Add constructors.
2628 (symbol_search::operator<): New function.
2629 (symbol_search::operator==): New function.
2630 (search_symbols): Remove std::vector.
2631 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2632 (symbol_search::compare_search_syms): Declare.
2633
0d28b0a5
YQ
26342017-10-06 Yao Qi <yao.qi@linaro.org>
2635
2636 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2637 arch/aarch64-insn.o.
2638 Remove one rule.
2639 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2640
71917808
YQ
26412017-10-06 Yao Qi <yao.qi@linaro.org>
2642
2643 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2644 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2645 arch/arm-linux.o respectively.
2646 * configure.tgt: Likewise.
2647
2081b2b2
YQ
26482017-10-06 Yao Qi <yao.qi@linaro.org>
2649
2650 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2651 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2652
a1b85d28
PA
26532017-10-06 Pedro Alves <palves@redhat.com>
2654
2655 * windows-nat.c: Include <algorithm>.
2656
d97987e2
YQ
26572017-10-06 Yao Qi <yao.qi@linaro.org>
2658
2659 * configure.tgt (i386_tobjs): New variable.
2660 (amd64_tobjs): New variable.
2661 Set $cpu_obs and $os_obs.
2662
f38307f5
YQ
26632017-10-06 Yao Qi <yao.qi@linaro.org>
2664
2665 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2666 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2667 (clean): Remove object files and dependency files.
2668 (distclean): Remove the directory.
2669 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2670 * configure: Re-generated.
2671 * configure.tgt: Replace amd64.o with arch/amd64.o.
2672
2f924de6
JM
26732017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2674
2675 PR build/22188
2676 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2677 and SETEND.
2678
2fd9d7ca
PA
26792017-10-05 Pedro Alves <palves@redhat.com>
2680
2681 * linux-nat.c (linux_child_follow_fork): When following the parent
2682 and detaching the child, consult the parent thread's architecture
2683 instead of the child's.
2684
d13b8493
UW
26852017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2686
2687 * ax.h: Do not include "doublest.h".
2688 (union agent_val): Remove.
2689
3b4b2f16
UW
26902017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2691
2692 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2693 (decimal_to_string): Return std::string object.
2694 (decimal_from_string): Accept std::string object. Return bool.
2695 (decimal_from_integral, decimal_from_doublest): Remove.
2696 (decimal_from_longest): Add prototype.
2697 (decimal_from_ulongest): Likewise.
2698 (decimal_to_longest): Likewise.
2699 (decimal_from_doublest): Likewise.
2700 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2701 (MAX_DECIMAL_STRING): Move here.
2702 (decimal_to_string): Return std::string object.
2703 (decimal_from_string): Accept std::string object. Return bool.
2704 (decimal_from_integral): Remove, replace by ...
2705 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2706 (decimal_to_longest): New function.
2707 (decimal_from_floating): Remove, replace by ...
2708 (decimal_from_doublest): ... this new function.
2709 (decimal_to_doublest): Update to new decimal_to_string interface.
2710
2711 * value.c (unpack_long): Use decimal_to_longest.
2712 * valops.c (value_cast): Use decimal_from_doublest instead of
2713 decimal_from_floating. Use decimal_from_[u]longest isntead of
2714 decimal_from_integral.
2715 * valarith.c (value_args_as_decimal): Likewise.
2716 * valprint.c (print_decimal_floating): Update to new
2717 decimal_to_string interface.
2718 * printcmd.c (printf_decfloat): Likewise.
2719 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2720
1841ee5d
UW
27212017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2722
2723 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2724 * gdbtypes.c: Include "floatformat.h".
2725 * value.c: Likewise.
2726 * m68k-tdep.c: Likewise.
2727
2728 * findvar.c: Do not include "floatformat.h".
2729 * amd64-darwin-tdep.c: Likewise.
2730 * arm-linux-tdep.c: Likewise.
2731 * i386-darwin-tdep.c: Likewise.
2732 * i387-tdep.c: Likewise.
2733 * m68k-linux-tdep.c: Likewise.
2734 * mep-tdep.c: Likewise.
2735 * mips-tdep.c: Likewise.
2736 * nios2-tdep.c: Likewise.
2737 * s390-linux-tdep.c: Likewise.
2738 * sparc-obsd-tdep.c: Likewise.
2739 * sparc-tdep.c: Likewise.
2740 * sparc64-tdep.c: Likewise.
2741 * spu-tdep.c: Likewise.
2742 * tic6x-tdep.c: Likewise.
2743 * tilegx-tdep.c: Likewise.
2744 * vax-tdep.c: Likewise.
2745 * xstormy16-tdep.c: Likewise.
2746 * xtensa-tdep.c: Likewise.
2747
2748 * top.c: Do not include "doublest.h".
2749 * aarch64-tdep.c: Likewise.
2750 * alpha-tdep.c: Likewise.
2751 * arm-linux-tdep.c: Likewise.
2752 * m68k-linux-tdep.c: Likewise.
2753 * tilegx-tdep.c: Likewise.
2754 * xstormy16-tdep.c: Likewise.
2755
a80a6471
JB
27562017-10-05 John Baldwin <jhb@FreeBSD.org>
2757
2758 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2759 (mipsn32_fbsd_sigframe): Define.
2760 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2761 for FreeBSD/mipsn32.
2762
12c4bd7f
JB
27632017-10-05 John Baldwin <jhb@FreeBSD.org>
2764
2765 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2766 AT_HWCAP.
2767
c91933e9
TG
27682017-10-05 Tristan Gingold <tgingold@free.fr>
2769
2770 * MAINTAINERS (Misc): Update my email address.
2771
5cd63fda
PA
27722017-10-04 Pedro Alves <palves@redhat.com>
2773
2774 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2775 it instead of target_gdbarch.
2776 (get_remote_state, get_remote_packet_size): Adjust
2777 get_remote_arch_state calls, passing down target_gdbarch
2778 explicitly.
2779 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2780 'gdbarch' and use it instead of target_gdbarch.
2781 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2782 passing down target_gdbarch explicitly.
2783 (struct stop_reply) <arch>: New field.
2784 (remote_parse_stop_reply): Use the stopped thread's architecture,
2785 not the current inferior's. Save the architecture in the
2786 stop_reply.
2787 (process_stop_reply): Use the stop reply's architecture.
2788 (process_g_packet, remote_fetch_registers)
2789 (remote_prepare_to_store, store_registers_using_G)
2790 (remote_store_registers): Adjust get_remote_arch_state calls,
2791 using the regcache's architecture.
2792 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2793 passing down target_gdbarch explicitly.
2794 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2795 beneath instead of calling target_gdbarch.
2796 * target.c (default_thread_architecture): Use the specified
2797 inferior's architecture, instead of the current inferior's
2798 architecture (via target_gdbarch).
2799
ed4227b7
PA
28002017-10-04 Pedro Alves <palves@redhat.com>
2801
2802 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2803 case.
2804 (regcache_print): Handle !target_has_registers here instead.
2805
55b11ddf
PA
28062017-10-04 Pedro Alves <palves@redhat.com>
2807
2808 * frame.c (create_test_frame): Delete.
2809 * frame.h (create_test_frame): Delete.
2810 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2811 (class regcache_test): Delete.
2812 (test_target_has_registers, test_target_has_stack)
2813 (test_target_has_memory, test_target_prepare_to_store)
2814 (test_target_store_registers): New functions.
2815 (test_target_ops): New class.
2816 (register_to_value_test): Error out if there's already a
2817 process_stratum (or higher) target pushed. Create a fuller mock
2818 environment, with mock target_ops, inferior, address space, thread
2819 and inferior_ptid.
2820 * progspace.c (struct address_space): Move to ...
2821 * progspace.h (struct address_space): ... here.
2822 * regcache.h (regcache::~regcache, regcache::raw_write)
2823 [GDB_SELF_TEST]: No longer virtual.
2824
4c71c105
SM
28252017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2826
2827 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2828
73dcd72d
PA
28292017-10-04 Pedro Alves <palves@redhat.com>
2830
2831 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2832 out of 'between TRY and CATCH'.
2833
44704526
PA
28342017-10-04 Pedro Alves <palves@redhat.com>
2835
2836 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2837 * common/common-exceptions.h (TRY): Open an outermost scope.
2838 Expand intro comment.
2839 (CATCH): Reindent.
2840 (END_CATCH): Close the outermost scope.
2841 * completer.c (complete_line_internal): Add missing END_CATCH.
2842
bc3b087d
SDJ
28432017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2844
2845 * NEWS (Changes since GDB 8.0): Add entry about new
2846 'set-cwd-on-gdbserver' feature.
2847 (New remote packets): Add entry for QSetWorkingDir.
2848 * common/common-inferior.h (set_inferior_cwd): New prototype.
2849 * infcmd.c (set_inferior_cwd): Remove "static".
2850 (show_cwd_command): Expand text to include remote debugging.
2851 * remote.c: Add PACKET_QSetWorkingDir.
2852 (remote_protocol_features) <QSetWorkingDir>: New entry for
2853 PACKET_QSetWorkingDir.
2854 (extended_remote_set_inferior_cwd): New function.
2855 (extended_remote_create_inferior): Call
2856 "extended_remote_set_inferior_cwd".
2857 (_initialize_remote): Call "add_packet_config_cmd" for
2858 QSetWorkingDir.
2859
d092c5a2
SDJ
28602017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2861
2862 * NEWS (New commands): Mention "set/show cwd".
2863 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2864 "cd" command's help text.
2865 * common/common-inferior.h (get_inferior_cwd): New prototype.
2866 * infcmd.c (inferior_cwd_scratch): New global variable.
2867 (set_inferior_cwd): New function.
2868 (get_inferior_cwd): Likewise.
2869 (set_cwd_command): Likewise.
2870 (show_cwd_command): Likewise.
2871 (_initialize_infcmd): Add "set/show cwd" commands.
2872 * inferior.h (class inferior) <cwd>: New field.
2873 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2874 (fork_inferior): Change inferior's cwd before its execution.
2875 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2876 to CreateProcess.
2877
7da0a886
SDJ
28782017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2879
2880 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2881 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2882 (COMMON_OBS): Add gdb_tilde_expand.o.
2883 * common/gdb_tilde_expand.c: New file.
2884 * common/gdb_tilde_expand.h: Likewise.
2885
db8dd160
MR
28862017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2887
2888 * gdbarch.sh (objfile): Remove duplicate declaration.
2889 * gdbarch.h: Regenerate.
2890
f8bfbf22
TT
28912017-10-03 Tom Tromey <tom@tromey.com>
2892
2893 * utils.c (internal_vproblem): Use string_vprintf.
2894
5178ed48
TT
28952017-10-03 Tom Tromey <tom@tromey.com>
2896
2897 * printcmd.c (info_symbol_command): Use std::string.
2898
8cff8730
TT
28992017-10-03 Tom Tromey <tom@tromey.com>
2900
2901 * top.c (gdb_safe_append_history): Use std::string.
2902
895b8f30
TT
29032017-10-03 Tom Tromey <tom@tromey.com>
2904
2905 * event-top.c (stdin_event_handler): Update.
2906 * main.c (captured_main_1): Update.
2907 * top.h (make_delete_ui_cleanup): Remove.
2908 (struct ui): Add constructor and destructor.
2909 (new_ui, delete_ui): Remove.
2910 * top.c (make_delete_ui_cleanup): Remove.
2911 (new_ui_command): Use std::unique_ptr.
2912 (delete_ui_cleanup): Remove.
2913 (ui::ui): Rename from new_ui. Update.
2914 (free_ui): Remove.
2915 (ui::~ui): Rename from delete_ui. Update.
2916
0efef640
TT
29172017-10-03 Tom Tromey <tom@tromey.com>
2918
2919 * symfile.c (load_progress): Use gdb::byte_vector.
2920
245ad7d3
TT
29212017-10-03 Tom Tromey <tom@tromey.com>
2922
2923 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2924 declaration.
2925 * printcmd.c (x_command): Remove unused declaration.
2926 * symfile.c (symbol_file_command): Remove unused declaration.
2927
e05550d7
TT
29282017-10-03 Tom Tromey <tom@tromey.com>
2929
2930 * utils.c (internal_vproblem): Use std::string.
2931 (defaulted_query): Likewise.
2932
b95de2b7
TT
29332017-10-03 Tom Tromey <tom@tromey.com>
2934
2935 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2936 * top.c (execute_command_to_string): Update.
2937 * utils.c (make_cleanup_restore_page_info): Remove.
2938 (do_restore_page_info_cleanup): Remove.
2939 (set_batch_flag_and_restore_page_info):
2940 New.
2941 (make_cleanup_restore_page_info): Remove.
2942 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2943 (~set_batch_flag_and_restore_page_info): New
2944 (make_cleanup_restore_uinteger): Remove.
2945 (make_cleanup_restore_integer): Remove.
2946 (struct restore_integer_closure): Remove.
2947 (restore_integer): Remove.
2948 * utils.h (struct set_batch_flag_and_restore_page_info): New
2949 class.
2950 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2951 (make_cleanup_restore_page_info): Remove.
2952 (make_cleanup_restore_uinteger) Remove.
2953 (make_cleanup_restore_integer) Remove.
2954
07036511
TT
29552017-10-03 Tom Tromey <tom@tromey.com>
2956
2957 * record-full.h (record_full_gdb_operation_disable_set): Return
2958 scoped_restore_tmpl<int>.
2959 * infrun.c (adjust_pc_after_break): Update.
2960 (handle_signal_stop): Update.
2961 * record-full.c (record_full_gdb_operation_disable_set): Return
2962 scoped_restore_tmpl<int>.
2963 (record_full_wait_1, record_full_insert_breakpoint)
2964 (record_full_remove_breakpoint, record_full_save)
2965 (record_full_goto_insn): Update.
2966
45320ffa
TT
29672017-10-02 Tom Tromey <tom@tromey.com>
2968
2969 PR rust/22236:
2970 * rust-lang.c (rust_val_print_str): New function.
2971 (val_print_struct): Call it.
2972 (rust_subscript): Preserve name of slice type.
2973
b3e3859b
TT
29742017-10-02 Tom Tromey <tom@tromey.com>
2975
2976 * rust-lang.c (rust_subscript): Handle slices in
2977 EVAL_AVOID_SIDE_EFFECTS case.
2978
01af5e0d
TT
29792017-10-02 Tom Tromey <tom@tromey.com>
2980
2981 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2982
888e3ddb
TT
29832017-10-02 Tom Tromey <tom@tromey.com>
2984
2985 * rust-lang.h (rust_slice_type): Add "extern".
2986
cc536b21
PA
29872017-10-02 Tom Tromey <tom@tromey.com>
2988 Pedro Alves <palves@redhat.com>
2989
2990 * ada-lang.h (ada_exc_info::operator<): Make const.
2991 (ada_exc_info::operator==): Make const.
2992 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2993 Make const.
2994
386c8614
TT
29952017-09-29 Tom Tromey <tom@tromey.com>
2996
2997 * target.c (read_whatever_is_readable): Change type of "result".
2998 Update.
2999 (free_memory_read_result_vector): Remove.
3000 (read_memory_robust): Change return type. Update.
3001 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3002 bin2hex, std::string.
3003 * target.h (memory_read_result_s): Remove typedef.
3004 (free_memory_read_result_vector): Remove.
3005 (read_memory_robust): Return std::vector.
3006
789c4b5e
TT
30072017-09-29 Tom Tromey <tom@tromey.com>
3008
3009 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3010
ab816a27
TT
30112017-09-29 Tom Tromey <tom@tromey.com>
3012
3013 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3014 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3015 operator< and operator==.
3016 (ada_exceptions_list): Return a std::vector.
3017 * ada-lang.c (ada_exc_info::operator<): Rename from
3018 compare_ada_exception_info.
3019 (ada_exc_info::operator==): New.
3020 (sort_remove_dups_ada_exceptions_list): Change type of
3021 "exceptions".
3022 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3023 (ada_add_global_exceptions): Likewise.
3024 (ada_exceptions_list_1): Return a std::vector.
3025 (ada_exceptions_list): Likewise.
3026
52f9abe4
TT
30272017-09-29 Tom Tromey <tom@tromey.com>
3028
3029 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3030 'std::set *'.
3031 (print_one_inferior): Update.
3032 (free_vector_of_ints): Remove.
3033 (list_available_thread_groups): Change "ids" to std::set.
3034 (mi_cmd_list_thread_groups): Update.
3035 (struct collect_cores_data) <core>: Now a std::set.
3036 (collect_cores): Update.
3037 (unique): Remove.
3038 (print_one_inferior): Update.
3039
dcd5ddcc
TT
30402017-09-29 Tom Tromey <tom@tromey.com>
3041
3042 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3043 (mi_execute_async_cli_command): Likewise.
3044 (mi_cmd_trace_frame_collected): Use field_fmt.
3045
45d288cc
TT
30462017-09-29 Tom Tromey <tom@tromey.com>
3047
3048 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3049 gdb::byte_vector.
3050
6afe2f4a
TT
30512017-09-29 Tom Tromey <tom@tromey.com>
3052
3053 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3054
9813429a
TT
30552017-09-29 Tom Tromey <tom@tromey.com>
3056
3057 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3058
2d6960b4
TT
30592017-09-29 Tom Tromey <tom@tromey.com>
3060
3061 * varobj.h (varobj_gen_name): Return std::string.
3062 * varobj.c (varobj_gen_name): Return std::string.
3063 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3064 (mi_cmd_var_delete): Don't copy "name".
3065
784c453a
TT
30662017-09-29 Tom Tromey <tom@tromey.com>
3067
3068 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3069 (mi_cmd_break_insert_1): Update.
3070
a9bc57b9
TT
30712017-09-29 Tom Tromey <tom@tromey.com>
3072
3073 * target.h (make_scoped_defer_target_commit_resume): Update.
3074 * target.c (make_scoped_defer_target_commit_resume): Rename from
3075 make_cleanup_defer_target_commit_resume. Return a
3076 scoped_restore.
3077 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3078
9754d8c4
TT
30792017-09-29 Tom Tromey <tom@tromey.com>
3080
3081 * main.c (captured_main_1): Remove unused declaration.
3082 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3083
99ef965c
TT
30842017-09-29 Tom Tromey <tom@tromey.com>
3085
3086 * symtab.c (search_symbols): Remove unused outer cleanup.
3087 (make_source_files_completion_list): Remove unused declaration.
3088
42518ba7
TT
30892017-09-29 Tom Tromey <tom@tromey.com>
3090
3091 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3092
726b2169
TT
30932017-09-29 Tom Tromey <tom@tromey.com>
3094
3095 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3096 gdb::byte_vector.
3097
55b06432
TT
30982017-09-29 Tom Tromey <tom@tromey.com>
3099
3100 * complaints.c (vcomplaint): Use std::string.
3101
8abcee91
TT
31022017-09-29 Tom Tromey <tom@tromey.com>
3103
3104 * tracepoint.c (trace_variable_command): Use std::string.
3105 (encode_actions_1): Remove unused declarations.
3106 (create_tsv_from_upload): Use std::string.
3107
6ad94bc7
TT
31082017-09-29 Tom Tromey <tom@tromey.com>
3109
3110 * cp-support.c (gdb_demangle): Use std::string.
3111
2003f3d8
TT
31122017-09-29 Tom Tromey <tom@tromey.com>
3113
3114 * stack.c (parse_frame_specification): Use std::string
3115 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3116
8f8accb5
TT
31172017-09-29 Tom Tromey <tom@tromey.com>
3118
3119 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3120
200aa7b1
TT
31212017-09-29 Tom Tromey <tom@tromey.com>
3122
3123 * utils.c (vfprintf_maybe_filtered): Use std::string.
3124 (vfprintf_unfiltered): Likewise.
3125
606aae8a
TT
31262017-09-29 Tom Tromey <tom@tromey.com>
3127
3128 * event-top.c (top_level_prompt): Return std::string.
3129 (display_gdb_prompt): Update.
3130
bd413795
TT
31312017-09-29 Tom Tromey <tom@tromey.com>
3132
3133 * unittests/common-utils-selftests.c (format): New function.
3134 (string_vprintf_tests): New function.
3135 (_initialize_common_utils_selftests): Register new tests.
3136 * common/common-utils.c (string_vprintf): New function.
3137 * common/common-utils.h (string_vprintf): Declare.
3138
256642e8
PA
31392017-09-29 Pedro Alves <palves@redhat.com>
3140
3141 * common/rsp-low.c (unpack_varlen_hex): Constify.
3142 * common/rsp-low.h (unpack_varlen_hex): Constify.
3143 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3144 Constify.
3145 * remote.c (remote_set_permissions, read_ptid)
3146 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3147 (remote_static_tracepoint_marker_at)
3148 (remote_static_tracepoint_markers_by_strid)
3149 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3150 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3151 (parse_tracepoint_definition, parse_tsv_definition)
3152 (parse_static_tracepoint_marker_definition): Constify.
3153 * tracepoint.h (parse_static_tracepoint_marker_definition)
3154 (parse_trace_status, parse_tracepoint_status)
3155 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3156
b6bb3468
PA
31572017-09-29 Pedro Alves <palves@redhat.com>
3158
3159 * remote.c (target_buf, target_buf_size): Delete.
3160 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3161 Use the connection's packet buffer instead.
3162 All callers adjusted.
3163 (_initialize_remote): Remove references to target_buf and
3164 target_buf_size.
3165
b2f8eb7a
PA
31662017-09-28 Pedro Alves <palves@redhat.com>
3167
3168 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3169 unittests/common-utils-selftests.c.
3170 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3171 (COMMON_OBS): Remove utils-selftests.o.
3172 * utils-selftests.c: Move to ...
3173 * unittests/common-utils-selftests.c: ... here and rename self
3174 test to "string_printf".
3175
08302ed2
DE
31762017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3177
3178 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3179 having NULL cus or tus.
3180
96a5a1d3
UW
31812017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3182
3183 * arm-tdep.c: (convert_from_extended): Remove.
3184 (convert_to_extended): Likewise.
3185 (arm_extract_return_value): Use convert_typed_floating.
3186 (arm_store_return_value): Likewise.
3187
3188 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3189 * sh-tdep.c: Do not include "floatformat.h".
3190 (sh_littlebyte_bigword_type): New function.
3191 (sh_register_convert_to_virtual): Use convert_typed_floating.
3192 (sh_register_convert_to_raw): Likewise.
3193 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3194 (sh64_littlebyte_bigword_type): New function.
3195 (sh64_extract_return_value): Use convert_typed_floating.
3196 (sh64_register_convert_to_virtual): Likewise.
3197 (sh64_register_convert_to_raw): Likewise.
3198
0db7851f
UW
31992017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3200
3201 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3202 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3203
3204 * gdbtypes.h (union type_specific): Make field floatformat hold
3205 just a single struct floatformat, not an array.
3206 (floatformat_from_type): Move here.
3207 * gdbtypes.c (floatformat_from_type): Move here. Update to
3208 changed TYPE_FLOATFORMAT definition.
3209 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3210 (recursive_dump_type): Likewise.
3211 (init_float_type): Install correct floatformat for byte order.
3212 (arch_float_type): Likewise.
3213
77b7c781
UW
32142017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3215
3216 * gdbtypes.c (init_type): Change incoming argument from
3217 length-in-bytes to length-in-bits. Assert length is a
3218 multiple of TARGET_CHAR_BITS.
3219 (arch_type, arch_flags_type): Likewise.
3220 (init_integer_type): Update call to init_type.
3221 (init_character_type): Likewise.
3222 (init_boolean_type): Likewise.
3223 (init_float_type): Likewise.
3224 (init_decfloat_type): Likewise.
3225 (init_complex_type): Likewise.
3226 (init_pointer_type): Likewise.
3227 (objfile_type): Likewise.
3228 (arch_integer_type): Update call to arch_type.
3229 (arch_character_type): Likewise.
3230 (arch_boolean_type): Likewise.
3231 (arch_float_type): Likewise.
3232 (arch_decfloat_type): Likewise.
3233 (arch_complex_type): Likewise.
3234 (arch_pointer_type): Likewise.
3235 (gdbtypes_post_init): Likewise.
3236
3237 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3238 (read_base_type): Likewise.
3239 * mdebugread.c (basic_type): Likewise.
3240 * stabsread.c (dbx_init_float_type): Likewise.
3241 (rs6000_builtin_type): Likewise.
3242 (read_range_type): Likewise. Also, fix call to init_integer_type
3243 with erroneous length argument.
3244
3245 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3246 * d-lang.c (build_d_types): Likewise.
3247 * f-lang.c (build_fortran_types): Likewise.
3248 * go-lang.c (build_go_types): Likewise.
3249 * opencl-lang.c (build_opencl_types): Likewise.
3250 * jit.c (finalize_symtab): Likewise.
3251 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3252 (build_std_type_info_type): Likewise.
3253 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3254 update call to arch_flags_type.
3255
3256 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3257 arch_type.
3258 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3259 * windows-tdep.c (windows_get_tlb_type): Likewise.
3260
3261 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3262 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3263 * m32c-tdep.c (make_types): Likewise.
3264 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3265 (rl78_psw_type): Update call to arch_flags_type.
3266 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3267 * rx-tdep.c (rx_psw_type): Likewise.
3268 (rx_fpsw_type): Likewise.
3269 * sparc-tdep.c (sparc_psr_type): Likewise.
3270 (sparc_fsr_type): Likewise.
3271 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3272 (sparc64_ccr_type): Likewise.
3273 (sparc64_fsr_type): Likewise.
3274 (sparc64_fprs_type): Likewise.
3275
f21b4d5c
TT
32762017-09-27 Tom Tromey <tom@tromey.com>
3277
3278 * findcmd.c (find_command): Constify.
3279
643c2ffa
TT
32802017-09-27 Tom Tromey <tom@tromey.com>
3281
3282 * ada-tasks.c (task_command_1, task_command): Constify.
3283
510e5e56
TT
32842017-09-27 Tom Tromey <tom@tromey.com>
3285
3286 * symtab.c (maintenance_print_symbol_cache)
3287 (maintenance_flush_symbol_cache)
3288 (maintenance_print_symbol_cache_statistics): Constify.
3289
e503b191
TT
32902017-09-27 Tom Tromey <tom@tromey.com>
3291
3292 * inferior.c (detach_inferior_command, kill_inferior_command)
3293 (inferior_command): Constify.
3294
4e001312
TT
32952017-09-27 Tom Tromey <tom@tromey.com>
3296
3297 * regcache.c (regcache_print, maintenance_print_registers)
3298 (maintenance_print_raw_registers)
3299 (maintenance_print_cooked_registers)
3300 (maintenance_print_register_groups)
3301 (maintenance_print_remote_registers): Constify.
3302
77763700
TT
33032017-09-27 Tom Tromey <tom@tromey.com>
3304
3305 * printcmd.c (map_display_numbers, undisplay_command)
3306 (enable_disable_display_command, enable_display_command)
3307 (disable_display_command): Constify.
3308
4495129a
TT
33092017-09-27 Tom Tromey <tom@tromey.com>
3310
3311 * breakpoint.h (delete_command): Don't declare.
3312 * breakpoint.c (delete_command, enable_once_command)
3313 (enable_count_command, enable_delete_command, breakpoint_1)
3314 (maintenance_info_breakpoints, stopin_command, stopat_command)
3315 (delete_command, delete_trace_command, save_breakpoints)
3316 (save_breakpoints_command, save_tracepoints_command): Constify.
3317
3088cf40
TT
33182017-09-27 Tom Tromey <tom@tromey.com>
3319
3320 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3321 (skip_ws, extract_identifier, macro_define_command)
3322 (macro_undef_command, macro_list_command): Constify.
3323
69f476a3
TT
33242017-09-27 Tom Tromey <tom@tromey.com>
3325
3326 * infcmd.c (environment_info, set_environment_command)
3327 (unset_environment_command, path_info, info_proc_cmd_1)
3328 (info_proc_cmd_mappings, info_proc_cmd_stat)
3329 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3330 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3331
c4a3e68e
TT
33322017-09-27 Tom Tromey <tom@tromey.com>
3333
3334 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3335 Constify.
3336
c9d31bd6
TT
33372017-09-27 Tom Tromey <tom@tromey.com>
3338
3339 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3340
1f3f85eb
TT
33412017-09-27 Tom Tromey <tom@tromey.com>
3342
3343 * demangle.c (demangle_command): Constify.
3344
9c504b5d
TT
33452017-09-27 Tom Tromey <tom@tromey.com>
3346
3347 * progspace.c (maintenance_info_program_spaces_command):
3348 Constify.
3349
6663cf91
TT
33502017-09-27 Tom Tromey <tom@tromey.com>
3351
3352 * compile/compile.c (check_raw_argument, compile_file_command)
3353 (compile_code_command, compile_print_command): Constify.
3354
34e5fa26
TT
33552017-09-27 Tom Tromey <tom@tromey.com>
3356
3357 * reggroups.c (maintenance_print_reggroups): Constify.
3358
8384c356
TT
33592017-09-27 Tom Tromey <tom@tromey.com>
3360
3361 * dwarf2read.c (save_gdb_index_command): Constify.
3362
884beb0c
TT
33632017-09-27 Tom Tromey <tom@tromey.com>
3364
3365 * stap-probe.c (info_probes_stap_command): Constify.
3366
e0b2930c
TT
33672017-09-27 Tom Tromey <tom@tromey.com>
3368
3369 * fork-child.c (unset_exec_wrapper_command): Constify.
3370
f938677d
TT
33712017-09-27 Tom Tromey <tom@tromey.com>
3372
3373 * btrace.c (get_uint, get_context_size, no_chunk)
3374 (maint_btrace_packet_history_cmd)
3375 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3376 (maint_info_btrace_cmd): Constify.
3377
8949cb87
TT
33782017-09-27 Tom Tromey <tom@tromey.com>
3379
3380 * reverse.c (delete_bookmark_command): Constify.
3381
ac88e2de
TT
33822017-09-27 Tom Tromey <tom@tromey.com>
3383
3384 * remote.c (set_memory_packet_size)
3385 (set_memory_write_packet_size, show_memory_write_packet_size)
3386 (set_memory_read_packet_size, show_memory_read_packet_size)
3387 (compare_sections_command, packet_command, remote_put_command)
3388 (remote_get_command, remote_delete_command): Constify.
3389
bd4c9dfe
TT
33902017-09-27 Tom Tromey <tom@tromey.com>
3391
3392 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3393 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3394 (set_mipsfpu_auto_command): Constify.
3395
5e93d4c6
TT
33962017-09-27 Tom Tromey <tom@tromey.com>
3397
3398 * cli/cli-cmds.h (cd_command): Constify.
3399 * cli/cli-cmds.c (cd_command): Constify.
3400
fc41a75b
TT
34012017-09-27 Tom Tromey <tom@tromey.com>
3402
3403 * thread.c (thread_name_command, thread_find_command): Constify.
3404
67810076
TT
34052017-09-27 Tom Tromey <tom@tromey.com>
3406
3407 * probe.c (enable_probes_command, disable_probes_command):
3408 Constify.
3409
1d8b34a7
TT
34102017-09-27 Tom Tromey <tom@tromey.com>
3411
3412 * symfile.c (symbol_file_command): Constify.
3413 * gdbcore.h (deprecated_file_changed_hook): Constify.
3414 * exec.c (deprecated_file_changed_hook, exec_file_command)
3415 (file_command): Constify.
3416 * defs.h (symbol_file_command): Constify.
3417
442019e1
TT
34182017-09-27 Tom Tromey <tom@tromey.com>
3419
3420 * remote-fileio.c (set_system_call_allowed)
3421 (show_system_call_allowed): Constify.
3422
2983f7cb
TT
34232017-09-27 Tom Tromey <tom@tromey.com>
3424
3425 * tracepoint.c (delete_trace_variable_command)
3426 (tfind_end_command, tfind_start_command, tfind_pc_command)
3427 (tfind_tracepoint_command, tfind_line_command)
3428 (tfind_range_command, tfind_outside_command): Constify.
3429
4fd41b24
TT
34302017-09-27 Tom Tromey <tom@tromey.com>
3431
3432 * ax-gdb.c (maint_agent_printf_command, agent_command)
3433 (agent_eval_command): Constify.
3434
f2fc3015
TT
34352017-09-27 Tom Tromey <tom@tromey.com>
3436
3437 * tracepoint.c (info_scope_command): Constify.
3438 * python/python.c (gdbpy_decode_line): Constify.
3439 * python/py-breakpoint.c (bppy_init): Constify.
3440 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3441 * location.h: (new_linespec_location)
3442 (string_to_event_location_basic, string_to_event_location):
3443 Constify.
3444 * location.c (new_linespec_location)
3445 (string_to_event_location_basic, string_to_event_location):
3446 Constify.
3447 * linespec.h (decode_line_with_current_source)
3448 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3449 * linespec.c (linespec_lex_to_end)
3450 (decode_line_with_current_source)
3451 (decode_line_with_last_displayed): Constify.
3452 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3453 Constify.
3454 * cli/cli-cmds.c (edit_command, list_command): Constify.
3455 * breakpoint.h (until_break_command, watch_command_wrapper)
3456 (awatch_command_wrapper, rwatch_command_wrapper)
3457 (init_ada_exception_breakpoint): Constify.
3458 * breakpoint.c (break_command_1, dprintf_command)
3459 (break_range_command, watch_command_wrapper)
3460 (rwatch_command_wrapper, awatch_command_wrapper)
3461 (until_break_command, init_ada_exception_breakpoint)
3462 (strace_marker_create_sals_from_location, trace_command)
3463 (ftrace_command, strace_command, struct tracepoint): Constify.
3464 * ax-gdb.c (agent_command_1): Constify.
3465 * ada-lang.c (ada_exception_sal): Constify.
3466
8c2f95f4
TT
34672017-09-27 Tom Tromey <tom@tromey.com>
3468
3469 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3470 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3471 (get_context_size, no_chunk, get_insn_history_modifiers)
3472 (cmd_record_insn_history, get_call_history_modifiers)
3473 (cmd_record_call_history): Constify.
3474
a0d65762
TT
34752017-09-27 Tom Tromey <tom@tromey.com>
3476
3477 * source.c (show_substitute_path_command)
3478 (unset_substitute_path_command, set_substitute_path_command):
3479 Constify.
3480
58971144
TT
34812017-09-27 Tom Tromey <tom@tromey.com>
3482
3483 * typeprint.c (maintenance_print_type): Constify.
3484 * maint.c (maintenance_dump_me, maintenance_demangle)
3485 (maintenance_time_display, maintenance_info_sections)
3486 (maintenance_print_statistics, maintenance_deprecate)
3487 (maintenance_undeprecate): Constify.
3488 (maintenance_do_deprecate): Constify. Use std::string.
3489 (maintenance_selftest): Constify.
3490 * gdbtypes.h (maintenance_print_type): Constify.
3491
c482f52c
TT
34922017-09-27 Tom Tromey <tom@tromey.com>
3493
3494 * hppa-tdep.c (unwind_command): Constify.
3495
e100df1a
TT
34962017-09-27 Tom Tromey <tom@tromey.com>
3497
3498 * target-descriptions.c (unset_tdesc_filename_cmd)
3499 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3500 Constify.
3501
31d56ade
TT
35022017-09-27 Tom Tromey <tom@tromey.com>
3503
3504 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3505
b961da0b
TT
35062017-09-27 Tom Tromey <tom@tromey.com>
3507
3508 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3509
e2d8ae16
TT
35102017-09-27 Tom Tromey <tom@tromey.com>
3511
3512 * tui/tui-regs.c (tui_reg_command): Constify.
3513
863779b0
TT
35142017-09-27 Tom Tromey <tom@tromey.com>
3515
3516 * skip.c (skip_file_command, skip_function_command)
3517 (skip_enable_command, skip_disable_command, skip_delete_command):
3518 Constify.
3519
cdb34d4a
TT
35202017-09-27 Tom Tromey <tom@tromey.com>
3521
3522 * record-btrace.c (cmd_record_btrace_bts_start)
3523 (cmd_record_btrace_pt_start): Constify.
3524
e99c83e7
TT
35252017-09-27 Tom Tromey <tom@tromey.com>
3526
3527 * symmisc.c (maintenance_print_symbols)
3528 (maintenance_print_msymbols, maintenance_print_objfiles)
3529 (maintenance_info_symtabs, maintenance_check_symtabs)
3530 (maintenance_expand_symtabs, maintenance_info_line_tables):
3531 Constify.
3532
32faf971
TT
35332017-09-27 Tom Tromey <tom@tromey.com>
3534
3535 * top.c (new_ui_command): Constify.
3536
2cf311eb
TT
35372017-09-27 Tom Tromey <tom@tromey.com>
3538
3539 * symfile.c (add_symbol_file_command)
3540 (remove_symbol_file_command, list_overlays_command)
3541 (map_overlay_command, unmap_overlay_command)
3542 (overlay_auto_command, overlay_manual_command)
3543 (overlay_off_command, overlay_load_command): Constify.
3544
e6738699
TT
35452017-09-27 Tom Tromey <tom@tromey.com>
3546
3547 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3548 (info_spu_mailbox_command, info_spu_dma_command)
3549 (info_spu_proxydma_command): Constify.
3550
aa360cd5
TT
35512017-09-27 Tom Tromey <tom@tromey.com>
3552
3553 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3554
898241a5
TT
35552017-09-27 Tom Tromey <tom@tromey.com>
3556
3557 * cli/cli-script.c (user_defined_command): Constify.
3558
2d0ac106
TT
35592017-09-27 Tom Tromey <tom@tromey.com>
3560
3561 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3562 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3563 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3564 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3565 (dump_binary_value, append_binary_memory, append_binary_value):
3566 Constify.
3567 (struct dump_context) <func>: Constify.
3568 (add_dump_command): Update.
3569
dede02ce
TT
35702017-09-27 Tom Tromey <tom@tromey.com>
3571
3572 * cli/cli-cmds.c (show_version, show_configuration)
3573 (source_command, show_user): Constify.
3574
d3cb6b99
TT
35752017-09-27 Tom Tromey <tom@tromey.com>
3576
3577 * target.c (maintenance_print_target_stack): Constify.
3578
1970a12f
TT
35792017-09-27 Tom Tromey <tom@tromey.com>
3580
3581 * interps.c (interpreter_exec_cmd): Constify.
3582
41243651
TT
35832017-09-27 Tom Tromey <tom@tromey.com>
3584
3585 * record-full.c (cmd_record_full_restore): Constify.
3586
4465d9db
TT
35872017-09-27 Tom Tromey <tom@tromey.com>
3588
3589 * memattr.c (enable_mem_command, disable_mem_command)
3590 (delete_mem_command): Constify.
3591
ad25e423
TT
35922017-09-27 Tom Tromey <tom@tromey.com>
3593
3594 * value.c (show_convenience): Constify.
3595
d64097b1
TT
35962017-09-27 Tom Tromey <tom@tromey.com>
3597
3598 * gdbcore.h (core_file_command): Update.
3599 * corefile.c (core_file_command): Constify.
3600
4d4589ef
TT
36012017-09-27 Tom Tromey <tom@tromey.com>
3602
3603 * user-regs.c (maintenance_print_user_registers): Constify.
3604
32a7bf17
TT
36052017-09-27 Tom Tromey <tom@tromey.com>
3606
3607 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3608
4a475551
TT
36092017-09-27 Tom Tromey <tom@tromey.com>
3610
3611 * cp-support.c (first_component_command): Constify.
3612
990b9f9f
TT
36132017-09-27 Tom Tromey <tom@tromey.com>
3614
3615 * psymtab.c (maintenance_print_psymbols)
3616 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3617 Constify.
3618
c281872e
TT
36192017-09-27 Tom Tromey <tom@tromey.com>
3620
3621 * windows-tdep.c (display_tib): Constify.
3622
5b64bf74
TT
36232017-09-27 Tom Tromey <tom@tromey.com>
3624
3625 * linux-fork.c (delete_checkpoint_command)
3626 (detach_checkpoint_command): Constify.
3627
4ada038f
TT
36282017-09-27 Tom Tromey <tom@tromey.com>
3629
3630 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3631
57f5a81b
TT
36322017-09-27 Tom Tromey <tom@tromey.com>
3633
3634 * arc-tdep.c (dump_arc_instruction_command): Constify.
3635
b0a8e6c4
TT
36362017-09-27 Tom Tromey <tom@tromey.com>
3637
3638 * valprint.c (set_radix, show_radix): Constify.
3639
8d97dc1c
TT
36402017-09-27 Tom Tromey <tom@tromey.com>
3641
3642 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3643
eb7c454d
TT
36442017-09-27 Tom Tromey <tom@tromey.com>
3645
3646 * command.h (not_just_help_class_command): Update.
3647 * cli/cli-decode.h (not_just_help_class_command): Update.
3648 * cli/cli-decode.c (not_just_help_class_command): Constify.
3649
e4e33335
TT
36502017-09-27 Tom Tromey <tom@tromey.com>
3651
3652 * gdb_bfd.c (maintenance_info_bfds): Constify.
3653
0450cc4c
TT
36542017-09-27 Tom Tromey <tom@tromey.com>
3655
3656 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3657 overloads.
3658 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3659 (do_const_cfunc): New function.
3660 (cmd_cfunc_eq): New overload.
3661 (cli_user_command_p): Check do_const_cfunc.
3662 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3663 const_cfunc.
3664 * command.h (add_cmd): Add const overload and no-function
3665 overload.
3666 (set_cmd_cfunc): Add const overload.
3667 (cmd_const_cfunc_ftype): Declare.
3668 (cmd_cfunc_eq): Add const overload.
3669 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3670 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3671 overload.
3672
a9bbfbd8
TT
36732017-09-27 Tom Tromey <tom@tromey.com>
3674
3675 * macroexp.c (get_next_token_for_substitution): New function.
3676 (substitute_args): Call it. Check for __VA_OPT__.
3677
5230b05a
WT
36782017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3679 Pedro Alves <palves@redhat.com>
3680
3681 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3682 producer_is_icc_lt_14.
3683 (producer_is_icc_lt_14): New function.
3684 (check_producer): Add code for checking version of ICC.
3685 (producer_is_icc): Move to producer.c.
3686 (read_structure_type): Restrict ICC workaround to ICC<14.
3687 * producer.c: Include selftest.h.
3688 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3689 New functions.
3690 * producer.h (producer_is_icc): New declaration.
3691
b32b108a
WT
36922017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3693
3694 * Makefile.in (SFILES): Add producer.c.
3695 (COMMON_OBS): Add producer.o
3696 * amd64-tdep.c (producer.h): Add new include.
3697 * dwarf2read.c (producer.h): Add new include.
3698 * producer.c: New file.
3699 * producer.h: New file.
3700 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3701 producer.c.
3702 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3703 producer.h.
3704
5007d765
MK
37052017-09-26 Matthias Klose <doko@ubuntu.com>
3706
3707 * configure.ac: Search ncursesw before ncurses.
3708 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3709 * gdb_curses.h: Include <ncursesw/ncurses.h>
3710 * config.in, configure: Regenerate.
3711
281c4447
RO
37122017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3713
3714 PR gdb/22185
3715 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3716 obsolete.
3717 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3718 Remove i386sol2 support.
3719 * configure.nat <i386sol2>: Remove.
3720 <sol2-64>: Fold into ...
3721 <sol2>: ... this.
3722 Move common settings to default section.
3723 Add sol-thread.o.
3724 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3725 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3726 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3727 <i[34567]86-*-solaris*>: Remove.
3728 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3729
3730 * configure.ac: Remove wctype in libw check.
3731 (_MSE_INT_H): Don't define on Solaris 7-9.
3732 <solaris*>: Remove libthread_db.so.1 check.
3733 * configure: Regenerate.
3734 * config.in: Regenerate.
3735
3736 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3737 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3738 (gdb_ps_size_t): Remove.
3739 Use base types in users.
3740 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3741
3742 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3743
39b06c20
RO
37442017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3745
3746 PR build/22206
3747 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3748 (adi_is_addr_mapped): Likewise.
3749 (PSR_ICC): Don't redefine.
3750 (PSR_IMPL): Likewise.
3751
6c3e20f1
TT
37522017-09-25 Tom Tromey <tom@tromey.com>
3753
3754 * regcache.c (regcache::dump): Use string_printf.
3755
b292235f
TT
37562017-09-25 Tom Tromey <tom@tromey.com>
3757
3758 * regcache.c (class regcache_invalidator): New.
3759 (struct register_to_invalidate): Remove.
3760 (make_cleanup_regcache_invalidate): Remove.
3761 (regcache::raw_write): Use regcache_invalidator.
3762
9ac86b52
TT
37632017-09-25 Tom Tromey <tom@tromey.com>
3764
3765 * spu-tdep.c (spu2ppu_sniffer): Update.
3766 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3767 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3768 Remove.
3769 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3770 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3771 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3772 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3773 (frame_pop): Update.
3774
c0e383c6
TT
37752017-09-25 Tom Tromey <tom@tromey.com>
3776
3777 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3778 * regcache.h (regcache_xfree): Don't declare.
3779 * regcache.c (regcache_xfree): Remove.
3780 (do_regcache_xfree): Use delete.
3781 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3782 * linux-fork.c (free_fork): Use delete.
3783 (fork_save_infrun_state): Likewise.
3784 * jit.c (jit_dealloc_cache): Use delete.
3785 * infrun.c (discard_infcall_suspend_state): Use delete.
3786
791199cc
TT
37872017-09-25 Tom Tromey <tom@tromey.com>
3788
3789 * regcache.h (regcache_xmalloc): Don't declare.
3790 (regcache_raw_set_cached_value): Update comment.
3791 * regcache.c (regcache_xmalloc): Remove.
3792 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3793 * jit.c (jit_frame_sniffer): Use new.
3794 * frame.c (frame_save_as_regcache): Use new.
3795
289e23aa
AA
37962017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3797
3798 * NEWS: Advertise support for guarded-storage registers on IBM z.
3799
1b63490c
AA
38002017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3801
3802 * s390-linux-nat.c (have_regset_gs): New static variable.
3803 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3804 control block and guarded-storage broadcast control regsets.
3805 (s390_read_description): Detect whether the target has
3806 guarded-storage support, return appropriate tdesc.
3807 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3808 (features/s390x-gs-linux64.c): Likewise.
3809 (struct gdbarch_tdep) <have_gs>: New field.
3810 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3811 (s390_gsbc_regset): New variables.
3812 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3813 and s390_gsbc_regset, if applicable.
3814 (s390_core_read_description): Check whether core file was from a
3815 target with guarded-storage support; include appropriate regsets.
3816 (s390_gdbarch_init): Add registers for guarded-storage support.
3817 (_initialize_s390_tdep): Initialize new target descriptions that
3818 include registers for guarded-storage support.
3819 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3820 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3821 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3822 (S390_NUM_REGS): Adjust macro definition.
3823 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3824 (tdesc_s390x_gs_linux64): New declarations.
3825
96235dc1
AA
38262017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3827
3828 * features/s390-gs-linux64.xml: New file.
3829 * features/s390-gs.xml: New file.
3830 * features/s390-gsbc.xml: New file.
3831 * features/s390x-gs-linux64.xml: New file.
3832 * features/Makefile (WHICH): Add s390-gs-linux64 and
3833 s390x-gs-linux64.
3834 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3835 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3836 * features/s390-gs-linux64.c: New generated file.
3837 * features/s390x-gs-linux64.c: New file.
3838 * regformats/s390-gs-linux64.dat: New file.
3839 * regformats/s390x-gs-linux64.dat: New file.
3840
b4a7c699
TT
38412017-09-23 Tom Tromey <tom@tromey.com>
3842
3843 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3844
c2f97536
TT
38452017-09-22 Tom Tromey <tom@tromey.com>
3846
3847 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3848 type to scoped_restore_tmpl.
3849 <scoped_input_handler>: Initialize m_quit_handler directly.
3850
43573013
SDJ
38512017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3852
3853 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3854 (cd_command): Likewise. Free "current_directory" before
3855 assigning to it.
3856 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3857 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3858 * top.c (gdb_dirbuf): Remove global declaration.
3859 * top.h (gdb_dirbuf): Likewise.
3860
6ec2e0f5
SDJ
38612017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3862
3863 * gnulib/aclocal.m4: Regenerate.
3864 * gnulib/config.in: Regenerate.
3865 * gnulib/configure: Regenerate.
3866 * gnulib/import/Makefile.am: Regenerate.
3867 * gnulib/import/Makefile.in: Regenerate.
3868 * gnulib/import/assure.h: New file.
3869 * gnulib/import/at-func.c: Likewise
3870 * gnulib/import/chdir-long.c: New file.
3871 * gnulib/import/chdir-long.h: New file.
3872 * gnulib/import/cloexec.c: New file.
3873 * gnulib/import/cloexec.h: New file.
3874 * gnulib/import/close.c: New file.
3875 * gnulib/import/closedir.c: New file.
3876 * gnulib/import/dirent-private.h: New file.
3877 * gnulib/import/dup-safer.c: New file.
3878 * gnulib/import/dup.c: New file.
3879 * gnulib/import/dup2.c: New file.
3880 * gnulib/import/error.c: New file.
3881 * gnulib/import/error.h: New file.
3882 * gnulib/import/exitfail.c: New file.
3883 * gnulib/import/exitfail.h: New file.
3884 * gnulib/import/fchdir.c: New file.
3885 * gnulib/import/fcntl.c: New file.
3886 * gnulib/import/fcntl.in.h: New file.
3887 * gnulib/import/fd-hook.c: New file.
3888 * gnulib/import/fd-hook.h: New file.
3889 * gnulib/import/fd-safer.c: New file.
3890 * gnulib/import/fdopendir.c: New file.
3891 * gnulib/import/filename.h: New file.
3892 * gnulib/import/filenamecat-lgpl.c: New file.
3893 * gnulib/import/filenamecat.h: New file.
3894 * gnulib/import/fstat.c: New file.
3895 * gnulib/import/fstatat.c: New file.
3896 * gnulib/import/getcwd-lgpl.c: New file.
3897 * gnulib/import/getcwd.c: New file.
3898 * gnulib/import/getdtablesize.c: New file.
3899 * gnulib/import/getlogin_r.c: New file.
3900 * gnulib/import/getprogname.c: New file.
3901 * gnulib/import/getprogname.h: New file.
3902 * gnulib/import/gettext.h: New file.
3903 * gnulib/import/glob-libc.h: New file.
3904 * gnulib/import/glob.c: New file.
3905 * gnulib/import/glob.in.h: New file.
3906 * gnulib/import/intprops.h: New file.
3907 * gnulib/import/m4/chdir-long.m4: New file.
3908 * gnulib/import/m4/close.m4: New file.
3909 * gnulib/import/m4/closedir.m4: New file.
3910 * gnulib/import/m4/d-ino.m4: New file.
3911 * gnulib/import/m4/d-type.m4: New file.
3912 * gnulib/import/m4/dup.m4: New file.
3913 * gnulib/import/m4/dup2.m4: New file.
3914 * gnulib/import/m4/error.m4: New file.
3915 * gnulib/import/m4/fchdir.m4: New file.
3916 * gnulib/import/m4/fcntl.m4: New file.
3917 * gnulib/import/m4/fcntl_h.m4: New file.
3918 * gnulib/import/m4/fdopendir.m4: New file.
3919 * gnulib/import/m4/filenamecat.m4: New file.
3920 * gnulib/import/m4/fstat.m4: New file.
3921 * gnulib/import/m4/fstatat.m4: New file.
3922 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3923 * gnulib/import/m4/getcwd-path-max.m4: New file.
3924 * gnulib/import/m4/getcwd.m4: New file.
3925 * gnulib/import/m4/getdtablesize.m4: New file.
3926 * gnulib/import/m4/getlogin_r.m4: New file.
3927 * gnulib/import/m4/getprogname.m4: New file.
3928 * gnulib/import/m4/glob.m4: New file.
3929 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3930 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3931 * gnulib/import/m4/mempcpy.m4: New file.
3932 * gnulib/import/m4/memrchr.m4: New file.
3933 * gnulib/import/m4/mode_t.m4: New file.
3934 * gnulib/import/m4/msvc-inval.m4: New file.
3935 * gnulib/import/m4/msvc-nothrow.m4: New file.
3936 * gnulib/import/m4/open.m4: New file.
3937 * gnulib/import/m4/openat.m4: New file.
3938 * gnulib/import/m4/opendir.m4: New file.
3939 * gnulib/import/m4/readdir.m4: New file.
3940 * gnulib/import/m4/realloc.m4: New file.
3941 * gnulib/import/m4/rewinddir.m4: New file.
3942 * gnulib/import/m4/save-cwd.m4: New file.
3943 * gnulib/import/m4/strdup.m4: New file.
3944 * gnulib/import/m4/strerror.m4: New file.
3945 * gnulib/import/m4/unistd-safer.m4: New file.
3946 * gnulib/import/mempcpy.c: New file.
3947 * gnulib/import/memrchr.c: New file.
3948 * gnulib/import/msvc-inval.c: New file.
3949 * gnulib/import/msvc-inval.h: New file.
3950 * gnulib/import/msvc-nothrow.c: New file.
3951 * gnulib/import/msvc-nothrow.h: New file.
3952 * gnulib/import/open.c: New file.
3953 * gnulib/import/openat-die.c: New file.
3954 * gnulib/import/openat-priv.h: New file.
3955 * gnulib/import/openat-proc.c: New file.
3956 * gnulib/import/openat.c: New file.
3957 * gnulib/import/openat.h: New file.
3958 * gnulib/import/opendir.c: New file.
3959 * gnulib/import/pipe-safer.c: New file.
3960 * gnulib/import/readdir.c: New file.
3961 * gnulib/import/realloc.c: New file.
3962 * gnulib/import/rewinddir.c: New file.
3963 * gnulib/import/save-cwd.c: New file.
3964 * gnulib/import/save-cwd.h: New file.
3965 * gnulib/import/strdup.c: New file.
3966 * gnulib/import/strerror-override.c: New file.
3967 * gnulib/import/strerror-override.h: New file.
3968 * gnulib/import/strerror.c: New file.
3969 * gnulib/import/unistd--.h: New file.
3970 * gnulib/import/unistd-safer.h: New file.
3971 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3972 "getcwd" and "glob".
3973 * ser-tcp.c: Undefine "close" before redefining it.
3974
432ae719
SM
39752017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3978 get rid of res_val.
3979
4fa7574e
RO
39802017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3981
3982 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3983 <sol2,sparc>: Likewise.
3984 <sol2-64,i386>: Likewise.
3985
3986 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3987 -Wdeprecated-declarations on *-*-solaris*.
3988 * configure: Regenerate.
3989
3990 * procfs.c: Include "nat/inferior.h".
3991 (procfs_info_proc): Fix typo.
3992
f6327dcb
KB
39932017-09-21 Kevin Buettner <kevinb@redhat.com>
3994
3995 * remote.c (vector): Include.
3996 (struct private_thread_info): Add field, thread_handle.
3997 (free_private_thread_info): Deallocate storage associated with
3998 thread handle.
3999 (get_private_info_thread): Initialize `thread_handle' field.
4000 (struct thread_item): Add field, thread_handle.
4001 (clear_threads_listing_context): Deallocate storage associated
4002 with thread handle.
4003 (start_thread): Add support for "handle" attribute.
4004 (thread_attributes): Add "handle".
4005 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4006 field.
4007 (remote_update_thread_list): Update thread_handle.
4008 (remote_thread_handle_to_thread_info): New function.
4009 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4010
fbbe5337
KB
40112017-09-21 Kevin Buettner <kevinb@redhat.com>
4012
4013 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4014 function.
4015 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4016 * python/python-internal.h (thread_object_type): Declare.
4017
e04ee09e
KB
40182017-09-21 Kevin Buettner <kevinb@redhat.com>
4019
4020 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4021 (target_thread_handle_to_thread_info): Declare.
4022 * target.c (target_thread_handle_to_thread_info): New function.
4023 * target-delegates.c: Regenerate.
4024 * gdbthread.h (find_thread_by_handle): Declare.
4025 * thread.c (find_thread_by_handle): New function.
4026 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4027 function.
4028 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4029
1e5b66ed
SM
40302017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4031
4032 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4033
ebe48ba0
SM
40342017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4035
4036 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4037
0a0bf5dc
YQ
40382017-09-21 Yao Qi <yao.qi@linaro.org>
4039
4040 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4041 to gdb_target_obs.
4042
d1b0a7bf
TT
40432017-09-20 Tom Tromey <tom@tromey.com>
4044
4045 * breakpoint.c (struct counted_command_line): Remove.
4046 (breakpoint_commands): Update.
4047 (alloc_counted_command_line, incref_counted_command_line)
4048 (decref_counted_command_line, do_cleanup_counted_command_line)
4049 (make_cleanup_decref_counted_command_line): Remove.
4050 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4051 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4052 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4053 (save_breakpoints): Update.
4054 * breakpoint.h (counted_command_line): Now a typedef to
4055 shared_ptr.
4056 (struct breakpoint) <commands>: Now a counted_command_line.
4057 (struct bpstats) <command>: Likewise.
4058
48649e1b
TT
40592017-09-20 Tom Tromey <tom@tromey.com>
4060
4061 * breakpoint.c (struct commands_info, do_map_commands_command):
4062 Remove.
4063 (commands_command_1): Update.
4064 (iterate_over_related_breakpoints): Take a function_view.
4065 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4066 (delete_command): Update.
4067 (map_breakpoint_numbers): Take a function_view.
4068 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4069 (disable_command): Update.
4070 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4071 (enable_command): Update.
4072 (struct disp_data, do_enable_breakpoint_disp)
4073 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4074 (do_map_enable_delete_breakpoint): Remove.
4075 (enable_once_command, enable_count_command, enable_delete_command)
4076 (delete_trace_variable_command): Update.
4077
04afa70c
TT
40782017-09-20 Tom Tromey <tom@tromey.com>
4079
4080 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4081 (bpstat_clear): Use delete.
4082 (bpstats): New constructors.
4083 (bpstat_copy, bpstat_stop_status): Use new.
4084 (dprintf_after_condition_true): Update.
4085 * breakpoint.h (bpstats::bpstats): Add constructors.
4086 (bpstats::~bpstats): Add destructor.
4087
c83833f4
PA
40882017-09-20 Pedro Alves <palves@redhat.com>
4089
4090 * eval.c (make_params): Delete, refactored as ...
4091 (class fake_method): ... this new type's ctor.
4092 (fake_method::~fake_method): New.
4093 (evaluate_subexp_standard): Use 'fake_method'.
4094
223ffa71
TT
40952017-09-20 Tom Tromey <tom@tromey.com>
4096
4097 * windows-nat.c (get_windows_debug_event, windows_wait)
4098 (do_initial_windows_stuff, windows_attach): Update.
4099 * utils.c (vwarning, internal_vproblem): Update.
4100 (ui_unregister_input_event_handler_cleanup)
4101 (prepare_to_handle_input): Remove.
4102 (class scoped_input_handler): New.
4103 (defaulted_query, prompt_for_continue): Update.
4104 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4105 Update.
4106 * top.c (undo_terminal_modifications_before_exit): Update.
4107 * target/target.h (target_terminal_init, target_terminal_inferior)
4108 (target_terminal_ours): Don't declare.
4109 (class target_terminal): New.
4110 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4111 (target_terminal_ours_for_output)
4112 (make_cleanup_restore_target_terminal): Don't declare.
4113 (target_terminal_info): Remove.
4114 * target.c (enum terminal_state, terminal_state): Remove.
4115 (target_terminal::terminal_state): Define.
4116 (target_terminal::init): Rename from target_terminal_init.
4117 (target_terminal::inferior): Rename from
4118 target_terminal_inferior.
4119 (target_terminal::ours): Rename from target_terminal_ours.
4120 (target_terminal::ours_for_output): Rename from
4121 target_terminal_ours_for_output.
4122 (target_terminal::info): New method.
4123 (cleanup_restore_target_terminal)
4124 (make_cleanup_restore_target_terminal): Remove.
4125 * solib.c (handle_solib_event): Update.
4126 * remote.c (remote_serial_quit_handler): Update.
4127 (remote_terminal_inferior, remote_wait_as): Update.
4128 * record-full.c (record_full_wait_1): Update.
4129 * nto-procfs.c (procfs_create_inferior): Update.
4130 * nat/fork-inferior.c (startup_inferior): Update.
4131 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4132 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4133 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4134 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4135 (mi_breakpoint_created, mi_breakpoint_deleted)
4136 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4137 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4138 (mi_user_selected_context_changed, report_initial_inferior):
4139 Update.
4140 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4141 (linux_nat_terminal_inferior): Update.
4142 * infrun.c (follow_fork_inferior)
4143 (handle_vfork_child_exec_or_exit, do_target_resume)
4144 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4145 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4146 Update.
4147 * inflow.c (child_terminal_init, info_terminal_command): Update.
4148 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4149 (attach_command): Update.
4150 * infcall.c (call_thread_fsm_should_stop): Update.
4151 * gnu-nat.c (gnu_attach): Update.
4152 * extension.c (struct active_ext_lang_state)
4153 (restore_active_ext_lang): Update.
4154 * exceptions.c (print_flush): Update.
4155 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4156 (struct quit_handler_cleanup_data, restore_quit_handler)
4157 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4158 Remove.
4159 * cp-support.c (gdb_demangle): Update.
4160 * breakpoint.c (update_inserted_breakpoint_locations)
4161 (insert_breakpoint_locations, handle_jit_event)
4162 (disable_breakpoints_in_unloaded_shlib): Update.
4163 * annotate.c (annotate_breakpoints_invalid)
4164 (annotate_frames_invalid): Update.
4165
013af3fc
TT
41662017-09-20 Tom Tromey <tom@tromey.com>
4167
4168 * main.c (catch_command_errors): Rename from
4169 catch_command_errors_const.
4170 (captured_main_1): Update.
4171
06871ae8
PA
41722017-09-20 Pedro Alves <palves@redhat.com>
4173
4174 * cli/cli-cmds.c (list_command): Use print_sal_location.
4175 (print_sal_location): New function.
4176 (ambiguous_line_spec): Use print_sal_location.
4177 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4178 * symtab.c (find_function_start_sal): Likewise.
4179 * symtab.h (symtab_and_line::symbol): New field.
4180
e5f25bc5
PA
41812017-09-20 Pedro Alves <palves@redhat.com>
4182
4183 * linespec.c (minsym_found): Handle non-text minsyms.
4184 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4185
1b7fa39e
WT
41862017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4187
4188 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4189 backslash.
4190
37dd0825
WT
41912017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4192
4193 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4194 vmovups instead vmovaps.
4195 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4196
4e5a4f58
JB
41972017-09-19 John Baldwin <jhb@FreeBSD.org>
4198
4199 * NEWS (Changes since GDB 8.0): Add starti.
4200 * infcmd.c (enum run_break): New.
4201 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4202 case.
4203 (run_command): Use enum run_how.
4204 (start_command): Likewise.
4205 (starti_command): New function.
4206 (RUN_ARGS_HELP): New macro.
4207 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4208 commands. Add starti command.
4209
aa70c9f1
YQ
42102017-09-19 Yao Qi <yao.qi@linaro.org>
4211
4212 * Makefile.in (monitor.o): Remove the rule.
4213
d6541620
YQ
42142017-09-19 Yao Qi <yao.qi@linaro.org>
4215
4216 * annotate.h (struct annotate_arg_emitter): Use
4217 DISABLE_COPY_AND_ASSIGN.
4218 * common/refcounted-object.h (refcounted_object): Likewise.
4219 * completer.h (struct completion_result): Likewise.
4220 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4221 * filename-seen-cache.h (filename_seen_cache): Likewise.
4222 * gdbcore.h (thread_section_name): Likewise.
4223 * gdb_regex.h (compiled_regex): Likewise.
4224 * gdbthread.h (scoped_restore_current_thread): Likewise.
4225 * inferior.h (scoped_restore_current_inferior): Likewise.
4226 * jit.c (jit_reader): Likewise.
4227 * linespec.h (struct linespec_result): Likewise.
4228 * mi/mi-parse.h (struct mi_parse): Likewise.
4229 * nat/fork-inferior.c (execv_argv): Likewise.
4230 * progspace.h (scoped_restore_current_program_space): Likewise.
4231 * python/python-internal.h (class gdbpy_enter): Likewise.
4232 * regcache.h (regcache): Likewise.
4233 * target-descriptions.c (struct tdesc_reg): Likewise.
4234 (struct tdesc_type): Likewise.
4235 (struct tdesc_feature): Likewise.
4236 * ui-out.h (ui_out_emit_type): Likewise.
4237
0615127c
SM
42382017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4239
4240 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4241 label abort_expression.
4242
5e187554
SM
42432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4244
4245 * common/buffer.c (buffer_xml_printf): Adjust.
4246 * common/xml-utils.c (xml_escape_text): Change return type to
4247 std::string, update code accordingly.
4248 * common/xml-utils.h (xml_escape_text): Change return type to
4249 std::string.
4250 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4251 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4252 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4253 Adjust.
4254
c3d7b541
SM
42552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4256
4257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4258 (SUBDIR_UNITTESTS_OBS): Add new object file.
4259 * unittests/xml-utils-selftests.c: New file.
4260
1526853e
SM
42612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4262
4263 * common/selftest.h (selftest): New struct/interface.
4264 (register_test): Add name parameter, add new overload.
4265 (run_tests): Add filter parameter.
4266 (for_each_selftest_ftype): New typedef.
4267 (for_each_selftest): New declaration.
4268 * common/selftest.c (tests): Change type to
4269 map<string, unique_ptr<selftest>>.
4270 (simple_selftest): New struct.
4271 (register_test): New function.
4272 (register_test): Add name parameter and use it.
4273 (run_tests): Add filter parameter and use it. Add prints.
4274 Adjust to vector -> map change.
4275 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4276 registering selftests.
4277 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4278 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4279 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4280 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4281 * findvar.c (_initialize_findvar): Likewise.
4282 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4283 * maint.c (maintenance_selftest): Update call to run_tests.
4284 (maintenance_info_selftests): New function.
4285 (_initialize_maint_cmds): Register "maintenance info selftests"
4286 command. Update "maintenance selftest" doc.
4287 * regcache.c (_initialize_regcache): Add names when registering
4288 selftests.
4289 * rust-exp.y (_initialize_rust_exp): Likewise.
4290 * selftest-arch.c (gdbarch_selftest): New struct.
4291 (gdbarch_tests): Remove.
4292 (register_test_foreach_arch): Add name parameter. Call
4293 register_test.
4294 (tests_with_arch): Remove, move most content to
4295 gdbarch_selftest::operator().
4296 (_initialize_selftests_foreach_arch): Remove.
4297 * selftest-arch.h (register_test_foreach_arch): Add name
4298 parameter.
4299 (run_tests_with_arch): New declaration.
4300 * utils-selftests.c (_initialize_utils_selftests): Add names
4301 when registering selftests.
4302 * utils.c (_initialize_utils): Likewise.
4303 * unittests/array-view-selftests.c
4304 (_initialize_array_view_selftests): Likewise.
4305 * unittests/environ-selftests.c (_initialize_environ_selftests):
4306 Likewise.
4307 * unittests/function-view-selftests.c
4308 (_initialize_function_view_selftests): Likewise.
4309 * unittests/offset-type-selftests.c
4310 (_initialize_offset_type_selftests): Likewise.
4311 * unittests/optional-selftests.c
4312 (_initialize_optional_selftests): Likewise.
4313 * unittests/scoped_restore-selftests.c
4314 (_initialize_scoped_restore_selftests): Likewise.
4315 * NEWS: Document "maintenance selftest" and "maint info
4316 selftests".
4317
5846367a
SM
43182017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4319
4320 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4321 scoped_restore.
4322
bd77e8ff
SM
43232017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4324
4325 * mi/mi-main.c (mi_load_progress): Make uiout variable
4326 a unique_ptr.
4327
26a67918
PA
43282017-09-15 Pedro Alves <palves@redhat.com>
4329
4330 * compile/compile-c-types.c (convert_enum, convert_int)
4331 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4332
3f8a7804
SM
43332017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4334
4335 * dwarf2read.c (copy_string): Remove.
4336 (parse_macro_definition): Replace copy_string with savestring.
4337
8d200706
YQ
43382017-09-15 Yao Qi <yao.qi@linaro.org>
4339
4340 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4341 gdb_target_obs.
4342 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4343 Likewise.
4344 (i[34567]86-*-linux*): Likewise.
4345
d185219d
SM
43462017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4347
4348 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4349 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4350 <stack>: Change type to std::vector.
4351 <stack_len, stack_allocated>: Remove.
4352 <grow_stack>: Remove.
4353 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4354 (dwarf_expr_context::~dwarf_expr_context): Remove.
4355 (dwarf_expr_context::grow_stack): Remove.
4356 (dwarf_expr_context::push): Adjust.
4357 (dwarf_expr_context::pop): Adjust.
4358 (dwarf_expr_context::fetch): Adjust.
4359 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4360 (dwarf_expr_context::stack_empty_p): Adjust.
4361 (dwarf_expr_context::execute_stack_op): Adjust.
4362
eccd80d6
SM
43632017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4364
4365 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4366 return type to bool.
4367 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4368
69009882
SM
43692017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4370
4371 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4372 Change type to bool.
4373 (dwarf_stack_value) <in_stack_memory>: Likewise.
4374 (dwarf_expr_context) <push_address>: Change parameter type to
4375 bool.
4376 <fetch_in_stack_memory>: Change return type to bool.
4377 <push>: Change parameter type to bool.
4378 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4379 to bool.
4380 (dwarf_expr_context::push_address): Likewise.
4381 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4382 to bool.
4383 (dwarf_expr_context::execute_stack_op): Adjust.
4384 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4385
1e467161
SM
43862017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4387
4388 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4389 (struct dwarf_expr_context) <n_pieces>: Remove.
4390 <pieces>: Change type to std::vector.
4391 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4392 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4393 pieces.
4394 (dwarf_expr_context::add_piece): Adjust.
4395 * dwarf2loc.c (struct piece_closure): Initialize fields.
4396 <n_pieces>: Remove.
4397 <pieces>: Change type to std::vector.
4398 (allocate_piece_closure): Adjust, change parameter to
4399 std::vector rvalue and std::move it to piece_closure.
4400 (rw_pieced_value): Adjust.
4401 (check_pieced_synthetic_pointer): Adjust.
4402 (indirect_synthetic_pointer): Adjust.
4403 (coerce_pieced_ref): Adjust.
4404 (free_pieced_value_closure): Adjust. Use delete to free
4405 piece_closure.
4406 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4407 to allocate_piece_closure.
4408 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4409
0782db84
SM
44102017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4411
4412 * probe.h (probe_ops_cp): Remove typedef.
4413 (DEF_VEC_P (probe_ops_cp)): Remove.
4414 (all_probe_ops): Change type to std::vector.
4415 * probe.c (info_probes_for_ops): Adjust to vector change.
4416 (probe_linespec_to_ops): Likewise.
4417 (all_probe_ops): Change type to std::vector.
4418 (_initialize_probe): Adjust to vector change.
4419 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4420 * elfread.c (elf_get_probes): Likewise.
4421 * stap-probe.c (_initialize_stap_probe): Likewise.
4422
1eac6bea
SM
44232017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4424
4425 * probe.h (struct bound_probe): Define constructors.
4426 * probe.c (bound_probe_s): Remove typedef.
4427 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4428 (collect_probes): Change return type to std::vector, remove
4429 cleanup.
4430 (compare_probes): Return bool, change parameter type. Change
4431 semantic to "less than".
4432 (gen_ui_out_table_header_info): Change parameter to std::vector
4433 and update.
4434 (exists_probe_with_pops): Likewise.
4435 (info_probes_for_ops): Update to std::vector change.
4436 (enable_probes_command): Likewise.
4437 (disable_probes_command): Likewise.
4438
aaa63a31
SM
44392017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4440
4441 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4442 vec to std::vector.
4443 * probe.c (parse_probes_in_pspace): Update.
4444 (find_probes_in_objfile): Update.
4445 (find_probe_by_pc): Update.
4446 (collect_probes): Update.
4447 (probe_any_get_probes): Update.
4448 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4449 return type to reference to std::vector.
4450 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4451 std::vector and update.
4452 (dtrace_process_dof): Likewise.
4453 (dtrace_get_probes): Likewise.
4454 * elfread.c (elf_get_probes): Change return type to std::vector,
4455 store an std::vector in bfd_data.
4456 (probe_key_free): Update to std::vector.
4457 * stap-probe.c (handle_stap_probe): Change parameter to
4458 std::vector and update.
4459 (stap_get_probes): Likewise.
4460 * symfile-debug.c (debug_sym_get_probes): Change return type to
4461 std::vector and update.
4462
cb85b21b
TT
44632017-09-11 Tom Tromey <tom@tromey.com>
4464
4465 * breakpoint.c (program_breakpoint_here_p): Update.
4466 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4467 from make_show_memory_breakpoints_cleanup. Return a
4468 scoped_restore_tmpl<int>.
4469 (restore_show_memory_breakpoints): Remove.
4470 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4471 * mem-break.c (memory_validate_breakpoint): Update.
4472 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4473 (ia64_memory_remove_breakpoint): Update.
4474 (ia64_breakpoint_from_pc): Update.
4475 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4476 from make_show_memory_breakpoints_cleanup.
4477
8fbc99ef
TT
44782017-09-11 Tom Tromey <tom@tromey.com>
4479
4480 * d-namespace.c (d_lookup_symbol): Use std::string.
4481 (find_symbol_in_baseclass): Likewise.
4482
50feb4bd
TT
44832017-09-11 Tom Tromey <tom@tromey.com>
4484
4485 * ctf.c (ctf_start): Use std::string.
4486
c6dc63a1
TT
44872017-09-11 Tom Tromey <tom@tromey.com>
4488
4489 * ada-lang.c (is_known_support_routine): Update.
4490 (ada_unhandled_exception_name_addr_from_raise): Update.
4491 * guile/scm-frame.c (gdbscm_frame_name): Update.
4492 * python/py-frame.c (frapy_name): Update.
4493 (frapy_function): Update.
4494 * stack.h (find_frame_funname): Update.
4495 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4496 (print_frame): Update.
4497
d6b9b80f
TT
44982017-09-11 Tom Tromey <tom@tromey.com>
4499
4500 * findcmd.c (put_bits): Take a gdb::byte_vector.
4501 (parse_find_args): Return gdb::byte_vector. "args" now const.
4502 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4503 cleanups.
4504 (find_command): Update.
4505
a9921622
TT
45062017-09-11 Tom Tromey <tom@tromey.com>
4507
4508 * cli/cli-script.c (class scoped_restore_hook_in): New.
4509 (clear_hook_in_cleanup): Remove.
4510 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4511 scoped_restore_hook_in.
4512
be0d7abb
TT
45132017-09-11 Tom Tromey <tom@tromey.com>
4514
4515 * cli/cli-script.c (restore_interp): Remove.
4516 (read_command_lines): Use scoped_restore_interp.
4517 * interps.c (scoped_restore_interp::set_temp): Rename from
4518 interp_set_temp.
4519 * interps.h (class scoped_restore_interp): New.
4520 (interp_set_temp): Remove.
4521
00f675ff
TT
45222017-09-11 Tom Tromey <tom@tromey.com>
4523
4524 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4525 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4526 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4527 scoped_restore.
4528 (mi_cmd_break_insert_1): Update.
4529 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4530 scoped_restore.
4531
cb791d59
TT
45322017-09-11 Tom Tromey <tom@tromey.com>
4533
4534 * demangle.c (demangle_command): Update.
4535 * breakpoint.c (disable_command): Update.
4536 (enable_command): Update.
4537 (find_location_by_number): Make "number" const. Use
4538 get_number_trailer.
4539 * cli/cli-utils.c (extract_arg): Return std::string.
4540 * probe.c (parse_probe_linespec): Update. Change types.
4541 (collect_probes): Take string arguments.
4542 (parse_probe_linespec): Likewise.
4543 (info_probes_for_ops): Update.
4544 (enable_probes_command): Update.
4545 (disable_probes_command): Update.
4546 * break-catch-sig.c (catch_signal_split_args): Update.
4547 * mi/mi-parse.c (mi_parse): Update.
4548
2039bd9f
TT
45492017-09-11 Tom Tromey <tom@tromey.com>
4550
4551 * language.h (language_enum): Make argument const.
4552 * language.c (language_enum): Make argument const.
4553
f1735a53
TT
45542017-09-11 Tom Tromey <tom@tromey.com>
4555
4556 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4557 as function.
4558 (skip_to_space): Rename from skip_to_space_const.
4559 * common/common-utils.c (skip_to_space): New function.
4560 (skip_to_space): Rename from skip_to_space_const.
4561 * cli/cli-utils.h (get_number): Rename from get_number_const.
4562 (extract_arg): Rename from extract_arg_const.
4563 * cli/cli-utils.c (get_number): Rename from get_number_const.
4564 (extract_arg): Rename from extract_arg_const.
4565 (number_or_range_parser::get_number): Use ::get_number.
4566 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4567 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4568 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4569 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4570 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4571 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4572 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4573 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4574
7d221d74
TT
45752017-09-11 Tom Tromey <tom@tromey.com>
4576
4577 * python/python.c (do_start_initialization): Use
4578 py-event-types.def to initialize types.
4579 Define all object type structures.
4580 * python/python-internal.h: Don't declare event initialization
4581 functions.
4582 * python/py-threadevent.c (thread_event_object_type): Don't
4583 define.
4584 * python/py-stopevent.c (stop_event_object_type): Don't define.
4585 * python/py-signalevent.c (signal_event_object_type): Don't
4586 declare or define.
4587 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4588 (clear_objfiles_event_object_type): Don't declare or define.
4589 * python/py-infevents.c (inferior_call_pre_event_object_type)
4590 (inferior_call_post_event_object_type)
4591 (register_changed_event_object_type)
4592 (memory_changed_event_object_type): Don't declare or define.
4593 * python/py-inferior.c (new_thread_event_object_type)
4594 (new_inferior_event_object_type)
4595 (inferior_deleted_event_object_type): Don't declare or define.
4596 * python/py-exitedevent.c (exited_event_object_type): Don't
4597 declare or define.
4598 * python/py-evts.c (gdbpy_initialize_py_events): Use
4599 py-all-events.def.
4600 * python/py-events.h (thread_event_object_type): Don't declare.
4601 (events_object): Use py-all-events.def.
4602 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4603 py-event-types.def.
4604 * python/py-event-types.def: New file.
4605 * python/py-continueevent.c (create_continue_event_object): Don't
4606 declare or define.
4607 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4608 declare or define.
4609 * python/py-all-events.def: New file.
4610
35c61a1d
TT
46112017-09-11 Tom Tromey <tom@tromey.com>
4612
4613 * python/py-threadevent.c (create_thread_event_object): Return
4614 gdbpy_ref.
4615 * python/py-stopevent.h (create_stop_event_object)
4616 (create_breakpoint_event_object, create_signal_event_object):
4617 Update.
4618 * python/py-stopevent.c (create_stop_event_object): Return
4619 gdbpy_ref.
4620 (emit_stop_event): Update.
4621 * python/py-signalevent.c (create_signal_event_object): Return
4622 gdbpy_ref.
4623 * python/py-infevents.c (create_inferior_call_event_object):
4624 Update.
4625 * python/py-event.h (create_event_object)
4626 (create_thread_event_object): Update.
4627 * python/py-event.c (create_event_object): Return gdbpy_ref.
4628 * python/py-continueevent.c: Return gdbpy_ref.
4629 * python/py-bpevent.c (create_breakpoint_event_object): Return
4630 gdbpy_ref.
4631
7c96f8c1
TT
46322017-09-11 Tom Tromey <tom@tromey.com>
4633
4634 PR python/15622:
4635 * NEWS: Add entry.
4636 * python/python.c (do_start_initialization): Initialize new event
4637 types.
4638 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4639 (gdbpy_initialize_inferior_deleted_event)
4640 (gdbpy_initialize_new_thread_event): Declare.
4641 * python/py-threadevent.c (create_thread_event_object): Add option
4642 "thread" parameter.
4643 * python/py-inferior.c (new_thread_event_object_type)
4644 (new_inferior_event_object_type)
4645 (inferior_deleted_event_object_type): Declare.
4646 (python_new_inferior, python_inferior_deleted): New functions.
4647 (add_thread_object): Emit new_thread event.
4648 (gdbpy_initialize_inferior): Attach new functions to corresponding
4649 observers.
4650 (new_thread, new_inferior, inferior_deleted): Define new event
4651 types.
4652 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4653 registries.
4654 * python/py-events.h (events_object) <new_inferior,
4655 inferior_deleted, new_thread>: New fields.
4656 * python/py-event.h (create_thread_event_breakpoint): Add optional
4657 "thread" parameter.
4658
72542b8e
AB
46592017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4660
4661 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4662 check current_ui instead.
4663 (internal_vproblem): Likewise.
4664
0d64823e
SM
46652017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4666
4667 * thread.c (print_thread_info_1): Remove unnecessary calls to
4668 uiout->is_mi_like_p.
4669
eb1e02fd
TT
46702017-09-09 Tom Tromey <tom@tromey.com>
4671
4672 * namespace.h (add_using_directive): Update.
4673 * namespace.c (add_using_directive): Change type of excludes to
4674 std::vector.
4675 * dwarf2read.c (read_import_statement): Use std::vector.
4676 (read_namespace): Update.
4677 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4678
0fc21fd8
TT
46792017-09-09 Tom Tromey <tom@tromey.com>
4680
4681 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4682
49663d05
TT
46832017-09-09 Tom Tromey <tom@tromey.com>
4684
4685 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4686
0b868b60
TT
46872017-09-09 Tom Tromey <tom@tromey.com>
4688
4689 * stack.c (func_command): Use gdb::def_vector.
4690
c0470d48
TT
46912017-09-09 Tom Tromey <tom@tromey.com>
4692
4693 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4694 ui_out_emit_list, ui_out_emit_tuple.
4695 (mi_cmd_var_update): Likewise.
4696
ca5909c7
TT
46972017-09-09 Tom Tromey <tom@tromey.com>
4698
4699 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4700 ui_out_redirect_pop.
4701 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4702 ui_out_redirect_pop.
4703 * utils.c (do_ui_out_redirect_pop)
4704 (make_cleanup_ui_out_redirect_pop): Remove.
4705 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4706 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4707 * ui-out.h (ui_out_redirect_pop): New class.
4708
e6a2252a
TT
47092017-09-09 Tom Tromey <tom@tromey.com>
4710
4711 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4712 (list_available_thread_groups, mi_cmd_list_thread_groups)
4713 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4714 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4715 Likewise.
4716
393702cd
TT
47172017-09-09 Tom Tromey <tom@tromey.com>
4718
4719 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4720 ui_out_emit_tuple.
4721
76f9c9cf
TT
47222017-09-09 Tom Tromey <tom@tromey.com>
4723
4724 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4725 * stack.c (print_frame): Use ui_out_emit_tuple.
4726 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4727 (info_spu_mailbox_command, info_spu_dma_command)
4728 (info_spu_proxydma_command): Likewise.
4729 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4730 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4731 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4732 ui_out_emit_tuple.
4733 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4734
dc9fe180
TT
47352017-09-09 Tom Tromey <tom@tromey.com>
4736
4737 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4738 (class ui_out_emit_table): Update comment.
4739 * ui-out.c (do_cleanup_table_end)
4740 (make_cleanup_ui_out_table_begin_end): Remove.
4741 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4742 (info_spu_dma_cmdlist): Likewise.
4743 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4744 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4745 ui_out_emit_table.
4746
f8cc3da6
TT
47472017-09-09 Tom Tromey <tom@tromey.com>
4748
4749 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4750 ui_out_emit_list, gdb::optional.
4751
481695ed
JB
47522017-09-09 John Baldwin <jhb@FreeBSD.org>
4753
4754 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4755 prototype.
4756 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4757 prototype.
4758 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4759 prototype.
4760 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4761 * ada-exp.y: Remove _initialize_ada_exp prototype.
4762 * ada-lang.c: Remove _initialize_ada_language prototype.
4763 * ada-tasks.c: Remove _initialize_tasks prototype.
4764 * addrmap.c: Remove _initialize_addrmap prototype.
4765 * agent.c: Remove _initialize_agent prototype.
4766 * aix-thread.c: Remove _initialize_aix_thread prototype.
4767 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4768 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4769 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4770 prototype.
4771 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4772 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4773 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4774 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4775 prototype.
4776 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4777 prototype.
4778 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4779 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4780 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4781 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4782 prototype.
4783 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4784 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4785 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4786 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4787 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4788 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4789 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4790 prototype.
4791 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4792 prototype.
4793 * annotate.c: Remove _initialize_annotate prototype.
4794 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4795 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4796 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4797 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4798 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4799 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4800 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4801 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4802 prototype.
4803 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4804 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4805 * auto-load.c: Remove _initialize_auto_load prototype.
4806 * auxv.c: Remove _initialize_auxv prototype.
4807 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4808 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4809 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4810 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4811 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4812 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4813 prototype.
4814 * break-catch-throw.c: Remove _initialize_break_catch_throw
4815 prototype.
4816 * breakpoint.c: Remove _initialize_breakpoint prototype.
4817 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4818 * btrace.c: Remove _initialize_btrace prototype.
4819 * charset.c: Remove _initialize_charset prototype.
4820 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4821 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4822 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4823 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4824 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4825 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4826 * coffread.c: Remove _initialize_coffread prototype.
4827 * compile/compile.c: Remove _initialize_compile prototype.
4828 * complaints.c: Remove _initialize_complaints prototype.
4829 * completer.c: Remove _initialize_completer prototype.
4830 * copying.awk: Remove _initialize_copying prototype.
4831 * copying.c: Regenerate.
4832 * core-regset.c: Remove _initialize_core_regset prototype.
4833 * corefile.c: Remove _initialize_core prototype.
4834 * corelow.c: Remove _initialize_corelow prototype.
4835 * cp-abi.c: Remove _initialize_cp_abi prototype.
4836 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4837 * cp-support.c: Remove _initialize_cp_support prototype.
4838 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4839 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4840 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4841 * ctf.c: Remove _initialize_ctf prototype.
4842 * d-lang.c: Remove _initialize_d_language prototype.
4843 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4844 prototype.
4845 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4846 * dbxread.c: Remove _initialize_dbxread prototype.
4847 * dcache.c: Remove _initialize_dcache prototype.
4848 * demangle.c: Remove _initialize_demangler prototype.
4849 * disasm-selftests.c: Remove _initialize_disasm_selftests
4850 prototype.
4851 * disasm.c: Remove _initialize_disasm prototype.
4852 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4853 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4854 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4855 prototype.
4856 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4857 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4858 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4859 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4860 * elfread.c: Remove _initialize_elfread prototype.
4861 * exec.c: Remove _initialize_exec prototype.
4862 * extension.c: Remove _initialize_extension prototype.
4863 * f-lang.c: Remove _initialize_f_language prototype.
4864 * f-valprint.c: Remove _initialize_f_valprint prototype.
4865 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4866 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4867 * filesystem.c: Remove _initialize_filesystem prototype.
4868 * findcmd.c: Remove _initialize_mem_search prototype.
4869 * fork-child.c: Remove _initialize_fork_child prototype.
4870 * frame-base.c: Remove _initialize_frame_base prototype.
4871 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4872 * frame.c: Remove _initialize_frame prototype.
4873 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4874 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4875 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4876 * gcore.c: Remove _initialize_gcore prototype.
4877 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4878 * gdbarch.c: Regenerate.
4879 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4880 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4881 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4882 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4883 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4884 * go-lang.c: Remove _initialize_go_language prototype.
4885 * go32-nat.c: Remove _initialize_go32_nat prototype.
4886 * guile/guile.c: Remove _initialize_guile prototype.
4887 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4888 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4889 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4890 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4891 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4892 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4893 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4894 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4895 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4896 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4897 prototype.
4898 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4899 prototype.
4900 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4901 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4902 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4903 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4904 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4905 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4906 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4907 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4908 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4909 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4910 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4911 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4912 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4913 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4914 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4915 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4916 prototype.
4917 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4918 prototype.
4919 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4920 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4921 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4922 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4923 * infcall.c: Remove _initialize_infcall prototype.
4924 * infcmd.c: Remove _initialize_infcmd prototype.
4925 * inferior.c: Remove _initialize_inferiors prototype.
4926 * inflow.c: Remove _initialize_inflow prototype.
4927 * infrun.c: Remove _initialize_infrun prototype.
4928 * interps.c: Remove _initialize_interpreter prototype.
4929 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4930 * jit.c: Remove _initialize_jit prototype.
4931 * language.c: Remove _initialize_language prototype.
4932 * linux-fork.c: Remove _initialize_linux_fork prototype.
4933 * linux-nat.c: Remove _initialize_linux_nat prototype.
4934 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4935 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4936 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4937 * m2-lang.c: Remove _initialize_m2_language prototype.
4938 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4939 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4940 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4941 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4942 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4943 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4944 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4945 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4946 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4947 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4948 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4949 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4950 * machoread.c: Remove _initialize_machoread prototype.
4951 * macrocmd.c: Remove _initialize_macrocmd prototype.
4952 * macroscope.c: Remove _initialize_macroscope prototype.
4953 * maint.c: Remove _initialize_maint_cmds prototype.
4954 * mdebugread.c: Remove _initialize_mdebugread prototype.
4955 * memattr.c: Remove _initialize_mem prototype.
4956 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4957 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4958 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4959 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4960 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4961 * microblaze-linux-tdep.c: Remove
4962 _initialize_microblaze_linux_tdep prototype.
4963 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4964 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4965 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4966 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4967 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4968 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4969 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4970 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4971 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4972 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4973 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4974 prototype.
4975 * mipsread.c: Remove _initialize_mipsread prototype.
4976 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4977 prototype.
4978 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4979 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4980 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4981 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4982 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4983 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4984 prototype.
4985 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4986 * nto-procfs.c: Remove _initialize_procfs prototype.
4987 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4988 * objc-lang.c: Remove _initialize_objc_language prototype.
4989 * objfiles.c: Remove _initialize_objfiles prototype.
4990 * observer.c: Remove observer_test_first_notification_function,
4991 observer_test_second_notification_function,
4992 observer_test_third_notification_function, and
4993 _initialize_observer prototypes.
4994 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4995 * osabi.c: Remove _initialize_gdb_osabi prototype.
4996 * osdata.c: Remove _initialize_osdata prototype.
4997 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4998 * parse.c: Remove _initialize_parse prototype.
4999 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5000 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5001 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5002 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5003 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5004 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5005 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5006 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5007 * printcmd.c: Remove _initialize_printcmd prototype.
5008 * probe.c: Remove _initialize_probe prototype.
5009 * proc-api.c: Remove _initialize_proc_api prototype.
5010 * proc-events.c: Remove _initialize_proc_events prototype.
5011 * proc-service.c: Remove _initialize_proc_service prototype.
5012 * procfs.c: Remove _initialize_procfs prototype.
5013 * psymtab.c: Remove _initialize_psymtab prototype.
5014 * python/python.c: Remove _initialize_python prototype.
5015 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5016 * record-btrace.c: Remove _initialize_record_btrace prototype.
5017 * record-full.c: Remove _initialize_record_full prototype.
5018 * record.c: Remove _initialize_record prototype.
5019 * regcache.c: Remove _initialize_regcache prototype.
5020 * reggroups.c: Remove _initialize_reggroup prototype.
5021 * remote-notif.c: Remove _initialize_notif prototype.
5022 * remote-sim.c: Remove _initialize_remote_sim prototype.
5023 * remote.c: Remove _initialize_remote prototype.
5024 * reverse.c: Remove _initialize_reverse prototype.
5025 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5026 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5027 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5028 prototype.
5029 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5030 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5031 * rust-exp.y: Remove _initialize_rust_exp prototype.
5032 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5033 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5034 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5035 * score-tdep.c: Remove _initialize_score_tdep prototype.
5036 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5037 prototype.
5038 * ser-go32.c: Remove _initialize_ser_dos prototype.
5039 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5040 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5041 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5042 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5043 * serial.c: Remove _initialize_serial prototype.
5044 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5045 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5046 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5047 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5048 * skip.c: Remove _initialize_step_skip prototype.
5049 * sol-thread.c: Remove _initialize_sol_thread prototype.
5050 * solib-aix.c: Remove _initialize_solib_aix prototype.
5051 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5052 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5053 * solib-frv.c: Remove _initialize_frv_solib prototype.
5054 * solib-spu.c: Remove _initialize_spu_solib prototype.
5055 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5056 * solib-target.c: Remove _initialize_solib_target prototype.
5057 * solib.c: Remove _initialize_solib prototype.
5058 * source.c: Remove _initialize_source prototype.
5059 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5060 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5061 prototype.
5062 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5063 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5064 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5065 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5066 prototype.
5067 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5068 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5069 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5070 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5071 prototype.
5072 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5073 prototype.
5074 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5075 prototype.
5076 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5077 prototype.
5078 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5079 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5080 prototype.
5081 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5082 prototype.
5083 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5084 prototype.
5085 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5086 prototype.
5087 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5088 prototype.
5089 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5090 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5091 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5092 * stabsread.c: Remove _initialize_stabsread prototype.
5093 * stack.c: Remove _initialize_stack prototype.
5094 * stap-probe.c: Remove _initialize_stap_probe prototype.
5095 * std-regs.c: Remove _initialize_frame_reg prototype.
5096 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5097 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5098 * symfile.c: Remove _initialize_symfile prototype.
5099 * symmisc.c: Remove _initialize_symmisc prototype.
5100 * symtab.c: Remove _initialize_symtab prototype.
5101 * target-dcache.c: Remove _initialize_target_dcache prototype.
5102 * target-descriptions.c: Remove _initialize_target_descriptions
5103 prototype.
5104 * thread.c: Remove _initialize_thread prototype.
5105 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5106 prototype.
5107 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5108 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5109 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5110 prototype.
5111 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5112 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5113 * tracefile.c: Remove _initialize_tracefile prototype.
5114 * tracepoint.c: Remove _initialize_tracepoint prototype.
5115 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5116 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5117 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5118 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5119 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5120 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5121 * tui/tui.c: Remove _initialize_tui prototype.
5122 * typeprint.c: Remove _initialize_typeprint prototype.
5123 * user-regs.c: Remove _initialize_user_regs prototype.
5124 * utils.c: Remove _initialize_utils prototype.
5125 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5126 * valarith.c: Remove _initialize_valarith prototype.
5127 * valops.c: Remove _initialize_valops prototype.
5128 * valprint.c: Remove _initialize_valprint prototype.
5129 * value.c: Remove _initialize_values prototype.
5130 * varobj.c: Remove _initialize_varobj prototype.
5131 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5132 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5133 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5134 * windows-nat.c: Remove _initialize_windows_nat,
5135 _initialize_check_for_gdb_ini, and _initialize_loadable
5136 prototypes.
5137 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5138 * xcoffread.c: Remove _initialize_xcoffread prototype.
5139 * xml-support.c: Remove _initialize_xml_support prototype.
5140 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5141 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5142 prototype.
5143 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5144 prototype.
5145 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5146
a611b5cb
KS
51472017-09-08 Keith Seitz <keiths@redhat.com>
5148
5149 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5150 field.
5151
469412dd
CW
51522017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5153
5154 * f-valprint.c (f_val_print): Remove check for one byte
5155 sized integers. Remove printing of character type.
5156
a5ad232b
FP
51572017-09-08 Frank Penczek <frank.penczek@intel.com>
5158 Christoph Weinmann <christoph.t.weinmann@intel.com>
5159 Bernhard Heckel <bernhard.heckel@intel.com>
5160
5161 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5162 to maintain proper indentation when printing pointers/refs.
5163
e5014227
JB
51642017-09-07 Joel Brobecker <brobecker@adacore.com>
5165
5166 GDB 8.0.1 released.
5167
63c99141
JB
51682017-09-07 Joel Brobecker <brobecker@adacore.com>
5169
5170 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5171
69c1e056
TT
51722017-09-05 Tom Tromey <tom@tromey.com>
5173
5174 * parse.c (funcall_chain): Now a std::vector.
5175 (start_arglist, end_arglist): Simplify.
5176 (free_funcalls): Remove.
5177 (parse_exp_in_context_1): Remove cleanup.
5178
fef704bf
TT
51792017-09-05 Tom Tromey <tom@tromey.com>
5180
5181 * go-exp.y (go_parse): Don't create a cleanup.
5182
5613c585
TT
51832017-09-05 Tom Tromey <tom@tromey.com>
5184
5185 * d-exp.y (PrimaryExpression): Use std::string.
5186 (d_parse): Don't create a cleanup.
5187
eae49211
TT
51882017-09-05 Tom Tromey <tom@tromey.com>
5189
5190 * utils.c (do_clear_parser_state): Remove.
5191 (make_cleanup_clear_parser_state): Remove.
5192 * p-exp.y (pascal_parse): Use scoped_restore.
5193 * m2-exp.y (m2_parse): Use scoped_restore.
5194 * f-exp.y (f_parse): Use scoped_restore.
5195 * d-exp.y (d_parse): Use scoped_restore.
5196 * c-exp.y (c_parse): Use scoped_restore.
5197 * ada-exp.y (ada_parse): Use scoped_restore.
5198 * utils.h (make_cleanup_clear_parser_state): Remove.
5199
73b9be8b
KS
52002017-09-06 Keith Seitz <keiths@redhat.com>
5201
5202 * dwarf2read.c (dw2_linkage_name_attr): New function.
5203 (dw2_linkage_name): New function.
5204 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5205 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5206 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5207
a102602b
KR
52082017-09-06 Kamil Rytarowski <n54@gmx.com>
5209
5210 * config/djgpp/djconfig.sh: Correct shell portability issue.
5211
28ad437d
KR
52122017-09-06 Kamil Rytarowski <n54@gmx.com>
5213
5214 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5215
351787dd
JB
52162017-09-06 John Baldwin <jhb@FreeBSD.org>
5217
5218 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5219 * NEWS: Mention new FreeBSD/mips native configuration.
5220 * configure.host: Add aarch64*-*-freebsd*.
5221 * configure.nat: Likewise.
5222 * aarch64-fbsd-nat.c: New file.
5223
c0f84956
JB
52242017-09-06 John Baldwin <jhb@FreeBSD.org>
5225
5226 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5227 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5228 * NEWS: Mention new FreeBSD/aarch64 target.
5229 * configure.tgt: Add aarch64*-*-freebsd*.
5230 * aarch64-fbsd-tdep.c: New file.
5231 * aarch64-fbsd-tdep.h: New file.
5232
7610297a
KR
52332017-09-06 Kamil Rytarowski <n54@gmx.com>
5234
5235 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5236
fbd1b771
JK
52372017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5238
5239 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5240 of TLS symbols.
5241
5ca79eae
PW
52422017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5243
5244 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5245 call.
5246
bf93d7ba
SM
52472017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5248
5249 * infrun.c (follow_exec): Call add_thread after
5250 target_find_description.
5251
1bb7c059
SM
52522017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5253
5254 * infrun.c (handle_inferior_event_1): When exec'ing, read
5255 stop_pc after follow_exec.
5256
fc809827
SM
52572017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5258
5259 * remote.c (process_g_packet): Update error message.
5260
d2fcdd85
YQ
52612017-09-05 Yao Qi <yao.qi@linaro.org>
5262
5263 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5264 targets.
5265
e69570ee
PA
52662017-09-05 Pedro Alves <palves@redhat.com>
5267
5268 * eval.c (eval_call, evaluate_funcall): New functions, factored
5269 out from ...
5270 (evaluate_subexp_standard): ... this.
5271
22916b07
YQ
52722017-09-05 Yao Qi <yao.qi@linaro.org>
5273
5274 * amd64-tdep.c (amd64_target_description): Create target
5275 descriptions.
5276 (_initialize_amd64_tdep): Don't call functions
5277 initialize_tdesc_amd64_*. Add self tests.
5278 * arch/amd64.c (amd64_create_target_description): Add parameter
5279 is_linux. Call set_tdesc_osabi if is_linux is true.
5280 * arch/amd64.h (amd64_create_target_description): Update the
5281 declaration.
5282 * arch/i386.c (i386_create_target_description): Add parameter
5283 is_linux. Call set_tdesc_osabi if is_linux is true.
5284 * arch/i386.h (i386_create_target_description): Update
5285 declaration.
5286 * configure.tgt: Add i386.o to gdb_target_obs.
5287 * features/Makefile (XMLTOC): Remove i386/*.xml.
5288 * features/i386/amd64-avx-avx512.c: Remove.
5289 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5290 * features/i386/amd64-avx-mpx.c: Remove.
5291 * features/i386/amd64-avx.c: Remove.
5292 * features/i386/amd64-mpx.c: Remove.
5293 * features/i386/amd64.c: Remove.
5294 * features/i386/i386-avx-avx512.c: Remove.
5295 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5296 * features/i386/i386-avx-mpx.c: Remove.
5297 * features/i386/i386-avx.c: Remove.
5298 * features/i386/i386-mmx.c: Remove.
5299 * features/i386/i386-mpx.c: Remove.
5300 * features/i386/i386.c: Remove.
5301 * i386-tdep.c: Don't include features/i386/i386*.c., include
5302 target-descriptions.h and arch/i386.h.
5303 (i386_target_description): Create target descriptions.
5304 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5305 functions. Do self tests.
5306
0854b7b1
YQ
53072017-09-05 Yao Qi <yao.qi@linaro.org>
5308
5309 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5310 * features/i386/amd64-avx-avx512-linux.c: Removed.
5311 * features/i386/amd64-avx-linux.c: Removed.
5312 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5313 * features/i386/amd64-avx-mpx-linux.c: Removed.
5314 * features/i386/amd64-linux.c: Removed.
5315 * features/i386/amd64-mpx-linux.c: Removed.
5316 * features/i386/x32-avx-avx512-linux.c: Removed.
5317 * features/i386/x32-avx-linux.c: Removed.
5318 * features/i386/x32-linux.c: Removed.
5319
b4570e4b
YQ
53202017-09-05 Yao Qi <yao.qi@linaro.org>
5321
5322 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5323 features/i386/*.c.
5324 (amd64_linux_read_description): Call
5325 amd64_create_target_description.
5326 * arch/amd64.c: New file.
5327 * arch/amd64.h: New file.
5328 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5329 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5330
6c73f67f
YQ
53312017-09-05 Yao Qi <yao.qi@linaro.org>
5332
5333 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5334 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5335 (amd64_linux_read_description): Create target descriptions.
5336 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5337 functions. Add unit tests.
5338 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5339 x32-core.xml.
5340 * features/i386/64bit-avx.c: Generated.
5341 * features/i386/64bit-avx512.c: Generated.
5342 * features/i386/64bit-core.c: Generated.
5343 * features/i386/64bit-linux.c: Generated.
5344 * features/i386/64bit-mpx.c: Generated.
5345 * features/i386/64bit-pkeys.c: Generated.
5346 * features/i386/64bit-segments.c: Generated.
5347 * features/i386/64bit-sse.c: Generated.
5348 * features/i386/x32-core.c: Generated.
5349 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5350 c files for amd64-linux and x32-linux.
5351
9d3d478b
YQ
53522017-09-05 Yao Qi <yao.qi@linaro.org>
5353
5354 * amd64-linux-tdep.c (amd64_linux_read_description): New
5355 function.
5356 (amd64_linux_core_read_description): Call
5357 amd64_linux_read_description.
5358 (amd64_linux_init_abi): Likewise.
5359 (amd64_x32_linux_init_abi): Likewise.
5360 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5361 * x86-linux-nat.c (x86_linux_read_description): Call
5362 amd64_linux_read_description.
5363
b9f1d50f
YQ
53642017-09-05 Yao Qi <yao.qi@linaro.org>
5365
5366 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5367 comments.
5368
188c9e6d
YQ
53692017-09-05 Yao Qi <yao.qi@linaro.org>
5370
5371 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5372 * features/i386/i386-avx-avx512-linux.c: Remove.
5373 * features/i386/i386-avx-linux.c: Remove.
5374 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5375 * features/i386/i386-avx-mpx-linux.c: Remove.
5376 * features/i386/i386-linux.c: Remove.
5377 * features/i386/i386-mmx-linux.c: Remove.
5378 * features/i386/i386-mpx-linux.c: Remove.
5379
5f035c07
YQ
53802017-09-05 Yao Qi <yao.qi@linaro.org>
5381
5382 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5383 (SFILES): Add arch/i386.c.
5384 (HFILES_NO_SRCDIR): Add arch/i386.h.
5385 * arch/i386.c: New file.
5386 * arch/i386.h: New file.
5387 * arch/tdesc.h (allocate_target_description): Declare.
5388 (set_tdesc_architecture): Declare.
5389 (set_tdesc_osabi): Declare.
5390 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5391 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5392 include arch/i386.h.
5393 (i386_linux_read_description): Remove code and call
5394 i386_create_target_description.
5395 (set_tdesc_architecture): New function.
5396 (set_tdesc_osabi): New function.
5397 * target-descriptions.h (allocate_target_description): Remove.
5398
0abe8a89
YQ
53992017-09-05 Yao Qi <yao.qi@linaro.org>
5400
5401 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5402 * target-descriptions.c (tdesc_create_feature): Likewise, and
5403 adjust code.
5404 * features/i386/32bit-avx.c: Re-generated.
5405 * features/i386/32bit-avx512.c: Re-generated.
5406 * features/i386/32bit-core.c: Re-generated.
5407 * features/i386/32bit-linux.c: Re-generated.
5408 * features/i386/32bit-mpx.c: Re-generated.
5409 * features/i386/32bit-pkeys.c: Re-generated.
5410 * features/i386/32bit-sse.c: Re-generated.
5411
0a188386
YQ
54122017-09-05 Yao Qi <yao.qi@linaro.org>
5413
5414 * regformats/regdef.h (struct reg): Override operator == and !=.
5415
f49ff000
YQ
54162017-09-05 Yao Qi <yao.qi@linaro.org>
5417
5418 * arch/tdesc.h: New file.
5419 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5420 * target-descriptions.c: Update comments.
5421 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5422 declarations.
5423 * features/i386/32bit-avx.c: Re-generated.
5424 * features/i386/32bit-avx512.c: Re-generated.
5425 * features/i386/32bit-core.c: Re-generated.
5426 * features/i386/32bit-linux.c: Re-generated.
5427 * features/i386/32bit-mpx.c: Re-generated.
5428 * features/i386/32bit-pkeys.c: Re-generated.
5429 * features/i386/32bit-sse.c: Re-generated.
5430
f7000548
YQ
54312017-09-05 Yao Qi <yao.qi@linaro.org>
5432
5433 * regformats/regdat.sh: Update generated code.
5434
c9a5e2a5
YQ
54352017-09-05 Yao Qi <yao.qi@linaro.org>
5436
5437 * regformats/regdat.sh: Adjust code order.
5438
d6b687ac
SM
54392017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5440
5441 * expprint.c (dump_subexp_body_standard): Use constant format
5442 string in fprintf_filtered call.
5443
a379bfd0
JB
54442017-09-04 John Baldwin <jhb@FreeBSD.org>
5445
5446 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5447 NetBSD/i386.
5448 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5449
f7efc967
JB
54502017-09-04 John Baldwin <jhb@FreeBSD.org>
5451
5452 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5453
c49fbc6c
JB
54542017-09-04 John Baldwin <jhb@FreeBSD.org>
5455
5456 * bsd-kvm.o: Define _KMEMUSER.
5457 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5458 * configure: Regenerate.
5459
26562e73
JB
54602017-09-04 John Baldwin <jhb@FreeBSD.org>
5461
5462 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5463 * i386-fbsd-nat.c: Likewise.
5464
31cf1487
JB
54652017-09-04 John Baldwin <jhb@FreeBSD.org>
5466
5467 * unittests/array-view-selftests.c: Add include of <array>.
5468
5b9f8a7c
JB
54692017-09-04 John Baldwin <jhb@FreeBSD.org>
5470
5471 * spu-tdep.c (flush_ea_cache): Add missing argument to
5472 call_function_by_hand.
5473
d69cf9b2
PA
54742017-09-04 Pedro Alves <palves@redhat.com>
5475
5476 * NEWS (Safer support for debugging with no debug info): New.
5477
3693fdb3
PA
54782017-09-04 Pedro Alves <palves@redhat.com>
5479
5480 * c-exp.y (function_method, function_method_void): Add current
5481 instance flags to TYPE_INSTANCE.
5482 * dwarf2read.c (check_modifier): New.
5483 (compute_delayed_physnames): Assert that only C++ adds delayed
5484 physnames. Mark fn_fields as const/volatile depending on
5485 physname.
5486 * eval.c (make_params): New type_instance_flags parameter. Use
5487 it as the new type's instance flags.
5488 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5489 flags element and pass it to make_params.
5490 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5491 instance flags element.
5492 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5493 * gdbtypes.h: Include "enum-flags.h".
5494 (type_instance_flags): New enum-flags type.
5495 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5496 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5497 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5498 (follow_type_instance_flags): New function.
5499 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5500 * parser-defs.h (follow_type_instance_flags): Declare.
5501 * valops.c (value_struct_elt_for_reference): const/volatile must
5502 match too.
5503
e68cb8e0
PA
55042017-09-04 Pedro Alves <palves@redhat.com>
5505
5506 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5507 function/method scopes; lookup the nested name as a function local
5508 static variable.
5509
858be34c
PA
55102017-09-04 Pedro Alves <palves@redhat.com>
5511
5512 (%type <voidval>): Add function_method.
5513 * c-exp.y (exp): New production for calls with no arguments.
5514 (function_method, function_method_void_or_typelist): New
5515 productions.
5516 (exp): New production for "method()::static_var".
5517 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5518 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5519 Handle OP_FUNC_STATIC_VAR.
5520 * parse.c (operator_length_standard):
5521 Handle OP_FUNC_STATIC_VAR.
5522
dd5901a6
PA
55232017-09-04 Pedro Alves <palves@redhat.com>
5524
5525 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5526 handling.
5527 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5528 Ditto.
5529 * parse.c (operator_length_standard, operator_check_standard):
5530 Ditto.
5531 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5532
46a4882b
PA
55332017-09-04 Pedro Alves <palves@redhat.com>
5534
5535 * ax-gdb.c: Include "typeprint.h".
5536 (gen_expr_for_cast): New function.
5537 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5538 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5539 type is unknown.
5540 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5541 nodebug_data_symbol.
5542 * eval.c: Include "typeprint.h".
5543 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5544 Error out if symbol has unknown type.
5545 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5546 evaluate_subexp_for_cast.
5547 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5548 OP_VAR_MSYM_VALUE.
5549 (evaluate_subexp_for_cast): New function.
5550 * gdbtypes.c (init_nodebug_var_type): New function.
5551 (objfile_type): Use it to initialize types of variables with no
5552 debug info.
5553 * typeprint.c (error_unknown_type): New.
5554 * typeprint.h (error_unknown_type): New declaration.
5555 * compile/compile-c-types.c (convert_type_basic): Handle
5556 TYPE_CODE_ERROR; warn and fallback to int for variables with
5557 unknown type.
5558
fe13dfec
PA
55592017-09-04 Pedro Alves <palves@redhat.com>
5560
5561 * eval.c (evaluate_var_value): New function, factored out from ...
5562 (evaluate_subexp_standard): ... here.
5563
d008ee21
PA
55642017-09-04 Pedro Alves <palves@redhat.com>
5565
5566 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5567 Remove useless assignments to 'op'.
5568
827d0c51
PA
55692017-09-04 Pedro Alves <palves@redhat.com>
5570
5571 * eval.c (eval_skip_value): New function.
5572 (evaluate_subexp_standard): Use it.
5573
2c5a2be1
PA
55742017-09-04 Pedro Alves <palves@redhat.com>
5575
5576 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5577 function name from symbol/minsym and pass it to
5578 error_call_unknown_return_type.
5579
74ea4be4
PA
55802017-09-04 Pedro Alves <palves@redhat.com>
5581
5582 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5583 * ax-gdb.c (gen_msym_var_ref): New function.
5584 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5585 * eval.c (evaluate_var_msym_value): New function.
5586 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5587 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5588 to call_function_by_hand.
5589 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5590 Handle OP_VAR_MSYM_VALUE.
5591 (union exp_element) <msymbol>: New field.
5592 * minsyms.h (struct type): Forward declare.
5593 (find_minsym_type_and_address): Declare.
5594 * parse.c (write_exp_elt_msym): New function.
5595 (write_exp_msymbol): Delete, refactored as ...
5596 (find_minsym_type_and_address): ... this new function.
5597 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5598 (operator_length_standard, operator_check_standard): Handle
5599 OP_VAR_MSYM_VALUE.
5600 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5601
7022349d
PA
56022017-09-04 Pedro Alves <palves@redhat.com>
5603
5604 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5605 TYPE_GNU_IFUNC specially here. Throw error if return type is
5606 unknown.
5607 * ada-typeprint.c (print_func_type): Handle functions with unknown
5608 return type.
5609 * c-typeprint.c (c_type_print_base): Handle functions and methods
5610 with unknown return type.
5611 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5612 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5613 * compile/compile-c-types.c: Include "objfiles.h".
5614 (convert_func): For functions with unknown return type, warn and
5615 default to int.
5616 * compile/compile-object-run.c (compile_object_run): Adjust call
5617 to call_function_by_hand_dummy.
5618 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5619 call_function_by_hand.
5620 * eval.c (evaluate_subexp_standard): Adjust calls to
5621 call_function_by_hand. Handle functions and methods with unknown
5622 return type. Pass expect_type to call_function_by_hand.
5623 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5624 return type.
5625 * gcore.c (call_target_sbrk): Adjust call to
5626 call_function_by_hand.
5627 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5628 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5629 an integer address type instead of nodebug.
5630 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5631 call_function_by_hand.
5632 * infcall.c (error_call_unknown_return_type): New function.
5633 (call_function_by_hand): New "default_return_type" parameter.
5634 Pass it down.
5635 (call_function_by_hand_dummy): New "default_return_type"
5636 parameter. Use it instead of defaulting to int. If there's no
5637 default and the return type is unknown, throw an error. If
5638 there's a default return type, and the called function has no
5639 debug info, then assume the function is prototyped.
5640 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5641 New "default_return_type" parameter.
5642 (error_call_unknown_return_type): New declaration.
5643 * linux-fork.c (call_lseek): Cast return type of lseek.
5644 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5645 call_function_by_hand.
5646 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5647 calls to call_function_by_hand.
5648 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5649 return type.
5650 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5651 (value_nsstring, print_object_command): Adjust calls to
5652 call_function_by_hand.
5653 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5654 functions with unknown return type.
5655 (pascal_type_print_func_varspec_suffix): New function.
5656 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5657 TYPE_CODE_METHOD>: Use it.
5658 * python/py-value.c (valpy_call): Adjust call to
5659 call_function_by_hand.
5660 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5661 call_function_by_hand.
5662 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5663 call_function_by_hand.
5664 * valops.c (value_allocate_space_in_inferior): Adjust call to
5665 call_function_by_hand.
5666 * typeprint.c (type_print_unknown_return_type): New function.
5667 * typeprint.h (type_print_unknown_return_type): New declaration.
5668
54990598
PA
56692017-09-04 Pedro Alves <palves@redhat.com>
5670
5671 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5672 types with more than one parameter as prototyped.
5673
9a24775b
PA
56742017-09-04 Pedro Alves <palves@redhat.com>
5675
5676 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5677 (disassemble_command): Use gdb_disassembly_flags instead of bare
5678 int.
5679 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5680 (dump_insns, do_mixed_source_and_assembly_deprecated)
5681 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5682 Use gdb_disassembly_flags instead of bare int.
5683 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5684 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5685 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5686 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5687 (enum gdb_disassembly_flag): ... values of this new enumeration.
5688 (gdb_disassembly_flags): Define.
5689 (gdb_disassembly)
5690 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5691 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5692 gdb_disassembly_flags instead of bare int.
5693 * record-btrace.c (btrace_insn_history)
5694 (record_btrace_insn_history, record_btrace_insn_history_range)
5695 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5696 instead of bare int.
5697 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5698 Use gdb_disassembly_flags instead of bare int.
5699 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5700 Define.
5701 * target-delegates.c: Regenerate.
5702 * target.c (target_insn_history, target_insn_history_from)
5703 (target_insn_history_range): Use gdb_disassembly_flags instead of
5704 bare int.
5705 * target.h: Include "disasm.h".
5706 (struct target_ops) <to_insn_history, to_insn_history_from,
5707 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5708 int.
5709 (target_insn_history, target_insn_history_from)
5710 (target_insn_history_range): Use gdb_disassembly_flags instead of
5711 bare int.
5712
80a65e9b
SM
57132017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * cli/cli-script.c (build_command_line): For if/while commands,
5716 check whether args is empty.
5717
6b66338c
SM
57182017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5719
5720 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5721 (enum command_control_type): Likewise.
5722 (struct command_line): Likewise.
5723 (free_command_lines): Likewise.
5724 (struct command_lines_deleter): Likewise.
5725 (command_line_up): Likewise.
5726 (read_command_lines): Likewise.
5727 (read_command_lines_1): Likewise.
5728 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5729 (enum command_control_type): Likewise.
5730 (struct command_line): Likewise.
5731 (free_command_lines): Likewise.
5732 (struct command_lines_deleter): Likewise.
5733 (command_line_up): Likewise.
5734 (read_command_lines): Likewise.
5735 (read_command_lines_1): Likewise.
5736 * breakpoint.h: Include cli/cli-script.h.
5737 * extension-priv.h: Likewise.
5738 * gdbcmd.h: Likewise.
5739
51abb421
PA
57402017-09-04 Pedro Alves <palves@redhat.com>
5741
5742 * ada-lang.c (is_known_support_routine): Move sal declaration to
5743 where it is initialized.
5744 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5745 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5746 (clear_command, update_static_tracepoint): Remove init_sal
5747 references. Move declarations closer to initializations.
5748 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5749 initializations.
5750 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5751 references. Move sal declarations closer to initializations.
5752 * frame.c (find_frame_sal): Return a symtab_and_line via function
5753 return instead of output parameter. Remove init_sal references.
5754 * frame.h (find_frame_sal): Return a symtab_and_line via function
5755 return instead of output parameter.
5756 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5757 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5758 instead of memset.
5759 (gdbscm_find_pc_line): Remove init_sal reference.
5760 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5761 references. Move declarations closer to initializations.
5762 * infcmd.c (set_step_frame): Update. Move declarations closer to
5763 initializations.
5764 (finish_backward): Remove init_sal references. Move declarations
5765 closer to initializations.
5766 * infrun.c (process_event_stop_test, handle_step_into_function)
5767 (insert_hp_step_resume_breakpoint_at_frame)
5768 (insert_step_resume_breakpoint_at_caller): Likewise.
5769 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5770 (symbol_to_sal): Likewise.
5771 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5772 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5773 to its initialization.
5774 * reverse.c (save_bookmark_command): Use new/delete. Remove
5775 init_sal references. Move declarations closer to initializations.
5776 * source.c (get_current_source_symtab_and_line): Remove brace
5777 initialization.
5778 (set_current_source_symtab_and_line): Now takes the sal by const
5779 reference. Remove brace initialization.
5780 (line_info): Remove init_sal reference.
5781 * source.h (set_current_source_symtab_and_line): Now takes a
5782 symtab_and_line via const reference.
5783 * stack.c (set_current_sal_from_frame): Adjust.
5784 (print_frame_info): Adjust.
5785 (get_last_displayed_sal): Return the sal via function return
5786 instead of via output parameter. Simplify.
5787 (frame_info): Adjust.
5788 * stack.h (get_last_displayed_sal): Return the sal via function
5789 return instead of via output parameter.
5790 * symtab.c (init_sal): Delete.
5791 (find_pc_sect_line): Remove init_sal references. Move
5792 declarations closer to initializations.
5793 (find_function_start_sal): Remove init_sal references. Move
5794 declarations closer to initializations.
5795 * symtab.h (struct symtab_and_line): In-class initialize all
5796 fields.
5797 * tracepoint.c (set_traceframe_context)
5798 (print_one_static_tracepoint_marker): Remove init_sal references.
5799 Move declarations closer to initializations.
5800 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5801 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5802 declarations closer to initializations.
5803 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5804 init_sal references. Adjust.
5805
6c5b2ebe
PA
58062017-09-04 Pedro Alves <palves@redhat.com>
5807
5808 * ax-gdb.c (agent_command_1): Use range-for.
5809 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5810 * breakpoint.c: Include "common/array-view.h".
5811 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5812 parameter from struct symtabs_and_lines to
5813 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5814 (breakpoint_sals_to_pc): Change sals parameter from struct
5815 symtabs_and_lines to std::vector reference.
5816 (check_fast_tracepoint_sals): Change sals parameter from struct
5817 symtabs_and_lines to std::array_view. Use range-for.
5818 (decode_static_tracepoint_spec): Return a std::vector instead of
5819 symtabs_and_lines. Update.
5820 (create_breakpoint): Update.
5821 (break_range_command, until_break_command, clear_command): Update.
5822 (base_breakpoint_decode_location, bkpt_decode_location)
5823 (bkpt_probe_create_sals_from_location)
5824 (bkpt_probe_decode_location, tracepoint_decode_location)
5825 (tracepoint_probe_decode_location)
5826 (strace_marker_create_sals_from_location): Return a std::vector
5827 instead of symtabs_and_lines.
5828 (strace_marker_create_breakpoints_sal): Update.
5829 (strace_marker_decode_location): Return a std::vector instead of
5830 symtabs_and_lines. Update.
5831 (update_breakpoint_locations): Change struct symtabs_and_lines
5832 parameters to gdb::array_view. Adjust.
5833 (location_to_sals): Return a std::vector instead of
5834 symtabs_and_lines. Update.
5835 (breakpoint_re_set_default): Use std::vector instead of struct
5836 symtabs_and_lines.
5837 (decode_location_default): Return a std::vector instead of
5838 symtabs_and_lines. Update.
5839 * breakpoint.h: Include "common/array-view.h".
5840 (struct breakpoint_ops) <decode_location>: Now returns a
5841 std::vector instead of returning a symtabs_and_lines via output
5842 parameter.
5843 (update_breakpoint_locations): Change sals parameters to use
5844 gdb::array_view.
5845 * cli/cli-cmds.c (edit_command, list_command): Update to use
5846 std::vector and gdb::array_view.
5847 (ambiguous_line_spec): Adjust to use gdb::array_view and
5848 range-for.
5849 (compare_symtabs): Rename to ...
5850 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5851 const reference and adjust.
5852 (filter_sals): Rewrite using std::vector and standard algorithms.
5853 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5854 (jump_command): Update to use std::vector.
5855 * linespec.c (struct linespec_state) <canonical_names>: Update
5856 comment.
5857 (add_sal_to_sals_basic): Delete.
5858 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5859 (decode_line_2, create_sals_line_offset)
5860 (convert_address_location_to_sals, convert_linespec_to_sals)
5861 (convert_explicit_location_to_sals, parse_linespec)
5862 (event_location_to_sals, decode_line_full, decode_line_1)
5863 (decode_line_with_current_source)
5864 (decode_line_with_last_displayed, decode_objc)
5865 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5866 (linespec_result::~linespec_result): Adjust to use std::vector
5867 instead of symtabs_and_lines.
5868 * linespec.h (linespec_sals::sals): Now a std::vector.
5869 (struct linespec_result): Use std::vector, bool, and in-class
5870 initialization.
5871 (decode_line_1, decode_line_with_current_source)
5872 (decode_line_with_last_displayed): Return std::vector.
5873 * macrocmd.c (info_macros_command): Use std::vector.
5874 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5875 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5876 std::vector.
5877 * probe.h (parse_probes): Return a std::vector.
5878 * python/python.c (gdbpy_decode_line): Use std::vector and
5879 gdb::array_view.
5880 * source.c (select_source_symtab, line_info): Use std::vector.
5881 * stack.c (func_command): Use std::vector.
5882 * symtab.h (struct symtabs_and_lines): Delete.
5883 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5884
7c44b49c
PA
58852017-09-04 Pedro Alves <palves@redhat.com>
5886
5887 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5888 unittests/array-view-selftests.c.
5889 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5890 * common/array-view.h: New file.
5891 * unittests/array-view-selftests.c: New file.
5892
e439fa14
PA
58932017-09-04 Pedro Alves <palves@redhat.com>
5894
5895 * cli/cli-cmds.c (edit_command): Pass message to
5896 ambiguous_line_spec.
5897 (list_command): Pass message to ambiguous_line_spec. Say
5898 "first"/"last" instead of "start" and "end" to be consistent with
5899 the manual.
5900 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5901 them to print formatted message.
5902
7525b645
PA
59032017-09-04 Pedro Alves <palves@redhat.com>
5904
5905 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5906 ftrace_update_insns by reference instead of pointer.
5907
badc0020
YQ
59082017-09-04 Yao Qi <yao.qi@linaro.org>
5909
5910 * i386-go32-tdep.c: Include x86-xstate.h.
5911 (i386_go32_init_abi): Call i386_target_description.
5912 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5913 if xcr0 is X86_XSTATE_X87_MASK.
5914 * i386-tdep.h (tdesc_i386): Remove the declaration.
5915 (tdesc_i386_mmx): Likewise.
5916
d78bdb54
YQ
59172017-09-04 Yao Qi <yao.qi@linaro.org>
5918
5919 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5920 X86_XSTATE_SSE_MASK instead of 0.
5921
ca1fa5ee
YQ
59222017-09-04 Yao Qi <yao.qi@linaro.org>
5923
5924 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5925 i386_target_description.
5926 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5927 i386_target_description.
5928 * i386-tdep.c (i386_gdbarch_init): Likewise.
5929
2434b019
YQ
59302017-09-04 Yao Qi <yao.qi@linaro.org>
5931
5932 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5933 (x86_darwin_init_abi_64): Call amd64_target_description.
5934 * amd64-dicos-tdep.c: Likewise.
5935 * amd64-fbsd-nat.c: Likewise.
5936 * amd64-fbsd-tdep.c: Likewise.
5937 * amd64-nbsd-tdep.c: Likewise.
5938 * amd64-obsd-tdep.c: Likewise.
5939 * amd64-sol2-tdep.c: Likewise.
5940 * amd64-windows-tdep.c: Likewise.
5941 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5942
0860c437
SM
59432017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5944
5945 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5946 (btrace_function) <insn>: Change type to use std::vector.
5947 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5948 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5949 ftrace_update_insns, ftrace_compute_global_level_offset,
5950 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5951 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5952 change to std::vector.
5953 (ftrace_update_insns): Adjust to change to std::vector, change
5954 type of INSN parameter.
5955 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5956 * record-btrace.c (btrace_call_history_insn_range,
5957 btrace_compute_src_line_range,
5958 record_btrace_frame_prev_register): Adjust to change to
5959 std::vector.
5960 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5961 to change to std::vector.
5962
0638b7f9
TT
59632017-09-03 Tom Tromey <tom@tromey.com>
5964
5965 * corefile.c (reopen_exec_file): Use std::string.
5966
8f84fb0e
TT
59672017-09-03 Tom Tromey <tom@tromey.com>
5968
5969 * compile/compile.c (compile_register_name_mangled): Return
5970 std::string.
5971 * compile/compile-loc2c.c (pushf_register_address): Update.
5972 (pushf_register): Update.
5973 * compile/compile-c-types.c (convert_array): Update.
5974 * compile/compile-c-symbols.c (generate_vla_size): Update.
5975 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5976 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5977 (convert_one_symbol): Update.
5978 (generate_c_for_for_one_variable): Update.
5979 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5980 std::string.
5981 (generate_register_struct): Update.
5982 * compile/compile-internal.h (c_get_range_decl_name): Return a
5983 std::string.
5984 (compile_register_name_mangled): Return std::string.
5985
18e9961f
TT
59862017-09-03 Tom Tromey <tom@tromey.com>
5987
5988 * utils.c (perror_string): Return a std::string.
5989 (throw_perror_with_name, perror_warning_with_name): Update.
5990
45343786
TT
59912017-09-03 Tom Tromey <tom@tromey.com>
5992
5993 * demangle.c (demangle_command): Use std::string,
5994 unique_xmalloc_ptr.
5995
b57af503
TT
59962017-09-03 Tom Tromey <tom@tromey.com>
5997
5998 * cli/cli-setshow.c (do_set_command): Use std::string.
5999
6eecf35f
TT
60002017-09-03 Tom Tromey <tom@tromey.com>
6001
6002 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6003
56496dd4
TT
60042017-09-03 Tom Tromey <tom@tromey.com>
6005
6006 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6007
e91a1fa7
TT
60082017-09-03 Tom Tromey <tom@tromey.com>
6009
6010 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6011 gdb::unique_xmalloc_ptr.
6012
7ffd83d7
TT
60132017-09-03 Tom Tromey <tom@tromey.com>
6014
6015 * thread.c (print_thread_info_1): Use string_printf.
6016 (thread_apply_command, thread_apply_all_command): Use
6017 std::string.
6018
1ccbe998
TT
60192017-09-03 Tom Tromey <tom@tromey.com>
6020
6021 * valprint.c (val_print_string): Update.
6022 * gdbcore.h (memory_error_message): Return std::string.
6023 * corefile.c (memory_error_message): Return std::string.
6024 (memory_error): Update.
6025 * breakpoint.c (insert_bp_location): Update.
6026
23fdd69e
SM
60272017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6028
6029 * target/waitstatus.h (target_waitstatus_to_string): Change
6030 return type to std::string.
6031 * target/waitstatus.c (target_waitstatus_to_string): Return
6032 std::string.
6033 * target.h (target_waitstatus_to_string): Remove declaration.
6034 * infrun.c (resume, clear_proceed_status_thread,
6035 print_target_wait_results, do_target_wait, save_waitstatus,
6036 stop_all_threads): Adjust.
6037 * record-btrace.c (record_btrace_wait): Adjust.
6038 * target-debug.h
6039 (target_debug_print_struct_target_waitstatus_p): Adjust.
6040
5c811d30
JK
60412017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6042
6043 PR gdb/22046
6044 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6045 detection.
6046
0a2dde4a
SDJ
60472017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6048
6049 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6050 for setting/unsetting environment variables on the remote target.
6051 (New remote packets): Add entries for QEnvironmentHexEncoded,
6052 QEnvironmentUnset and QEnvironmentReset.
6053 * common/environ.c (gdb_environ::operator=): Extend method to
6054 handle m_user_set_env_list and m_user_unset_env_list.
6055 (gdb_environ::clear): Likewise.
6056 (match_var_in_string): Change type of first parameter from 'char
6057 *' to 'const char *'.
6058 (gdb_environ::set): Extend method to handle
6059 m_user_set_env_list and m_user_unset_env_list.
6060 (gdb_environ::unset): Likewise.
6061 (gdb_environ::clear_user_set_env): New method.
6062 (gdb_environ::user_set_envp): Likewise.
6063 (gdb_environ::user_unset_envp): Likewise.
6064 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6065 m_user_unset_env_list on move constructor/assignment.
6066 (unset): Add new default parameter 'update_unset_list = true'.
6067 (clear_user_set_env): New method.
6068 (user_set_envp): Likewise.
6069 (user_unset_envp): Likewise.
6070 (m_user_set_env_list): New std::set.
6071 (m_user_unset_env_list): Likewise.
6072 * common/rsp-low.c (hex2str): New function.
6073 (bin2hex): New overload for bin2hex function.
6074 * common/rsp-low.c (hex2str): New prototype.
6075 (str2hex): New overload prototype.
6076 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6077 QEnvironmentUnset and QEnvironmentReset.
6078 (remote_protocol_features): Add QEnvironmentHexEncoded,
6079 QEnvironmentUnset and QEnvironmentReset packets.
6080 (send_environment_packet): New function.
6081 (extended_remote_environment_support): Likewise.
6082 (extended_remote_create_inferior): Call
6083 extended_remote_environment_support.
6084 (_initialize_remote): Add QEnvironmentHexEncoded,
6085 QEnvironmentUnset and QEnvironmentReset packet configs.
6086 * unittests/environ-selftests.c (gdb_selftest_env_var):
6087 New variable.
6088 (test_vector_initialization): New function.
6089 (test_init_from_host_environ): Likewise.
6090 (test_reinit_from_host_environ): Likewise.
6091 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6092 Likewise.
6093 (test_unset_set_empty_vector): Likewise.
6094 (test_vector_clear): Likewise.
6095 (test_std_move): Likewise.
6096 (test_move_constructor):
6097 (test_self_move): Likewise.
6098 (test_set_unset_reset): Likewise.
6099 (run_tests): Rewrite in terms of the functions above.
6100
654670a4
WP
61012017-08-31 Weimin Pan <weimin.pan@oracle.com>
6102
6103 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6104 (adi_available): Use a temp variable of type CORE_ADDR as argument
6105 3 when calling target_auxv_search.
6106 (adi_normalize_address): Use masks and xor operators to calculate
6107 normalized address.
6108 (adi_read_versions, adi_write_versions, adi_print_versions)
6109 (do_examine, do_assign): Use paddress.
6110
7755ddb7
JB
61112017-08-29 John Baldwin <jhb@FreeBSD.org>
6112
6113 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6114 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6115 out of loop and add supply of FIR.
6116 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6117 add collect of FIR.
6118
fd437cbc
SM
61192017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6120
3804a343 6121 PR gdb/21827
fd437cbc
SM
6122 * cli/cli-script.c (define_command): Don't convert command name
6123 to lower case.
6124
988f6b3d
JB
61252017-08-25 Joel Brobecker <brobecker@adacore.com>
6126
6127 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6128 Update all callers accordingly. Remove all code blocks handling
6129 the case where DISPP is not NULL.
6130
663c44ac
JK
61312017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6132
6133 PR symtab/22003
6134 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6135 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6136 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6137
f1902523
JK
61382017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6139
6140 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6141 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6142 (read_comp_units_from_section): New parameter abbrev_section, use
6143 read_and_check_comp_unit_head, allocate signatured_type if needed.
6144 (create_all_comp_units): Update read_comp_units_from_section caller.
6145
87215ad1
SDJ
61462017-08-23 Pedro Alves <palves@redhat.com>
6147
6148 PR remote/21852
6149 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6150 to null_ptid and switch to thread without reading the registers
6151 after adding the inferior.
6152
6e41ddec
JK
61532017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6154
6155 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6156 compile-gcc.
6157 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6158 (compile_to_object): Implement compile_gcc.
6159 (_initialize_compile): Install "set compile-gcc". Initialize
6160 compile_gcc.
6161
e68c32d5
JK
61622017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6163
6164 * compile/compile.c (compile_to_object): Conditionally call
6165 set_verbose. Conditionally call compile or compile_v0.
6166
58afddc6
WP
61672017-08-07 Weimin Pan <weimin.pan@oracle.com>
6168
6169 * sparc64-tdep.h: (adi_normalize_address): New export.
6170 * sparc-nat.h: (open_adi_tag_fd): New export.
6171 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6172 * sparc64-linux-tdep.c:
6173 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6174 (sparc64_linux_handle_segmentation_fault): New function.
6175 (sparc64_linux_init_abi): Register
6176 sparc64_linux_handle_segmentation_fault
6177 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6178 (sparc64_addr_bits_remove): New function.
6179 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6180 (MAX_PROC_NAME_SIZE): New macro.
6181 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6182 (sparc64adilist): New variable.
6183 (adi_proc_list): New variable.
6184 (find_adi_info): New function.
6185 (add_adi_info): New function.
6186 (get_adi_info_proc): New function.
6187 (get_adi_info): New function.
6188 (info_adi_command): New function.
6189 (read_maps_entry): New function.
6190 (adi_available): New function.
6191 (adi_normalize_address): New function.
6192 (adi_align_address): New function.
6193 (adi_convert_byte_count): New function.
6194 (adi_tag_fd): New function.
6195 (adi_is_addr_mapped): New function.
6196 (adi_read_versions): New function.
6197 (adi_write_versions): New function.
6198 (adi_print_versions): New function.
6199 (do_examine): New function.
6200 (do_assign): New function.
6201 (adi_examine_command): New function.
6202 (adi_assign_command): New function.
6203 (_initialize_sparc64_adi_tdep): New function.
6204
11db9430
SM
62052017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6206
6207 * breakpoint.c (breakpoints_info): Rename to ...
6208 (info_breakpoints_command): ... this.
6209 (watchpoints_info): Rename to ...
6210 (info_watchpoints_command): ... this.
6211 (tracepoints_info): Rename to ...
6212 (info_tracepoints_command): ... this.
6213 (_initialize_breakpoint): Adjust.
6214 * dcache.c (dcache_info): Rename to ...
6215 (info_display_command): ... this.
6216 (_initialize_dcache): Adjust.
6217 * frame.h (args_info): Rename to ...
6218 (info_args_command): ... this.
6219 (locals_info): Rename to ...
6220 (info_locals_command): ... this.
6221 * infcmd.c (nofp_registers_info): Rename to ...
6222 (info_registers_command): ... this.
6223 (float_info): Rename to ...
6224 (info_float_command): ... this.
6225 (program_info): Rename to ...
6226 (info_program_command): ... this.
6227 (all_registers_info): Rename to ...
6228 (info_all_registers_command): ... this.
6229 (vector_info): Rename to ...
6230 (info_vector_command): ... this.
6231 (float_info): Rename to ...
6232 (info_float_command): ... this.
6233 (_initialize_infcmd): Adjust.
6234 * inferior.h (term_info): Rename to ...
6235 (info_terminal_command): ... this.
6236 * inflow.c (term_info): Rename to ...
6237 (info_terminal_command): ... this.
6238 (_initialize_inflow): Adjust.
6239 * infrun.c (signals_info): Rename to ...
6240 (info_signals_command): ... this.
6241 (_initialize_infrun): Adjust.
6242 * objc-lang.c (classes_info): Rename to ...
6243 (info_classes_command): ... this.
6244 (selectors_info): Rename to ...
6245 (info_selectors_command): ... this.
6246 (_initialize_objc_language): Adjust.
6247 * printcmd.c (sym_info): Rename to ...
6248 (info_symbol_command): ... this.
6249 (address_info): Rename to ...
6250 (info_address_command): ... this.
6251 (display_info): Rename to ...
6252 (info_display_command): ... this.
6253 (_initialize_printcmd): Adjust.
6254 * reverse.c (bookmarks_info): Rename to ...
6255 (info_breakpoints_command): ... this.
6256 (_initialize_reverse): Adjust.
6257 * ser-go32.c (dos_info): Rename to ...
6258 (info_serial_command): ... this.
6259 (_initialize_ser_dos): Adjust.
6260 * skip.c (skip_info): Rename to ...
6261 (info_skip_command): ... this.
6262 (_initialize_step_skip): Adjust.
6263 * source.c (line_info): Rename to ...
6264 (info_line_command): ... this.
6265 (source_info): Rename to ...
6266 (info_source_command)
6267 * stack.c (frame_info): Rename to ...
6268 (info_frame_command): ... this.
6269 (locals_info): Rename to ...
6270 (info_locals_command): ... this.
6271 (args_info): Rename to ...
6272 (info_args_command): ... this.
6273 (_initialize_stack): Adjust.
6274 * symtab.c (sources_info): Rename to ...
6275 (info_sources_command): ... this.
6276 (variables_info): Rename to ...
6277 (info_variables_command): ... this.
6278 (functions_info): Rename to ...
6279 (info_functions_command): ... this.
6280 (types_info): Rename to ...
6281 (info_types_command): ... this.
6282 (_initialize_symtab): Adjust.
6283 * target.c (target_info): Rename to ...
6284 (info_target_command): ... this.
6285 (initialize_targets): Adjust.
6286 * tracepoint.c (tvariables_info): Rename to ...
6287 (info_tvariables_command): ... this.
6288 (scope_info): Rename to ...
6289 (info_scope_command): ... this.
6290 (trace_dump_actions): Adjust.
6291 (_initialize_tracepoint): Adjust.
6292
b270e6f9
TT
62932017-08-22 Tom Tromey <tom@tromey.com>
6294
6295 * breakpoint.h (install_breakpoint): Update.
6296 * breakpoint.c (add_solib_catchpoint): Update.
6297 (install_breakpoint): Change argument to a std::unique_ptr.
6298 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6299 (create_breakpoint_sal, create_breakpoint): Update.
6300 (watch_command_1, catch_exec_command_1)
6301 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6302 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6303 Return the breakpoint.
6304 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6305 (new_single_step_breakpoint): Update.
6306 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6307 std::unique_ptr.
6308 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6309 std::unique_ptr.
6310 * break-catch-sig.c (create_signal_catchpoint): Use
6311 std::unique_ptr.
6312 * ada-lang.c (create_ada_exception_catchpoint): Use
6313 std::unique_ptr.
6314
36bd8eaa
TT
63152017-08-22 Tom Tromey <tom@tromey.com>
6316
6317 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6318
56f37645
TT
63192017-08-22 Tom Tromey <tom@tromey.com>
6320
6321 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6322 (lookup_partial_symbol): Update.
6323
0b581c69
TT
63242017-08-22 Tom Tromey <tom@tromey.com>
6325
6326 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6327 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6328 (find_and_open_source, symtab_to_fullname): Update.
6329 * psymtab.c (psymtab_to_fullname): Update.
6330
14278e1f
TT
63312017-08-22 Tom Tromey <tom@tromey.com>
6332
6333 * exec.c (exec_file_attach): Update.
6334 * linux-thread-db.c (try_thread_db_load): Update.
6335 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6336 * utils.c (gdb_realpath): Change return type.
6337 (gdb_realpath_keepfile): Update.
6338 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6339 (_initialize_utils): Register the new self test.
6340 * source.c (openp): Update.
6341 (find_and_open_source): Update.
6342 * nto-tdep.c (nto_find_and_open_solib): Update.
6343 * main.c (set_gdb_data_directory): Update.
6344 (captured_main_1): Update.
6345 * dwarf2read.c (dwarf2_get_dwz_file): Update
6346 (dw2_map_symbol_filenames): Update.
6347 * auto-load.c (auto_load_safe_path_vec_update): Update.
6348 (filename_is_in_auto_load_safe_path_vec): Change type of
6349 "filename_realp".
6350 (auto_load_objfile_script): Update.
6351 (file_is_auto_load_safe): Update. Use std::string.
6352 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6353
4971c9a7
TT
63542017-08-22 Tom Tromey <tom@tromey.com>
6355
6356 * utils.c (gdb_realpath_keepfile): Return a
6357 gdb::unique_xmalloc_ptr.
6358 * exec.c (exec_file_attach): Update.
6359 * utils.h (gdb_realpath_keepfile): Return a
6360 gdb::unique_xmalloc_ptr.
6361
e3e41d58
TT
63622017-08-22 Tom Tromey <tom@tromey.com>
6363
6364 * compile/compile.c (compile_file_command): Use
6365 gdb::unique_xmalloc_ptr, std::string.
6366 * utils.c (gdb_abspath): Change return type.
6367 * source.c (openp): Update.
6368 * objfiles.c (allocate_objfile): Update.
6369 * main.c (set_gdb_data_directory): Update.
6370 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6371
0d999a6e
ZZ
63722017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6373
6374 * cli-cmds.c (list_commands): List actual code around more than
6375 one location.
6376
329d5e7e
JB
63772017-08-21 John Baldwin <jhb@FreeBSD.org>
6378
6379 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6380
bf223d3e
PA
63812017-08-21 Pedro Alves <palves@redhat.com>
6382
6383 PR gdb/19487
6384 * c-exp.y (variable production): Handle function aliases.
6385 * minsyms.c (msymbol_is_text): New function.
6386 * minsyms.h (msymbol_is_text): Declare.
6387 * symtab.c (find_function_alias_target): New function.
6388 * symtab.h (find_function_alias_target): Declare.
6389
c973d0aa
PA
63902017-08-21 Pedro Alves <palves@redhat.com>
6391
6392 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6393 typedefs.
6394 * typeprint.c (whatis_exp): If handling "whatis", and expression
6395 is OP_TYPE, strip one typedef level. Otherwise don't strip
6396 typedefs here.
6397 * valops.c (value_cast): Save "to" type before resolving
6398 stubs/typedefs. Use that type as resulting value's type.
6399
2989a365
TT
64002017-08-18 Tom Tromey <tom@tromey.com>
6401 Pedro Alves <palves@redhat.com>
6402
6403 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6404 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6405 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6406 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6407 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6408 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6409 (linux_get_siginfo_data): Add "thread" argument. Use
6410 scoped_restore.
6411 * linux-nat.c (linux_child_follow_fork)
6412 (check_stopped_by_watchpoint): Use scoped_restore.
6413 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6414 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6415 (restore_inferior_ptid, save_inferior_ptid): Remove.
6416 * btrace.c (btrace_fetch): Use scoped_restore.
6417 * bsd-uthread.c (bsd_uthread_fetch_registers)
6418 (bsd_uthread_store_registers): Use scoped_restore.
6419 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6420 scoped_restore.
6421 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6422 (aix_thread_xfer_partial): Use scoped_restore.
6423 * inferior.h (save_inferior_ptid): Remove.
6424
e60eb288
YQ
64252017-08-18 Yao Qi <yao.qi@linaro.org>
6426
6427 PR tdep/21818
6428 * arm-tdep.c (gdb_print_insn_arm): Mark
6429 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6430
6d580b63
YQ
64312017-08-18 Yao Qi <yao.qi@linaro.org>
6432
6433 * NEWS: Mention GDBserver's new option "--selftest".
6434 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6435 * selftest.c: Move it to common/selftest.c.
6436 * selftest.h: Move it to common/selftest.h.
6437 * selftest-arch.c (reset): New function.
6438 (tests_with_arch): Call reset.
6439
86dcbf50
YQ
64402017-08-18 Yao Qi <yao.qi@linaro.org>
6441
6442 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6443 instead of exception_fprintf and printf_filtered.
6444
7649770c
YQ
64452017-08-18 Yao Qi <yao.qi@linaro.org>
6446
6447 * selftest.c (register_self_test): Rename it to
6448 selftests::register_test.
6449 (run_self_tests): selftest::run_tests.
6450 * selftest.h: Update declarations.
6451 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6452 selftests::register_test_foreach_arch.
6453 * selftest-arch.h: Update declaration.
6454 * aarch64-tdep.c: Update.
6455 * arm-tdep.c: Likewise.
6456 * disasm-selftests.c: Likewise.
6457 * dwarf2loc.c: Likewise.
6458 * dwarf2-frame.c: Likewise.
6459 * findvar.c: Likewise.
6460 * gdbarch-selftests.c: Likewise.
6461 * maint.c (maintenance_selftest): Likewise.
6462 * regcache.c: Likewise.
6463 * rust-exp.y: Likewise.
6464 * selftest-arch.c: Likewise.
6465 * unittests/environ-selftests.c: Likewise.
6466 * unittests/function-view-selftests.c: Likewise.
6467 * unittests/offset-type-selftests.c: Likewise.
6468 * unittests/optional-selftests.c: Likewise.
6469 * unittests/scoped_restore-selftests.c: Likewise.
6470 * utils-selftests.c: Likewise.
6471
b0cba12e
PA
64722017-08-17 Pedro Alves <palves@redhat.com>
6473
6474 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6475 local.
6476
4c8aa72d
PA
64772017-08-17 Pedro Alves <palves@redhat.com>
6478
6479 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6480 field.
6481 (reset_die_in_process): Delete, replaced by ...
6482 (process_die_scope): ... this new class. Make it responsible for
6483 freeing cu->line_header too.
6484 (process_die): Use process_die_scope.
6485 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6486 cu->line_header_die_owner. Don't release the line header if it's
6487 owned by the CU.
6488 (setup_type_unit_groups): Make the CU/DIE own the line header.
6489 Don't release the line header here.
6490
ba713918
AL
64912017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6492
6493 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6494
44d0fb3a
RK
64952017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6496
6497 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6498 Single-Key mode
6499
a5afdb16
RK
65002017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6501
6502 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6503 mode command list.
6504
47613aeb
SH
65052017-08-15 Stafford Horne <shorne@gmail.com>
6506
6507 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6508
9c3cc999
SH
65092017-08-15 Stafford Horne <shorne@gmail.com>
6510
6511 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6512
206726fb
SDJ
65132017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6514
6515 PR gdb/21954
6516 * infcmd.c (unset_environment_command): Use the 'clear' method on
6517 the environment instead of resetting it.
6518
0335ac6d
JB
65192017-08-15 John Baldwin <jhb@FreeBSD.org>
6520
6521 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6522 platforms.
6523
d3abe1c8
TT
65242017-08-14 Tom Tromey <tom@tromey.com>
6525
6526 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6527 (print_binary_chars): Likewise.
6528 (BITS_IN_BYTES): Remove.
6529
d6382fff
TT
65302017-08-14 Tom Tromey <tom@tromey.com>
6531
6532 PR gdb/21675
6533 * valprint.c (LOW_ZERO): Change value to 034.
6534 (print_octal_chars): Add static_asserts for octal constants.
6535 * printcmd.c (print_scalar_formatted): Add 'd' case.
6536
f978cb06
TT
65372017-08-11 Tom Tromey <tom@tromey.com>
6538
6539 * symfile.c (add_symbol_file_command): Use std::vector.
6540
2f5404b3
TT
65412017-08-14 Tom Tromey <tom@tromey.com>
6542
6543 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6544 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6545 std::move.
6546 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6547
de7985c3
PA
65482017-08-11 Pedro Alves <palves@redhat.com>
6549
6550 * infrun.c (process_event_stop_test): Adjust
6551 function_name_is_marked_for_skip call.
6552 * skip.c: Include <list>.
6553 (skiplist_entry): Make it a class with private fields, and
6554 getters/setters.
6555 (skiplist_entry_chain): Delete.
6556 (skiplist_entries): New.
6557 (skiplist_entry_count): Delete.
6558 (highest_skiplist_entry_num): New.
6559 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6560 (add_skiplist_entry): Delete.
6561 (skiplist_entry::skiplist_entry): New.
6562 (skiplist_entry::add_entry): New.
6563 (skip_file_command, skip_function): Adjust.
6564 (compile_skip_regexp): Delete.
6565 (skip_command): Don't compile regexp here. Adjust to use
6566 skiplist_entry::add_entry.
6567 (skip_info): Adjust to use range-for and getters.
6568 (skip_enable_command, skip_disable_command): Adjust to use
6569 range-for and setters.
6570 (skip_delete_command): Adjust to use std::list.
6571 (add_skiplist_entry): Delete.
6572 (skip_file_p): Delete, refactored as ...
6573 (skiplist_entry::do_skip_file_p): ... this new method.
6574 (skip_gfile_p): Delete, refactored as ...
6575 (skiplist_entry::do_gskip_file_p): ... this new method.
6576 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6577 (skiplist_entry::skip_function_p): ... this new method.
6578 (function_name_is_marked_for_skip): Now returns bool, and takes
6579 the function sal by const reference. Adjust to use range-for and
6580 skiplist_entry methods.
6581 (_initialize_step_skip): Remove references to
6582 skiplist_entry_chain, skiplist_entry_count.
6583 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6584 takes the function sal by const reference.
6585
be7d3cd5
YQ
65862017-08-11 Yao Qi <yao.qi@linaro.org>
6587
6588 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6589 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6590 (dwarf2_frame_cache):
6591 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6592 RETURN_MASK_ALL and set *this_case to NULL.
6593 * frame-unwind.h: Update comments.
6594
1c90d9f0
YQ
65952017-08-11 Yao Qi <yao.qi@linaro.org>
6596
6597 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6598 (dwarf2_frame_state_copy_regs): Remove.
6599 (dwarf2_frame_state_free_regs): Remove.
6600 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6601 (dwarf2_restore_rule): Call method .alloc_regs instead of
6602 dwarf2_frame_state_alloc_regs.
6603 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6604 constructor. Call std::move.
6605 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6606 (dwarf2_frame_cache): Likewise.
6607
6608 [GDB_SELF_TEST]: Include selftest.h and
6609 selftest-arch.h.
6610 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6611 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6612 execute_cfa_program_test.
6613
6614 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6615 copy ctor, assignment operator, move assignment.
6616 <alloc_regs>: New method.
6617 <swap>: New method.
6618 (struct dwarf2_frame_state): Delete dtor.
6619 (dwarf2_frame_state_alloc_regs): Remove declaration.
6620 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6621 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6622
afe37d6b
YQ
66232017-08-11 Yao Qi <yao.qi@linaro.org>
6624
6625 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6626 (dwarf2_frame_state::dwarf2_frame_state): New.
6627 (dwarf2_frame_state::~dwarf2_frame_state): New.
6628 (dwarf2_fetch_cfa_info): Update.
6629 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6630 rather than a pointer. Update code.
6631 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6632 dtor.
6633 <data_align, code_align, retaddr_column>: Change them to const.
6634 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6635 to bool.
6636
b348037f
YQ
66372017-08-11 Yao Qi <yao.qi@linaro.org>
6638
6639 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6640 <loc.exp>: New field.
6641 * dwarf2-frame.c (execute_cfa_program): Update.
6642 (dwarf2_frame_prev_register): Update.
6643
e7c9de26
PA
66442017-08-10 Pedro Alves <palves@redhat.com>
6645
6646 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6647
e8c6b620
JB
66482017-08-09 John Baldwin <jhb@FreeBSD.org>
6649
6650 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6651 (fbsd_pending_children): Use std::list.
6652 (fbsd_remember_child): Likewise.
6653 (fbsd_is_child_pending): Likewise.
6654 (fbsd_pending_vfork_done): Use std::forward_list.
6655 (fbsd_add_vfork_done): Likewise.
6656 (fbsd_is_vfork_done_pending): Likewise.
6657 (fbsd_next_vfork_done): Likewise.
6658
e4a26669
JB
66592017-08-09 John Baldwin <jhb@FreeBSD.org>
6660
6661 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6662 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6663 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6664 for `mapfilename'.
6665 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 6666 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 6667
142311d3
JB
66682017-08-09 John Baldwin <jhb@FreeBSD.org>
6669
6670 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6671 "filestuff.h".
6672 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6673
42fa2e0e
TT
66742017-08-09 Tom Tromey <tom@tromey.com>
6675
6676 * skip.c (skiplist_entry): New constructor.
6677 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6678 (skiplist_entry::file_is_glob): Now bool.
6679 (skiplist_entry::file, skiplist_entry::function): Now
6680 std::string.
6681 (make_skip_entry): Return a unique_ptr. Use new.
6682 (free_skiplist_entry, free_skiplist_entry_cleanup)
6683 (make_free_skiplist_entry_cleanup): Remove.
6684 (skip_command, skip_disable_command, add_skiplist_entry)
6685 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6686 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6687 (function_name_is_marked_for_skip): Update.
6688 (skip_delete_command): Update. Use delete.
6689
cd3af38d
JW
66902017-08-09 Jiong Wang <jiong.wang@arm.com>
6691
6692 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6693 (aarch64_linux_core_read_description): New function.
6694 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6695
29592bde
PA
66962017-08-09 Pedro Alves <palves@redhat.com>
6697
6698 * cp-name-parser.y (cp_comp_to_string): Return a
6699 gdb::unique_xmalloc_ptr<char>.
6700 * cp-support.c (replace_typedefs_qualified_name)
6701 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6702 (cp_canonicalize_string_full): Use op= instead of explicit
6703 convertion.
6704 (cp_class_name_from_physname, method_name_from_physname)
6705 (cp_func_name, cp_remove_params): Adjust to use
6706 gdb::unique_xmalloc_ptr<char>.
6707 * cp-support.h (cp_comp_to_string): Return a
6708 gdb::unique_xmalloc_ptr<char>.
6709 * python/py-type.c (typy_lookup_type): Adjust to use
6710 gdb::unique_xmalloc_ptr<char>.
6711
b3340438
L
67122017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6713
6714 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6715
e88e8651
YQ
67162017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6717 Yao Qi <yao.qi@linaro.org>
6718
6719 * cp-support.c (cp_canonicalize_string_full): Use
6720 gdb::unique_xmalloc_ptr<char>.
6721 (cp_canonicalize_string): Likewise.
6722
f5a29eb0
YQ
67232017-08-09 Yao Qi <yao.qi@linaro.org>
6724
6725 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6726 * regformats/i386/amd64-avx-avx512.dat: Remove.
6727 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6728 * regformats/i386/amd64-avx-mpx.dat:Remove.
6729 * regformats/i386/amd64-avx.dat: Remove.
6730 * regformats/i386/amd64-mpx.dat: Remove.
6731 * regformats/i386/i386-avx-avx512.dat: Remove.
6732 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6733 * regformats/i386/i386-avx-mpx.dat: Remove.
6734 * regformats/i386/i386-mmx.dat: Remove.
6735 * regformats/i386/i386-mpx.dat: Remove.
6736
57757c2f
YQ
67372017-08-09 Yao Qi <yao.qi@linaro.org>
6738
6739 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6740 * amd64-tdep.c: Don't include features/i386/x32*.c.
6741 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6742 functions.
6743 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6744 and i386/x32-avx-avx512.
6745 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6746 and i386/x32.xml.
6747 * features/i386/x32-avx-avx512.c: Removed.
6748 * features/i386/x32-avx-avx512.xml: Removed.
6749 * features/i386/x32-avx.c: Removed.
6750 * features/i386/x32-avx.xml: Removed.
6751 * features/i386/x32.c: Removed.
6752 * features/i386/x32.xml: Removed.
6753 * regformats/i386/x32-avx-avx512.dat: Removed.
6754 * regformats/i386/x32-avx.dat: Removed.
6755 * regformats/i386/x32.dat: Removed.
6756
ba7b109b
MR
67572017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6758
6759 PR breakpoints/21886
6760 * mem-break.c (default_memory_insert_breakpoint): Use
6761 `->placed_address' rather than `->reqstd_address' for the
6762 breakpoint location.
6763
e347efc3
MR
67642017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6765
6766 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6767 assertions.
6768
0dba2a6c
MR
67692017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6770
6771 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6772 a union of `tdep_info', `tdesc_data' and `id'.
6773 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6774 rather than `info.tdep_info'.
6775 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6776 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6777 * i386-tdep.c (i386_gdbarch_init): Likewise.
6778 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6779 * mips-tdep.c (mips_gdbarch_init): Likewise.
6780 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6781 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6782 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6783 `info.tdep_info'.
6784 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6785 `info.tdep_info'.
6786 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6787 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6788 `info.tdep_info'.
6789 * spu-tdep.c (spu_gdbarch_init): Likewise.
6790 * gdbarch.h: Regenerate.
6791
16eb6b2d
LS
67922017-08-07 Leszek Swirski <leszeks@google.com>
6793
7b005726 6794 PR symtab/20899
16eb6b2d
LS
6795 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6796
74cbb09e
SM
67972017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6798
6799 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6800 (gdbsim_open): Rename gdb_argv args object to argv.
6801
ee0c3293
TT
68022017-08-05 Tom Tromey <tom@tromey.com>
6803
6804 * compile/compile-object-load.c (compile_object_load): Use
6805 gdb::unique_xmalloc_ptr.
6806 * cli/cli-dump.c (scan_filename): Rename from
6807 scan_filename_with_cleanup. Change return type.
6808 (scan_expression): Rename from scan_expression_with_cleanup.
6809 Change return type.
6810 (dump_memory_to_file, dump_value_to_file, restore_command):
6811 Use gdb::unique_xmalloc_ptr. Update.
6812 * cli/cli-cmds.c (find_and_open_script): Use
6813 gdb::unique_xmalloc_ptr.
6814 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6815 * symmisc.c (maintenance_print_symbols)
6816 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6817 * symfile.c (symfile_bfd_open, generic_load)
6818 (add_symbol_file_command, remove_symbol_file_command): Use
6819 gdb::unique_xmalloc_ptr.
6820 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6821 * psymtab.c (maintenance_print_psymbols): Use
6822 gdb::unique_xmalloc_ptr.
6823 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6824 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6825 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6826 (reload_shared_libraries_1): Likewise.
6827
3232fabd
TT
68282017-08-05 Tom Tromey <tom@tromey.com>
6829
6830 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6831 (rust_op_vector, rust_set_vector): New typedefs.
6832 (current_parser): New global.
6833 (work_obstack): Change to pointer type. Update all users.
6834 (rust_ast, pstate): Remove globals.
6835 (struct rust_parser): New.
6836 (%union) <params, field_inits>: Change type.
6837 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6838 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6839 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6840 (convert_params_to_types, convert_params_to_expression): Change
6841 type of "params".
6842 (ast_string): Change type of "fields".
6843 (rust_parse): Make a rust_parser. Remove cleanups.
6844 (rust_lex_tests): Make and install an auto_obstack.
6845
f02fd774
YQ
68462017-08-04 Yao Qi <yao.qi@linaro.org>
6847
6848 * configure.srv (ipa_x32_linux_regobj): New.
6849 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6850 instead of X86_TDESC_AVX512.
6851 (initialize_low_tracepoint): Call
6852 init_registers_x32_avx_avx512_linux.
6853
91975afd
YQ
68542017-08-04 Yao Qi <yao.qi@linaro.org>
6855
6856 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6857
2331fa3a
RK
68582017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6859
6860 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6861
744e4fe1
TT
68622017-08-03 Tom Tromey <tom@tromey.com>
6863
6864 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6865 Remove.
6866 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6867
1c034b67
TT
68682017-08-03 Tom Tromey <tom@tromey.com>
6869
6870 * python/py-param.c (compute_enum_values): Use gdb_argv.
6871
773a1edc
TT
68722017-08-03 Tom Tromey <tom@tromey.com>
6873
6874 * utils.h (struct gdb_argv_deleter): New.
6875 (gdb_argv): New class.
6876 * utils.c (gdb_argv::reset): New method.
6877 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6878 * tracefile.c (tsave_command): Use gdb_argv.
6879 * top.c (new_ui_command): Use gdb_argv.
6880 * symmisc.c (maintenance_print_symbols)
6881 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6882 * symfile.c (symbol_file_command, generic_load)
6883 (remove_symbol_file_command): Use gdb_argv.
6884 * stack.c (backtrace_command): Use gdb_argv.
6885 * source.c (add_path, show_substitute_path_command)
6886 (unset_substitute_path_command, set_substitute_path_command):
6887 Use gdb_argv.
6888 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6889 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6890 * remote.c (extended_remote_run, remote_put_command)
6891 (remote_get_command, remote_delete_command): Use gdb_argv.
6892 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6893 (gdbsim_open): Use gdb_argv.
6894 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6895 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6896 * procfs.c (procfs_info_proc): Use gdb_argv.
6897 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6898 * infrun.c (handle_command): Use gdb_argv.
6899 * inferior.c (add_inferior_command, clone_inferior_command):
6900 Use gdb_argv.
6901 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6902 * exec.c (exec_file_command): Use gdb_argv.
6903 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6904 * compile/compile.c (build_argc_argv): Use gdb_argv.
6905
0d50bde3
TT
69062017-08-03 Tom Tromey <tom@tromey.com>
6907
6908 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6909
7f968c89
TT
69102017-08-03 Tom Tromey <tom@tromey.com>
6911
6912 * python/python.c (compute_python_string): Return std::string.
6913 (gdbpy_eval_from_control_command): Update.
6914 (do_start_initialization): Use std::string.
6915 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6916 xstrprintf.
6917 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6918 xstrprintf.
6919
3c9ebddd
TT
69202017-08-03 Tom Tromey <tom@tromey.com>
6921
6922 * top.h (do_restore_instream_cleanup): Remove.
6923 * top.c (do_restore_instream_cleanup): Remove.
6924 (read_command_file): Use scoped_restore.
6925 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6926
b51b225e
TT
69272017-08-03 Tom Tromey <tom@tromey.com>
6928
6929 * cli/cli-script.c (execute_user_command)
6930 (execute_control_command): Use scoped_restore.
6931
ac991630
TT
69322017-08-03 Tom Tromey <tom@tromey.com>
6933
6934 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6935 (execute_user_command): Remove user_call_depth; use
6936 user_args_stack's size instead.
6937
898e0c8e
TT
69382017-08-03 Tom Tromey <tom@tromey.com>
6939
6940 * top.h (in_user_command): Remove.
6941 * top.c (in_user_command): Remove.
6942 * cli/cli-script.c (do_restore_user_call_depth)
6943 (execute_user_command): Update.
6944
26fcd5d7
TT
69452017-08-03 Tom Tromey <tom@tromey.com>
6946
6947 * valops.c (search_struct_method): Use gdb::byte_vector.
6948 * valarith.c (value_concat): Use std::vector.
6949 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6950 (simple_search_memory): Likewise.
6951 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6952 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6953 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6954 * elfread.c (elf_rel_plt_read): Use std::string.
6955 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6956 * cli/cli-dump.c (restore_section_callback): Use
6957 gdb::byte_vector.
6958
7c218e6c
TT
69592017-08-03 Tom Tromey <tom@tromey.com>
6960
6961 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6962
31b68d4a
TT
69632017-08-03 Tom Tromey <tom@tromey.com>
6964
6965 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6966 (tui_register_format): Use scoped_restore.
6967
2ec845e7
TT
69682017-08-03 Tom Tromey <tom@tromey.com>
6969
6970 * reverse.c (exec_direction_default): Remove.
6971 (exec_reverse_once): Use scoped_restore.
6972 * remote.c (restore_remote_timeout): Remove.
6973 (remote_flash_erase, remote_flash_write, remote_flash_done)
6974 (readchar, remote_serial_write): Use scoped_restore.
6975 * cli/cli-script.c (struct source_cleanup_lines_args)
6976 (source_cleanup_lines): Remove.
6977 (script_from_file): Use scoped_restore.
6978 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6979 (source_command): Use scoped_restore.
6980
b3bc8453
TT
69812017-08-03 Tom Tromey <tom@tromey.com>
6982
6983 * utils.h (make_cleanup_free_so): Remove.
6984 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6985 * solist.h (struct so_deleter): New.
6986 (so_list_up): New typedef.
6987 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6988
e3ad2841
TT
69892017-08-03 Tom Tromey <tom@tromey.com>
6990
6991 * utils.h (make_cleanup_restore_current_language): Remove.
6992 * utils.c (do_restore_current_language)
6993 (make_cleanup_restore_current_language): Remove.
6994 * parse.c (parse_exp_in_context_1)
6995 (parse_expression_with_language): Use
6996 scoped_restore_current_language.
6997 * mi/mi-main.c (mi_cmd_execute): Use
6998 scoped_restore_current_language.
6999 * language.h (scoped_restore_current_language): New class.
7000
b80cf838
TT
70012017-08-03 Tom Tromey <tom@tromey.com>
7002
7003 * compile/compile.c (cleanup_unlink_file): Remove.
7004 (compile_to_object): Use gdb::unlinker.
7005 (eval_compile_command): Likewise.
7006
fad0444a
TT
70072017-08-03 Tom Tromey <tom@tromey.com>
7008
7009 * utils.h (make_cleanup_fclose): Remove.
7010 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7011
6e7bc05c
TT
70122017-08-03 Tom Tromey <tom@tromey.com>
7013
7014 * top.c (open_terminal_stream): Return gdb_file_up.
7015 (new_ui_command): Update.
7016
4a45905b
TT
70172017-08-03 Tom Tromey <tom@tromey.com>
7018
7019 * source.c (print_source_lines_base, forward_search_command)
7020 (reverse_search_command): Use gdb_file_up.
7021
7cd06d6e
TT
70222017-08-03 Tom Tromey <tom@tromey.com>
7023
7024 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7025
ed166945
TT
70262017-08-03 Tom Tromey <tom@tromey.com>
7027
7028 * cli/cli-cmds.c (find_and_open_script): Change return type.
7029 Remove "streamp" and "full_path" parameters.
7030 (source_script_with_search): Update.
7031 * auto-load.c (source_script_file): Update.
7032 * cli/cli-cmds.h (find_and_open_script): Change type.
7033 (open_script): New struct.
7034
d419f42d
TT
70352017-08-03 Tom Tromey <tom@tromey.com>
7036
7037 * xml-support.c (xml_fetch_content_from_file): Update.
7038 * ui-file.c (stdio_file::open): Update.
7039 * tracefile-tfile.c (tfile_start): Update.
7040 * remote.c (remote_file_put, remote_file_get): Update.
7041 * nat/linux-procfs.c (linux_proc_get_int)
7042 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7043 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7044 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7045 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7046 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7047 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7048 * linux-nat.c (linux_proc_pending_signals): Update.
7049 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7050 (file_closer): Remove.
7051 * compile/compile.c (compile_to_object): Update.
7052 * common/filestuff.h (struct gdb_file_deleter): New.
7053 (gdb_file_up): New typedef.
7054 (gdb_fopen_cloexec): Change return type.
7055 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7056 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7057 (dump_binary_file, restore_binary_file): Update.
7058 * auto-load.c (auto_load_objfile_script_1): Update.
7059
4a2b031d
TT
70602017-08-03 Tom Tromey <tom@tromey.com>
7061
7062 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7063 (info_static_tracepoint_markers_command): Likewise.
7064 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7065 * skip.c (skip_info): Use ui_out_emit_table.
7066 * progspace.c (print_program_space): Use ui_out_emit_table.
7067 * osdata.c (info_osdata): Use ui_out_emit_table.
7068 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7069 ui_out_emit_table.
7070 * linux-thread-db.c (info_auto_load_libthread_db): Use
7071 ui_out_emit_table.
7072 * inferior.c (print_inferior): Use ui_out_emit_table.
7073 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7074 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7075 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7076 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7077 * ui-out.h (class ui_out_emit_table): New.
7078
a4f320fd
MR
70792017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7080
7081 * mips-tdep.c (mips_fpu_type_str): New function.
7082 (mips_dump_tdep): Call it.
7083
a2f1f308
MR
70842017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7085
7086 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7087 `->mips_fpu_type'.
7088
7e5ed83b
XR
70892017-07-31 Xavier Roirand <roirand@adacore.com>
7090
7091 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7092
4c9dc811
XR
70932017-07-27 Xavier Roirand <roirand@adacore.com>
7094
7095 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7096
27d41eac
YQ
70972017-07-26 Yao Qi <yao.qi@linaro.org>
7098
7099 * cli/cli-cmds.c (maintenancechecklist): New variable.
7100 * gdbcmd.h (maintenancechecklist): Declare it.
7101 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7102 Call i386_linux_read_description with different masks.
7103 * maint.c (maintenance_check_command): New function.
7104 (_initialize_maint_cmds): Call add_prefix_cmd.
7105 * target-descriptions.c (tdesc_reg): override operator != and ==.
7106 (tdesc_type): Likewise.
7107 (tdesc_feature): Likewise.
7108 (target_desc): Likewise.
7109 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7110 (maintenance_check_xml_descriptions): New function.
7111 (_initialize_target_descriptions) Add command "xml-descriptions".
7112 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7113
ea03d0d3
YQ
71142017-07-26 Yao Qi <yao.qi@linaro.org>
7115
7116 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7117 Include features/i386/32bit-*.c.
7118 (i386_linux_read_description): Generate target description if it
7119 doesn't exist.
7120 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7121 functions.
7122 * features/i386/32bit-linux.c: Re-generated.
7123 * features/i386/32bit-sse.c: Likewise.
7124 * target-descriptions.c (print_c_feature::visit): Print code to
7125 set register number if needed.
7126 (print_c_feature) <m_next_regnum>: New field.
7127
25aa13e5
YQ
71282017-07-26 Yao Qi <yao.qi@linaro.org>
7129
7130 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7131 (FEATURE_XMLFILES): New.
7132 (FEATURE_CFILES): New.
7133 New rules.
7134 (clean-cfiles): Remove generated c files.
7135 * features/i386/32bit-avx.c: Generated.
7136 * features/i386/32bit-avx512.c: Generated.
7137 * features/i386/32bit-core.c: Generated.
7138 * features/i386/32bit-linux.c: Generated.
7139 * features/i386/32bit-mpx.c: Generated.
7140 * features/i386/32bit-pkeys.c: Generated.
7141 * features/i386/32bit-sse.c: Generated.
7142 * target-descriptions.c: Include algorithm.
7143 (tdesc_element_visitor): Add method visit_end.
7144 (print_c_tdesc): Implement visit_end.
7145 (print_c_tdesc:: m_filename_after_features): Move it to
7146 protected.
7147 (print_c_feature): New class.
7148 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7149 name starts with "i386/32bit-".
7150
6eb1e6a8
YQ
71512017-07-26 Yao Qi <yao.qi@linaro.org>
7152
7153 * target-descriptions.c (tdesc_element_visitor): New class.
7154 (tdesc_element): New class.
7155 (tdesc_reg): Inherit from tdesc_element.
7156 (tdesc_reg::accept): New function.
7157 (tdesc_type): Inherit from tdesc_element.
7158 (tdesc_type::accept): New function.
7159 (tdesc_feature): Inherit from tdesc_element.
7160 (tdesc_feature::accept): New function.
7161 (target_desc): Inherit from tdesc_element.
7162 (target_desc::target_desc): New.
7163 (target_desc::~target_desc): New.
7164 (target_desc::accept): New.
7165 (allocate_target_description): Use new.
7166 (free_target_description): Use delete.
7167 (print_c_tdesc): New class.
7168 (maint_print_c_tdesc_cmd): Adjust.
7169
7170 * features/aarch64.c: Re-generated.
7171 * features/arc-arcompact.c: Re-generated.
7172 * features/arc-v2.c: Re-generated.
7173 * features/arm/arm-with-iwmmxt.c: Re-generated.
7174 * features/arm/arm-with-m.c: Re-generated.
7175 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7176 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7177 * features/arm/arm-with-neon.c: Re-generated.
7178 * features/arm/arm-with-vfpv2.c: Re-generated.
7179 * features/arm/arm-with-vfpv3.c: Re-generated.
7180 * features/i386/amd64-avx-avx512.c: Re-generated.
7181 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7182 * features/i386/amd64-avx.c: Re-generated.
7183 * features/i386/amd64-avx-linux.c: Re-generated.
7184 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7185 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7186 * features/i386/amd64-avx-mpx.c: Re-generated.
7187 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7188 * features/i386/amd64.c: Re-generated.
7189 * features/i386/amd64-linux.c: Re-generated.
7190 * features/i386/amd64-mpx.c: Re-generated.
7191 * features/i386/amd64-mpx-linux.c: Re-generated.
7192 * features/i386/i386-avx-avx512.c: Re-generated.
7193 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7194 * features/i386/i386-avx.c: Re-generated.
7195 * features/i386/i386-avx-linux.c: Re-generated.
7196 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7197 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7198 * features/i386/i386-avx-mpx.c: Re-generated.
7199 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7200 * features/i386/i386.c: Re-generated.
7201 * features/i386/i386-linux.c: Re-generated.
7202 * features/i386/i386-mmx.c: Re-generated.
7203 * features/i386/i386-mmx-linux.c: Re-generated.
7204 * features/i386/i386-mpx.c: Re-generated.
7205 * features/i386/i386-mpx-linux.c: Re-generated.
7206 * features/i386/x32-avx-avx512.c: Re-generated.
7207 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7208 * features/i386/x32-avx.c: Re-generated.
7209 * features/i386/x32-avx-linux.c: Re-generated.
7210 * features/i386/x32.c: Re-generated.
7211 * features/i386/x32-linux.c: Re-generated.
7212 * features/microblaze.c: Re-generated.
7213 * features/microblaze-with-stack-protect.c: Re-generated.
7214 * features/mips64-dsp-linux.c: Re-generated.
7215 * features/mips64-linux.c: Re-generated.
7216 * features/mips-dsp-linux.c: Re-generated.
7217 * features/mips-linux.c: Re-generated.
7218 * features/nds32.c: Re-generated.
7219 * features/nios2.c: Re-generated.
7220 * features/nios2-linux.c: Re-generated.
7221 * features/rs6000/powerpc-32.c: Re-generated.
7222 * features/rs6000/powerpc-32l.c: Re-generated.
7223 * features/rs6000/powerpc-403.c: Re-generated.
7224 * features/rs6000/powerpc-403gc.c : Re-generated.
7225 * features/rs6000/powerpc-405.c: Re-generated.
7226 * features/rs6000/powerpc-505.c: Re-generated.
7227 * features/rs6000/powerpc-601.c: Re-generated.
7228 * features/rs6000/powerpc-602.c: Re-generated.
7229 * features/rs6000/powerpc-603.c: Re-generated.
7230 * features/rs6000/powerpc-604.c: Re-generated.
7231 * features/rs6000/powerpc-64.c: Re-generated.
7232 * features/rs6000/powerpc-64l.c: Re-generated.
7233 * features/rs6000/powerpc-7400.c: Re-generated.
7234 * features/rs6000/powerpc-750.c: Re-generated.
7235 * features/rs6000/powerpc-860.c: Re-generated.
7236 * features/rs6000/powerpc-altivec32.c: Re-generated.
7237 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7238 * features/rs6000/powerpc-altivec64.c: Re-generated.
7239 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7240 * features/rs6000/powerpc-cell32l.c: Re-generated.
7241 * features/rs6000/powerpc-cell64l.c: Re-generated.
7242 * features/rs6000/powerpc-e500.c: Re-generated.
7243 * features/rs6000/powerpc-e500l.c: Re-generated.
7244 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7245 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7246 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7247 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7248 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7249 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7250 * features/rs6000/powerpc-vsx32.c: Re-generated.
7251 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7252 * features/rs6000/powerpc-vsx64.c: Re-generated.
7253 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7254 * features/rs6000/rs6000.c: Re-generated.
7255 * features/s390-linux32.c: Re-generated.
7256 * features/s390-linux32v1.c: Re-generated.
7257 * features/s390-linux32v2.c: Re-generated.
7258 * features/s390-linux64.c: Re-generated.
7259 * features/s390-linux64v1.c: Re-generated.
7260 * features/s390-linux64v2.c: Re-generated.
7261 * features/s390-te-linux64.c: Re-generated.
7262 * features/s390-tevx-linux64.c: Re-generated.
7263 * features/s390-vx-linux64.c: Re-generated.
7264 * features/s390x-linux64.c: Re-generated.
7265 * features/s390x-linux64v1.c: Re-generated.
7266 * features/s390x-linux64v2.c: Re-generated.
7267 * features/s390x-te-linux64.c: Re-generated.
7268 * features/s390x-tevx-linux64.c: Re-generated.
7269 * features/s390x-vx-linux64.c: Re-generated.
7270 * features/sparc/sparc32-solaris.c: Re-generated.
7271 * features/sparc/sparc64-solaris.c: Re-generated.
7272 * features/tic6x-c62x.c: Re-generated.
7273 * features/tic6x-c62x-linux.c: Re-generated.
7274 * features/tic6x-c64x.c: Re-generated.
7275 * features/tic6x-c64x-linux.c: Re-generated.
7276 * features/tic6x-c64xp.c: Re-generated.
7277 * features/tic6x-c64xp-linux.c: Re-generated.
7278
35b4818d
YQ
72792017-07-26 Yao Qi <yao.qi@linaro.org>
7280
7281 * i386-linux-tdep.c (i386_linux_read_description): New function.
7282 (i386_linux_core_read_description): Call
7283 i386_linux_read_description.
7284 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7285 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7286 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7287 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7288 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7289 * x86-linux-nat.c (x86_linux_read_description): Call
7290 i386_linux_read_description.
7291
8e2141c6
YQ
72922017-07-26 Yao Qi <yao.qi@linaro.org>
7293
7294 * NEWS: Mention it.
7295 * features/Makefile (%.c: %.xml): Pass the xml file name to
7296 command "maint print c-tdesc".
7297 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7298 name from 'arg'.
7299
b468ff4c
YQ
73002017-07-26 Yao Qi <yao.qi@linaro.org>
7301
7302 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7303 in-class initialization.
7304 (tdesc_create_feature): Call new instead of XCNEW.
7305 (free_target_description): Ue delete.
7306
b9c0e1b4
JB
73072017-07-25 John Baldwin <jhb@FreeBSD.org>
7308
7309 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7310
a04b5337
YQ
73112017-07-25 Yao Qi <yao.qi@linaro.org>
7312
7313 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7314 constant.
7315 (amd64_x32_init_abi): Likewise.
7316 * amd64-tdep.h (amd64_init_abi): Update declaration.
7317 (amd64_x32_init_abi): Likewise.
7318
02ad7fc2
YQ
73192017-07-25 Yao Qi <yao.qi@linaro.org>
7320
7321 PR tdep/21717
7322 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7323 condition for FPSCR.
7324 (arm_linux_store_inferior_registers): Likewise.
7325
b6f48cb0
TT
73262017-07-22 Tom Tromey <tom@tromey.com>
7327
7328 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7329 <syscalls_counts>: Now a std::vector.
7330 (get_catch_syscall_inferior_data): Use "new".
7331 (catch_syscall_inferior_data_cleanup): Use "delete".
7332 (insert_catch_syscall, remove_catch_syscall)
7333 (clear_syscall_counts): Update.
7334
e12c9b7a
TT
73352017-07-22 Tom Tromey <tom@tromey.com>
7336
7337 * break-catch-syscall.c (syscall_catchpoint)
7338 <syscalls_to_be_caught>: Now a std::vector<int>
7339 (~syscall_catchpoint): Remove.
7340 (insert_catch_syscall, remove_catch_syscall)
7341 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7342 (print_mention_catch_syscall, print_recreate_catch_syscall):
7343 Update.
7344 (create_syscall_event_catchpoint): Change type of "filter"
7345 parameter.
7346 (catch_syscall_split_args): Return a std::vector.
7347 (catch_syscall_command_1, catching_syscall_number_1): Update.
7348
4fa8aeac
TT
73492017-07-22 Tom Tromey <tom@tromey.com>
7350
7351 * break-catch-throw.c (struct exception_catchpoint)
7352 <exception_rx>: Now a std::string.
7353 (~exception_catchpoint): Remove.
7354 (print_one_detail_exception_catchpoint): Update.
7355 (handle_gnu_v3_exceptions): Change type of except_rx.
7356 (extract_exception_regexp): Return a std::string.
7357 (catch_exception_command_1): Update.
7358
f746a154
TT
73592017-07-22 Tom Tromey <tom@tromey.com>
7360
7361 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7362 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7363 std::vector.
7364 <catch_all>: Now a bool.
7365 (~signal_catchpoint): Remove.
7366 (signal_catchpoint_insert_location)
7367 (signal_catchpoint_remove_location)
7368 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7369 (signal_catchpoint_print_mention)
7370 (signal_catchpoint_print_recreate)
7371 (signal_catchpoint_explains_signal): Update.
7372 (create_signal_catchpoint): Change type of "filter" and
7373 "catch_all".
7374 (catch_signal_split_args): Return a std::vector. Change type of
7375 "catch_all".
7376 (catch_signal_command): Update.
7377
47e77640
PA
73782017-07-20 Pedro Alves <palves@redhat.com>
7379
7380 * ada-lang.c (ada_language_defn): Make extern.
7381 (_initialize_ada_language): Remove add_language call.
7382 * c-lang.c (c_language_defn, cplus_language_defn)
7383 (asm_language_defn, minimal_language_defn): Make extern.
7384 (_initialize_c_language): Delete.
7385 * completer.c (compare_cstrings): Delete, moved to utils.h.
7386 * d-lang.c (d_language_defn): Make extern.
7387 (_initialize_d_language): Remove add_language calls.
7388 * defs.h (enum language): Add comment.
7389 * f-lang.c (f_language_defn): Make extern.
7390 (_initialize_f_language): Remove add_language call.
7391 * go-lang.c (go_language_defn): Make extern.
7392 (_initialize_go_language): Remove add_language call.
7393 * language.c: Include <algorithm>.
7394 (languages): Redefine as const array.
7395 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7396 (set_language_command): Handle "local". Use for-range loop.
7397 (set_language): Remove loop.
7398 (language_enum): Rewrite.
7399 (language_def, language_str): Remove loops.
7400 (add_language): Delete.
7401 (add_set_language_command): New, based on add_languages.
7402 (skip_language_trampoline): Adjust.
7403 (local_language_defn): Delete.
7404 (language_gdbarch_post_init): Adjust.
7405 (_initialize_language): Remove add_language calls. Call
7406 add_set_language_command.
7407 * language.h (add_language): Delete.
7408 (auto_language_defn)
7409 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7410 (asm_language_defn, c_language_defn, cplus_language_defn)
7411 (d_language_defn, f_language_defn, go_language_defn)
7412 (m2_language_defn, objc_language_defn, opencl_language_defn)
7413 (pascal_language_defn, rust_language_defn): Declare.
7414 * m2-lang.c (m2_language_defn): Make extern.
7415 (_initialize_m2_language): Remove add_language call.
7416 * objc-lang.c (objc_language_defn): Make extern.
7417 (_initialize_objc_language): Remove add_language call.
7418 * opencl-lang.c (opencl_language_defn): Make extern.
7419 (_initialize_opencl_language): Remove add_language call.
7420 * p-lang.c (pascal_language_defn): Make extern.
7421 (_initialize_pascal_language): Delete.
7422 * rust-lang.c (rust_language_defn): Make extern.
7423 (_initialize_rust_language): Delete.
7424 * utils.h (compare_cstrings): New static inline function.
7425
edb0c9cb
PA
74262017-07-20 Pedro Alves <palves@redhat.com>
7427
7428 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7429 (get_var_value): Constify parameters.
7430 (get_int_var_value): Change prototype.
7431 (to_fixed_range_type): Adjust.
7432 * ada-lang.h (get_int_var_value): Change prototype.
7433
a778f165
PA
74342017-07-20 Pedro Alves <palves@redhat.com>
7435
7436 * dwarf2read.c (dw2_lookup_symbol): Use
7437 SYMBOL_MATCHES_SEARCH_NAME.
7438 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7439
42edd901
PA
74402017-07-20 Pedro Alves <palves@redhat.com>
7441
7442 * block.c (block_iter_name_step, block_iter_name_first)
7443 (block_iter_name_next): Delete.
7444 (block_lookup_symbol_primary): Adjust to use
7445 dict_iter_match_first/dict_iter_match_next.
7446 * block.h (block_iter_name_first, block_iter_name_next): Delete
7447 declarations.
7448 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7449 dict_iter_match_first/dict_iter_match_next.
7450
cf325299
PA
74512017-07-20 Pedro Alves <palves@redhat.com>
7452
7453 * cp-support.c (cp_find_first_component_aux): Add missing case for
7454 end of string.
7455
c5ed0576
DB
74562017-07-18 David Blaikie <dblaikie@gmail.com>
7457
7458 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7459 of dwo_cu's dwo_file.
7460
27841e76
YQ
74612017-07-18 Yao Qi <yao.qi@linaro.org>
7462
7463 * remote.c (store_registers_using_G): Remove one line comment.
7464
cfb7e58b
YQ
74652017-07-18 Yao Qi <yao.qi@linaro.org>
7466
7467 * regcache.c (regcache_cpy): Simplify it.
7468 (regcache::cpy_no_passthrough): Remove it.
7469 * regcache.h (cpy_no_passthrough): Remove it.
7470 (regcache_dup, regcache_cpy): Update comments.
7471
386535dd
PA
74722017-07-18 Pedro Alves <palves@redhat.com>
7473
7474 * remote-sim.c (sim_command_completer): Adjust to work with a
7475 completion_tracker instead of a VEC.
7476
c45ec17c
PA
74772017-07-17 Pedro Alves <palves@redhat.com>
7478
7479 * completer.c (complete_source_filenames): New function.
7480 (complete_address_and_linespec_locations): New function.
7481 (location_completer): Use complete_address_and_linespec_locations.
7482 (completion_tracker::build_completion_result): Honor the tracker's
7483 request to suppress append.
7484 * completer.h (completion_tracker::suppress_append_ws)
7485 (completion_tracker::set_suppress_append_ws): New methods.
7486 (completion_tracker::m_suppress_append_ws): New field.
7487 (complete_source_filenames): New declaration.
7488 * linespec.c (linespec_complete_what): New.
7489 (struct ls_parser) <complete_what, completion_word,
7490 completion_quote_char, completion_quote_end, completion_tracker>:
7491 New fields.
7492 (string_find_incomplete_keyword_at_end): New.
7493 (linespec_lexer_lex_string): Record quote char. If in completion
7494 mode, don't throw.
7495 (linespec_lexer_consume_token): Advance the completion word point.
7496 (linespec_lexer_peek_token): Save/restore completion info.
7497 (save_stream_and_consume_token): New.
7498 (set_completion_after_number): New.
7499 (linespec_parse_basic): Set what to complete next depending on
7500 token. Handle function and label completions specially.
7501 (parse_linespec): Disable objc shortcut in completion mode. Set
7502 what to complete next depending on token type. Skip keyword if in
7503 completion mode.
7504 (complete_linespec_component, linespec_complete): New.
7505 * linespec.h (linespec_complete): Declare.
7506
be966d42
PA
75072017-07-17 Pedro Alves <palves@redhat.com>
7508
7509 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7510 Handle 'operator<' / 'operator<<'.
7511
a2459270
PA
75122017-07-17 Pedro Alves <palves@redhat.com>
7513
7514 * completer.c (collect_explicit_location_matches): Handle
7515 MATCH_LABEL.
7516 (convert_explicit_location_to_linespec): New, factored out from
7517 ...
7518 (convert_explicit_location_to_sals): ... this.
7519 (complete_label): New.
7520 (linespec_complete_label, find_label_symbols_in_block): New.
7521 (find_label_symbols): Add completion_mode parameter and adjust to
7522 call find_label_symbols_in_block.
7523 * linespec.h (linespec_complete_label): Declare.
7524
c6756f62
PA
75252017-07-17 Pedro Alves <palves@redhat.com>
7526
7527 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7528 complete_symbol_mode parameter.
7529 * cli/cli-cmds.c (complete_command): Get the completion result out
7530 of the handle_brkchars tracker if used a custom word point.
7531 * completer.c: Include "linespec.h".
7532 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7533 (advance_to_expression_complete_word_point): New.
7534 (completion_tracker::completes_to_completion_word): New.
7535 (complete_files_symbols): Pass down
7536 complete_symbol_mode::EXPRESSION.
7537 (explicit_options, probe_options): New.
7538 (collect_explicit_location_matches): Complete on the
7539 explictit_loc->foo instead of word. Use
7540 linespec_complete_function. Handle MATCH_LINE. Handle offering
7541 keyword and options completions.
7542 (backup_text_ptr): Delete.
7543 (skip_keyword): New.
7544 (complete_explicit_location): Remove 'word' parameter. Add
7545 language, quoted_arg_start and quoted_arg_end parameters.
7546 Rewrite, parsing left to right.
7547 (location_completer): Rewrite.
7548 (location_completer_handle_brkchars): New function.
7549 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7550 (enum complete_line_internal_reason): Adjust comments.
7551 (completion_tracker::discard_completions): New.
7552 (completer_handle_brkchars_func_for_completer): Handle
7553 location_completer.
7554 (gdb_custom_word_point_brkchars)
7555 (gdb_org_rl_basic_quote_characters): New.
7556 (gdb_completion_word_break_characters_throw)
7557 (completion_find_completion_word): Handle trackers that use a
7558 custom word point.
7559 (completion_tracker::advance_custom_word_point_by): New.
7560 (completion_tracker::build_completion_result): Don't rely on
7561 readline appending the quote char.
7562 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7563 use a custom word point.
7564 (gdb_rl_attempted_completion_function): Restore
7565 rl_basic_quote_characters.
7566 * completer.h (class completion_tracker): Extend intro comment.
7567 (completion_tracker::set_quote_char)
7568 (completion_tracker::quote_char)
7569 (completion_tracker::set_use_custom_word_point)
7570 (completion_tracker::use_custom_word_point)
7571 (completion_tracker::custom_word_point)
7572 (completion_tracker::set_custom_word_point)
7573 (completion_tracker::advance_custom_word_point_by)
7574 (completion_tracker::completes_to_completion_word)
7575 (completion_tracker::discard_completions): New methods.
7576 (completion_tracker::m_quote_char)
7577 (completion_tracker::m_use_custom_word_point)
7578 (completion_tracker::m_custom_word_point): New fields.
7579 (advance_to_expression_complete_word_point): Declare.
7580 * f-lang.c (f_collect_symbol_completion_matches): Add
7581 complete_symbol_mode parameter.
7582 * language.h (struct language_defn)
7583 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7584 parameter.
7585 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7586 (linespec_complete_function): New function.
7587 (linespec_lexer_lex_keyword): Adjust.
7588 * linespec.h (linespec_keywords, linespec_complete_function): New
7589 declarations.
7590 * location.c (find_end_quote): New function.
7591 (explicit_location_lex_one): Add explicit_completion_info
7592 parameter. Save quoting info. Don't throw if being called for
7593 completion. Don't handle Ada operators here.
7594 (is_cp_operator, skip_op_false_positives, first_of)
7595 (explicit_location_lex_one_function): New function.
7596 (string_to_explicit_location): Replace 'dont_throw' parameter with
7597 an explicit_completion_info pointer parameter. Handle it. Don't
7598 use explicit_location_lex_one to lex function names. Use
7599 explicit_location_lex_one_function instead.
7600 * location.h (struct explicit_completion_info): New.
7601 (string_to_explicit_location): Replace 'dont_throw' parameter with
7602 an explicit_completion_info pointer parameter.
7603 * symtab.c (default_collect_symbol_completion_matches_break_on):
7604 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7605 (default_collect_symbol_completion_matches)
7606 (collect_symbol_completion_matches): Add complete_symbol_mode
7607 parameter.
7608 (collect_symbol_completion_matches_type): Pass down
7609 complete_symbol_mode::EXPRESSION.
7610 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7611 parameter. Handle LINESPEC mode.
7612 * symtab.h (complete_symbol_mode): New.
7613 (default_collect_symbol_completion_matches_break_on)
7614 (default_collect_symbol_completion_matches)
7615 (collect_symbol_completion_matches)
7616 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7617 parameter.
7618
1d550c82
PA
76192017-07-17 Pedro Alves <palves@redhat.com>
7620
7621 * utils.c (enum class strncmp_iw_mode): New.
7622 (strcmp_iw): Rename to ...
7623 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7624 parameters. Handle them.
7625 (strncmp_iw): New.
7626 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7627 * utils.h (strncmp_iw): Declare.
7628 (strcmp_iw): Move describing comments here.
7629
8090b426
PA
76302017-07-17 Pedro Alves <palves@redhat.com>
7631
7632 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7633 CP_OPERATOR_STR.
7634 * c-typeprint.c (is_type_conversion_operator): Use
7635 CP_OPERATOR_STR.
7636 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7637 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7638 CP_OPERATOR_LEN.
7639 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7640 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7641 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7642 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7643 CP_OPERATOR_STR.
7644 * location.c: Include "cp-support.h".
7645 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7646 CP_OPERATOR_STR.
7647 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7648 CP_OPERATOR_LEN.
7649
6a2c1b87
PA
76502017-07-17 Pedro Alves <palves@redhat.com>
7651
7652 * cli/cli-cmds.c (complete_command): Use a completion tracker
7653 along with completion_find_completion_word for handle_brkchars
7654 phase.
7655 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7656 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7657 (struct gdb_rl_completion_word_info): New.
7658 (gdb_rl_find_completion_word): New.
7659 (completion_find_completion_word): New.
7660 * completer.h (completion_find_completion_word): Declare.
7661
eb3ff9a5
PA
76622017-07-17 Pedro Alves <palves@redhat.com>
7663
7664 * ada-lang.c (symbol_completion_match): Adjust comments.
7665 (symbol_completion_add): Replace vector parameter with
7666 completion_tracker parameter. Use it.
7667 (ada_make_symbol_completion_list): Rename to...
7668 (ada_collect_symbol_completion_matches): ... this. Add
7669 completion_tracker parameter and use it.
7670 (ada_language_defn): Adjust.
7671 * break-catch-syscall.c (catch_syscall_completer): Adjust
7672 prototype and work with completion_tracker instead of VEC.
7673 * breakpoint.c (condition_completer): Adjust prototype and work
7674 with completion_tracker instead of VEC.
7675 * c-lang.c (c_language_defn, cplus_language_defn)
7676 (asm_language_defn, minimal_language_defn): Adjust to renames.
7677 * cli/cli-cmds.c (complete_command): Rework using
7678 completion_tracker. Catch exceptions when completing.
7679 * cli/cli-decode.c (integer_unlimited_completer)
7680 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7681 with completion_tracker instead of VEC.
7682 * command.h (struct completion_tracker): Forward declare.
7683 (completer_ftype, completer_handle_brkchars_ftype): Change
7684 types.
7685 (complete_on_cmdlist, complete_on_enum): Adjust.
7686 * completer.c: Include <algorithm>.
7687 (struct gdb_completer_state): New.
7688 (current_completion): New global.
7689 (readline_line_completion_function): Delete.
7690 (noop_completer, filename_completer)
7691 (filename_completer_handle_brkchars, complete_files_symbols)
7692 (linespec_location_completer): Adjust to work with a
7693 completion_tracker instead of a VEC.
7694 (string_or_empty): New.
7695 (collect_explicit_location_matches): Adjust to work with a
7696 completion_tracker instead of a VEC.
7697 (explicit_location_completer): Rename to ...
7698 (complete_explicit_location): ... this and adjust to work with a
7699 completion_tracker instead of a VEC.
7700 (location_completer): Adjust to work with a completion_tracker
7701 instead of a VEC.
7702 (add_struct_fields): Adjust to work with a completion_list instead
7703 of VEC.
7704 (expression_completer): Rename to ...
7705 (complete_expression): ... this and adjust to work with a
7706 completion_tracker instead of a VEC. Use complete_files_symbols.
7707 (expression_completer): Reimplement on top of complete_expression.
7708 (symbol_completer): Adjust to work with a completion_tracker
7709 instead of a VEC.
7710 (enum complete_line_internal_reason): Add describing comments.
7711 (complete_line_internal_normal_command): Adjust to work with a
7712 completion_tracker instead of a VEC.
7713 (complete_line_internal): Rename to ...
7714 (complete_line_internal_1): ... this and adjust to work with a
7715 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7716 handle_brkchars phase.
7717 (new_completion_tracker): Delete.
7718 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7719 complete_line_internal_1.
7720 (free_completion_tracker): Delete.
7721 (INITIAL_COMPLETION_HTAB_SIZE): New.
7722 (completion_tracker::completion_tracker)
7723 (completion_tracker::~completion_tracker): New.
7724 (maybe_add_completion): Delete.
7725 (completion_tracker::maybe_add_completion)
7726 (completion_tracker::add_completion)
7727 (completion_tracker::add_completions): New.
7728 (throw_max_completions_reached_error): Delete.
7729 (complete_line): Adjust to work with a completion_tracker instead
7730 of a VEC. Don't create a completion_tracker_t or check for max
7731 completions here.
7732 (command_completer, command_completer_handle_brkchars)
7733 (signal_completer, reg_or_group_completer_1)
7734 (reg_or_group_completer, default_completer_handle_brkchars):
7735 Adjust to work with a completion_tracker.
7736 (gdb_completion_word_break_characters_throw): New.
7737 (gdb_completion_word_break_characters): Reimplement.
7738 (line_completion_function): Delete.
7739 (completion_tracker::recompute_lowest_common_denominator)
7740 (expand_preserving_ws)
7741 (completion_tracker::build_completion_result)
7742 (completion_result::completion_result)
7743 (completion_result::completion_result)
7744 (completion_result::~completion_result)
7745 (completion_result::completion_result)
7746 (completion_result::release_match_list, compare_cstrings)
7747 (completion_result::sort_match_list)
7748 (completion_result::reset_match_list)
7749 (gdb_rl_attempted_completion_function_throw)
7750 (gdb_rl_attempted_completion_function): New.
7751 * completer.h (completion_list, struct completion_result)
7752 (class completion_tracker): New.
7753 (complete_line): Add completion_tracker parameter.
7754 (readline_line_completion_function): Delete.
7755 (gdb_rl_attempted_completion_function): New.
7756 (noop_completer, filename_completer, expression_completer)
7757 (location_completer, symbol_completer, command_completer)
7758 (signal_completer, reg_or_group_completer): Update prototypes.
7759 (completion_tracker_t, new_completion_tracker)
7760 (make_cleanup_free_completion_tracker): Delete.
7761 (enum maybe_add_completion_enum): Delete.
7762 (maybe_add_completion): Delete.
7763 (throw_max_completions_reached_error): Delete.
7764 * corefile.c (complete_set_gnutarget): Adjust to work with a
7765 completion_tracker instead of a VEC.
7766 * cp-abi.c (cp_abi_completer): Adjust to work with a
7767 completion_tracker instead of a VEC.
7768 * d-lang.c (d_language_defn): Adjust.
7769 * disasm.c (disassembler_options_completer): Adjust to work with a
7770 completion_tracker instead of a VEC.
7771 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7772 (f_collect_symbol_completion_matches): ... this. Adjust to work
7773 with a completion_tracker instead of a VEC.
7774 (f_language_defn): Adjust.
7775 * go-lang.c (go_language_defn): Adjust.
7776 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7777 Adjust to work with a completion_tracker instead of a VEC.
7778 * infrun.c (handle_completer): Likewise.
7779 * interps.c (interpreter_completer): Likewise.
7780 * interps.h (interpreter_completer): Likewise.
7781 * language.c (unknown_language_defn, auto_language_defn)
7782 (local_language_defn): Adjust.
7783 * language.h (language_defn::la_make_symbol_completion_list):
7784 Rename to ...
7785 (language_defn::la_collect_symbol_completion_matches): ... this
7786 and adjust to work with a completion_tracker instead of a VEC.
7787 * m2-lang.c (m2_language_defn): Adjust.
7788 * objc-lang.c (objc_language_defn): Adjust.
7789 * opencl-lang.c (opencl_language_defn): Adjust.
7790 * p-lang.c (pascal_language_defn): Adjust.
7791 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7792 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7793 with a completion_tracker.
7794 * rust-lang.c (rust_language_defn): Adjust.
7795 * symtab.c (free_completion_list, do_free_completion_list)
7796 (return_val, completion_tracker): Delete.
7797 (completion_list_add_name, completion_list_add_symbol)
7798 (completion_list_add_msymbol, completion_list_objc_symbol)
7799 (completion_list_add_fields, add_symtab_completions): Add
7800 completion_tracker parameter and use it.
7801 (default_make_symbol_completion_list_break_on_1): Rename to...
7802 (default_collect_symbol_completion_matches_break_on): ... this.
7803 Add completion_tracker parameter and use it instead of allocating
7804 a completion tracker here.
7805 (default_make_symbol_completion_list_break_on): Delete old
7806 implementation.
7807 (default_make_symbol_completion_list): Delete.
7808 (default_collect_symbol_completion_matches): New.
7809 (make_symbol_completion_list): Delete.
7810 (collect_symbol_completion_matches): New.
7811 (make_symbol_completion_type): Rename to ...
7812 (collect_symbol_completion_matches_type): ... this. Add
7813 completion_tracker parameter and use it instead of VEC.
7814 (make_file_symbol_completion_list_1): Rename to...
7815 (collect_file_symbol_completion_matches): ... this. Add
7816 completion_tracker parameter and use it instead of VEC.
7817 (make_file_symbol_completion_list): Delete.
7818 (add_filename_to_list): Use completion_list instead of a VEC.
7819 (add_partial_filename_data::list): Now a completion_list.
7820 (make_source_files_completion_list): Work with a completion_list
7821 instead of a VEC.
7822 * symtab.h: Include "completer.h".
7823 (default_make_symbol_completion_list_break_on)
7824 (default_make_symbol_completion_list, make_symbol_completion_list)
7825 (make_symbol_completion_type, make_file_symbol_completion_list)
7826 (make_source_files_completion_list): Delete.
7827 (default_collect_symbol_completion_matches_break_on)
7828 (default_collect_symbol_completion_matches)
7829 (collect_symbol_completion_matches)
7830 (collect_symbol_completion_matches_type)
7831 (collect_file_symbol_completion_matches)
7832 (make_source_files_completion_list): New.
7833 * top.c (init_main): Don't install a rl_completion_entry_function
7834 hook. Install a rl_attempted_completion_function hook instead.
7835 * tui/tui-layout.c (layout_completer): Adjust to work with a
7836 completion_tracker.
7837 * tui/tui-regs.c (tui_reggroup_completer):
7838 * tui/tui-win.c (window_name_completer, focus_completer)
7839 (winheight_completer): Adjust to work with a completion_tracker.
7840 * value.c: Include "completer.h".
7841 (complete_internalvar): Adjust to work with a completion_tracker.
7842 * value.h (complete_internalvar): Likewise.
7843
6e1dbf8c
PA
78442017-07-17 Pedro Alves <palves@redhat.com>
7845
7846 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7847 renames.
7848 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7849 comments to completer_ftype's declaration.
7850 <completer_handle_brkchars>: Change type to
7851 completer_handle_brkchars_ftype.
7852 * command.h (completer_ftype): Add describing comment and give
7853 names to parameters.
7854 (completer_ftype_void): Rename to ...
7855 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7856 (set_cmd_completer_handle_brkchars): Adjust.
7857 * completer.c (filename_completer_handle_brkchars): New function.
7858 (complete_line_internal_normal_command): New function, factored
7859 out from ...
7860 (complete_line_internal): ... here.
7861 (command_completer_handle_brkchars)
7862 (default_completer_handle_brkchars)
7863 (completer_handle_brkchars_func_for_completer): New functions.
7864 * completer.h (set_gdb_completion_word_break_characters): Delete
7865 declaration.
7866 (completer_handle_brkchars_func_for_completer): New declaration.
7867 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7868 completer_handle_brkchars_func_for_completer.
7869
78b13106
PA
78702017-07-17 Pedro Alves <palves@redhat.com>
7871
7872 * completer.c (symbol_completer): New function, based on
7873 make_symbol_completion_list_fn.
7874 * completer.h (symbol_completer): New declaration.
7875 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7876 * python/py-cmd.c (completers): Adjust.
7877 * symtab.c (make_symbol_completion_list_fn): Delete.
7878 * symtab.h (make_symbol_completion_list_fn): Delete.
7879 * cli/cli-decode.c (add_cmd): Adjust.
7880
bbf2f4df
PA
78812017-07-17 Pedro Alves <palves@redhat.com>
7882
7883 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7884 * dwarf2read.c: Include "filename-seen-cache.h".
7885 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7886 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7887 * filename-seen-cache.c: New file.
7888 * filename-seen-cache.h: New file.
7889 * symtab.c: Include "filename-seen-cache.h".
7890 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7891 (create_filename_seen_cache, clear_filename_seen_cache)
7892 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7893 to filename-seen-cache.h/filename-seen-cache.c.
7894 (output_source_filename, sources_info)
7895 (maybe_add_partial_symtab_filename)
7896 (make_source_files_completion_list): Adjust to use
7897 filename_seen_cache.
7898
330cdd98
PA
78992017-07-17 Pedro Alves <palves@redhat.com>
7900
7901 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7902 fields.
7903 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7904 dwarf2_debug_sections*)): New.
7905 (dwarf2_per_objfile::dwarf2_per_objfile(const
7906 dwarf2_per_objfile&)): Declare as deleted.
7907 (dwarf2_per_objfile::operator=): Declare as deleted.
7908 (dwarf2_per_objfile::dwarf2_per_objfile)
7909 (dwarf2_per_objfile::~dwarf2_per_objfile)
7910 (dwarf2_per_objfile::free_cached_comp_units): New.
7911 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7912 ctor. Call dwarf2_per_objfile's ctor manually.
7913 (dwarf2_locate_sections): Deleted/refactored as ...
7914 (dwarf2_per_objfile::locate_sections): ... this new method.
7915 (free_cached_comp_units): Defer to
7916 dwarf2_per_objfile::free_cached_comp_units.
7917 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7918
8880f2a9
TT
79192017-07-14 Tom Tromey <tom@tromey.com>
7920
7921 PR rust/21764:
7922 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7923 parameter.
7924 <UNOP_SIZEOF>: Split into separate case.
7925 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7926
65547233
TT
79272017-07-14 Tom Tromey <tom@tromey.com>
7928
7929 PR rust/21763:
7930 * symtab.c (symbol_matches_domain): Add language_rust to special
7931 case.
7932 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7933 treat LOC_TYPEDEF symbols as variables.
7934
8f14146e
PA
79352017-07-14 Pedro Alves <palves@redhat.com>
7936
7937 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7938 symtabs matching all symtabs with SRCFILE as file name instead of
7939 only considering the first hit, with lookup_symtab.
7940
2347965c
SM
79412017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7942
7943 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7944 operator_name parameters.
7945 (gen_expr): Update function call.
7946
40f4af28
SM
79472017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7948
7949 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7950 parameter.
7951 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7952 Likewise.
7953 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7954 parameter, use agent_expr::gdbarch instead, update function
7955 calls.
7956 (locexpr_tracepoint_var_ref): Likewise.
7957 (loclist_tracepoint_var_ref): Likewise.
7958 * ax-gdb.c (gen_trace_static_fields): Likewise.
7959 (gen_traced_pop): Likewise.
7960 (gen_frame_args_address): Likewise.
7961 (gen_frame_locals_address): Likewise.
7962 (gen_var_ref): Likewise.
7963 (gen_struct_ref_recursive): Likewise.
7964 (gen_static_field): Likewise.
7965 (gen_maybe_namespace_elt): Likewise.
7966 (gen_expr): Likewise.
7967 (gen_trace_for_var): Likewise.
7968 (gen_trace_for_expr): Likewise.
7969 (gen_trace_for_return_address): Likewise.
7970
053f8057
SM
79712017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7972
7973 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7974 parameter.
7975 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7976
6661ad48
SM
79772017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7978
7979 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7980 from ax, update calls.
7981 (gen_usual_arithmetic): Likewise.
7982 (gen_integral_promotions): Likewise.
7983 (gen_bitfield_ref): Likewise.
7984 (gen_primitive_field): Likewise.
7985 (gen_struct_ref_recursive): Likewise.
7986 (gen_struct_ref): Likewise.
7987 (gen_maybe_namespace_elt): Likewise.
7988 (gen_struct_elt_for_reference): Likewise.
7989 (gen_namespace_elt): Likewise.
7990 (gen_aggregate_elt_ref): Likewise.
7991 (gen_expr): Get gdbarch from ax, update calls.
7992 (gen_expr_binop_rest): Likewise.
7993
c55a47e7
PA
79942017-07-13 Pedro Alves <palves@redhat.com>
7995
7996 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7997 as default tdesc.
7998 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7999 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8000 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8001 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8002 tdep.
8003 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8004 Get final tdesc from the tdep.
8005 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8006 default tdesc.
8007 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8008 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8009 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8010 Use it as default tdesc.
8011 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8012 down to amd_init_abi. No longer handle fallback tdesc here.
8013 * amd64-tdep.h (tdesc_x32): Declare.
8014 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8015 parameter.
8016 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8017 as default tdesc.
8018
55efceab
AA
80192017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8020
8021 * s390-linux-tdep.c (s390_process_record): Add support for
8022 instructions new in arch12.
8023
0aa37b65
JB
80242017-07-11 John Baldwin <jhb@FreeBSD.org>
8025
8026 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8027 PT_GETFSBASE and PT_GETGSBASE.
8028 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8029 PT_SETGSBASE.
8030
48aeef91
JB
80312017-07-11 John Baldwin <jhb@FreeBSD.org>
8032
8033 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8034 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8035 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8036 those rules.
8037 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8038 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8039 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8040 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8041 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8042 * features/i386/amd64.xml: Add 64bit-segments.xml.
8043 * features/i386/amd64-avx-avx512.c: Regenerated.
8044 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8045 * features/i386/amd64-avx-mpx.c: Regenerated.
8046 * features/i386/amd64-avx.c: Regenerated.
8047 * features/i386/amd64-mpx.c: Regenerated.
8048 * features/i386/amd64.c: Regenerated.
8049 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8050 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8051 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8052 * regformats/i386/amd64-avx.dat: Regenerated.
8053 * regformats/i386/amd64-mpx.dat: Regenerated.
8054 * regformats/i386/amd64.dat: Regenerated.
8055
77c501bc
YQ
80562017-07-10 Yao Qi <yao.qi@linaro.org>
8057
8058 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8059 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8060
6dc8d757
AK
80612017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8062
8063 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8064 unsetenv.
8065 * gnulib/aclocal.m4: Regenerate.
8066 * gnulib/config.in: Regenerate.
8067 * gnulib/configure: Regenerate.
8068 * gnulib/import/Makefile.am: Regenerate.
8069 * gnulib/import/Makefile.in: Regenerate.
8070 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8071 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8072 * gnulib/import/m4/environ.m4: New file.
8073 * gnulib/import/m4/setenv.m4: New file.
8074 * gnulib/import/setenv.c: New file.
8075 * gnulib/import/unsetenv.c: New file.
8076
266934d1
SM
80772017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8078
8079 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8080 address when op is DW_OP_addr.
8081
03278692
TT
80822017-07-09 Tom Tromey <tom@tromey.com>
8083
8084 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8085 check and apply to outer type.
8086
4b654465
JB
80872017-07-07 John Baldwin <jhb@FreeBSD.org>
8088
8089 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8090 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8091 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8092 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8093
2af9fc44
JB
80942017-07-07 John Baldwin <jhb@FreeBSD.org>
8095
8096 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8097
382b69bb
JB
80982017-07-07 John Baldwin <jhb@FreeBSD.org>
8099
8100 * corelow.c (get_core_siginfo): Remove.
8101 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8102 instead of get_core_siginfo.
8103 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8104 * gdbarch.h: Re-generate.
8105 * gdbarch.c: Re-generate.
8106 * linux-tdep.c (linux_core_xfer_siginfo): New.
8107 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8108
6e5eab33
JB
81092017-07-07 John Baldwin <jhb@FreeBSD.org>
8110
8111 * corelow.c (thread_section_name): Move to ...
8112 * gdbcore.h (thread_section_name): ... here.
8113
929edea9
JB
81142017-07-07 John Baldwin <jhb@FreeBSD.org>
8115
8116 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8117 (struct siginfo32): New.
8118 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8119 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8120 via ptrace(PT_LWPINFO).
8121
762c974a
JB
81222017-07-07 John Baldwin <jhb@FreeBSD.org>
8123
8124 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8125 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8126 (fbsd_get_siginfo_type): New.
8127 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8128 (_initialize_fbsd_tdep): New.
8129
33c5cd75
DB
81302017-07-06 David Blaikie <dblaikie@gmail.com>
8131
8132 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8133 a singular dwo_unit*) to support multiple CUs in the same way that
8134 multiple TUs are supported.
8135 (create_cus_hash_table): Replace create_dwo_cu with a function for
8136 parsing multiple CUs from a DWO file.
8137 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8138 create_dwo_cu.
8139 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8140 htab_find, rather than comparing the signature to a singleton CU in
8141 the dwo_file.
8142
8455d262
PA
81432017-07-06 Pedro Alves <palves@redhat.com>
8144
8145 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8146
4da3eb35
PA
81472017-07-04 Pedro Alves <palves@redhat.com>
8148
8149 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8150 * gdbtypes.h (TYPE_STATIC): Delete.
8151 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8152 is_synchronized, is_native>: Delete.
8153 <dummy>: Bump.
8154 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8155 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8156 (TYPE_FN_FIELD_ABSTRACT): Delete.
8157
5bfd255c
SM
81582017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8159
8160 * buffer.h (buffer_finish): Fix spelling mistakes.
8161
25c54127
EZ
81622017-07-01 Eli Zaretskii <eliz@gnu.org>
8163
8164 * .dir-locals.el: Automatically switch to C-style comments in
8165 versions of Emacs that support the feature.
8166
dc4bde35
SDJ
81672017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8168 Pedro Alves <palves@redhat.com>
8169
8170 PR cli/21688
8171 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8172 (process_next_line): New variable 'inline_cmd'.
8173 Adjust 'if' clauses for "python", "compile" and "guile" to use
8174 'command_name_equals' and check for '!inline_cmd'.
8175
51ed89aa
SDJ
81762017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8177
8178 PR cli/21688
8179 * cli/cli-script.c (command_name_equals_not_inline): New function.
8180 (process_next_line): Adjust 'if' clauses for "python", "compile"
8181 and "guile" to use command_name_equals_not_inline.
8182
eb17d413
PA
81832017-06-29 Pedro Alves <palves@redhat.com>
8184
8185 * completer.c (expression_completer): Call
8186 linespec_location_completer instead of location_completer.
8187
195bcdd5
PA
81882017-06-29 Pedro Alves <palves@redhat.com>
8189
8190 * completer.c (expression_completer): Remove code that recomputes
8191 'text' from 'word'.
8192
adc764e7
YQ
81932017-06-29 Yao Qi <yao.qi@linaro.org>
8194
8195 * regformats/regdat.sh: Generate code with
8196 "ifndef IN_PROCESS_AGENT".
8197
6e75794e
PA
81982017-06-28 Pedro Alves <palves@redhat.com>
8199
8200 * command.h: Include "common/scoped_restore.h".
8201
bc491f2e
YQ
82022017-06-28 Yao Qi <yao.qi@linaro.org>
8203
8204 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8205 instead of obstack_grow.
8206
41664b45
DG
82072017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8208
8209 PR gdb/21337
8210 * symfile.c (reread_symbols): Call objfiles_changed just before
8211 read_symbols.
8212
6da67eb1
PA
82132017-06-27 Pedro Alves <palves@redhat.com>
8214
8215 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8216 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8217 (completion_list_add_symbol, completion_list_add_msymbol):
8218 ... these new functions.
8219 (add_symtab_completions)
8220 (default_make_symbol_completion_list_break_on_1): Adjust.
8221
23732b1e
PA
82222017-06-27 Pedro Alves <palves@redhat.com>
8223
8224 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8225 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8226 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8227 dtor.
8228 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8229 'storage_obstack' field an auto_obstack. In-class initialize all
8230 non-bitfield fields. Make minsyms_read bool.
8231 * symfile.c (read_symbols): Adjust.
8232
a4d1e79a
AH
82332017-06-27 Alan Hayward <alan.hayward@arm.com>
8234
8235 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8236 (gdbsim_store_register): Likewise.
8237
8268c778
PA
82382017-06-27 Pedro Alves <palves@redhat.com>
8239
8240 * c-exp.y (name_obstack): Now an auto_obstack.
8241 (yylex): Use auto_obstack::clear.
8242 (c_parse): Use auto_obstack::clear instead of reinitializing and
8243 freeing the obstack.
8244 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8245 * d-exp.y (name_obstack): Now an auto_obstack.
8246 (yylex): Use auto_obstack::clear.
8247 (d_parse): Use auto_obstack::clear instead of reinitializing and
8248 freeing the obstack.
8249 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8250 auto_obstack.
8251 * dwarf2read.c (create_addrmap_from_index)
8252 (dwarf2_build_psymtabs_hard)
8253 (update_enumeration_type_from_children): Likewise.
8254 * gdb_obstack.h (auto_obstack): New type.
8255 * go-exp.y (name_obstack): Now an auto_obstack.
8256 (build_packaged_name): Use auto_obstack::clear.
8257 (go_parse): Use auto_obstack::clear instead of reinitializing and
8258 freeing the obstack.
8259 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8260 auto_obstack.
8261 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8262 * rust-exp.y (work_obstack): Now an auto_obstack.
8263 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8264 reinitializing and freeing the obstack.
8265 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8266 (host_char_to_target): Use auto_obstack.
8267 * utils.h (make_cleanup_obstack_free): Delete declaration.
8268 * valprint.c (generic_emit_char, generic_printstr): Use
8269 auto_obstack.
8270
db665f42
SM
82712017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8272
8273 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8274 thread.
8275 (darwin_init_thread_list): Don't update dummy thread.
8276 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8277
873c0814
SM
82782017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8279
8280 * record-full.c (netorder16): Remove.
8281
8b5a7a6e
SM
82822017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8283
8284 * common/diagnostics.h: Define macros for GCC.
8285 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8286 * common/vec.h: Include diagnostics.h.
8287 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8288 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8289 warning.
8290
d1435379
SM
82912017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8292
8293 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8294 New macro.
8295 * ada-lex.l: Ignore deprecated register warnings.
8296
cc75e0fd
SM
82972017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8298
8299 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8300 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8301
07809eaf
SM
83022017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8303
8304 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8305 its own line.
8306
f076f034
SM
83072017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8308
8309 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8310
0dd5cbc5
AH
83112017-06-23 Alan Hayward <alan.hayward@arm.com>
8312
8313 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8314 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8315 (xtensa_register_read_masked): Likewise.
8316
d4c6ce5b
SDJ
83172017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8318
8319 * common/environ.c (gdb_environ::unset): Update comment.
8320
16892a03
AH
83212017-06-22 Alan Hayward <alan.hayward@arm.com>
8322
8323 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8324 registers.
8325
d7dcbefc
AH
83262017-06-22 Alan Hayward <alan.hayward@arm.com>
8327
8328 * record-full.c (record_full_exec_insn): Use byte_vector.
8329
b30ff123
YQ
83302017-06-22 Yao Qi <yao.qi@linaro.org>
8331
8332 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8333 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8334
4fa847d7
AH
83352017-06-22 Alan Hayward <alan.hayward@arm.com>
8336
8337 * remote.c (cached_reg): Move from here...
8338 * regcache.h (cached_reg): ...to here.
8339 * python/py-unwind.c (struct reg_info): Remove.
8340 (cached_frame_info): Use cached_reg_t.
8341 (pyuw_prev_register): Likewise.
8342 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8343 (pyuw_dealloc_cache): Free all registers.
8344
f4906a9a
PA
83452017-06-22 Pedro Alves <palves@redhat.com>
8346 Simon Marchi <simon.marchi@ericsson.com>
8347
8348 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8349 warning.
8350 * common/diagnostics.h: New file.
8351
b45a1208
PA
83522017-06-22 Pedro Alves <palves@redhat.com>
8353
8354 * common/agent.h: Add include guards.
8355
e4da2c61
SM
83562017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8357
8358 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8359 talk about addressable units instead of bytes.
8360
96160d60
SDJ
83612017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8362
8363 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8364 of '::const_iterator'.
8365
9a6c7d9c
SDJ
83662017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8367
8368 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8369 'unittests/environ-selftests.c'.
8370 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8371 * charset.c (find_charset_names): Declare object 'iconv_env'.
8372 Update code to use 'iconv_env' object. Remove call to
8373 'free_environ'.
8374 * common/environ.c: Include <utility>.
8375 (make_environ): Delete function.
8376 (free_environ): Delete function.
8377 (gdb_environ::clear): New function.
8378 (gdb_environ::operator=): New function.
8379 (gdb_environ::get): Likewise.
8380 (environ_vector): Delete function.
8381 (set_in_environ): Delete function.
8382 (gdb_environ::set): New function.
8383 (unset_in_environ): Delete function.
8384 (gdb_environ::unset): New function.
8385 (gdb_environ::envp): Likewise.
8386 * common/environ.h: Include <vector>.
8387 (struct gdb_environ): Delete; transform into...
8388 (class gdb_environ): ... this class.
8389 (free_environ): Delete prototype.
8390 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8391 environ_vector): Likewise.
8392 * infcmd.c (run_command_1): Update code to call
8393 'envp' from 'gdb_environ' class.
8394 (environment_info): Update code to call methods from 'gdb_environ'
8395 class.
8396 (unset_environment_command): Likewise.
8397 (path_info): Likewise.
8398 (path_command): Likewise.
8399 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8400 (inferior::inferior): Initialize 'environment' using the host's
8401 information.
8402 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8403 Include "environ.h".
8404 (class inferior) <environment>: Change type from 'struct
8405 gdb_environ' to 'gdb_environ'.
8406 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8407 methods from 'gdb_environ' class.
8408 * solib.c (solib_find_1): Likewise
8409 * unittests/environ-selftests.c: New file.
8410
75c554cf
YQ
84112017-06-20 Yao Qi <yao.qi@linaro.org>
8412
8413 * features/i386/i386-linux.xml: Exchange the order of including
8414 32bit-linux.xml and 32bit-sse.xml.
8415 * features/i386/i386-linux.c: Regenerated.
8416
72ddacb7
YQ
84172017-06-20 Yao Qi <yao.qi@linaro.org>
8418
8419 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8420 Delete copy ctor and assignment operator.
8421 (tdesc_type): Likewise.
8422 (tdesc_feature): Likewise.
8423 (tdesc_free_reg): Remove.
8424 (tdesc_create_reg): Use new.
8425 (tdesc_free_type): Remove.
8426 (tdesc_create_vector): Use new.
8427 (tdesc_create_union): Likewise.
8428 (tdesc_create_flags): Likewise.
8429 (tdesc_create_enum): Likewise.
8430 (tdesc_free_feature): Delete.
8431 (free_target_description): Use delete.
8432
325c9fd4
JB
84332017-06-19 John Baldwin <jhb@FreeBSD.org>
8434
8435 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8436 registers.
8437
16b7a719
PA
84382017-06-19 Pedro Alves <palves@redhat.com>
8439
8440 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8441 after gdb::unlinker.
8442
1c8e01c9
SDJ
84432017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8444
8445 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8446 gdb_environ to access an environment variable.
8447
ffce45d2
TP
84482017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8449
8450 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8451 gdb_byte*.
8452
1d4fbac9
SM
84532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8454
8455 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8456
8465943a
SM
84572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8458
8459 * configure: Re-generate.
8460 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8461
3e019bdc
SM
84622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8463
8464 * configure: Re-generate.
8465 * warning.m4: Pass -Werror to compiler when checking for
8466 supported warning flags.
8467
cf0dd6f0
SM
84682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8469
8470 * Makefile.in (COMPILE.pre): Add "-x c++".
8471
6f98355c
YQ
84722017-06-16 Alan Hayward <alan.hayward@arm.com>
8473 Pedro Alves <palves@redhat.com>
8474 Yao Qi <yao.qi@linaro.org>
8475
8476 * defs.h (RequireLongest): New.
8477 (extract_integer): Declare function template.
8478 (extract_signed_integer): Remove the declaration, but define it
8479 static inline.
8480 (extract_unsigned_integer): Likewise.
8481 (store_integer): Declare function template.
8482 (store_signed_integer): Remove the declaration, but define it
8483 static inline.
8484 (store_unsigned_integer): Likewise.
8485 * findvar.c (extract_integer): New function template.
8486 (extract_signed_integer): Remove.
8487 (extract_unsigned_integer): Remove.
8488 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8489 instantiations.
8490 (store_integer): New function template.
8491 (store_signed_integer): Remove.
8492 (store_unsigned_integer): Remove.
8493 (store_integer): Explicit instantiations.
8494 * regcache.c (regcache_raw_read_signed): Update.
8495 (regcache::raw_read): New function.
8496 (regcache::raw_read_signed): Remove.
8497 (regcache::raw_read_unsigned): Remove.
8498 (regcache_raw_read_unsigned): Update.
8499 (regcache_raw_write_unsigned): Update.
8500 (regcache::raw_write_signed): Remove.
8501 (regcache::raw_write): New function.
8502 (regcache_cooked_read_signed): Update.
8503 (regcache::raw_write_unsigned): Remove.
8504 (regcache::cooked_read_signed): Remove.
8505 (regcache_cooked_read_unsigned): Update.
8506 (regcache::cooked_read_unsigned): Remove.
8507 (regcache_cooked_write_signed): Update.
8508 (regcache_cooked_write_unsigned): Update.
8509 * regcache.h (regcache) <raw_read_signed>: Remove.
8510 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8511 <raw_read, raw_write>: New.
8512 <cooked_read_signed, cooked_write_signed>: Remove.
8513 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8514 <cooked_read, cooked_write>: New.
8515 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8516 (sh64_pseudo_register_write): Update.
8517
a87dc45a
AK
85182017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8519
8520 * arc-tdep.c (arc_disassembler_options): New variable.
8521 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8522 of default_print_insn.
8523 (arc_delayed_print_insn): Set info->section when needed,
8524 use default_print_insn to retrieve a disassembler.
8525
45159d6a
SDJ
85262017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8527
8528 PR gdb/21574
8529 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8530 to mention $SHELL and startup-with-shell.
8531
b46c4cf0
MF
85322017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8533
8534 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8535
6394c606
YQ
85362017-06-14 Yao Qi <yao.qi@linaro.org>
8537
8538 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8539 default_print_insn instead of print_insn_aarch64.
8540 * arm-tdep.c (gdb_print_insn_arm): Call
8541 default_print_insn instead of print_insn_big_arm
8542 and print_insn_little_arm.
8543 * i386-tdep.c (i386_print_insn): Call default_print_insn
8544 instead of print_insn_i386.
8545 * ia64-tdep.c (ia64_print_insn): Call
8546 default_print_insn instead of print_insn_ia64.
8547 * mips-tdep.c (gdb_print_insn_mips): Call
8548 default_print_insn instead of print_insn_big_mips
8549 and print_insn_little_mips.
8550 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8551 instead of print_insn_spu.
8552
d5722aa2
PA
85532017-06-14 Pedro Alves <palves@redhat.com>
8554
8555 * ada-lang.c: Include "common/byte-vector.h".
8556 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8557 * charset.c (wchar_iterator::iterate): Resize the vector instead
8558 of reserving it.
8559 * common/byte-vector.h: Include "common/def-vector.h".
8560 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8561 * cli/cli-dump.c: Include "common/byte-vector.h".
8562 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8563 * common/byte-vector.h: New file.
8564 * common/def-vector.h: New file.
8565 * common/default-init-alloc.h: New file.
8566 * dwarf2loc.c: Include "common/byte-vector.h".
8567 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8568 instead of reserving it.
8569 * dwarf2read.c: Include "common/byte-vector.h".
8570 (data_buf::m_vec): Now a gdb::byte_vector.
8571 * gdb_regex.c: Include "common/def-vector.h".
8572 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8573 * mi/mi-main.c: Include "common/byte-vector.h".
8574 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8575 * printcmd.c: Include "common/byte-vector.h".
8576 (print_scalar_formatted): Use gdb::byte_vector.
8577 * valprint.c: Include "common/byte-vector.h".
8578 (maybe_negate_by_bytes, print_decimal_chars): Use
8579 gdb::byte_vector.
8580
01ec7a27
SM
85812017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8582
8583 * darwin-nat.c: Include "nat/fork-inferior.h".
8584
848d9074
SM
85852017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8586
8587 * configure.nat: Factor out Darwin bits that are not
8588 architecture-specific. Add fork-inferior.o.
8589
3b912944
SM
85902017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8591
8592 * configure.nat: Factor out AIX bits that are not
8593 architecture-specific. Add fork-inferior.o.
8594
55acdf22
AA
85952017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8596
8597 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8598 (read_pieced_value, write_pieced_value): ...here. Reduce to
8599 wrappers that just call rw_pieced_value.
8600
f65e2044
AA
86012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8602
8603 * dwarf2loc.c (write_pieced_value): When writing the data for a
8604 memory piece, use write_memory_with_notification instead of
8605 write_memory.
8606
23f945bf
AA
86072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8608
8609 * valops.c (read_value_memory): Change embedded_offset to
8610 represent a bit offset instead of a byte offset.
8611 * value.h (read_value_memory): Adjust comment.
8612
f236533e
AA
86132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8614
8615 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8616 dest_offset_bits and source_offset_bits.
8617 (write_pieced_value): Likewise.
8618
65d84b76
AA
86192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8620
8621 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8622 given by DW_OP_bit_piece.
8623 (write_pieced_value): Likewise.
8624
242d31ab
AA
86252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8626
8627 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8628 some other preparations to the places where sufficient information
8629 is available.
8630 (write_pieced_value): Likewise.
8631
03c8af18
AA
86322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8633
8634 * dwarf2loc.c (bits_to_bytes): New function.
8635 (read_pieced_value): Fix offset calculations for register pieces
8636 on big-endian targets.
8637 (write_pieced_value): Likewise.
8638
840989c1
AA
86392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8640
8641 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8642 (write_pieced_value): Likewise.
8643
359b19bb
AA
86442017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8645
8646 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8647 transfer the source value's least significant bits, instead of its
8648 lowest-addressed ones. Rename type_len to max_offset.
8649 (read_pieced_value): Mirror above changes to write_pieced_value as
8650 applicable.
8651
07c9ca3b
AA
86522017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8653
8654 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8655 truncate full bytes from dest_offset_bits before using it as an
8656 offset into the buffer.
8657
f1cc9874
AA
86582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8659
8660 * dwarf2loc.c (write_pieced_value): Include transfer size in
8661 byte-wise check.
8662
cdaac320
AA
86632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8664
8665 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8666 calculation of this_size.
8667
af547a96
AA
86682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8669
8670 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8671 when targeting a bit-field.
8672 (write_pieced_value): Likewise.
8673
ddd7882a
AA
86742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8675
8676 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8677 (allocate_piece_closure): Drop addr_size parameter.
8678 (dwarf2_evaluate_loc_desc_full): Adjust call to
8679 allocate_piece_closure.
8680
e9352324
AA
86812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8682
8683 PR gdb/21226
8684 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8685 the LSB end, independent of endianness.
8686
d5d1163e
AA
86872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8688
8689 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8690 size capping.
8691
032bb6ea
YQ
86922017-06-13 Yao Qi <yao.qi@linaro.org>
8693
8694 * mips-linux-nat.c: Move include features/mips*-linux.c to
8695 mips-linux-tdep.c.
8696 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8697 to mips-linux-tdep.c.
8698 * mips-linux-tdep.c: Include features/mips*-linux.c
8699 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8700 functions.
8701 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8702 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8703 (tdesc_mips64_dsp_linux): Declare.
8704
f12f6bad
TT
87052017-06-12 Tom Tromey <tom@tromey.com>
8706
8707 * valprint.h (val_print_type_code_int): Remove.
8708 * valprint.c (generic_val_print_int): Always call
8709 val_print_scalar_formatted.
8710 (val_print_type_code_int): Remove.
8711 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8712 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8713 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8714 * ada-valprint.c (ada_val_print_num): Use
8715 val_print_scalar_formatted.
8716
d9109c80
TT
87172017-06-12 Tom Tromey <tom@tromey.com>
8718
8719 * printcmd.c (print_scalar_formatted): Unify the two switches.
8720 Don't convert scalars to LONGEST.
8721
4ac0cb1c
TT
87222017-06-12 Tom Tromey <tom@tromey.com>
8723
8724 PR exp/16225:
8725 * valprint.h (print_decimal_chars): Update.
8726 * valprint.c (maybe_negate_by_bytes): New function.
8727 (print_decimal_chars): Add "is_signed" argument.
8728 * printcmd.c (print_scalar_formatted): Update.
8729
30a25466
TT
87302017-06-12 Tom Tromey <tom@tromey.com>
8731
8732 PR exp/16225:
8733 * valprint.h (print_binary_chars, print_hex_chars): Update.
8734 * valprint.c (val_print_type_code_int): Update.
8735 (print_binary_chars): Add "zero_pad" argument.
8736 (emit_octal_digit): New function.
8737 (print_octal_chars): Don't zero-pad.
8738 (print_decimal_chars): Likewise.
8739 (print_hex_chars): Add "zero_pad" argument.
8740 * sh64-tdep.c (sh64_do_fp_register): Update.
8741 * regcache.c (regcache::dump): Update.
8742 * printcmd.c (print_scalar_formatted): Update.
8743 * infcmd.c (default_print_one_register_info): Update.
8744
b3464d03
PA
87452017-06-12 Pedro Alves <palves@redhat.com>
8746 Alan Hayward <alan.hayward@arm.com>
8747
8748 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8749 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8750 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8751 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8752 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8753
4b76cda9
PA
87542017-06-12 Pedro Alves <palves@redhat.com>
8755
8756 * dwarf2read.c (mapped_symtab::data): Now a vector of
8757 symtab_index_entry instead of vector of
8758 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8759 whether an element's name is NULL instead of checking whether the
8760 element itself is NULL.
8761 (find_slot): Change return type. Adjust.
8762 (hash_expand, , add_index_entry, uniquify_cu_indices)
8763 (write_hash_table): Adjust.
8764
e8f8bcb3
PA
87652017-06-12 Pedro Alves <palves@redhat.com>
8766
8767 * dwarf2read.c (recursively_count_psymbols): New function.
8768 (write_psymtabs_to_index): Call it to compute number of psyms and
8769 pass estimate size of psyms_seen to unordered_set's ctor.
8770
70a1152b
PA
87712017-06-12 Pedro Alves <palves@redhat.com>
8772
8773 * dwarf2read.c (write_hash_table): Check if key already exists
8774 before emplacing.
8775
c2f134ac
PA
87762017-06-12 Pedro Alves <palves@redhat.com>
8777
8778 * dwarf2read.c (data_buf::append_space): Rename to...
8779 (data_buf::grow): ... this, and make private. Adjust all callers.
8780 (data_buf::append_uint): New method.
8781 (add_address_entry, write_one_signatured_type)
8782 (write_psymtabs_to_index): Use it.
8783
a81e6d4d
PA
87842017-06-12 Pedro Alves <palves@redhat.com>
8785
8786 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8787 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8788 (data_buf::file_write): Call ::fwrite directly.
8789
6fd931f2
PA
87902017-06-12 Pedro Alves <palves@redhat.com>
8791
8792 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8793 std::vector::erase.
8794
bc8f2430
JK
87952017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8796
8797 Code cleanup: C++ify .gdb_index producer.
8798 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8799 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8800 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8801 (create_strtab, add_string): Remove.
8802 (file_write, data_buf): New.
8803 (struct symtab_index_entry): Use std::vector for cu_indices.
8804 (struct mapped_symtab): Use std::vector for data.
8805 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8806 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8807 Remove.
8808 (find_slot): Change return type. Update it to the new data structures.
8809 (hash_expand, add_index_entry): Update it to the new data structures.
8810 (offset_type_compare): Remove.
8811 (uniquify_cu_indices): Update it to the new data structures.
8812 (c_str_view, c_str_view_hasher, vector_hasher): New.
8813 (add_indices_to_cpool): Remove.
8814 (write_hash_table): Update it to the new data structures.
8815 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8816 (eq_psymtab_cu_index): Remove.
8817 (psym_index_map): New typedef.
8818 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8819 reference and std::unordered_map for cu_index_htab.
8820 (add_address_entry, add_address_entry_worker, write_address_map)
8821 (write_psymbols): Update it to the new data structures.
8822 (write_obstack): Remove.
8823 (struct signatured_type_index_data): Change types_list to a data_buf
8824 reference and psyms_seen to a std::unordered_set reference.
8825 (write_one_signatured_type, recursively_write_psymbols)
8826 (write_psymtabs_to_index): Update it to the new data structures.
8827
c4dcb155
SM
88282017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8829
8830 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8831 separate-debug-file commands.
8832 * symfile.h (separate_debug_file_debug): New global.
8833 * symfile.c (separate_debug_file_debug): New global.
8834 (separate_debug_file_exists, find_separate_debug_file): Add
8835 debug output.
8836 (_initialize_symfile): Add "set debug separate-debug-file"
8837 command.
8838 * build-id.c (build_id_to_debug_bfd,
8839 find_separate_debug_file_by_buildid): Add debug output.
8840
6d45d4b4
SM
88412017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8842
8843 * gdbarch.sh (displaced_step_free_closure): Remove.
8844 * gdbarch.h, gdbarch.c: Re-generate.
8845 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8846 displaced_step_free_closure.
8847 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8848 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8849 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8850 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8851 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8852 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8853 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8854 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8855 * infrun.c (displaced_step_clear): Call xfree instead of
8856 gdbarch_displaced_step_free_closure.
8857
2f91880f
SDJ
88582017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8859
8860 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8861 NULL".
8862
b8b6e72f
AH
88632017-06-08 Alan Hayward <alan.hayward@arm.com>
8864
8865 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8866 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8867 (mn10300_push_dummy_call): Likewise.
8868
5369082e
AH
88692017-06-08 Alan Hayward <alan.hayward@arm.com>
8870
8871 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8872
ff4ca5ac
AH
88732017-06-08 Alan Hayward <alan.hayward@arm.com>
8874
8875 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8876
aefd8b33
SDJ
88772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8878
8879 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8880 able to start inferiors using a shell.
8881 (New remote packets): Announce new packet "QStartupWithShell".
8882 * remote.c: Add PACKET_QStartupWithShell.
8883 (extended_remote_create_inferior): Handle new
8884 PACKET_QStartupWithShell.
8885 (remote_protocol_features) <QStartupWithShell>: New entry for
8886 PACKET_QStartupWithShell.
8887 (_initialize_remote): Call "add_packet_config_cmd" for
8888 QStartupShell.
8889
2090129c
SDJ
88902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8891 Pedro Alves <palves@redhat.com>
8892
8893 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8894 and "nat/fork-inferior.h".
8895 * common/common-inferior.h: New file, with contents from
8896 "gdb/inferior.h".
8897 * commom/common-utils.c: Include "common-utils.h".
8898 (stringify_argv): New function.
8899 * common/common-utils.h (stringify_argv): New prototype.
8900 * configure.nat: Add "fork-inferior.o" as a dependency for
8901 "*linux*", "fbsd*" and "nbsd*" hosts.
8902 * corefile.c (get_exec_file): Update comment.
8903 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8904 instead of "startup_inferior".
8905 (darwin_create_inferior): Call "add_thread_silent" after
8906 "fork_inferior".
8907 * fork-child.c: Cleanup unnecessary includes.
8908 (SHELL_FILE): Move to "common/common-fork-child.c".
8909 (environ): Likewise.
8910 (exec_wrapper): Initialize.
8911 (get_exec_wrapper): New function.
8912 (breakup_args): Move to "common/common-fork-child.c"; rename to
8913 "breakup_args_for_exec".
8914 (escape_bang_in_quoted_argument): Move to
8915 "common/common-fork-child.c".
8916 (saved_ui): New variable.
8917 (prefork_hook): New function.
8918 (postfork_hook): Likewise.
8919 (postfork_child_hook): Likewise.
8920 (gdb_startup_inferior): Likewise.
8921 (fork_inferior): Move to "common/common-fork-child.c". Update
8922 function to support gdbserver.
8923 (startup_inferior): Likewise.
8924 * gdbcore.h (get_exec_file): Remove declaration.
8925 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8926 instead of "startup_inferior". Call "add_thread_silent" after
8927 "fork_inferior".
8928 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8929 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8930 instead of "startup_inferior". Call "add_thread_silent" after
8931 "fork_inferior".
8932 * inferior.h: Include "common-inferior.h".
8933 (trace_start_error): Move to "common/common-utils.h".
8934 (trace_start_error_with_name): Likewise.
8935 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8936 (startup_inferior): Likewise.
8937 (gdb_startup_inferior): New prototype.
8938 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8939 * nat/fork-inferior.h: New file.
8940 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8941 instead of "startup_inferior". Call "add_thread_silent" after
8942 "fork_inferior".
8943 * target.h (target_terminal_init): Move prototype to
8944 "target/target.h".
8945 (target_terminal_inferior): Likewise.
8946 (target_terminal_ours): Likewise.
8947 * target/target.h (target_terminal_init): New prototype, moved
8948 from "target.h".
8949 (target_terminal_inferior): Likewise.
8950 (target_terminal_ours): Likewise.
8951 * utils.c (gdb_flush_out_err): New function.
8952
043a4934
SDJ
89532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8954
8955 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8956 * common/common-gdbthread.h: New file, with parts from
8957 "gdb/gdbthread.h".
8958 * gdbthread.h: Include "common-gdbthread.h".
8959 (switch_to_thread): Moved to "common/common-gdbthread.h".
8960
15652511
SDJ
89612017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8962
8963 * Makefile.in (SFILES): Add "common/job-control.c".
8964 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8965 (COMMON_OBS): Add "job-control.o".
8966 * common/job-control.c: New file, with contents from
8967 "gdb/inflow.c".
8968 * common/job-control.h: New file, with contents from "terminal.h".
8969 * fork-child.c: Include "job-control.h".
8970 * inflow.c: Include "job-control.h".
8971 (gdb_setpgid): Move to "common/common-inflow.c".
8972 (_initialize_inflow): Move setting of "job_control" to
8973 "handle_job_control".
8974 * terminal.h (job_control): Moved to "common/common-terminal.h".
8975 (gdb_setpgid): Likewise.
8976 * top.c: Include "job_control.h".
8977 * utils.c: Likewise.
8978 (job_control): Moved to "job-control.c".
8979
2d7cc5c7
PA
89802017-06-07 Pedro Alves <palves@redhat.com>
8981
8982 * Makefile.in (SFILES): Add gdb_regex.c.
8983 (COMMON_OBS): Add gdb_regex.o.
8984 * ada-lang.c (ada_add_standard_exceptions)
8985 (ada_add_exceptions_from_frame, name_matches_regex)
8986 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8987 parameter type to compiled_regex. Adjust.
8988 (ada_exceptions_list): Use compiled_regex.
8989 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8990 std::unique_ptr<compiled_regex>.
8991 (exception_catchpoint::~exception_catchpoint): Remove regfree
8992 call.
8993 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8994 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8995 * breakpoint.c (solib_catchpoint::compiled): Now a
8996 std::unique_ptr<compiled_regex>.
8997 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8998 (check_status_catch_solib): Adjust to use compiled_regex.
8999 (add_solib_catchpoint): Adjust to use compiled_regex.
9000 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9001 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9002 compiled_regex reference. Adjust to use it.
9003 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9004 declaration. Include "gdb_regex.h".
9005 (apropos_cmd): Change regex parameter to compiled_regex reference.
9006 * gdb_regex.c: New file.
9007 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9008 declarations.
9009 (class compiled_regex): New.
9010 * linux-tdep.c: Include "common/gdb_optional.h".
9011 (struct mapping_regexes): New, factored out from
9012 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9013 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9014 gdb::optional and remove cleanups. Adjust to compiled_regex.
9015 * probe.c: Include "common/gdb_optional.h".
9016 (collect_probes): Use compiled_regex and gdb::optional and remove
9017 cleanups.
9018 * skip.c: Include "common/gdb_optional.h".
9019 (skiplist_entry::compiled_function_regexp): Now a
9020 gdb::optional<compiled_regex>.
9021 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9022 (free_skiplist_entry): Remove regfree call.
9023 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9024 compiled_regex and gdb::optional.
9025 * symtab.c: Include "common/gdb_optional.h".
9026 (search_symbols): Use compiled_regex and gdb::optional.
9027 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9028 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9029 to gdb_regex.c.
9030
50d6adef
AH
90312017-06-07 Alan Hayward <alan.hayward@arm.com>
9032
9033 * regcache.c (regcache::save): Avoid buffer use.
9034 (regcache::dump): Likewise.
9035
4a8a33c8
AH
90362017-06-07 Alan Hayward <alan.hayward@arm.com>
9037
9038 * sh-tdep.c (sh_pseudo_register_read): Remove
9039 MAX_REGISTER_SIZE.
9040 (sh_pseudo_register_write): Likewise.
9041 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9042 (sh64_pseudo_register_write): Likewise
9043
d1be909e
AH
90442017-06-07 Alan Hayward <alan.hayward@arm.com>
9045
9046 * aarch64-tdep.c (aarch64_store_return_value): Use
9047 V_REGISTER_SIZE.
9048 (aarch64_pseudo_read_value): Likewise.
9049 (aarch64_pseudo_write): Likewise.
9050
f4a65042
YQ
90512017-06-06 Yao Qi <yao.qi@linaro.org>
9052
9053 * regformats/regdef.h (set_register_cache): Remove the
9054 declaration.
9055
9f7fb0aa
AH
90562017-06-06 Alan Hayward <alan.hayward@arm.com>
9057
9058 * frame.c (frame_unwind_register_signed): Use
9059 frame_unwind_register_value.
9060
e1e01040
PA
90612017-06-06 Pedro Alves <palves@redhat.com>
9062
9063 PR breakpoints/21553
9064 * breakpoint.c (create_breakpoints_sal_default)
9065 (init_breakpoint_sal, create_breakpoint_sal): Use
9066 gdb::unique_xmalloc_ptr for string parameters.
9067 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9068 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9069 (base_breakpoint_create_breakpoints_sal)
9070 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9071 (strace_marker_create_breakpoints_sal)
9072 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9073 string parameters.
9074 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9075 gdb::unique_xmalloc_ptr for string parameters.
9076 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9077 parameters.
9078
fbe654c8
AH
90792017-06-06 Alan Hayward <alan.hayward@arm.com>
9080
9081 * alpha-tdep.c (alpha_register_to_value): Use
9082 get_frame_register_value.
9083 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9084
ae0d01d6
AH
90852017-06-06 Alan Hayward <alan.hayward@arm.com>
9086
9087 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9088 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9089 (ia64_value_to_register): Likewise.
9090 (ia64_extract_return_value): Likewise.
9091 (ia64_store_return_value): Likewise.
9092 (ia64_push_dummy_call): Likewise.
9093
49cf576c
JB
90942017-06-04 Joel Brobecker <brobecker@adacore.com>
9095
9096 GDB 8.0 released.
9097
26b6a6ab
SM
90982017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9099
9100 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9101
22827c51
SM
91022017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9103
9104 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9105 parameter.
9106 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9107
0e05cf3a
SM
91082017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9109
9110 * event-loop.c (poll_timers): Unallocate timer using delete
9111 instead of xfree.
9112
c1fc2657
SM
91132017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9114
9115 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9116 (struct breakpoint) <~breakpoint>: New.
9117 (struct watchpoint): Inherit from breakpoint.
9118 <~watchpoint>: New.
9119 <base>: Remove.
9120 (struct tracepoint): Inherit from breakpoint.
9121 <base>: Remove.
9122 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9123 (struct longjmp_breakpoint): Inherit from breakpoint.
9124 <~longjmp_breakpoint>: New.
9125 <base>: Remove.
9126 (new_breakpoint_from_type): Remove casts.
9127 (watchpoint_in_thread_scope): Remove reference to base field.
9128 (watchpoint_del_at_next_stop): Likewise.
9129 (update_watchpoint): Likewise.
9130 (watchpoint_check): Likewise.
9131 (bpstat_check_watchpoint): Likewise.
9132 (set_longjmp_breakpoint): Likewise.
9133 (struct fork_catchpoint): Inherit from breakpoint.
9134 <base>: Remove.
9135 (struct solib_catchpoint): Inherit from breakpoint.
9136 <~solib_catchpoint>: New.
9137 <base>: Remove.
9138 (dtor_catch_solib): Change to ...
9139 (solib_catchpoint::~solib_catchpoint): ... this.
9140 (breakpoint_hit_catch_solib): Remove reference to base field.
9141 (add_solib_catchpoint): Likewise.
9142 (create_fork_vfork_event_catchpoint): Likewise.
9143 (struct exec_catchpoint): Inherit from breakpoint.
9144 <~exec_catchpoint>: New.
9145 <base>: Remove.
9146 (dtor_catch_exec): Change to ...
9147 (exec_catchpoint::~exec_catchpoint): ... this.
9148 (dtor_watchpoint): Change to ...
9149 (watchpoint::~watchpoint): ... this.
9150 (watch_command_1): Remove reference to base field.
9151 (catch_exec_command_1): Likewise.
9152 (base_breakpoint_dtor): Change to ...
9153 (breakpoint::~breakpoint): ... this.
9154 (base_breakpoint_ops): Remove dtor field value.
9155 (longjmp_bkpt_dtor): Change to ...
9156 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9157 (strace_marker_create_breakpoints_sal): Remove reference to base
9158 field.
9159 (delete_breakpoint): Don't manually call breakpoint destructor.
9160 (create_tracepoint_from_upload): Remove reference to base field.
9161 (trace_pass_set_count): Likewise.
9162 (initialize_breakpoint_ops): Don't initialize
9163 momentary_breakpoint_ops, don't set dtors.
9164 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9165 <~ada_catchpoint>: New.
9166 <base>: Remove.
9167 (create_excep_cond_exprs): Remove reference to base field.
9168 (dtor_exception): Change to ...
9169 (ada_catchpoint::~ada_catchpoint): ... this.
9170 (dtor_catch_exception): Remove.
9171 (dtor_catch_exception_unhandled): Remove.
9172 (dtor_catch_assert): Remove.
9173 (create_ada_exception_catchpoint): Remove reference to base
9174 field.
9175 (initialize_ada_catchpoint_ops): Don't set dtors.
9176 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9177 breakpoint.
9178 <~signal_catchpoint>: New.
9179 <base>: Remove.
9180 (signal_catchpoint_dtor): Change to ...
9181 (signal_catchpoint::~signal_catchpoint): ... this.
9182 (create_signal_catchpoint): Remove reference to base field.
9183 (initialize_signal_catchpoint_ops): Don't set dtor.
9184 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9185 from breakpoint.
9186 <~syscall_catchpoint>: New.
9187 <base>: Remove.
9188 (dtor_catch_syscall): Change to ...
9189 (syscall_catchpoint::~syscall_catchpoint): ... this.
9190 (create_syscall_event_catchpoint): Remove reference to base
9191 field.
9192 (initialize_syscall_catchpoint_ops): Don't set dtor.
9193 * break-catch-throw.c (struct exception_catchpoint): Inherit
9194 from breakpoint.
9195 <~exception_catchpoint>: New.
9196 <base>: Remove.
9197 (dtor_exception_catchpoint): Change to ...
9198 (exception_catchpoint::~exception_catchpoint): ... this.
9199 (handle_gnu_v3_exceptions): Remove reference to base field.
9200 (initialize_throw_catchpoint_ops): Don't set dtor.
9201 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9202 field.
9203 * remote.c (remote_get_tracepoint_status): Likewise.
9204 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9205 * tracefile.c (tracefile_fetch_registers): Likewise.
9206 * tracepoint.c (actions_command): Likewise.
9207 (validate_actionline): Likewise.
9208 (tfind_1): Likewise.
9209 (get_traceframe_location): Likewise.
9210 (find_matching_tracepoint_location): Likewise.
9211 (parse_tracepoint_status): Likewise.
9212 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9213
3b0871f4
SM
92142017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9215
9216 * breakpoint.c (struct longjmp_breakpoint): New struct.
9217 (is_tracepoint_type): Change return type to bool.
9218 (is_longjmp_type): New function.
9219 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9220 (set_raw_breakpoint_without_location): Use
9221 new_breakpoint_from_type.
9222 (set_raw_breakpoint): Likewise.
9223
a5e364af
SM
92242017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9225
9226 * breakpoint.c (new_breakpoint_from_type): New function.
9227 (create_breakpoint_sal): Use new_breakpoint_from_type and
9228 unique_ptr.
9229 (create_breakpoint): Likewise.
9230
ae3b3f34
SM
92312017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9232
9233 * memattr.c (mem_info_command): Rename to ...
9234 (info_mem_command): ... this.
9235 (mem_enable_command): Rename to ...
9236 (enable_mem_command): ... this.
9237 (mem_disable_command): Rename to ...
9238 (disable_mem_command): ... this.
9239 (mem_delete_command): Rename to ...
9240 (delete_mem_command): ... this.
9241 (_initialize_mem): Adjust function names.
9242
13ace077
MM
92432017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9244
9245 * btrace.c (handle_pt_insn_events): New.
9246 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9247 STATUS. Split into this and ...
9248 (handle_pt_insn_event_flags): ... this.
9249
c56ccc05
MM
92502017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9251
9252 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9253 and struct pt_insn.resynced.
9254 * configure: Regenerated.
9255 * config.in: Regenerated.
9256
08c3f6d2
TW
92572017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9258
9259 * btrace.c (ftrace_find_call_by_number): New function.
9260 (ftrace_new_function): Store objects, not pointers.
9261 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9262 ftrace_new_gap, ftrace_update_function,
9263 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9264 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9265 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9266 btrace_ends_with_single_insn, btrace_call_get): Account for
9267 btrace_thread_info::functions now storing objects.
9268 * btrace.h (struct btrace_thread_info): Add constructor.
9269 (struct btrace_thread_info) <functions>: Make std::vector.
9270 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9271 Initialize with default values.
9272 * record-btrace.c (record_btrace_frame_sniffer): Account for
9273 btrace_thread_info::functions now storing objects.
9274
8ffd39f2
TW
92752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9276
9277 * btrace.c: Remove typedef bfun_s.
9278 (ftrace_new_gap): Directly add gaps to the list of gaps.
9279 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9280 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9281 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9282 instead of gdb VEC.
9283
4aeb0dfc
TW
92842017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9285
9286 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9287 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9288 with btrace_thread_info::next_segment and
9289 btrace_thread_info::prev_segment.
9290 * btrace.h: Remove struct btrace_func_link.
9291 (struct btrace_function): Replace pair of function segment pointers
9292 with pair of indices.
9293 * python/py-record-btrace.c (btpy_call_prev_sibling,
9294 btpy_call_next_sibling): Replace references to
9295 btrace_thread_info::segment with btrace_thread_info::next_segment and
9296 btrace_thread_info::prev_segment.
9297 * record-btrace.c (record_btrace_frame_this_id): Use
9298 btrace_find_call_by_number.
9299
eb8f2b9c
TW
93002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9301
9302 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9303 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9304 btrace_insn_next, btrace_insn_prev): Remove references to
9305 btrace_thread_info::flow.
9306 * btrace.h (struct btrace_function): Remove FLOW.
9307
42bfe59e
TW
93082017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9309
9310 * btrace.c (ftrace_find_call_by_number): New function.
9311 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9312 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9313 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9314 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9315 index.
9316 * btrace.h (struct btrace_function): Turn UP into an index.
9317 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9318 as an index.
9319 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9320 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9321 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9322
b54b03bd
TW
93232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9324
9325 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9326 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9327 ftrace_update_function, ftrace_compute_global_level_offset,
9328 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9329 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9330 btrace_insn_end, btrace_is_empty): Remove references to
9331 btrace_thread_info::begin and btrace_thread_info::end.
9332 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9333 (struct btrace_thread_info) <functions>: Adjust comment.
9334 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9335 btrace_thread_info::begin.
9336
8286623c
TW
93372017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9338
9339 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9340 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9341 ftrace_update_function): Remove arguments that implicitly were always
9342 BTINFO->END.
9343 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9344 Don't pass BTINFO->END.
9345
a0f1b963
TW
93462017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9347
9348 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9349 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9350 btrace_find_insn_by_number): Replace function segment pointer with
9351 index.
9352 (btrace_insn_cmp): Simplify.
9353 * btrace.h: (struct btrace_insn_iterator) Rename index to
9354 insn_index. Replace function segment pointer with index into function
9355 segment vector.
9356 * record-btrace.c (record_btrace_call_history): Replace function
9357 segment pointer use with index.
9358 (record_btrace_frame_sniffer): Retrieve function call segment through
9359 vector.
9360 (record_btrace_set_replay): Remove defunc't safety check.
9361
f158f208
TW
93622017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9363
9364 * btrace.c (btrace_ends_with_single_insn): New function.
9365 (btrace_call_get, btrace_call_number, btrace_call_begin,
9366 btrace_call_end, btrace_call_next, btrace_call_prev,
9367 btrace_find_call_by_number): Use index into call segment vector
9368 instead of pointer.
9369 (btrace_call_cmp): Simplify.
9370 * btrace.h (struct btrace_call_iterator): Replace function call segment
9371 pointer with index into vector.
9372 * record-btrace.c (record_btrace_call_history): Use index instead of
9373 pointer.
9374
521103fd
TW
93752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9376
9377 * btrace.c (btrace_insn_begin, btrace_insn_end,
9378 btrace_find_insn_by_number): Add btinfo to iterator.
9379 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9380
17b89b34
TW
93812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9382
9383 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9384 and save pointers directly.
9385 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9386 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9387 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9388 changed signature of functions.
9389 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9390 (btrace_fetch): Remove code that adds btrace_function pointers to
9391 vector of btrace_functions.
9392 (btrace_clear): Simplify freeing vector of btrace_functions.
9393
2b51eddc
TW
93942017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9395
9396 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9397 Replace VEC_* with std::vector functions.
9398 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9399 (struct btrace_thread_info)<functions>: Change type to std::vector.
9400
db6be0d5
SM
94012017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9402
9403 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9404 "Removed targets and native configurations" up. Merge duplicate
9405 "New commands" sub-sections. Add "New options" sub-sections.
9406
b057297a
AH
94072017-05-26 Alan Hayward <alan.hayward@arm.com>
9408
9409 * defs.h (copy_integer_to_size): New declaration.
9410 * findvar.c (copy_integer_to_size): New function.
9411 (do_cint_test): New selftest function.
9412 (copy_integer_to_size_test): Likewise.
9413 (_initialize_findvar): Likewise.
9414 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9415 (mips_fbsd_collect_reg): Use raw_collect_integer.
9416 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9417 (mips64_fill_gregset): Use raw_collect_integer
9418 (mips64_fill_fpregset): Use raw_supply_integer.
9419 * regcache.c (regcache::raw_supply_integer): New function.
9420 (regcache::raw_collect_integer): Likewise.
9421 * regcache.h: (regcache::raw_supply_integer): New declaration.
9422 (regcache::raw_collect_integer): Likewise.
9423
b77b02a5
YQ
94242017-05-24 Yao Qi <yao.qi@linaro.org>
9425
9426 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9427 (COMMON_OBS): Add gdbarch-selftests.o.
9428 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9429 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9430 * gdbarch-selftests.c: New file.
9431 * regcache.h (regcache) <~regcache>: Mark it virtual if
9432 GDB_SELF_TEST.
9433 <raw_write>: Likewise.
9434
e521e87e
YQ
94352017-05-24 Yao Qi <yao.qi@linaro.org>
9436
9437 * regcache.c (current_regcache): Change it to
9438 regcache::current_regcache.
9439 (regcache_observer_target_changed): Update.
9440 (regcache_thread_ptid_changed): Make it a regcache static
9441 method.
9442 (regcache_thread_ptid_changed): Update.
9443 (class regcache_access): New.
9444 (current_regcache_test): Update.
9445 (_initialize_regcache): Update.
9446 * regcache.h: Include forward_list.
9447 (regcache): Declare regcache_thread_ptid_changed and declare
9448 registers_changed_ptid as friend.
9449
d8e07dda
YQ
94502017-05-24 Yao Qi <yao.qi@linaro.org>
9451
9452 * i387-tdep.c (i387_register_to_value): Use register_size
9453 instead of TYPE_LENGTH.
9454 * m68k-tdep.c (m68k_register_to_value): Likewise.
9455
8c8f9122
YQ
94562017-05-24 Yao Qi <yao.qi@linaro.org>
9457
9458 * i387-tdep.c (i387_convert_register_p): Return false if type
9459 code isn't TYPE_CODE_FLT.
9460
68fce50f
YQ
94612017-05-24 Yao Qi <yao.qi@linaro.org>
9462
9463 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9464 length is 4.
9465 (alpha_register_to_value): Remove type length check.
9466 (alpha_value_to_register): Likewise.
9467
88954b49
YQ
94682017-05-24 Yao Qi <yao.qi@linaro.org>
9469
9470 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9471 TYPE_CODE_FLT.
9472
e3ec9b69
YQ
94732017-05-24 Yao Qi <yao.qi@linaro.org>
9474
9475 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9476 TYPE_CODE_FLT or not.
9477
cdd238da
YQ
94782017-05-24 Yao Qi <yao.qi@linaro.org>
9479
9480 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9481 * avr-tdep.c (avr_gdbarch_init): Likewise.
9482 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9483 * cris-tdep.c (cris_gdbarch_init): Likewise.
9484 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9485 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9486 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9487 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9488 * mep-tdep.c (mep_gdbarch_init): Likewise.
9489 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9490 * mips-tdep.c (mips_gdbarch_init): Likewise.
9491 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9492 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9493 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9494 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9495 * v850-tdep.c (v850_gdbarch_init): Likewise.
9496
7a3929c4
YQ
94972017-05-24 Yao Qi <yao.qi@linaro.org>
9498
9499 * selftest-arch.c (tests_with_arch): Call registers_changed
9500 and reinit_frame_cache.
9501 * selftest.c (run_self_tests): Likewise.
9502
f4985dba
YQ
95032017-05-24 Yao Qi <yao.qi@linaro.org>
9504
9505 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9506 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9507
ab20fa4a
YQ
95082017-05-24 Yao Qi <yao.qi@linaro.org>
9509
9510 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9511 set_gdbarch_print_insn.
9512
f532ab94
YQ
95132017-05-24 Yao Qi <yao.qi@linaro.org>
9514
9515 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9516 set_gdbarch_print_insn.
9517
39503f82
YQ
95182017-05-24 Yao Qi <yao.qi@linaro.org>
9519
9520 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9521 set_gdbarch_print_insn.
9522 * arc-tdep.c (arc_gdbarch_init): Likewise.
9523 * arch-utils.c: include dis-asm.h.
9524 (default_print_insn): New function.
9525 * arch-utils.h (default_print_insn): Declare.
9526 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9527 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9528 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9529 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9530 * frv-tdep.c (frv_gdbarch_init): Likewise.
9531 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9532 * gdbarch.sh (print_insn): Use default_print_insn.
9533 * gdbarch.c: Regenerated.
9534 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9535 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9536 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9537 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9538 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9539 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9540 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9541 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9542 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9543 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9544 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9545 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9546 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9547 * mt-tdep.c (mt_gdbarch_init): Likewise.
9548 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9549 * nios2-tdep.c (nios2_print_insn): Remove.
9550 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9551 * rx-tdep.c (rx_gdbarch_init): Likewise.
9552 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9553 * score-tdep.c (score_print_insn): Remove.
9554 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9555 * sh-tdep.c (sh_gdbarch_init): Likewise.
9556 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9557 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9558 * tic6x-tdep.c (tic6x_print_insn): Remove.
9559 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9560 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9561 * v850-tdep.c (v850_gdbarch_init): Likewise.
9562 * vax-tdep.c (vax_gdbarch_init): Likewise.
9563 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9564 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9565
f7241d4f
JB
95662017-05-23 John Baldwin <jhb@FreeBSD.org>
9567
9568 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9569 (MIPS_FP0_REGNUM): Remove.
9570 (MIPS_FSR_REGNUM): Remove.
9571 (mips_fbsd_supply_fpregs): Use mips_regnum.
9572 (mips_fbsd_supply_gregs): Likewise.
9573 (mips_fbsd_collect_fpregs): Likewise.
9574 (mips_fbsd_collect_gregs): Likewise.
9575
d489d81d
JB
95762017-05-23 John Baldwin <jhb@FreeBSD.org>
9577
9578 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9579 (getpfpregs_supplies): New function.
9580 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9581 getfpregs_supplies.
9582 (mips_fbsd_store_inferior_registers): Likewise.
9583
e11b3cdc
PA
95842017-05-22 Pedro Alves <palves@redhat.com>
9585
9586 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9587 maintainer.
9588
0f068fb5
AH
95892017-05-22 Alan Hayward <alan.hayward@arm.com>
9590
9591 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9592 (store_register): Likewise.
9593 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9594 (get_decimal_float_return_value): Likewise.
9595 (do_ppc_sysv_return_value): Likewise.
9596 (ppc64_sysv_abi_push_integer): Likewise.
9597 (ppc64_sysv_abi_push_freg): Likewise.
9598 (ppc64_sysv_abi_return_value_base): Likewise.
9599 (ppc64_sysv_abi_return_value): Likewise.
9600 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9601 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9602 * rs6000-nat.c: Likewise.
9603 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9604 (rs6000_value_to_register): Likewise.
9605 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9606
e6cf65f2
TT
96072017-05-21 Tom Tromey <tom@tromey.com>
9608
9609 PR rust/21466:
9610 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9611 arrays as "[T]", not "[T; ]".
9612
43cc5389
TT
96132017-05-19 Tom Tromey <tom@tromey.com>
9614
9615 PR rust/21484:
9616 * rust-lang.c (exp_descriptor_rust): New function.
9617 (rust_language_defn): Use it.
9618 * p-lang.c (pascal_language_defn): Update.
9619 * opencl-lang.c (opencl_language_defn): Update.
9620 * objc-lang.c (objc_language_defn): Update.
9621 * m2-lang.c (m2_language_defn): Update.
9622 * language.h (struct language_defn)
9623 <la_watch_location_expression>: New member.
9624 * language.c (unknown_language_defn, auto_language_defn)
9625 (local_language_defn): Update.
9626 * go-lang.c (go_language_defn): Update.
9627 * f-lang.c (f_language_defn): Update.
9628 * d-lang.c (d_language_defn): Update.
9629 * c-lang.h (c_watch_location_expression): Declare.
9630 * c-lang.c (c_watch_location_expression): New function.
9631 (c_language_defn, cplus_language_defn, asm_language_defn)
9632 (minimal_language_defn): Use it.
9633 * breakpoint.c (watch_command_1): Call
9634 la_watch_location_expression.
9635 * ada-lang.c (ada_language_defn): Update.
9636
7a6e7fcc
RO
96372017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9638
6e7e1744
RO
9639 PR tui/21482
9640 * gdb_curses.h (NOMACROS): Define.
9641 (NCURSES_NOMACROS): Define.
9642
96432017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9644
9645 PR tui/21482
7a6e7fcc
RO
9646 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9647 arg to char *.
9648 * tui/tui-wingeneral.c (box_win): Likewise.
9649 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9650 (tui_show_source_line): Likewise.
9651 (tui_show_exec_info_content): Likewise.
9652
1933fd8e
VM
96532017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9654
9655 * sparc-tdep.c (sparc_structure_return_p)
9656 (sparc_arg_on_registers_p): New functions.
9657 (sparc32_store_arguments): Use them.
9658 * sparc64-tdep.c (sparc64_16_byte_align_p)
9659 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9660 Handle TYPE_CODE_ARRAY.
9661
21873064
YQ
96622017-05-17 Yao Qi <yao.qi@linaro.org>
9663
9664 * cli/cli-decode.c (add_alias_cmd): New function.
9665 * command.h (add_alias_cmd): Declare.
9666 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9667 instead call add_alias_cmd.
9668
2b351b19
PA
96692017-05-17 Pedro Alves <palves@redhat.com>
9670
9671 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9672 (nat_makefile_frag): ... this. All references updated.
9673 * configure.ac: Likewise.
9674 * configure.nat: Likewise. Enhance comments.
9675 * configure: Regenerate.
9676
5f2ad7a3
RO
96772017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9678
9679 * procfs.c (procfs_create_inferior): Change prototype to match
9680 definition.
9681
adf3dde5
EZ
96822017-05-13 Eli Zaretskii <eliz@gnu.org>
9683
9684 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9685 C++ compiler warning.
9686
6830f270
TT
96872017-05-12 Tom Tromey <tom@tromey.com>
9688
9689 PR rust/21483:
9690 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9691 recurse, just call value_struct_elt directly.
9692
68f2f2e3
TT
96932017-05-12 Tom Tromey <tom@tromey.com>
9694
9695 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9696 OP_RUST_ARRAY>: Fix.
9697
256afbc2
TT
96982017-05-12 Tom Tromey <tom@tromey.com>
9699
9700 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9701
94bb8dfe
YQ
97022017-05-09 Yao Qi <yao.qi@linaro.org>
9703
9704 * regcache.c: Include <forward_list>.
9705 (struct regcache_list): Remove.
9706 (current_regcache): Update.
9707 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9708 (regcache_thread_ptid_changed): Likewise.
9709 (registers_changed_ptid): Likewise.
9710 (current_regcache_size): Likewise.
9711
8248946c
YQ
97122017-05-09 Yao Qi <yao.qi@linaro.org>
9713
9714 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9715 (current_regcache_size): New function.
9716 (current_regcache_test): New function.
9717 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9718
313c5961
AH
97192017-05-08 Alan Hayward <alan.hayward@arm.com>
9720
9721 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9722 (print_gp_register_row): Use get_frame_register_value.
9723
27bfc1d1
AH
97242017-05-08 Alan Hayward <alan.hayward@arm.com>
9725
9726 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9727 (mips_supply_fpregset): Likewise.
9728 (mips64_supply_gregset): Likewise.
9729
146e6c5c
AH
97302017-05-08 Alan Hayward <alan.hayward@arm.com>
9731
9732 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9733 regcache->raw_supply_zeroed.
9734
e50f25ec
SDJ
97352017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9736
9737 * configure.nat: Rearrange 'case' statements to match
9738 host before cpu.
9739
21ea5acd
SDJ
97402017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9741
9742 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9743 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9744 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9745 "@nat_extra_makefile_frag@".
9746 (Makefile): Remove dependency on "@frags@".
9747 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9748 (data-directory/Makefile): Likewise.
9749 * config/aarch64/linux.mh: Deleted; moved contents to
9750 "gdb/configure.nat".
9751 * config/alpha/alpha-linux.mh: Likewise.
9752 * config/alpha/nbsd.mh: Likewise.
9753 * config/arm/linux.mh: Likewise.
9754 * config/arm/nbsdelf.mh: Likewise.
9755 * config/i386/cygwin.mh: Likewise.
9756 * config/i386/cygwin64.mh: Likewise.
9757 * config/i386/darwin.mh: Likewise.
9758 * config/i386/fbsd.mh: Likewise.
9759 * config/i386/fbsd64.mh: Likewise.
9760 * config/i386/go32.mh: Likewise.
9761 * config/i386/i386gnu.mh: Likewise.
9762 * config/i386/i386sol2.mh: Likewise.
9763 * config/i386/linux.mh: Likewise.
9764 * config/i386/linux64.mh: Likewise.
9765 * config/i386/mingw.mh: Likewise.
9766 * config/i386/mingw64.mh: Likewise.
9767 * config/i386/nbsd64.mh: Likewise.
9768 * config/i386/nbsdelf.mh: Likewise.
9769 * config/i386/nto.mh: Likewise.
9770 * config/i386/obsd.mh: Likewise.
9771 * config/i386/obsd64.mh: Likewise.
9772 * config/i386/sol2-64.mh: Likewise.
9773 * config/ia64/linux.mh: Likewise.
9774 * config/m32r/linux.mh: Likewise.
9775 * config/m68k/linux.mh: Likewise.
9776 * config/m68k/nbsdelf.mh: Likewise.
9777 * config/m68k/obsd.mh: Likewise.
9778 * config/m88k/obsd.mh: Likewise.
9779 * config/mips/fbsd.mh: Likewise.
9780 * config/mips/linux.mh: Likewise.
9781 * config/mips/nbsd.mh: Likewise.
9782 * config/mips/obsd64.mh: Likewise.
9783 * config/pa/linux.mh: Likewise.
9784 * config/pa/nbsd.mh: Likewise.
9785 * config/pa/obsd.mh: Likewise.
9786 * config/powerpc/aix.mh: Likewise.
9787 * config/powerpc/fbsd.mh: Likewise.
9788 * config/powerpc/linux.mh: Likewise.
9789 * config/powerpc/nbsd.mh: Likewise.
9790 * config/powerpc/obsd.mh: Likewise.
9791 * config/powerpc/ppc64-linux.mh: Likewise.
9792 * config/powerpc/spu-linux.mh: Likewise.
9793 * config/s390/linux.mh: Likewise.
9794 * config/sh/nbsd.mh: Likewise.
9795 * config/sparc/fbsd.mh: Likewise.
9796 * config/sparc/linux.mh: Likewise.
9797 * config/sparc/linux64.mh: Likewise.
9798 * config/sparc/nbsd64.mh: Likewise.
9799 * config/sparc/nbsdelf.mh: Likewise.
9800 * config/sparc/obsd64.mh: Likewise.
9801 * config/sparc/sol2.mh: Likewise.
9802 * config/tilegx/linux.mh: Likewise.
9803 * config/vax/nbsdelf.mh: Likewise.
9804 * config/vax/obsd.mh: Likewise.
9805 * config/xtensa/linux.mh: Likewise.
9806 * config/i386/i386gnu.mn: New file, with excerpts from
9807 "config/i386/i386gnu.mh".
9808 * configure: Regenerate.
9809 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9810 *.mh files under "gdb/config".
9811 * configure.nat: New file, with contents from the
9812 "gdb/config/*/*.mh" files.
9813
7ed1acaf
TW
98142017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9815
9816 * btrace.c (btrace_clear): Free insn vector.
9817
e13cb306
PA
98182017-05-05 Pedro Alves <palves@redhat.com>
9819
9820 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9821 * configure: Regenerate.
9822
5ed8105e
PA
98232017-05-04 Pedro Alves <palves@redhat.com>
9824
9825 * Makefile.in (SFILES): Add progspace-and-thread.c.
9826 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9827 (COMMON_OBS): Add progspace-and-thread.o.
9828 * breakpoint.c: Include "progspace-and-thread.h".
9829 (update_inserted_breakpoint_locations)
9830 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9831 Use scoped_restore_current_pspace_and_thread.
9832 (create_std_terminate_master_breakpoint): Use
9833 scoped_restore_current_program_space.
9834 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9835 (print_breakpoint_location): Use
9836 scoped_restore_current_program_space.
9837 (bp_loc_is_permanent): Use
9838 scoped_restore_current_pspace_and_thread.
9839 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9840 (download_tracepoint_locations): Use
9841 scoped_restore_current_pspace_and_thread.
9842 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9843 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9844 (enum step_over_calls_kind): Moved from inferior.h.
9845 (class scoped_restore_current_thread): New class.
9846 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9847 declaration.
9848 (scoped_restore_current_thread): New class.
9849 * infcmd.c: Include "common/gdb_optional.h".
9850 (continue_1, proceed_after_attach): Use
9851 scoped_restore_current_thread.
9852 (notice_new_inferior): Use scoped_restore_current_thread.
9853 * inferior.c: Include "progspace-and-thread.h".
9854 (restore_inferior, save_current_inferior): Delete.
9855 (add_inferior_command, clone_inferior_command): Use
9856 scoped_restore_current_pspace_and_thread.
9857 * inferior.h (scoped_restore_current_inferior): New class.
9858 * infrun.c: Include "progspace-and-thread.h" and
9859 "common/gdb_optional.h".
9860 (follow_fork_inferior): Use
9861 scoped_restore_current_pspace_and_thread.
9862 (scoped_restore_exited_inferior): New class.
9863 (handle_vfork_child_exec_or_exit): Use
9864 scoped_restore_exited_inferior,
9865 scoped_restore_current_pspace_and_thread,
9866 scoped_restore_current_thread and scoped_restore.
9867 (fetch_inferior_event): Use scoped_restore_current_thread.
9868 * linespec.c (decode_line_full, decode_line_1): Use
9869 scoped_restore_current_program_space.
9870 * mi/mi-main.c: Include "progspace-and-thread.h".
9871 (exec_continue): Use scoped_restore_current_thread.
9872 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9873 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9874 * proc-service.c (ps_pglobal_lookup): Use
9875 scoped_restore_current_program_space.
9876 * progspace-and-thread.c: New file.
9877 * progspace-and-thread.h: New file.
9878 * progspace.c (release_program_space, clone_program_space): Use
9879 scoped_restore_current_program_space.
9880 (restore_program_space, save_current_program_space)
9881 (save_current_space_and_thread): Delete.
9882 (switch_to_program_space_and_thread): Moved to
9883 progspace-and-thread.c.
9884 * progspace.h (save_current_program_space)
9885 (save_current_space_and_thread): Delete declarations.
9886 (scoped_restore_current_program_space): New class.
9887 * remote.c (remote_btrace_maybe_reopen): Use
9888 scoped_restore_current_thread.
9889 * symtab.c: Include "progspace-and-thread.h".
9890 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9891 * thread.c (print_thread_info_1): Use
9892 scoped_restore_current_thread.
9893 (struct current_thread_cleanup): Delete.
9894 (do_restore_current_thread_cleanup)
9895 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9896 (scoped_restore_current_thread::~scoped_restore_current_thread):
9897 ... this new dtor.
9898 (make_cleanup_restore_current_thread): Rename/convert to ...
9899 (scoped_restore_current_thread::scoped_restore_current_thread):
9900 ... this new ctor.
9901 (thread_apply_all_command): Use scoped_restore_current_thread.
9902 (thread_apply_command): Use scoped_restore_current_thread.
9903 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9904 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9905
f6223dbb
PA
99062017-05-04 Pedro Alves <palves@redhat.com>
9907
9908 * thread.c (make_cleanup_restore_current_thread): Move
9909 find_thread_ptid call before the is_stopped call. Assert that the
9910 thread is found. Replace is_stopped call by checking the thread's
9911 state directly. Remove unnecessary NULL-thread check.
9912
3c3ae77e
PA
99132017-05-04 Pedro Alves <palves@redhat.com>
9914
9915 * corelow.c (thread_section_name): New class.
9916 (get_core_register_section, get_core_siginfo): Use it.
9917
45eba0ab
AA
99182017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9919
9920 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9921 (get_core_register_section): Remove xfree of NULL pointer.
9922
f81fdd35
AH
99232017-05-03 Alan Hayward <alan.hayward@arm.com>
9924
9925 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9926 * regcache.c (regcache::raw_supply_zeroed): New function.
9927 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9928
35837774
SM
99292017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9930
9931 * gdbarch.sh: Remove commented out definition of
9932 TARGET_CHAR_BIT.
9933 * gdbarch.h: Re-generate.
9934
c94fee56
SDJ
99352017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9936
9937 * configure: Regenerate.
9938
d17f7b36
SM
99392017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9940
9941 * solib-target.c (solib_target_relocate_section_addresses):
9942 Remove num_section_bases, num_bases, segment_bases variables.
9943
b560ebd6
SM
99442017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9945
9946 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9947
f2f46dfc
SM
99482017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9949
9950 * solib-target.c: Include <vector>
9951 (struct lm_info_target) <~lm_info_target>: Remove.
9952 <segment_bases, section_bases>: Change type to
9953 std::vector<CORE_ADDR>.
9954 (library_list_start_segment, library_list_start_section,
9955 library_list_end_library,
9956 solib_target_relocate_section_addresses): Adjust.
9957
a0ff9e1a
SM
99582017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9959
9960 * gdbarch.sh (software_single_step): Change return type to
9961 std::vector<CORE_ADDR>.
9962 * gdbarch.c, gdbarch.h: Re-generate.
9963 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9964 Adjust.
9965 (arm_deal_with_atomic_sequence_raw): Adjust.
9966 (thumb_get_next_pcs_raw): Adjust.
9967 (arm_get_next_pcs_raw): Adjust.
9968 (arm_get_next_pcs): Adjust.
9969 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9970 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9971 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9972 (alpha_software_single_step): Adjust.
9973 * alpha-tdep.h (alpha_software_single_step): Adjust.
9974 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9975 * arm-tdep.c (arm_software_single_step): Adjust.
9976 (arm_breakpoint_kind_from_current_state): Adjust.
9977 * arm-tdep.h (arm_software_single_step): Adjust.
9978 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9979 * cris-tdep.c (cris_software_single_step): Adjust.
9980 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9981 (micromips_deal_with_atomic_sequence): Adjust.
9982 (deal_with_atomic_sequence): Adjust.
9983 (mips_software_single_step): Adjust.
9984 * mips-tdep.h (mips_software_single_step): Adjust.
9985 * moxie-tdep.c (moxie_software_single_step): Adjust.
9986 * nios2-tdep.c (nios2_software_single_step): Adjust.
9987 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9988 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9989 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9990 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9991 * sparc-tdep.c (sparc_software_single_step): Adjust.
9992 * spu-tdep.c (spu_software_single_step): Adjust.
9993 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9994
ea480a30
SM
99952017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9996
9997 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9998 * gdbarch.h: Re-generate.
9999
d050f7d7
TW
100002017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10001
10002 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10003 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10004 * python/py-instruction.c, python/py-instruction.h: New file.
10005 * python/py-record.c: Add py-instruction.h include.
10006 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10007 gdb.RecordInstruction.
10008 * python/python-internal.h: Add gdbpy_initialize_instruction
10009 declaration.
10010 * python/python.c (do_start_initialization): Add
10011 gdbpy_initialize_instruction.
10012
14f819c8
TW
100132017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10014
10015 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10016 Remove.
10017 (btrace_func_from_recpy_func): New function.
10018 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10019 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10020 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10021 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10022 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10023 Also, use new helper functions.
10024 (btpy_list_item): Use new helper functions.
10025 (recpy_bt_function_call_history): Use new type name.
10026 (btpy_call_getset): Remove.
10027 (gdbpy_initialize_btrace): Remove code to initialize
10028 gdb.BtraceFunctionCall.
10029 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10030 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10031 recpy_bt_func_prev, recpy_bt_func_next): New export.
10032 * python/py-record.c (recpy_func_type): New static object.
10033 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10034 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10035 recpy_func_next): New function.
10036 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10037 (recpy_func_getset): New static object.
10038 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10039 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10040
0ed5da75
TW
100412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10042
10043 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10044 (btpy_object, btpy_insn_type, btpy_new): Remove.
10045 (btpy_list_object): Use gdb.RecordInstruction type instead of
10046 gdb.BtraceInstruction type.
10047 (btrace_insn_from_recpy_insn): New function.
10048 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10049 btpy_new.
10050 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10051 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10052 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10053 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10054 instead of btpy_object.
10055 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10056 btpy_insn_data, btpy_insn_decode): Rename to ...
10057 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10058 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10059 recpy_bt_insn_decode): This. Also, use new helper functions.
10060 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10061 recpy_insn_type.
10062 (btpy_insn_getset): Remove.
10063 (gdbpy_initialize_btrace): Remove code to initialize
10064 gdb.BtraceInstruction. Use recpy_element_object.
10065 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10066 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10067 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10068 * python/py-record.c (recpy_insn_type): New static object.
10069 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10070 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10071 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10072 New function.
10073 (recpy_insn_getset): New static object.
10074 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10075 * python/py-record.h (recpy_element_object): New typedef.
10076 (recpy_insn_type, recpy_insn_new): New export.
10077
913aeadd
TW
100782017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10079
10080 * py-record-btrace.c (btpy_insn_new): Removed.
10081 (btpy_insn_or_gap_new): New function.
10082 (btpy_insn_error): Removed.
10083 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10084 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10085 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10086 btpy_insn_or_gap_new instead of btpy_insn_new.
10087 (btpy_insn_getset): Remove btpy_insn_error.
10088 * py-record.c (recpy_gap_type): New static object.
10089 (recpy_gap_object): New typedef.
10090 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10091 recpy_gap_reason_string): New function.
10092 (recpy_gap_getset): New static object.
10093 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10094 * py-record.h (recpy_gap_new): New export.
10095
a3be24ad
TW
100962017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10097
10098 * python/py-record.c (recpy_ptid): Remove.
10099 (recpy_record_getset): Remove recpy_ptid.
10100
ae20e79a
TW
101012017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10102
10103 * btrace.c (btrace_fetch): Set inferior_ptid.
10104 * python/py-record-btrace.c: Add "py-record.h" include.
10105 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10106 recpy_bt_end, recpy_bt_instruction_history,
10107 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10108 in gdb.Record object instead of current ptid.
10109 * python/py-record.c: Include new "py-record.h" file.
10110 (recpy_record_object): Moved to py-record.h.
10111 * python/py-record.h: New file.
10112
8d0050ea
TW
101132017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10114
10115 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10116 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10117 indentation.
10118
3f380b50
JB
101192017-05-01 Joel Brobecker <brobecker@adacore.com>
10120
10121 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10122 the past maintainers section.
10123
07495424
YQ
101242017-04-28 Yao Qi <yao.qi@linaro.org>
10125
10126 * infcmd.c (get_return_value): Use regcache ctor, and remove
10127 cleanup.
10128
deb1fa3e
YQ
101292017-04-28 Yao Qi <yao.qi@linaro.org>
10130 Pedro Alves <palves@redhat.com>
10131
10132 * regcache.c (regcache::regcache): New tag dispatch ctor.
10133 (do_cooked_read): Moved above.
10134 (regcache_dup): Use the tag dispatch ctor..
10135 * regcache.h (regcache): Declare ctor, delete copy ctor and
10136 assignment operator, remove friend regcache_dup.
10137
b421c83c
YQ
101382017-04-28 Yao Qi <yao.qi@linaro.org>
10139
10140 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10141 call method save instead of regcache_cpy.
10142 * regcache.h (struct regcache): Make regcache_dup a friend.
10143
ef79d9a3
YQ
101442017-04-28 Yao Qi <yao.qi@linaro.org>
10145
10146 * regcache.c (struct regcache): Move to regcache.h
10147 (regcache::arch): New method.
10148 (regcache_get_ptid): Update.
10149 (get_regcache_arch): Call arch method.
10150 (get_regcache_aspace): Call method aspace.
10151 (register_buffer): Change it to method.
10152 (regcache_save): Change it to regcache::save.
10153 (regcache_restore): Likewise.
10154 (regcache_cpy_no_passthrough): Remove the declaration.
10155 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10156 (regcache_cpy_no_passthrough): Change it to method
10157 cpy_no_passthrough.
10158 (regcache_register_status): Change it to method
10159 get_register_status.
10160 (regcache_invalidate): Change it to method invalidate.
10161 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10162 (regcache_raw_update): Change it to method raw_update.
10163 (regcache_raw_read): Likewise.
10164 (regcache_raw_read_signed): Likewise.
10165 (regcache_raw_read_unsigned): Likewise.
10166 (regcache_raw_write_signed): Likewise.
10167 (regcache_raw_write_unsigned): Likewise.
10168 (regcache_cooked_read): Likewise.
10169 (regcache_cooked_read_value): Likewise.
10170 (regcache_cooked_read_signed): Likewise.
10171 (regcache_cooked_read_unsigned): Likewise.
10172 (regcache_cooked_write_signed): Likewise.
10173 (regcache_cooked_write_unsigned): Likewise.
10174 (regcache_raw_set_cached_value): Likewise.
10175 (regcache_raw_write): Likewise.
10176 (regcache_cooked_write): Likewise.
10177 (regcache_xfer_part): Likewise.
10178 (regcache_raw_read_part): Likewise.
10179 (regcache_raw_write_part): Likewise.
10180 (regcache_cooked_read_part): Likewise.
10181 (regcache_cooked_write_part): Likewise.
10182 (regcache_raw_supply): Likewise.
10183 (regcache_raw_collect): Likewise.
10184 (regcache_transfer_regset): Likewise.
10185 (regcache_supply_regset): Likewise.
10186 (regcache_collect_regset): Likewise.
10187 (regcache_debug_print_register): Likewise.
10188 (enum regcache_dump_what): Move it to regcache.h.
10189 (regcache_dump): Change it to method dump.
10190 * regcache.h (enum regcache_dump_what): New.
10191 (class regcache): New.
10192 * target.c (target_fetch_registers): Call method
10193 debug_print_register.
10194 (target_store_registers): Likewise.
10195
f8fdb78e
SM
101962017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10197
10198 * windows-nat.c (struct lm_info_windows): Initialize field.
10199 (windows_make_so): Allocate lm_info_windows with new.
10200 (windows_free_so): Free lm_info_windows with delete.
10201
9ccbfd7b
SM
102022017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10203
10204 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10205 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10206 cleanup.
10207 (darwin_free_so): Free lm_info_darwin with delete.
10208
76e75227
SM
102092017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10210
10211 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10212 <l_addr_p>: Change type to bool.
10213 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10214 (svr4_free_so): Free lm_info_svr4 with delete.
10215 (svr4_copy_library_list): Replace memcpy with call to copy
10216 constructor.
10217 (library_list_start_library, svr4_default_sos): Allocate
10218 lm_info_svr4 with new.
10219
51046d9e
SM
102202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10221
10222 * solib-target.c (struct lm_info_target): Add destructor,
10223 initialize fields.
10224 <name>: Change type to std::string.
10225 (library_list_start_library): Allocate lm_info_target with new.
10226 (solib_target_free_library_list): Free lm_info_target with
10227 delete.
10228 (solib_target_current_sos): Adapt to std::string.
10229 (solib_target_free_so): Free lm_info_target with delete.
10230
4023ae76
SM
102312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10232
10233 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10234 fields.
10235 (frv_current_sos): Allocate lm_info_frv with new.
10236 (frv_relocate_main_executable): Free lm_info_frv with delete,
10237 allocate with new.
10238 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10239
af43057b
SM
102402017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10241
10242 * solib-frv.c (struct lm_info_frv): Fix indentation.
10243
b0911207
SM
102442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10245
10246 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10247 map field.
10248 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10249 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10250 and allocate with new.
10251 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10252
6c401f72
SM
102532017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10254
10255 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10256 <filename, member_name>: Change type to std::string.
10257 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10258 (library_list_start_library): Allocate lm_info_aix with new.
10259 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10260 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10261 with copy constructor.
10262
d0e449a1
SM
102632017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10264
10265 * solist.h (struct lm_info): Remove.
10266 (struct lm_info_base): New class.
10267 (struct so_list) <lm_info>: Change type to lm_info_base *.
10268 * nto-tdep.c (struct lm_info): Remove.
10269 (lm_addr): Adjust.
10270 * solib-aix.c (struct lm_info): Rename to ...
10271 (struct lm_info_aix): ... this. Extend lm_info_base.
10272 (lm_info_p): Rename to ...
10273 (lm_info_aix_p): ... this, and adjust.
10274 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10275 solib_aix_parse_libraries, library_list_start_library,
10276 solib_aix_free_library_list, solib_aix_parse_libraries,
10277 solib_aix_get_library_list,
10278 solib_aix_relocate_section_addresses, solib_aix_free_so,
10279 solib_aix_get_section_offsets,
10280 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10281 Adjust.
10282 (struct solib_aix_inferior_data) <library_list>: Adjust.
10283 * solib-darwin.c (struct lm_info): Rename to ...
10284 (struct lm_info_darwin): ... this. Extend lm_info_base.
10285 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10286 * solib-dsbt.c (struct lm_info): Rename to ...
10287 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10288 (struct dsbt_info) <main_executable_lm_info): Adjust.
10289 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10290 dsbt_relocate_section_addresses): Adjust.
10291 * solib-frv.c (struct lm_info): Rename to ...
10292 (struct lm_info_frv): ... this. Extend lm_info_base.
10293 (main_executable_lm_info): Adjust.
10294 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10295 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10296 find_canonical_descriptor_in_load_object,
10297 frv_fdpic_find_canonical_descriptor): Adjust.
10298 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10299 to lm_info_svr4.
10300 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10301 svr4_clear_so, svr4_copy_library_list,
10302 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10303 svr4_current_sos, svr4_fetch_objfile_link_map,
10304 solist_update_incremental): Adjust.
10305 * solib-svr4.h (struct lm_info_svr4): Move here from
10306 solib-svr4.c.
10307 * solib-target.c (struct lm_info): Rename to ...
10308 (struct lm_info_target): ... this. Extend lm_info_base.
10309 (lm_info_p): Rename to ...
10310 (lm_info_target_p): ... this.
10311 (solib_target_parse_libraries, library_list_start_segment,
10312 library_list_start_section, library_list_start_library,
10313 library_list_end_library, solib_target_free_library_list,
10314 solib_target_current_sos, solib_target_free_so,
10315 solib_target_relocate_section_addresses): Adjust.
10316 * windows-nat.c (struct lm_info): Rename to ...
10317 (struct lm_info_windows): ... this. Extend lm_info_base.
10318 (windows_make_so, handle_load_dll, handle_unload_dll,
10319 windows_xfer_shared_libraries): Adjust.
10320
434a4023
SM
103212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10322
10323 * solib-darwin.c (struct darwin_so_list): Remove.
10324 (darwin_current_sos): Allocate an so_list object instead of a
10325 darwin_so_list, separately allocate an lm_info object.
10326 (darwin_free_so): Free lm_info.
10327
428544e8
JB
103282017-04-28 John Baldwin <jhb@FreeBSD.org>
10329
10330 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10331 with fprintf_filtered.
10332
4621115f
YQ
103332017-04-28 Yao Qi <yao.qi@linaro.org>
10334
10335 * regcache.c (regcache::regcache): New function.
10336 (regcache::~regcache): New function.
10337 (regcache_xmalloc_1): Remove.
10338 (regcache_xmalloc): Call new regcache.
10339 (regcache_xfree): Call delete regcache.
10340 (get_thread_arch_aspace_regcache): Call new regcache.
10341
339053c2
YQ
103422017-04-28 Yao Qi <yao.qi@linaro.org>
10343
10344 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10345 lwp instead of ptid_get_lwp.
10346
7974a605
YQ
103472017-04-28 Yao Qi <yao.qi@linaro.org>
10348
10349 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10350 lwp_info instead of getting from inferior_ptid.
10351
e15c3eb4
KS
103522017-04-27 Keith Seitz <keiths@redhat.com>
10353
10354 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10355 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10356 (CV_CONVERSION_BADNESS): Define.
10357 (rank_one_type): Remove overly restrictive rvalue reference
10358 rank checks.
10359 Add cv-qualifier checks and subranks for type equality.
10360 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10361 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10362 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10363
72bc1d24
SM
103642017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10365
10366 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10367 count when creating the object.
10368
55bcecda
UW
103692017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10370 Ulrich Weigand <uweigand@de.ibm.com>
10371
10372 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10373 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10374 is used in AIX.
10375 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10376 (process_xcoff_symbol): Likewise.
10377 (scan_xcoff_symtab): Likewise.
10378
5c99fcf8
AH
103792017-04-26 Alan Hayward <alan.hayward@arm.com>
10380
10381 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10382 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10383 (ia64_access_reg): Use get_frame_register_unsigned.
10384 (ia64_access_rse_reg): Likewise.
10385 (ia64_libunwind_frame_prev_register): Likewise.
10386
b41c5a85
JW
103872017-04-26 Jiong Wang <jiong.wang@arm.com>
10388
10389 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10390 * gdbarch.c: Regenerated.
10391 * gdbarch.h: Regenerated.
10392 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10393 visibility external.
10394 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10395 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10396 (enum cfa_how_kind): Move to ...
10397 (struct dwarf2_frame_state_reg_info): Likewise.
10398 (struct dwarf2_frame_state): Likewise.
10399 * dwarf2-frame.h: ... here.
10400 (dwarf2_frame_state_alloc_regs): New declaration.
10401 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10402 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10403
c185f580
AH
104042017-04-26 Alan Hayward <alan.hayward@arm.com>
10405
10406 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10407 regcache_raw_read_unsigned.
10408 (xtensa_pseudo_register_write): Likewise.
10409
19c45594
AH
104102017-04-26 Alan Hayward <alan.hayward@arm.com>
10411
10412 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10413 (nds32_pseudo_register_write): Likewise.
10414
4658f12e
YQ
104152017-04-25 Yao Qi <yao.qi@linaro.org>
10416
10417 * regcache.c (struct regcache) <readonly_p>: Change its type
10418 to bool.
10419 (regcache_xmalloc_1): Update parameter type and callers update.
10420
d581dda8
YQ
104212017-04-25 Yao Qi <yao.qi@linaro.org>
10422
10423 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10424 set_gdbarch_wchar_bit.
10425 * arm-tdep.c (arm_gdbarch_init): Likewise.
10426
debed3db
PA
104272017-04-25 Pedro Alves <palves@redhat.com>
10428
10429 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10430 (BothAreRelocatable, memcopy, memmove): Don't define.
10431 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10432 macros.
10433
b0b92aeb
PA
104342017-04-25 Pedro Alves <palves@redhat.com>
10435
10436 * common/common-defs.h: Include "common/poison.h".
10437 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10438 and adjust.
10439 * common/poison.h: New file.
10440 * common/traits.h: Include <type_traits>.
10441 (Not, Or, Requires): New, moved from common/function-view.h.
10442
16c4d54a
PA
104432017-04-25 Pedro Alves <palves@redhat.com>
10444
10445 * breakpoint.h (struct breakpoint): In-class initialize all
10446 fields. Make boolean fields "bool".
10447 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10448 memset call and initializations no longer necessary.
10449
b5c36682
PA
104502017-04-25 Pedro Alves <palves@redhat.com>
10451
10452 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10453 reference.
10454 (pt_btrace_insn): New function.
10455 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10456
5625a286
PA
104572017-04-25 Pedro Alves <palves@redhat.com>
10458
10459 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10460 "base" field and inherit from "bp_location" instead. Add
10461 non-default ctor.
10462 (allocate_location_exception): Use new non-default ctor.
10463 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10464 (init_bp_location): Convert to ...
10465 (bp_location::bp_location): ... this new ctor, and remove memset
10466 call.
10467 (base_breakpoint_allocate_location): Use the new non-default ctor.
10468 * breakpoint.h (bp_location): Now a class. Declare default and
10469 non-default ctors. In-class initialize all members.
10470 (init_bp_location): Remove declaration.
10471
23bcc18f
PA
104722017-04-25 Pedro Alves <palves@redhat.com>
10473
10474 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10475 assignment operator.
10476
e1ba3053
YQ
104772017-04-24 Yao Qi <yao.qi@linaro.org>
10478
10479 * doublest.c (convert_doublest_to_floatformat): Call
10480 floatformat_totalsize_bytes.
10481
10f489e5
TT
104822017-04-22 Tom Tromey <tom@tromey.com>
10483
10484 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10485 ui_out_emit_list.
10486 * stack.c (print_frame): Use ui_out_emit_list.
10487 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10488 ui_out_emit_list.
10489 * mi/mi-main.c (print_one_inferior)
10490 (mi_cmd_data_list_register_names)
10491 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10492 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10493 ui_out_emit_list.
10494 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10495 (mi_output_solib_attribs): Use ui_out_emit_list,
10496 ui_out_emit_tuple.
10497 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10498 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10499 (mi_cmd_stack_list_args, list_args_or_locals): Use
10500 ui_out_emit_list.
10501 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10502 * breakpoint.c (print_solib_event, output_thread_groups): Use
10503 ui_out_emit_list.
10504
0092b74d
TT
105052017-04-22 Tom Tromey <tom@tromey.com>
10506
10507 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10508 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10509 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10510
a14a62dd
TT
105112017-04-22 Tom Tromey <tom@tromey.com>
10512
10513 * tracepoint.c (tvariables_info_1)
10514 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10515
46b9c129
TT
105162017-04-22 Tom Tromey <tom@tromey.com>
10517
10518 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10519 annotate_arg_emitter.
10520 * breakpoint.c (print_mention_watchpoint)
10521 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10522 * annotate.h (struct annotate_arg_emitter): New.
10523
2e783024
TT
105242017-04-22 Tom Tromey <tom@tromey.com>
10525
10526 * record-btrace.c (record_btrace_insn_history)
10527 (record_btrace_insn_history_range, record_btrace_call_history)
10528 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10529 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10530 ui_out_emit_tuple.
10531 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10532 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10533 * skip.c (skip_info): Use ui_out_emit_tuple.
10534 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10535 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10536 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10537 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10538 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10539 ui_out_emit_tuple.
10540 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10541 (output_register, mi_cmd_data_read_memory)
10542 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10543 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10544 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10545 Use ui_out_emit_tuple.
10546 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10547 ui_out_emit_tuple.
10548 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10549 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10550 * linux-thread-db.c (info_auto_load_libthread_db): Use
10551 ui_out_emit_tuple.
10552 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10553 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10554 * disasm.c (do_mixed_source_and_assembly_deprecated)
10555 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10556 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10557 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10558 * breakpoint.c (print_one_breakpoint_location)
10559 (print_one_breakpoint): Use ui_out_emit_tuple.
10560 * auto-load.c (print_script, info_auto_load_cmd): Use
10561 ui_out_emit_tuple.
10562 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10563
9be21bb4
SM
105642017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10565
10566 * thread.c (print_thread_info_1): Remove dead code.
10567
0d4c07af
JK
105682017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10569
10570 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10571 GDB_SELF_TEST.
10572 * arm-tdep.c (selftests::arm_record_test): Likewise.
10573
4daf993d
YQ
105742017-04-21 Yao Qi <yao.qi@linaro.org>
10575
10576 * regcache.c (regcache_restore): Remove argument 2. Replace
10577 argument 3 with regcache. Get register status from
10578 src->register_status and get register contents from
10579 register_buffer (src, regnum).
10580 (regcache_cpy): Update.
10581
a6c21d4a
PA
105822017-04-19 Pedro Alves <palves@redhat.com>
10583
10584 * gdbthread.h (thread): Add missing closing parenthesis in
10585 comment.
10586
3a3fd0fd
PA
105872017-04-19 Pedro Alves <palves@redhat.com>
10588
10589 * common/refcounted-object.h: New file.
10590 * gdbthread.h: Include "common/refcounted-object.h".
10591 (thread_info): Inherit from refcounted_object and add comments.
10592 (thread_info::incref, thread_info::decref)
10593 (thread_info::m_refcount): Delete.
10594 (thread_info::deletable): Use the refcounted_object::refcount()
10595 method.
10596 * inferior.c (current_inferior_): Add comment.
10597 (set_current_inferior): Increment/decrement refcounts.
10598 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10599 not-deletable instead of comparing with the current inferior.
10600 (initialize_inferiors): Increment the initial inferior's refcount.
10601 * inferior.h (struct inferior): Forward declare.
10602 Include "common/refcounted-object.h".
10603 (current_inferior, set_current_inferior): Move declaration to
10604 before struct inferior's definition, and fix comment.
10605 (inferior): Inherit from refcounted_object. Add comments.
10606 * thread.c (switch_to_thread_no_regs): Reference the thread's
10607 inferior pointer directly instead of doing a ptid lookup.
10608 (switch_to_no_thread): New function.
10609 (switch_to_thread(thread_info *)): New function, factored out
10610 from ...
10611 (switch_to_thread(ptid_t)): ... this.
10612 (restore_current_thread): Delete.
10613 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10614 fields, and add 'inf' field.
10615 (do_restore_current_thread_cleanup): Check whether old->inf is
10616 alive instead of looking up an inferior by ptid. Use
10617 switch_to_thread and switch_to_no_thread.
10618 (restore_current_thread_cleanup_dtor): Use old->inf directly
10619 instead of lookup up an inferior by id. Decref the inferior.
10620 Don't restore 'removable'.
10621 (make_cleanup_restore_current_thread): Same the inferior pointer
10622 in old, instead of the inferior number. Incref the inferior.
10623 Don't save/clear 'removable'.
10624
9bcb1f16
PA
106252017-04-19 Pedro Alves <palves@redhat.com>
10626
10627 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10628 unittests/scoped_restore-selftests.c.
10629 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10630 * common/scoped_restore.h (scoped_restore_base): Make "class".
10631 (scoped_restore_base::release): New public method.
10632 (scoped_restore_base::scoped_restore_base): New protected ctor.
10633 (scoped_restore_base::m_saved_var): New protected field.
10634 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10635 scoped_restore_base base class instead of m_saved_var directly.
10636 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10637 (scoped_restore_tmpl::scoped_restore_tmpl(const
10638 scoped_restore_tmpl<T>&)): Likewise.
10639 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10640 method.
10641 (scoped_restore_tmpl::saved_var): New method.
10642 (scoped_restore_tmpl::m_saved_var): Delete.
10643 * inferior.h (inferior::detaching): Now a bool.
10644 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10645 cleanup.
10646 * unittests/scoped_restore-selftests.c: New file.
10647
26fcd539
PA
106482017-04-19 Pedro Alves <palves@redhat.com>
10649
10650 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10651 Re-sort in alphabetic order.
10652
fdd243b0
PA
106532017-04-18 Pedro Alves <palves@redhat.com>
10654
10655 * xml-support.c (obstack_xml_printf): Delete.
10656 * xml-support.h (obstack_xml_printf): Delete.
10657
4895cde2
PA
106582017-04-18 Pedro Alves <palves@redhat.com>
10659
10660 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10661 vdebug, verror, body_text, start_element, end_element, name,
10662 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10663 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10664 is_xinclude>: Make private and add m_ prefix.
10665 (gdb_xml_parser::body_text): New method, based on ...
10666 (gdb_xml_body_text): ... this. Adjust.
10667 (gdb_xml_parser::vdebug): New method, based on ...
10668 (gdb_xml_debug): ... this. Adjust.
10669 (gdb_xml_parser::verror): New method, based on ...
10670 (gdb_xml_error): ... this. Adjust.
10671 (gdb_xml_parser::start_element): New method, based on ...
10672 (gdb_xml_start_element): ... this. Adjust.
10673 (gdb_xml_start_element_wrapper): Defer to
10674 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10675 (gdb_xml_parser::end_element): New method, based on ...
10676 (gdb_xml_end_element_wrapper): ... this. Adjust.
10677 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10678 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10679 (gdb_xml_parser::use_dtd): New method, based on ...
10680 (gdb_xml_use_dtd): ... this. Adjust.
10681 (gdb_xml_parser::parse): New method, based on ...
10682 (gdb_xml_parse): ... this. Adjust.
10683 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10684 (xinclude_start_include): Adjust to call the parser's name method.
10685 (xml_xinclude_default, xml_xinclude_start_doctype)
10686 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10687 method.
10688 (xml_process_xincludes): Adjust to call parser methods.
10689 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10690 declarations.
10691
bd8a901f
PA
106922017-04-18 Pedro Alves <palves@redhat.com>
10693
10694 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10695 gdb::optional<std::string>.
10696 * xml-support.c: Include <string>.
10697 (scope_level::scope_level(scope_level &&))
10698 (scope_level::~scope_level): Delete.
10699 (scope_level::body): Now a std::string.
10700 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10701 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10702 parameter.
10703 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10704 (xinclude_parsing_data::output): Now a std::string reference.
10705 (xinclude_start_include): Adjust.
10706 (xml_xinclude_default): Adjust.
10707 (xml_process_xincludes): Add 'output' parameter, and return bool.
10708 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10709 and return bool.
10710 * xml-tdesc.c: Include <unordered_map> and <string>.
10711 (tdesc_xml_cache): Delete.
10712 (tdesc_xml_cache_s): Delete.
10713 (xml_cache): Now an std::unordered_map.
10714 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10715 (target_fetch_description_xml): Change return type to
10716 gdb::optional<std::string>, and adjust.
10717 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10718 (target_fetch_description_xml): Change return type to
10719 gdb::optional<std::string>.
10720
d35d1958
PA
107212017-04-18 Pedro Alves <palves@redhat.com>
10722
10723 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10724 unittests/optional-selftests.c.
10725 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10726 * unittests/optional-selftests.c: New file.
10727 * unittests/optional/assignment/1.cc: New file.
10728 * unittests/optional/assignment/2.cc: New file.
10729 * unittests/optional/assignment/3.cc: New file.
10730 * unittests/optional/assignment/4.cc: New file.
10731 * unittests/optional/assignment/5.cc: New file.
10732 * unittests/optional/assignment/6.cc: New file.
10733 * unittests/optional/assignment/7.cc: New file.
10734 * unittests/optional/cons/copy.cc: New file.
10735 * unittests/optional/cons/default.cc: New file.
10736 * unittests/optional/cons/move.cc: New file.
10737 * unittests/optional/cons/value.cc: New file.
10738 * unittests/optional/in_place.cc: New file.
10739 * unittests/optional/observers/1.cc: New file.
10740 * unittests/optional/observers/2.cc: New file.
10741
22796e97
PA
107422017-04-18 Pedro Alves <palves@redhat.com>
10743
10744 * common/gdb_optional.h: Include common/traits.h.
10745 (in_place_t): New type.
10746 (in_place): New constexpr variable.
10747 (optional::optional): Remove member initialization of
10748 m_instantiated.
10749 (optional::optional(in_place_t...)): New constructor.
10750 (optional::~optional): Use reset.
10751 (optional::optional(const optional&)): New.
10752 (optional::optional(const optional&&)): New.
10753 (optional::optional(T &)): New.
10754 (optional::optional(T &&)): New.
10755 (operator::operator=(const optional &)): New.
10756 (operator::operator=(optional &&)): New.
10757 (operator::operator= (const T &))
10758 (operator::operator= (T &&))
10759 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10760 (operator::reset): New.
10761 (operator::m_instantiated):: Add in-class initializer.
10762 * common/traits.h: Include <type_traits>.
10763 (struct And): New types.
10764
a7fc9b61
PA
107652017-04-18 Pedro Alves <palves@redhat.com>
10766
10767 * xml-support.c: Include <vector>.
10768 (scope_level::scope_level(const gdb_xml_element *))
10769 (scope_level::scope_level(scope_level&&)): New.
10770 (scope_level::~scope_level): New.
10771 (scope_level_s): Delete.
10772 (gdb_xml_parser::scopes): Now a std::vector.
10773 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10774 Use std::vector.
10775 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10776 scope cleanup code.
10777 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10778 of the scopes member. Use std::vector::emplace_back.
10779
010151c9
PA
107802017-04-18 Pedro Alves <palves@redhat.com>
10781
10782 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10783 a bool.
10784 (gdb_xml_end_element): Change type of first parameter.
10785 (gdb_xml_cleanup): Rename to ...
10786 (gdb_xml_parser::~gdb_xml_parser): ... this.
10787 (gdb_xml_create_parser_and_cleanup): Delete with ...
10788 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10789 to this new ctor.
10790 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10791 using gdb_xml_create_parser_and_cleanup.
10792 (xinclude_parsing_data): Add ctor/dtor.
10793 (xml_xinclude_cleanup): Delete.
10794 (xml_process_xincludes): Create a local xinclude_parsing_data
10795 instead of heap-allocating one. Create a local gdb_xml_parser
10796 instead of heap-allocating one with
10797 gdb_xml_create_parser_and_cleanup.
10798
d56060f0
JB
107992017-04-18 John Baldwin <jhb@FreeBSD.org>
10800
10801 PR threads/20743
10802 * fbsd-nat.c (resume_one_thread_cb): Remove.
10803 (resume_all_threads_cb): Remove.
10804 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10805 iterate_over_threads.
10806
305d16a9
JB
108072017-04-17 Joel Brobecker <brobecker@adacore.com>
10808
10809 * NEWS: Create a new section for the next release branch.
10810 Rename the section of the current branch, now that it has
10811 been cut.
10812
8bb57231
JB
108132017-04-17 Joel Brobecker <brobecker@adacore.com>
10814
10815 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10816 * version.in: Bump version to 8.0.50.DATE-git.
10817
096c92dd
SDJ
108182017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10819
10820 PR gdb/21385
10821 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10822 independently of the host, and fix build breakage on Cygwin.
10823
0550c955
PA
108242017-04-13 Pedro Alves <palves@redhat.com>
10825
10826 * inferior.c (free_inferior): Convert to ...
10827 (inferior::~inferior): ... this dtor.
10828 (inferior::inferior): New ctor, factored out from ...
10829 (add_inferior_silent): ... here. Allocate the inferior with a new
10830 expression.
10831 (delete_inferior): Call delete instead of free_inferior.
10832 * inferior.h (gdb_environ, continuation): Forward declare.
10833 (inferior): Now a class. Add in-class initialization to all
10834 members. Make boolean fields bool, except 'detaching'.
10835 (inferior::inferior): New explicit ctor.
10836 (inferior::~inferior): New.
10837
e3d60dfc
PA
108382017-04-13 Pedro Alves <palves@redhat.com>
10839
10840 * inferior.c (init_inferior_list): Delete.
10841 * inferior.h (init_inferior_list): Delete.
10842
5fd69d0a
PA
108432017-04-13 Pedro Alves <palves@redhat.com>
10844
10845 PR threads/13217
10846 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10847 (top level): Call it twice, with different thread sets.
10848
c6609450
PA
108492017-04-13 Pedro Alves <palves@redhat.com>
10850
10851 * thread.c: Include <algorithm>.
10852 (thread_array_cleanup): Delete.
10853 (scoped_inc_dec_ref): New class.
10854 (live_threads_count): New function.
10855 (set_thread_refcount): Delete.
10856 (tp_array_compar_ascending): Now a bool.
10857 (tp_array_compar): Convert to a std::sort comparison function.
10858 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10859 and live_threads_count.
10860
2a00d7ce
PA
108612017-04-13 Pedro Alves <palves@redhat.com>
10862
10863 * infrun.c (follow_fork_inferior): Also switch the current
10864 inferior.
10865
441d7c93
PA
108662017-04-13 Pedro Alves <palves@redhat.com>
10867
10868 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10869 before calling create_internal_breakpoint.
10870
808480f6
PA
108712017-04-13 Pedro Alves <palves@redhat.com>
10872
10873 * fork-child.c (execv_argv): New class.
10874 (breakup_args): Refactored as ...
10875 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10876 Copy arguments to storage and replace separators with NULL
10877 terminators in place.
10878 (escape_bang_in_quoted_argument): Adjust to return bool.
10879 (execv_argv::execv_argv): New ctor.
10880 (execv_argv::init_for_shell): New method, factored out from
10881 fork_inferior. Don't strdup strings into the vector.
10882 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10883 Remove free_vector_argv call.
10884
ad3d022a
YQ
108852017-04-13 Yao Qi <yao.qi@linaro.org>
10886
10887 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10888 tdep->rx_psw_type.
10889
e6ddc3bf
YQ
108902017-04-13 Yao Qi <yao.qi@linaro.org>
10891
10892 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10893 * rx-tdep.c (rx_gdbarch_init): Likewise.
10894
bfb8cf90
PA
108952017-04-13 Pedro Alves <palves@redhat.com>
10896
10897 * breakpoint.h (struct breakpoint): Reindent.
10898
f5336ca5
PA
108992017-04-13 Pedro Alves <palves@redhat.com>
10900
10901 * breakpoint.c (bp_location): Rename to ...
10902 (bp_locations): ... this. All references updated.
10903 (bp_location_count): Rename to ...
10904 (bp_locations_count): ... this. All references updated.
10905 (bp_location_placed_address_before_address_max): Rename to ...
10906 (bp_locations_placed_address_before_address_max): ... this. All
10907 references updated.
10908 (bp_location_shadow_len_after_address_max): Rename to ...
10909 (bp_locations_shadow_len_after_address_max): ... this. All
10910 references updated.
10911 (bp_location_compare_addrs): Rename to ...
10912 (bp_locations_compare_addrs): ... this. All references updated.
10913 (bp_location_compare):Rename to ...
10914 (bp_locations_compare): ... this. All references updated.
10915 (bp_location_target_extensions_update): Rename to ...
10916 (bp_locations_target_extensions_update): ... this. All references
10917 updated.
10918
be628ab8
SDJ
109192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10920
10921 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10922 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10923 'sgtty.h'.
10924 * common/gdb_termios.h: New file, with parts of "terminal.h".
10925 * inflow.c: Include "gdb_termios.h".
10926 * ser-unix.c: Include "gdb_termios.h".
10927 * terminal.h: Move terminal-related defines to
10928 "common/gdb_termios.h".
10929
8e9e35b1
TT
109302017-04-12 Tom Tromey <tom@tromey.com>
10931
10932 * probe.c (parse_probes): Update.
10933 * location.h (delete_event_location): Don't declare.
10934 (event_location_deleter::operator()): Update.
10935 * location.c (event_location_deleter::operator()): Rename from
10936 delete_event_location.
10937 * linespec.h (linespec_result) <location>: Change type to
10938 event_location_up.
10939 * linespec.c (canonicalize_linespec, event_location_to_sals)
10940 (decode_objc): Update.
10941 (linespec_result): Don't call delete_event_location.
10942 * breakpoint.c (create_breakpoints_sal)
10943 (bkpt_probe_create_sals_from_location)
10944 (strace_marker_create_sals_from_location): Update.
10945
16e802b9
TT
109462017-04-12 Tom Tromey <tom@tromey.com>
10947
10948 * linespec.h (struct linespec_result): Add constructor and
10949 destructor.
10950 (init_linespec_result, destroy_linespec_result)
10951 (make_cleanup_destroy_linespec_result): Don't declare.
10952 * linespec.c (init_linespec_result): Remove.
10953 (linespec_result::~linespec_result): Rename from
10954 destroy_linespec_result. Update.
10955 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10956 Remove.
10957 * breakpoint.c (create_breakpoint, break_range_command)
10958 (decode_location_default): Update.
10959 * ax-gdb.c (agent_command_1): Update.
10960
d28cd78a
TT
109612017-04-12 Tom Tromey <tom@tromey.com>
10962
10963 * remote.c (remote_download_tracepoint): Update.
10964 * python/py-breakpoint.c (bppy_get_location): Update.
10965 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10966 (gdbscm_breakpoint_location): Update.
10967 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10968 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10969 Change type to event_location_up.
10970 * breakpoint.c (create_overlay_event_breakpoint)
10971 (create_longjmp_master_breakpoint)
10972 (create_std_terminate_master_breakpoint)
10973 (create_exception_master_breakpoint)
10974 (breakpoint_event_location_empty_p, print_breakpoint_location)
10975 (print_one_breakpoint_location, create_thread_event_breakpoint)
10976 (init_breakpoint_sal, create_breakpoint)
10977 (print_recreate_ranged_breakpoint, break_range_command)
10978 (init_ada_exception_breakpoint, say_where): Update.
10979 (base_breakpoint_dtor): Don't call delete_event_location.
10980 (bkpt_print_recreate, tracepoint_print_recreate)
10981 (dprintf_print_recreate, update_static_tracepoint)
10982 (breakpoint_re_set_default): Update.
10983
711799d5
TT
109842017-04-12 Tom Tromey <tom@tromey.com>
10985
10986 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10987 type of "to_do". Update.
10988 (compute_stack_depth): Use std::vector.
10989
52d214d3
TT
109902017-04-12 Tom Tromey <tom@tromey.com>
10991
10992 * printcmd.c (find_instruction_backward): Use std::vector.
10993
4c404b8b
TT
109942017-04-12 Tom Tromey <tom@tromey.com>
10995
10996 * symfile.c (objfilep): Remove typedef.
10997 (reread_symbols): Use a std::vector.
10998
156d9eab
TT
109992017-04-12 Tom Tromey <tom@tromey.com>
11000
11001 * mi/mi-main.c (exec_direction_forward): Remove.
11002 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11003 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11004 scoped_restore.
11005 * guile/guile.c (guile_repl_command, guile_command)
11006 (gdbscm_execute_gdb_command): Use scoped_restore.
11007 * go-exp.y (go_parse): Use scoped_restore.
11008 * d-exp.y (d_parse): Use scoped_restore.
11009 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11010 * c-exp.y (c_parse): Use scoped_restore.
11011
4d89769a
TT
110122017-04-12 Tom Tromey <tom@tromey.com>
11013
11014 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11015 (mi_parse): Update return type.
11016 (mi_parse_free): Remove.
11017 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11018 (mi_parse::~mi_parse): Rename from mi_parse_free.
11019 (mi_parse_cleanup): Remove.
11020 (mi_parse): Return a unique_ptr. Use new.
11021 * mi/mi-main.c (mi_execute_command): Update.
11022
4b217cc7
TT
110232017-04-12 Tom Tromey <tom@tromey.com>
11024
11025 * location.c (explicit_location_lex_one): Return a
11026 unique_xmalloc_ptr.
11027 (string_to_explicit_location): Update. Remove cleanups.
11028
59d3651b
TT
110292017-04-12 Tom Tromey <tom@tromey.com>
11030
11031 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11032 (compare_value_and_voffset): Change type. Update.
11033 (compute_vtable_size): Change type of "offset_vec".
11034 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11035 (gnuv3_get_typeid): Remove extraneous declaration.
11036
b24b0d6c
TT
110372017-04-12 Tom Tromey <tom@tromey.com>
11038
11039 * charset.h (wchar_iterator): Fix comment.
11040
80a3b8c5
TT
110412017-04-12 Tom Tromey <tom@tromey.com>
11042
11043 * charset.c (iconv_wrapper): New class.
11044 (cleanup_iconv): Remove.
11045 (convert_between_encodings): Use it.
11046
c83dd867
TT
110472017-04-12 Tom Tromey <tom@tromey.com>
11048
11049 * symfile.h (increment_reading_symtab): Update type.
11050 * symfile.c (decrement_reading_symtab): Remove.
11051 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11052 * psymtab.c (psymtab_to_symtab): Update.
11053 * dwarf2read.c (dw2_instantiate_symtab): Update.
11054
0e8621a0
TT
110552017-04-12 Tom Tromey <tom@tromey.com>
11056
11057 * jit.c (struct jit_reader): Declare separately. Add constructor
11058 and destructor. Change type of "handle".
11059 (loaded_jit_reader): Define separately.
11060 (jit_reader_load): Update. New "new".
11061 (jit_reader_unload_command): Use "delete".
11062 * gdb-dlfcn.h (struct dlclose_deleter): New.
11063 (gdb_dlhandle_up): New typedef.
11064 (gdb_dlopen, gdb_dlsym): Update types.
11065 (gdb_dlclose): Remove.
11066 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11067 (gdb_dlsym): Change type of "handle".
11068 (make_cleanup_dlclose): Remove.
11069 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11070 * compile/compile-c-support.c (load_libcc): Update.
11071
67d89901
TT
110722017-04-12 Tom Tromey <tom@tromey.com>
11073
11074 * symtab.h (find_pcs_for_symtab_line): Change return type.
11075 * symtab.c (find_pcs_for_symtab_line): Change return type.
11076 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11077 type of "vec". Update.
11078 (ltpy_get_pcs_for_line): Update.
11079 * linespec.c (decode_digits_ordinary): Update.
11080
93921405
TT
110812017-04-12 Tom Tromey <tom@tromey.com>
11082
11083 * tracepoint.c (actions_command): Update.
11084 * python/python.c (python_command, python_interactive_command):
11085 Update.
11086 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11087 * guile/guile.c (guile_command): Update.
11088 * defs.h (read_command_lines, read_command_lines_1): Return
11089 command_line_up.
11090 (command_lines_deleter): New struct.
11091 (command_line_up): New typedef.
11092 * compile/compile.c (compile_code_command)
11093 (compile_print_command): Update.
11094 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11095 command_line_up.
11096 (make_cleanup_free_command_lines): Remove.
11097 * cli/cli-script.c (get_command_line, read_command_lines_1)
11098 (copy_command_lines): Return command_line_up.
11099 (while_command, if_command, read_command_lines, define_command)
11100 (document_command): Update.
11101 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11102 Remove.
11103 * breakpoint.h (breakpoint_set_commands): Change type of
11104 "commands".
11105 * breakpoint.c (breakpoint_set_commands): Change type of
11106 "commands". Update.
11107 (do_map_commands_command, update_dprintf_command_list)
11108 (create_tracepoint_from_upload): Update.
11109
ffc2605c
TT
111102017-04-12 Tom Tromey <tom@tromey.com>
11111
11112 * tracepoint.c (scope_info): Update.
11113 * spu-tdep.c (spu_catch_start): Update.
11114 * python/python.c (gdbpy_decode_line): Update.
11115 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11116 * python/py-breakpoint.c (bppy_init): Update.
11117 * probe.c (parse_probes): Update.
11118 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11119 * location.h (event_location_deleter): New struct.
11120 (event_location_up): New typedef.
11121 (new_linespec_location, new_address_location, new_probe_location)
11122 (new_explicit_location, copy_event_location)
11123 (string_to_event_location, string_to_event_location_basic)
11124 (string_to_explicit_location): Update return type.
11125 (make_cleanup_delete_event_location): Remove.
11126 * location.c (new_linespec_location, new_address_location)
11127 (new_probe_location, new_explicit_location, copy_event_location):
11128 Return event_location_up.
11129 (delete_event_location_cleanup)
11130 (make_cleanup_delete_event_location): Remove.
11131 (string_to_explicit_location, string_to_event_location_basic)
11132 (string_to_event_location): Return event_location_up.
11133 * linespec.c (canonicalize_linespec, event_location_to_sals)
11134 (decode_line_with_current_source)
11135 (decode_line_with_last_displayed, decode_objc): Update.
11136 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11137 * completer.c (location_completer): Update.
11138 * cli/cli-cmds.c (edit_command, list_command): Update.
11139 * breakpoint.c (create_overlay_event_breakpoint)
11140 (create_longjmp_master_breakpoint)
11141 (create_std_terminate_master_breakpoint)
11142 (create_exception_master_breakpoint)
11143 (create_thread_event_breakpoint): Update.
11144 (init_breakpoint_sal): Update. Remove some dead code.
11145 (create_breakpoint_sal): Change type of "location". Update.
11146 (create_breakpoints_sal, create_breakpoint, break_command_1)
11147 (dprintf_command, break_range_command, until_break_command)
11148 (init_ada_exception_breakpoint)
11149 (strace_marker_create_sals_from_location)
11150 (update_static_tracepoint, trace_command, ftrace_command)
11151 (strace_command, create_tracepoint_from_upload): Update.
11152 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11153 * ax-gdb.c (agent_command_1): Update.
11154
8f10c932
PA
111552017-04-12 Pedro Alves <palves@redhat.com>
11156
11157 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11158 * configure.tgt: Handle i[34567]86-*-go32* and
11159 i[34567]86-*-msdosdjgpp*.
11160 * i386-tdep.c (i386_svr4_reg_to_regnum):
11161 Make extern.
11162 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11163 i386-go32-tdep.c.
11164 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11165 * i386-go32-tdep.c: New file.
11166 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11167 declarations.
11168
0a31ccfb
SM
111692017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11170
11171 * aix-thread.c (pd_status2str): Change return type to const char *.
11172
e9bb3fbb
PA
111732017-04-12 Pedro Alves <palves@redhat.com>
11174
11175 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11176 calls to set_gdbarch_gnu_triplet_regexp.
11177
53375380
PA
111782017-04-12 Pedro Alves <palves@redhat.com>
11179
11180 PR gdb/21323
11181 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11182 New enum value.
11183 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11184 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11185 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11186 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11187 * gdbarch.h, gdbarch.c: Regenerate.
11188 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11189 gdbarch_wchar_bit and gdbarch_wchar_signed.
11190 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11191 * arm-tdep.c (arm_gdbarch_init): Likewise.
11192 * avr-tdep.c (avr_gdbarch_init): Likewise.
11193 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11194 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11195 * i386-tdep.c (i386_go32_init_abi): Likewise.
11196 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11197 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11198 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11199 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11200 * sh-tdep.c (sh_gdbarch_init): Likewise.
11201 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11202 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11203 * windows-tdep.c (windows_init_abi): Likewise.
11204 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11205
53e710ac
PA
112062017-04-12 Pedro Alves <palves@redhat.com>
11207
11208 PR c++/21323
11209 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11210 cplus_primitive_type_char32_t>: New enum values.
11211 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11212 and cplus_primitive_type_char32_t.
11213 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11214 32, use the archtecture's built-in type for char16_t and char32_t,
11215 respectively. Otherwise, fallback to init_integer_type as before,
11216 but make the type unsigned, and issue a complaint.
11217 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11218
ab0538b8
AH
112192017-04-12 Alan Hayward <alan.hayward@arm.com>
11220
5e0e0422 11221 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
11222 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11223
5430098f
SDJ
112242017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11225
11226 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11227 'const char *'.
11228
7c5ded6a
SDJ
112292017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11230
11231 * common/common-utils.c (free_vector_argv): New function.
11232 * common/common-utils.h: Include <vector>.
11233 (free_vector_argv): New prototype.
11234 * darwin-nat.c (darwin_create_inferior): Rewrite function
11235 prototype in order to constify "exec_file" and accept a
11236 "std::string" for "allargs".
11237 * fork-child.c: Include <vector>.
11238 (breakup_args): Rewrite function, using C++.
11239 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11240 and accept "std::string" for "allargs". Update the code to
11241 calculate "argv" based on "allargs". Update calls to "exec_fun"
11242 and "execvp".
11243 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11244 order to constify "exec_file" and accept a "std::string" for
11245 "allargs".
11246 * go32-nat.c (go32_create_inferior): Likewise.
11247 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11248 * infcmd.c (run_command_1): Constify "exec_file". Use
11249 "std::string" for inferior arguments.
11250 * inferior.h (fork_inferior): Update prototype.
11251 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11252 prototype in order to constify "exec_file" and accept a
11253 "std::string" for "allargs".
11254 * nto-procfs.c (procfs_create_inferior): Likewise.
11255 * procfs.c (procfs_create_inferior): Likewise.
11256 * remote-sim.c (gdbsim_create_inferior): Likewise.
11257 * remote.c (extended_remote_run): Update code to accept
11258 "std::string" as argument.
11259 (extended_remote_create_inferior): Rewrite function prototype in
11260 order to constify "exec_file" and accept a "std::string" for
11261 "allargs".
11262 * rs6000-nat.c (super_create_inferior): Likewise.
11263 (rs6000_create_inferior): Likewise.
11264 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11265 * windows-nat.c (windows_create_inferior): Likewise.
11266
ae0eee42
PA
112672017-04-11 Pedro Alves <palves@redhat.com>
11268
11269 * thread.c: Fix whitespace throughout.
11270
a6acac06
PR
112712017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11272
11273 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11274
64403bd1
AH
112752017-04-11 Alan Hayward <alan.hayward@arm.com>
11276
11277 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11278
a5bef50f
SDJ
112792017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11280
11281 PR gdb/21364
11282 * osdata.c (info_osdata): Check if 'type' is an empty string
11283 instead of NULL.
11284
9295a5a9
PA
112852017-04-10 Pedro Alves <palves@redhat.com>
11286
11287 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11288 (ptid_to_global_thread_id, in_thread_list)
11289 (do_captured_list_thread_ids, set_resumed, set_running)
11290 (set_executing, set_stop_requested, finish_thread_state)
11291 (validate_registers_access, can_access_registers_ptid)
11292 (print_thread_info_1, switch_to_thread)
11293 (do_restore_current_thread_cleanup)
11294 (make_cleanup_restore_current_thread, thread_command)
11295 (thread_name_command): Use operator== instead of ptid_equal.
11296
996812e3
PA
112972017-04-10 Pedro Alves <palves@redhat.com>
11298
11299 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11300 (current_thread_cleanup_chain): Delete.
11301 (restore_current_thread_cleanup_dtor)
11302 (make_cleanup_restore_current_thread): Remove references to
11303 current_thread_cleanup_chain.
11304
845b344f
AH
113052017-04-10 Alan Hayward <alan.hayward@arm.com>
11306
11307 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11308 REG_UNKNOWN.
11309
803bdfe4
YQ
113102017-04-10 Yao Qi <yao.qi@linaro.org>
11311
11312 PR gdb/19942
11313 * gdbthread.h (thread_info::deletable): New method.
11314 (thread_info::incref): New method.
11315 (thread_info::decref): New method.
11316 (thread_info::refcount): Move it to private.
11317 * infrun.c (save_stop_context): Call inc_refcount.
11318 (release_stop_context_cleanup): Likewise.
11319 * thread.c (set_thread_exited): New function.
11320 (init_thread_list): Delete "tp" only it is deletable, otherwise
11321 call set_thread_exited.
11322 (delete_thread_1): Call set_thread_exited.
11323 (current_thread_cleanup) <inferior_pid>: Remove.
11324 <thread>: New field.
11325 (restore_current_thread_ptid_changed): Removed.
11326 (do_restore_current_thread_cleanup): Adjust.
11327 (restore_current_thread_cleanup_dtor): Don't call
11328 find_thread_ptid.
11329 (set_thread_refcount): Use dec_refcount.
11330 (make_cleanup_restore_current_thread): Adjust.
11331 (thread_apply_all_command): Call inc_refcount.
11332 (_initialize_thread): Don't call
11333 observer_attach_thread_ptid_changed.
11334
8c25b497
YQ
113352017-04-10 Yao Qi <yao.qi@linaro.org>
11336
11337 * thread.c (delete_thread_1): Hoist code on marking thread as
11338 exited.
11339
8473b447
SM
113402017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11341
11342 * windows-nat.c (windows_detach): Initialize ptid with
11343 minus_one_ptid.
11344
6670ec13
SM
113452017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11346
11347 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11348
ba2f91bb
AH
113492017-04-07 Alan Hayward <alan.hayward@arm.com>
11350
11351 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11352 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11353 (bfin_pseudo_register_write): Likewise
11354
436252de
SM
113552017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11356
11357 * common/ptid.h (struct ptid): Change to...
11358 (class ptid_t): ... this.
11359 <ptid_t>: New constructors.
11360 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11361 matches>: New methods.
11362 <make_null, make_minus_one>: New static methods.
11363 <pid>: Rename to...
11364 <m_pid>: ...this.
11365 <lwp>: Rename to...
11366 <m_lwp>: ...this.
11367 <tid>: Rename to...
11368 <m_tid>: ...this.
11369 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11370 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11371 as references, move comment to class ptid_t.
11372 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11373 ptid_t static methods.
11374 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11375 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11376 Take ptid arguments as references, implement using ptid_t methods.
11377 * unittests/ptid-selftests.c: New file.
11378 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11379 unittests/ptid-selftests.c.
11380 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11381
0dedf377
TP
113822017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11383
11384 * python/python.c (python_run_simple_file): Cast mode literal to
11385 non-const char pointer as expected by PyFile_FromString.
11386
4e9868d4
SM
113872017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11388
11389 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11390 minus_one_ptid and null_ptid.
11391
9bf2a700
PA
113922017-04-05 Pedro Alves <palves@redhat.com>
11393
11394 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11395 * configure: Regenerate.
11396
a121b7c1
PA
113972017-04-05 Pedro Alves <palves@redhat.com>
11398
11399 * ada-exp.y (yyerror): Constify.
11400 * ada-lang.c (bound_name, get_selections)
11401 (ada_variant_discrim_type)
11402 (ada_variant_discrim_name, ada_value_struct_elt)
11403 (ada_lookup_struct_elt_type, is_unchecked_variant)
11404 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11405 (catch_ada_exception_command_split)
11406 (catch_ada_assert_command_split, catch_assert_command)
11407 (ada_op_name): Constify.
11408 * ada-lang.h (ada_yyerror, get_selections)
11409 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11410 * arc-tdep.c (arc_print_frame_cache): Constify.
11411 * arm-tdep.c (arm_skip_stub): Constify.
11412 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11413 (gen_aggregate_elt_ref): Constify.
11414 * bcache.c (print_bcache_statistics): Constify.
11415 * bcache.h (print_bcache_statistics): Constify.
11416 * break-catch-throw.c (catch_exception_command_1):
11417 * breakpoint.c (struct ep_type_description::description):
11418 Constify.
11419 (add_solib_catchpoint): Constify.
11420 (catch_fork_command_1): Add cast.
11421 (add_catch_command): Constify.
11422 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11423 Constify.
11424 * bsd-uthread.c (bsd_uthread_state): Constify.
11425 * buildsym.c (patch_subfile_names): Constify.
11426 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11427 Constify.
11428 * c-exp.y (yyerror): Constify.
11429 (token::oper): Constify.
11430 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11431 * c-varobj.c (cplus_describe_child): Constify.
11432 * charset.c (find_charset_names): Add cast.
11433 (find_charset_names): Constify array and add const_cast.
11434 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11435 (edit_command): Constify.
11436 * cli/cli-decode.c (lookup_cmd): Constify.
11437 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11438 Constify.
11439 (struct dump_context): Constify.
11440 (add_dump_command, restore_command): Constify.
11441 * cli/cli-script.c (get_command_line): Constify.
11442 * cli/cli-script.h (get_command_line): Constify.
11443 * cli/cli-utils.c (check_for_argument): Constify.
11444 * cli/cli-utils.h (check_for_argument): Constify.
11445 * coff-pe-read.c (struct read_pe_section_data): Constify.
11446 * command.h (lookup_cmd): Constify.
11447 * common/print-utils.c (decimal2str): Constify.
11448 * completer.c (gdb_print_filename): Constify.
11449 * corefile.c (set_gnutarget): Constify.
11450 * cp-name-parser.y (yyerror): Constify.
11451 * cp-valprint.c (cp_print_class_member): Constify.
11452 * cris-tdep.c (cris_register_name, crisv32_register_name):
11453 Constify.
11454 * d-exp.y (yyerror): Constify.
11455 (struct token::oper): Constify.
11456 * d-lang.h (d_yyerror): Constify.
11457 * dbxread.c (struct header_file_location::name): Constify.
11458 (add_old_header_file, add_new_header_file, last_function_name)
11459 (dbx_next_symbol_text, add_bincl_to_list)
11460 (find_corresponding_bincl_psymtab, set_namestring)
11461 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11462 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11463 * defs.h (command_line_input, print_address_symbolic)
11464 (deprecated_readline_begin_hook): Constify.
11465 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11466 Constify.
11467 * event-top.c (handle_line_of_input): Constify and add cast.
11468 * exceptions.c (catch_errors): Constify.
11469 * exceptions.h (catch_errors): Constify.
11470 * expprint.c (print_subexp_standard, op_string, op_name)
11471 (op_name_standard, dump_raw_expression, dump_raw_expression):
11472 * expression.h (op_name, op_string, dump_raw_expression):
11473 Constify.
11474 * f-exp.y (yyerror): Constify.
11475 (struct token::oper): Constify.
11476 (struct f77_boolean_val::name): Constify.
11477 * f-lang.c (f_word_break_characters): Constify.
11478 * f-lang.h (f_yyerror): Constify.
11479 * fork-child.c (fork_inferior): Add cast.
11480 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11481 (new_variant): Constify.
11482 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11483 * gdbarch.c: Regenerate.
11484 * gdbcore.h (set_gnutarget): Constify.
11485 * go-exp.y (yyerror): Constify.
11486 (token::oper): Constify.
11487 * go-lang.h (go_yyerror): Constify.
11488 * go32-nat.c (go32_sysinfo): Constify.
11489 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11490 * guile/scm-cmd.c (cmdscm_function): Constify.
11491 * guile/scm-param.c (pascm_param_value): Constify.
11492 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11493 (h8300sx_register_name): Constify.
11494 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11495 Constify.
11496 * ia64-tdep.c (ia64_register_names): Constify.
11497 * infcmd.c (construct_inferior_arguments): Constify.
11498 (path_command, attach_post_wait): Constify.
11499 * language.c (show_range_command, show_case_command)
11500 (unk_lang_error): Constify.
11501 * language.h (language_defn::la_error)
11502 (language_defn::la_name_of_this): Constify.
11503 * linespec.c (decode_line_2): Constify.
11504 * linux-thread-db.c (thread_db_err_str): Constify.
11505 * lm32-tdep.c (lm32_register_name): Constify.
11506 * m2-exp.y (yyerror): Constify.
11507 * m2-lang.h (m2_yyerror): Constify.
11508 * m32r-tdep.c (m32r_register_names): Constify and make static.
11509 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11510 * m88k-tdep.c (m88k_register_name): Constify.
11511 * macroexp.c (appendmem): Constify.
11512 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11513 (upgrade_type, parse_external, parse_partial_symbols)
11514 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11515 (new_symbol): Constify.
11516 * memattr.c (mem_info_command): Constify.
11517 * mep-tdep.c (register_name_from_keyword): Constify.
11518 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11519 Constify.
11520 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11521 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11522 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11523 cast.
11524 (mi_execute_async_cli_command): Constify.
11525 * mips-tdep.c (mips_register_name): Constify.
11526 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11527 (am33_register_name, am33_2_register_name)
11528 * moxie-tdep.c (moxie_register_names): Constify.
11529 * nat/linux-osdata.c (osdata_type): Constify fields.
11530 * nto-tdep.c (nto_parse_redirection): Constify.
11531 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11532 (lookup_child_selector): Constify.
11533 (objc_methcall::name): Constify.
11534 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11535 (lookup_struct_typedef): Constify.
11536 * objfiles.c (pc_in_section): Constify.
11537 * objfiles.h (pc_in_section): Constify.
11538 * p-exp.y (struct token::oper): Constify.
11539 (yyerror): Constify.
11540 * p-lang.h (pascal_yyerror): Constify.
11541 * parser-defs.h (op_name_standard): Constify.
11542 (op_print::string): Constify.
11543 (exp_descriptor::op_name): Constify.
11544 * printcmd.c (print_address_symbolic): Constify.
11545 * psymtab.c (print_partial_symbols): Constify.
11546 * python/py-breakpoint.c (stop_func): Constify.
11547 (bppy_get_expression): Constify.
11548 * python/py-cmd.c (cmdpy_completer::name): Constify.
11549 (cmdpy_function): Constify.
11550 * python/py-event.c (evpy_add_attribute)
11551 (gdbpy_initialize_event_generic): Constify.
11552 * python/py-event.h (evpy_add_attribute)
11553 (gdbpy_initialize_event_generic): Constify.
11554 * python/py-evts.c (add_new_registry): Constify.
11555 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11556 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11557 * python/py-inferior.c (get_buffer): Add cast.
11558 * python/py-param.c (parm_constant::name): Constify.
11559 * python/py-unwind.c (fprint_frame_id): Constify.
11560 * python/python.c (gdbpy_parameter_value): Constify.
11561 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11562 * remote.c (memory_packet_config::name): Constify.
11563 (show_packet_config_cmd, remote_write_bytes)
11564 (remote_buffer_add_string):
11565 * reverse.c (exec_reverse_once): Constify.
11566 * rs6000-tdep.c (variant::name, variant::description): Constify.
11567 * rust-exp.y (rustyyerror): Constify.
11568 * rust-lang.c (rust_op_name): Constify.
11569 * rust-lang.h (rustyyerror): Constify.
11570 * serial.h (serial_ops::name): Constify.
11571 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11572 (sh_sh3e_register_name, sh_sh2e_register_name)
11573 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11574 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11575 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11576 (sh_sh4al_dsp_register_name): Constify.
11577 * sh64-tdep.c (sh64_register_name): Constify.
11578 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11579 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11580 * stabsread.c (patch_block_stabs, read_type_number)
11581 (ref_map::stabs, ref_add, process_reference)
11582 (symbol_reference_defined, define_symbol, define_symbol)
11583 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11584 (read_one_struct_field, read_struct_fields, read_baseclasses)
11585 (read_tilde_fields, read_struct_type, read_array_type)
11586 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11587 (read_huge_number, read_range_type, read_args, common_block_start)
11588 (find_name_end): Constify.
11589 * stabsread.h (common_block_start, define_symbol)
11590 (process_one_symbol, symbol_reference_defined, ref_add):
11591 * symfile.c (get_section_index, add_symbol_file_command):
11592 * symfile.h (get_section_index): Constify.
11593 * target-descriptions.c (tdesc_type::name): Constify.
11594 (tdesc_free_type): Add cast.
11595 * target.c (find_default_run_target):
11596 (add_deprecated_target_alias, find_default_run_target)
11597 (target_announce_detach): Constify.
11598 (do_option): Constify.
11599 * target.h (add_deprecated_target_alias): Constify.
11600 * thread.c (print_thread_info_1): Constify.
11601 * top.c (deprecated_readline_begin_hook, command_line_input):
11602 Constify.
11603 (init_main): Add casts.
11604 * top.h (handle_line_of_input): Constify.
11605 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11606 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11607 (tfind_command): Rename to ...
11608 (tfind_command_1): ... this and constify.
11609 (tfind_command): New function.
11610 (tfind_end_command, tfind_start_command): Adjust.
11611 (encode_source_string): Constify.
11612 * tracepoint.h (encode_source_string): Constify.
11613 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11614 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11615 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11616 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11617 * tui/tui-win.c (parse_scrolling_args): Constify.
11618 * tui/tui-windata.c (tui_erase_data_content): Constify.
11619 * tui/tui-windata.h (tui_erase_data_content): Constify.
11620 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11621 * tui/tui.c (tui_enable): Add cast.
11622 * utils.c (defaulted_query): Constify.
11623 (init_page_info): Add cast.
11624 (puts_debug, subset_compare): Constify.
11625 * utils.h (subset_compare): Constify.
11626 * varobj.c (varobj_format_string): Constify.
11627 * varobj.h (varobj_format_string): Constify.
11628 * vax-tdep.c (vax_register_name): Constify.
11629 * windows-nat.c (windows_detach): Constify.
11630 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11631 * xml-support.c (gdb_xml_end_element): Constify.
11632 * xml-tdesc.c (tdesc_start_reg): Constify.
11633 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11634 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11635 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11636
995816ba
PA
116372017-04-05 Pedro Alves <palves@redhat.com>
11638
11639 * proc-api.c (struct trans): Constify.
11640 (procfs_note): Constify.
11641 * proc-events.c (struct trans, syscall_table):
11642 * proc-flags.c (struct trans): Constify.
11643 * proc-utils.h (procfs_note): Constify.
11644 * proc-why.c (struct trans): Constify.
11645 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11646 (procfs_detach): Constify.
11647 * sol-thread.c (struct string_map): Constify.
11648 (td_err_string, td_state_string): Constify.
11649
3e83a920
PA
116502017-04-05 Pedro Alves <palves@redhat.com>
11651
11652 * proc-api.c (procfs_filename): Don't initialize
11653 procfs_filename.
11654 (prepare_to_trace): Assume procfs_filename is non-NULL.
11655 (_initialize_proc_api): Give procfs_filename a default value here.
11656
63160a43
PA
116572017-04-05 Pedro Alves <palves@redhat.com>
11658
11659 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11660 'cond_string' parameter.
11661 (extract_exception_regexp): Constify 'string' parameter.
11662 (catch_exception_command_1): Constify.
11663 * breakpoint.c (init_catchpoint)
11664 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11665 parameter.
11666 (ep_parse_optional_if_clause, catch_fork_command_1)
11667 (catch_exec_command_1): Constify.
11668 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11669 parameter.
11670 (ep_parse_optional_if_clause): Constify.
11671 * cli/cli-utils.c (remove_trailing_whitespace)
11672 (check_for_argument): Constify.
11673 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11674 non-const overload.
11675 (check_for_argument): Likewise.
11676
9b2eba3d
PA
116772017-04-05 Pedro Alves <palves@redhat.com>
11678
11679 * event-top.c (command_line_handler): Add cast to execute_command
11680 call.
11681 * record-btrace.c (cmd_record_btrace_bts_start)
11682 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11683 (cmd_record_btrace_start): Add cast to execute_command call.
11684 * record-full.c (record_full_goto_insn):
11685 * record.c (record_start, record_stop): Add cast to
11686 execute_command_to_string calls.
11687 (cmd_record_start): Add cast to execute_command calls.
11688
2adadf51
PA
116892017-04-05 Pedro Alves <palves@redhat.com>
11690
11691 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11692 static inline function.
11693 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11694 array and use gdb_PyArg_ParseTupleAndKeywords.
11695 * python/py-cmd.c (cmdpy_init): Likewise.
11696 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11697 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11698 (infpy_search_memory): Likewise.
11699 * python/py-objfile.c (objfpy_add_separate_debug_file)
11700 (gdbpy_lookup_objfile): Likewise.
11701 * python/py-symbol.c (gdbpy_lookup_symbol)
11702 (gdbpy_lookup_global_symbol): Likewise.
11703 * python/py-type.c (gdbpy_lookup_type): Likewise.
11704 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11705 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11706 Likewise.
11707
0d1f4ceb
PA
117082017-04-05 Pedro Alves <palves@redhat.com>
11709
11710 * python/python-internal.h (gdb_PyGetSetDef): New type.
11711 * python/py-block.c (block_object_getset)
11712 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11713 * python/py-event.c (event_object_getset)
11714 (finish_breakpoint_object_getset): Likewise.
11715 * python/py-inferior.c (inferior_object_getset): Likewise.
11716 * python/py-infthread.c (thread_object_getset): Likewise.
11717 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11718 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11719 * python/py-objfile.c (objfile_getset): Likewise.
11720 * python/py-progspace.c (pspace_getset): Likewise.
11721 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11722 Likewise.
11723 * python/py-record.c (recpy_record_getset): Likewise.
11724 * python/py-symbol.c (symbol_object_getset): Likewise.
11725 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11726 Likewise.
11727 * python/py-type.c (type_object_getset, field_object_getset):
11728 Likewise.
11729 * python/py-value.c (value_object_getset): Likewise.
11730
4d759979
PA
117312017-04-05 Pedro Alves <palves@redhat.com>
11732
11733 * python/python-internal.h (gdb_PyObject_CallMethod)
11734 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11735 New functions.
11736 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11737 (PySys_GetObject, PySys_SetPath): New macros.
11738
fdf9e36f
PA
117392017-04-05 Pedro Alves <palves@redhat.com>
11740
11741 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11742 info_osdata_command.
11743 * osdata.c (info_osdata_command): Rename to ...
11744 (info_osdata): ... this. Constify 'type' parameter, and remove
11745 the 'from_tty' parameter. Accept NULL TYPE.
11746 (info_osdata_command): New function.
11747 * osdata.h (info_osdata_command): Remove declaration.
11748 (info_osdata): New declaration.
11749
9f33b8b7
PA
117502017-04-05 Pedro Alves <palves@redhat.com>
11751
11752 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11753 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11754 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11755 parameter.
11756 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11757 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11758 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11759 parameter.
11760 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11761 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11762 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11763 (mi_cmd_file_list_exec_source_files)
11764 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11765 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11766 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11767 parameter.
11768 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11769 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11770 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11771 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11772 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11773 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11774 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11775 'command' parameter.
11776 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11777 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11778 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11779 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11780 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11781 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11782 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11783 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11784 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11785 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11786 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11787 parameter.
11788 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11789 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11790 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11791 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11792 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11793 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11794 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11795 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11796 (mi_cmd_data_list_changed_registers)
11797 (mi_cmd_data_write_register_values)
11798 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11799 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11800 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11801 (mi_cmd_list_features, mi_cmd_list_target_features)
11802 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11803 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11804 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11805 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11806 (mi_cmd_trace_frame_collected): Constify 'command'
11807 parameter.
11808 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11809 'command' parameter.
11810
67cb5b2d
PA
118112017-04-05 Pedro Alves <palves@redhat.com>
11812
11813 * ada-lang.c (ada_completer_word_break_characters): Now a const
11814 array.
11815 (ada_get_gdb_completer_word_break_characters): Constify.
11816 * completer.c (gdb_completer_command_word_break_characters)
11817 (gdb_completer_file_name_break_characters)
11818 (gdb_completer_quote_characters): Now const arrays.
11819 (get_gdb_completer_quote_characters): Constify.
11820 (set_rl_completer_word_break_characters): New function.
11821 (set_gdb_completion_word_break_characters)
11822 (complete_line_internal): Use it.
11823 * completer.h (get_gdb_completer_quote_characters): Constify.
11824 (set_rl_completer_word_break_characters): Declare.
11825 * f-lang.c (f_word_break_characters): Constify.
11826 * language.c (default_word_break_characters): Constify.
11827 * language.h (language_defn::la_word_break_characters): Constify.
11828 (default_word_break_characters): Constify.
11829 * top.c (init_main): Use set_rl_completer_word_break_characters.
11830
7a114964
PA
118312017-04-05 Pedro Alves <palves@redhat.com>
11832
11833 * aix-thread.c (aix_thread_pid_to_str)
11834 (aix_thread_extra_thread_info): Constify.
11835 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11836 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11837 (bsd_uthread_pid_to_str): Constify.
11838 * corelow.c (core_pid_to_str): Constify.
11839 * darwin-nat.c (darwin_pid_to_str): Constify.
11840 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11841 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11842 Constify.
11843 * gnu-nat.c (gnu_pid_to_str): Constify.
11844 * go32-nat.c (go32_pid_to_str): Constify.
11845 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11846 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11847 * inferior.c (inferior_pid_to_str): Constify.
11848 * linux-nat.c (linux_nat_pid_to_str): Constify.
11849 * linux-tdep.c (linux_core_pid_to_str): Constify.
11850 * linux-thread-db.c (thread_db_pid_to_str)
11851 (thread_db_extra_thread_info): Constify.
11852 * nto-tdep.c (nto_extra_thread_info): Constify.
11853 * nto-tdep.h (nto_extra_thread_info): Constify.
11854 * obsd-nat.c (obsd_pid_to_str): Constify.
11855 * procfs.c (procfs_pid_to_str): Constify.
11856 * ravenscar-thread.c (ravenscar_extra_thread_info)
11857 (ravenscar_pid_to_str): Constify.
11858 * remote-sim.c (gdbsim_pid_to_str): Constify.
11859 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11860 Constify.
11861 * sol-thread.c (solaris_pid_to_str): Constify.
11862 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11863 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11864 * target.c (default_pid_to_str, target_pid_to_str)
11865 (normal_pid_to_str, default_pid_to_str): Constify.
11866 * target.h (target_ops::to_pid_to_str)
11867 (target_ops::to_extra_thread_info): Constify.
11868 (target_pid_to_str, normal_pid_to_str): Constify.
11869 * windows-nat.c (windows_pid_to_str): Constify.
11870 * gdbarch.sh (core_pid_to_str): Constify.
11871 * target-delegates.c: Regenerate.
11872 * gdbarch.h, gdbarch.c: Regenerate.
11873
69bbf465
PA
118742017-04-05 Pedro Alves <palves@redhat.com>
11875
11876 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11877 the memory of the temporary warning_pre_print override.
11878 * utils.c (warning_pre_print): Constify.
11879 * utils.h (warning_pre_print): Constify.
11880
be47f9e8
PA
118812017-04-05 Pedro Alves <palves@redhat.com>
11882
11883 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11884 (shell_command): New function.
11885 (make_command): Use std::string.
11886 (init_cli_cmds): Register shell_command instead of shell_escape.
11887
bde6261a
PA
118882017-04-05 Pedro Alves <palves@redhat.com>
11889
11890 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11891 * tracepoint.c (default_collect): Don't initialize.
11892
b38ef47f
PA
118932017-04-05 Pedro Alves <palves@redhat.com>
11894
11895 * macroexp.c (macro_buffer::shared): Now a bool.
11896 (init_buffer): Update.
11897 (init_shared_buffer): Constify 'addr' parameter.
11898 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11899 casts.
11900
f995bbe8
PA
119012017-04-05 Pedro Alves <palves@redhat.com>
11902
11903 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11904 * disasm.c (set_disassembler_options): Constify local.
11905 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11906
4a596fe2
SDJ
119072017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11908
11909 PR gdb/21352
11910 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11911 option.
11912
2cad08ea
YQ
119132017-04-05 Yao Qi <yao.qi@linaro.org>
11914
11915 * frame.c (frame_unwind_register_unsigned): Call
11916 frame_unwind_register_value.
11917
55a98976
YQ
119182017-04-05 Yao Qi <yao.qi@linaro.org>
11919
11920 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11921 Use gdb_test_multiple, and don't match anchor.
11922
4ac40124
PA
119232017-04-05 Pedro Alves <palves@redhat.com>
11924
11925 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11926 (Write After Approval): Remove Simon Marchi.
11927
c053b654
PA
119282017-04-05 Pedro Alves <palves@redhat.com>
11929
11930 * common/gdb_optional.h (optional::optional): Make constexpr and
11931 initialize m_dummy.
11932
4c7bf4f9
JB
119332017-04-04 John Baldwin <jhb@FreeBSD.org>
11934
11935 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11936 (amd64fbsd_jmp_buf_reg_offset): Remove.
11937 (amd64fbsd_supply_uthread): Remove function.
11938 (amd64fbsd_collect_uthread): Remove function.
11939 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11940 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11941 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11942 (fbsd-nat.c): Update comment.
11943 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11944 (i386fbsd_jmp_buf_reg_offset): Remove.
11945 (i386fbsd_supply_uthread): Remove function.
11946 (i386fbsd_collect_uthread): Remove function.
11947 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11948
1e1a8bef
JB
119492017-04-04 John Baldwin <jhb@FreeBSD.org>
11950
11951 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11952 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11953 * NEWS: Mention that support for FreeBSD/alpha was removed.
11954 * alpha-fbsd-tdep.c: Delete file.
11955 * config/alpha/fbsd.mh: Delete file.
11956 * configure.host: Delete alpha*-*-freebsd* and
11957 alpha*-*-kfreebsd*-gnu.
11958 * configure.tgt: Delete alpha*-*-freebsd* and
11959 alpha*-*-kfreebsd*-gnu.
11960
49907934
JB
119612017-04-04 John Baldwin <jhb@FreeBSD.org>
11962
11963 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11964 amd64bsd_store_inferior_registers): Use ptid from regcache.
11965
6f77053d
PA
119662017-04-04 Pedro Alves <palves@redhat.com>
11967
11968 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11969 data fields, make them private and add "m_" prefixes.
11970 (lnp_state_machine::lnp_state_machine): New ctor.
11971 (record_line, check_line_address, handle_set_discriminator)
11972 (handle_set_address, handle_advance_pc, handle_special_opcode)
11973 (handle_advance_line, handle_set_file, handle_negate_stmt)
11974 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11975 (end_sequence, advance_line): New methods.
11976 (m_gdbarch, m_record_lines_p): New fields.
11977 (lnp_reader_state): Delete.
11978 (dwarf_record_line): Rename to ...
11979 (lnp_state_machine::record_line): ... adjust.
11980 (init_lnp_state_machine): Delete.
11981 (lnp_state_machine::lnp_state_machine): New.
11982 (check_line_address): Rename to ...
11983 (lnp_state_machine::check_line_address): This.
11984 (dwarf_decode_lines_1): Remove reference to "reader_state".
11985 Adjust lnp_state_machine having a non-default ctor. Use bool.
11986 State machine internal state manipulation moved to
11987 lnp_state_machine methods.
11988
9c541725
PA
119892017-04-04 Pedro Alves <palves@redhat.com>
11990
11991 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11992 unittests/offset-type-selftests.c.
11993 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11994 * common/offset-type.h: New file.
11995 * common/preprocessor.h: New file.
11996 * common/traits.h: New file.
11997 * common/valid-expr.h: New file.
11998 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11999 sect_offset and cu_offset strong typedefs throughout.
12000 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12001 typedefs throughout.
12002 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12003 sect_offset and cu_offset strong typedefs throughout.
12004 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12005 typedefs throughout.
12006 * gdbtypes.h: Include "common/offset-type.h".
12007 (cu_offset): Now an offset type (strong typedef) instead of a
12008 struct.
12009 (sect_offset): Likewise.
12010 (union call_site_parameter_u): Rename "param_offset" field to
12011 "param_cu_off".
12012 * unittests/offset-type-selftests.c: New file.
12013
ecfb656c
PA
120142017-04-04 Pedro Alves <palves@redhat.com>
12015
12016 * common/underlying.h: New file.
12017 * dwarf2read.c: Include "common/gdb_optional.h" and
12018 "common/underlying.h".
12019 (dir_index, file_name_index): New types.
12020 (file_entry): Use them.
12021 (file_entry::include): Use to_underlying.
12022 (line_header::add_file_name): Use dir_index.
12023 (read_formatted_entries): Use gdb::optional. Read form before
12024 writting to file_entry.
12025 (dwarf_decode_line_header): Use dir_index.
12026 (lnp_state_machine::current_file): Use to_underlying.
12027 (lnp_state_machine::file): Change type to file_name_index.
12028 (dwarf_record_line): Use to_underlying.
12029 (init_lnp_state_machine): Use file_name_index.
12030 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12031
d194f1fe
PA
120322017-04-04 Pedro Alves <palves@redhat.com>
12033
12034 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12035 operator bool, has_value and get methods.
12036
fff8551c
PA
120372017-04-04 Pedro Alves <palves@redhat.com>
12038
12039 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12040 fields.
12041 (line_header): Initialize all data fields. Change type of
12042 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12043 Change type of include_dirs to std::vector<const char *>. Remove
12044 num_include_dirs, include_dirs_size. Change type of file_names to
12045 std::vector<file_entry>. Remove num_file_names, file_names_size.
12046 (line_header::line_header): New.
12047 (line_header::add_include_dir, line_header::add_file_name): New
12048 methods.
12049 (line_header::include_dir_at): Remove NULL check.
12050 (line_header::file_name_at): Add const overload.
12051 (line_header_up): New unique_ptr typedef.
12052 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12053 std::vector. Remove free_line_header call.
12054 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12055 free_line_header call.
12056 (free_cu_line_header): Delete.
12057 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12058 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12059 Adjust to use std::vector.
12060 (free_line_header): Delete.
12061 (free_line_header_voidp): Use delete.
12062 (add_include_dir): Replace with ...
12063 (line_header::add_include_dir): ... this method. Use std::vector.
12064 (add_file_name): Replace with ...
12065 (line_header::add_file_name): ... this method. Use std::vector.
12066 (add_include_dir_stub): Delete.
12067 (read_formatted_entries): Remove memset.
12068 (dwarf_decode_line_header): Return a line_header_up instead of a
12069 raw pointer. Remove cleanup handling. Pass lambdas to
12070 read_formatted_entries. Adjust to use line_header methods.
12071 (dwarf_decode_lines_1): Adjust to use line_header methods.
12072 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12073 use std::vector.
12074
d62a8ae2
SM
120752017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12076
12077 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12078 instead of struct ptid.
12079
db3a1dc7
AH
120802017-05-04 Alan Hayward <alan.hayward@arm.com>
12081
12082 * frame.c (get_frame_register_bytes): Unwind using value.
12083 (put_frame_register_bytes): Likewise.
12084
b1b45502
IB
120852017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12086
12087 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12088 aggregate-like.
12089
ec13808e
JK
120902017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12091
12092 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12093
12316564
YQ
120942017-03-29 Yao Qi <yao.qi@linaro.org>
12095
12096 * gdbthread.h (struct thread_info): Declare constructor and
12097 destructor. Add some in-class member initializers.
12098 * thread.c (free_thread): Remove.
12099 (init_thread_list): Call delete instead of free_thread.
12100 (new_thread): Call thread_info constructor.
12101 (thread_info::thread_info): New function.
12102 (thread_info::~thread_info): New function.
12103 (delete_thread_1): Call delete instead of free_thread.
12104 (make_cleanup_restore_current_thread): Move tp and frame to
12105 inner block.
12106
fe5f7374
AK
121072017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12108
12109 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12110 (arc_skip_prologue): Likewise.
12111 (arc_make_frame_cache): Likewise.
12112 (arc_pv_get_operand): New function.
12113 (arc_is_in_prologue): Likewise.
12114 (arc_analyze_prologue): Likewise.
12115 (arc_print_frame_cache): Likewise.
12116 (MAX_PROLOGUE_LENGTH): New constant.
12117
eea78757
AK
121182017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12119
12120 * configure.tgt: Add arc-insn.o.
12121 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12122 (dump_arc_instruction_command): New function.
12123 (arc_fprintf_disasm): Likewise.
12124 (arc_disassemble_info): Likewise.
12125 (arc_insn_get_operand_value): Likewise.
12126 (arc_insn_get_operand_value_signed): Likewise.
12127 (arc_insn_get_memory_base_reg): Likewise.
12128 (arc_insn_get_memory_offset): Likewise.
12129 (arc_insn_get_branch_target): Likewise.
12130 (arc_insn_dump): Likewise.
12131 (arc_insn_get_linear_next_pc): Likewise.
12132 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12133 (arc_disassemble_info): Likewise.
12134 (arc_insn_get_branch_target): Likewise.
12135 (arc_insn_get_linear_next_pc): Likewise.
12136 * NEWS: Mention new "maint print arc arc-instruction".
12137
3be78afd
AK
121382017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12139
12140 * arc-tdep (maintenance_print_arc_list): New variable.
12141 (maintenance_print_arc_command): New function.
12142
296ec4fa
AK
121432017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12144
12145 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12146 Add "limm" and "reserved".
12147 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12148 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12149 * arc-tdep.h (arc_regnum): Likewise.
12150
f74f865e
MF
121512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12152
12153 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12154 for THREADPTR register.
12155 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12156 register.
12157 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12158 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12159 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12160
0d0bf81a
MF
121612017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12162
12163 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12164 registers above gdbarch_num_regs (gdbarch) as privileged in
12165 call0 ABI.
12166
0ce4291e
MF
121672017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12168
12169 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12170 for a single specified register or for all registers in
12171 a0_base..a0_base + C0_NREGS range.
12172 (supply_gregset_reg): Call regcache_raw_supply for a single
12173 specified register or for all registers in a0_base..a0_base +
12174 C0_NREGS range.
12175
c56054f9
MF
121762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12177
12178 * arch/xtensa.h (C0_NREGS): Add definition.
12179 * xtensa-tdep.c (C0_NREGS): Remove definition.
12180
a4398628
MF
121812017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12182
12183 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12184 Drop xtensa_default_isa initialization.
12185 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12186
8c43009f
PA
121872017-03-27 Pedro Alves <palves@redhat.com>
12188
12189 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12190 (file_entry::include_dir): New method.
12191 (line_header::include_dir_at, line_header::file_name_at): New
12192 methods.
12193 (setup_type_unit_groups, setup_type_unit_groups)
12194 (psymtab_include_file_name): Simplify using the new methods.
12195 (lnp_state_machine) <the_line_header>: New field.
12196 <file>: Add comment.
12197 (lnp_state_machine::current_file): New method.
12198 (dwarf_record_line): Simplify using the new methods.
12199 (init_lnp_state_machine): Initialize the "the_line_header" field.
12200 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12201 Simplify using the new methods.
12202
a7e80b9e
PA
122032017-03-27 Pedro Alves <palves@redhat.com>
12204
12205 * cp-name-parser.y (make_empty): Delete.
12206 (demangler_special, nested_name, ptr_operator, array_indicator)
12207 (direct_declarator, declarator_1): Use fill_comp instead of
12208 make_empty.
12209
21047726
PA
122102017-03-27 Pedro Alves <palves@redhat.com>
12211
12212 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12213 to ATTRIBUTE_PRINTF.
12214 * solib-target.c (library_list_start_list): Print "string" not
12215 "version".
12216 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12217 gdb_xml_error call.
12218
d721ba37
PA
122192017-03-27 Pedro Alves <palves@redhat.com>
12220
12221 * dwarf2read.c (struct file_and_directory): New.
12222 (dwarf2_get_dwz_file): Adjust to use std::string.
12223 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12224 (find_file_and_directory): Adjust to return a file_and_directory
12225 object.
12226 (read_file_scope): Adjust to use file_and_directory. Remove
12227 make_cleanup/do_cleanups calls.
12228 (open_and_init_dwp_file): Adjust to use std::string. Remove
12229 make_cleanup/do_cleanups calls.
12230 * python/python.c (do_start_initialization): Adjust to ldirname
12231 returning a std::string.
12232 * utils.c (ldirname): Now returns a std::string.
12233 * utils.h (ldirname): Change return type to std::string.
12234 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12235 returning a std::string.
12236 * xml-tdesc.c (file_read_description_xml): Likewise.
12237
ed771251
AH
122382017-03-24 Alan Hayward <alan.hayward@arm.com>
12239
12240 * regcache.c (regcache_debug_print_register): New function.
12241 * regcache.h (regcache_debug_print_register): New declaration.
12242 * target.c (debug_print_register): Remove.
12243 (target_fetch_registers): Call regcache_debug_print_register.
12244 (target_store_registers): Likewise.
12245
568c1b9f
PB
122462017-03-24 Pádraig Brady <pbrady@fb.com>
12247
12248 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12249 reference beyond the 'lh->include_dirs' array before accessing to
12250 it.
12251 (psymtab_include_file_name): Likewise.
12252 (dwarf_decode_lines_1): Likewise.
12253 (dwarf_decode_lines): Likewise.
12254 (file_file_name): Likewise.
12255
3e00d44f
SM
122562017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12257
12258 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12259 inferior_ptid.
12260 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12261 ps_lsetfpregs): Likewise.
12262 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12263 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12264 ps_lsetfpregs): Likewise.
12265 * target.c (target_fetch_registers, target_store_registers):
12266 Remove asserts.
12267
077ae656
AH
122682017-03-23 Alan Hayward <alan.hayward@arm.com>
12269
12270 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12271
1e2b521d
YQ
122722017-03-23 Yao Qi <yao.qi@linaro.org>
12273
12274 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12275 (_initialize_aarch64_tdep): Register it.
12276 (aarch64_record_load_store): Handle PRFM instruction.
12277 (aarch64_process_record_test): New function.
12278
33877125
YQ
122792017-03-23 Yao Qi <yao.qi@linaro.org>
12280
12281 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12282 indentation.
12283
a0eef940
YQ
122842017-03-23 Yao Qi <yao.qi@linaro.org>
12285
12286 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12287
3f2a3564
PR
122882017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12289
12290 python/python.c (do_start_initialization): Fix memory leak.
12291
b67aeab0
SM
122922017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12293
12294 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12295 using get_ptrace_pid.
12296 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12297 inferior_ptid.
12298 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12299 inferior_ptid instead of pid.
12300
ffdbe864
YQ
123012017-03-22 Yao Qi <yao.qi@linaro.org>
12302
12303 * aarch64-tdep.c: Wrap locally used classes in anonymous
12304 namespace.
12305 * arm-tdep.c: Likewise.
12306 * linespec.c: Likewise.
12307 * ui-out.c: Likewise.
12308
9d736fbf
JG
123092017-03-22 Jonah Graham <jonah@kichwacoders.com>
12310
12311 PR gdb/19637
12312 * python/lib/gdb/printer/bound_registers.py: Import sys.
12313
3de88e9a
SM
123142017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12315
12316 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12317 windows_thread_info parameter and use it instead of
12318 current_thread.
12319 (windows_fetch_inferior_registers): Don't set current_thread,
12320 pass the thread to do_windows_fetch_inferior_registers. Use
12321 ptid from regcache instead of inferior_ptid.
12322 (do_windows_store_inferior_registers): Add windows_thread_info
12323 parameter and use it instead of current_thread.
12324 (windows_store_inferior_registers): Don't set current_thread,
12325 pass the thread to do_windows_store_inferior_registers. Use
12326 ptid from regcache instead of inferior_ptid.
12327
0e7b8f61
SM
123282017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12329
12330 * ser-mingw.c (ser_windows_raw): Remove reference to
12331 struct serial::current_timeout.
12332
5badf10a
IR
123332017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12334
12335 PR tdep/20928
12336 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12337 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12338 (sparc64_fsr_type): Fix %fsr decoding.
12339
cee59b3f
TW
123402017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12341
12342 * python/py-record-btrace.c (btpy_insn_data): Change return type
12343 for Python 2.
12344
639a9038
SM
123452017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12346
12347 * spu-linux-nat.c (spu_fetch_inferior_registers,
12348 spu_store_inferior_registers): Use ptid from regcache, set and
12349 restore inferior_ptid.
12350 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12351 Likewise.
12352
bcc0c096
SM
123532017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12354
12355 * i386-linux-nat.c (fetch_register, store_register,
12356 i386_linux_fetch_inferior_registers,
12357 i386_linux_store_inferior_registers): Use ptid from regcache.
12358 * ia64-linux-nat.c (ia64_linux_fetch_register,
12359 ia64_linux_store_register): Likewise.
12360 * inf-ptrace.c (inf_ptrace_fetch_register,
12361 inf_ptrace_store_register): Likewise.
12362 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12363 m32r_linux_store_inferior_registers): Likewise.
12364 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12365 m68kbsd_store_inferior_registers): Likewise.
12366 * m68k-linux-nat.c (fetch_register, store_register,
12367 m68k_linux_fetch_inferior_registers,
12368 m68k_linux_store_inferior_registers): Likewise.
12369 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12370 m88kbsd_store_inferior_registers): Likewise.
12371 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12372 mips_fbsd_store_inferior_registers): Likewise.
12373 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12374 mips64_linux_regsets_store_registers): Likewise.
12375 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12376 mipsnbsd_store_inferior_registers): Likewise.
12377 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12378 mips64obsd_store_inferior_registers): Likewise.
12379 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12380 Likewise.
12381 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12382 ppcfbsd_store_inferior_registers): Likewise.
12383 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12384 ppc_linux_store_inferior_registers): Likewise.
12385 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12386 ppcnbsd_store_inferior_registers): Likewise.
12387 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12388 ppcobsd_store_registers): Likewise.
12389 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12390 Likewise.
12391 * ravenscar-thread.c (ravenscar_fetch_registers,
12392 ravenscar_store_registers, ravenscar_prepare_to_store):
12393 Likewise.
12394 * record-btrace.c (record_btrace_fetch_registers,
12395 record_btrace_store_registers, record_btrace_prepare_to_store):
12396 Likewise.
12397 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12398 Lookup inferior using ptid from regcache, instead of
12399 current_inferior.
12400 * remote.c (remote_fetch_registers, remote_store_registers): Use
12401 ptid from regcache.
12402 * rs6000-nat.c (fetch_register, store_register): Likewise.
12403 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12404 s390_linux_store_inferior_registers): Likewise.
12405 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12406 shnbsd_store_inferior_registers): Likewise.
12407 * sol-thread.c (sol_thread_fetch_registers,
12408 sol_thread_store_registers): Likewise.
12409 * sparc-nat.c (sparc_fetch_inferior_registers,
12410 sparc_store_inferior_registers): Likewise.
12411 * tilegx-linux-nat.c (fetch_inferior_registers,
12412 store_inferior_registers): Likewise.
12413 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12414 vaxbsd_store_inferior_registers): Likewise.
12415 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12416 store_xtregs): Likewise.
12417
c0f55cc6
AV
124182017-03-20 Artemiy Volkov <artemiyv@acm.org>
12419
12420 PR gdb/14441
12421 * NEWS: Mention support for rvalue references in GDB and python.
12422 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12423 supports both lvalue and rvalue references.
12424
15c0a2a9
AV
124252017-03-20 Artemiy Volkov <artemiyv@acm.org>
12426
12427 PR gdb/14441
12428 * gdbtypes.c (rank_one_type): Implement overloading
12429 resolution rules regarding rvalue references.
12430
aa006118
AV
124312017-03-20 Artemiy Volkov <artemiyv@acm.org>
12432
12433 PR gdb/14441
12434 * aarch64-tdep.c (aarch64_type_align)
12435 (aarch64_extract_return_value, aarch64_store_return_value): Change
12436 lvalue reference type checks to general reference type checks.
12437 * amd64-tdep.c (amd64_classify): Likewise.
12438 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12439 Likewise.
12440 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12441 (arm_store_return_value): Likewise.
12442 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12443 * c-typeprint.c (c_print_type): Likewise.
12444 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12445 (cplus_number_of_children, cplus_describe_child): Likewise.
12446 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12447 * completer.c (expression_completer): Likewise.
12448 * cp-support.c (make_symbol_overload_list_adl_namespace):
12449 Likewise.
12450 * darwin-nat-info.c (info_mach_region_command): Likewise.
12451 * dwarf2loc.c (entry_data_value_coerce_ref)
12452 (value_of_dwarf_reg_entry): Likewise.
12453 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12454 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12455 Likewise.
12456 * findvar.c (extract_typed_address, store_typed_address):
12457 Likewise.
12458 * gdbtypes.c (rank_one_type): Likewise.
12459 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12460 * infcall.c (value_arg_coerce): Likewise.
12461 * language.c (pointer_type): Likewise.
12462 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12463 Likewise.
12464 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12465 * mn10300-tdep.c (mn10300_type_align): Likewise.
12466 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12467 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12468 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12469 Likewise.
12470 * printcmd.c (print_formatted, x_command): Likewise.
12471 * python/py-type.c (typy_get_composite, typy_template_argument):
12472 Likewise.
12473 * python/py-value.c (valpy_referenced_value)
12474 (valpy_get_dynamic_type, value_has_field): Likewise.
12475 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12476 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12477 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12478 * spu-tdep.c (spu_scalar_value_p): Likewise.
12479 * symtab.c (lookup_symbol_aux): Likewise.
12480 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12481 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12482 Likewise.
12483 * valops.c (value_cast_pointers, value_cast)
12484 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12485 (value_struct_elt, value_struct_elt_bitpos)
12486 (value_find_oload_method_list, find_overload_match)
12487 (value_rtti_indirect_type): Likewise.
12488 * valprint.c (val_print_scalar_type_p, generic_val_print):
12489 Likewise.
12490 * value.c (value_actual_type, value_as_address, unpack_long)
12491 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12492 (coerce_ref): Likewise.
12493 * varobj.c (varobj_get_value_type): Likewise.
12494
3fcf899d
AV
124952017-03-20 Artemiy Volkov <artemiyv@acm.org>
12496
12497 PR gdb/14441
12498 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12499 table of constants.
12500 * python/lib/gdb/command/explore.py: Support exploring values
12501 of rvalue reference types.
12502 * python/lib/gdb/types.py: Implement get_basic_type() for
12503 rvalue reference types.
12504 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12505 constant.
12506 * python/py-value.c (valpy_getitem): Add an rvalue reference
12507 check.
12508 (valpy_reference_value): Add new parameter "refcode".
12509 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12510 New wrappers for valpy_reference_value().
12511 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12512 (gdbpy_invoke_xmethod): Likewise.
12513
4297a3f0
AV
125142017-03-20 Artemiy Volkov <artemiyv@acm.org>
12515
12516 PR gdb/14441
12517 * dwarf2read.c (process_die, read_type_die_1): Handle the
12518 DW_TAG_rvalue_reference_type DIE.
12519 (read_tag_reference_type): Add new parameter "refcode".
12520
e1cb3213
AV
125212017-03-20 Artemiy Volkov <artemiyv@acm.org>
12522
12523 PR gdb/14441
12524 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12525 (c_type_print_modifier, c_type_print_varspec_suffix)
12526 (c_type_print_base): Support printing rvalue reference types.
12527 * c-valprint.c (c_val_print, c_value_print): Support printing
12528 rvalue reference values.
12529
e4347c89
AV
125302017-03-20 Artemiy Volkov <artemiyv@acm.org>
12531
12532 PR gdb/14441
12533 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12534 typename.
12535 * cp-support.c (replace_typedefs): Handle
12536 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12537 * python/py-type.c (typy_lookup_type): Likewise.
12538
53cc15f5
AV
125392017-03-20 Artemiy Volkov <artemiyv@acm.org>
12540
12541 PR gdb/14441
12542 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12543 * parse.c (insert_type): Change assert statement.
12544 (follow_types): Handle rvalue reference types.
12545 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12546 constant.
12547
a65cfae5
AV
125482017-03-20 Artemiy Volkov <artemiyv@acm.org>
12549
12550 PR gdb/14441
12551 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12552 value_ref() interface.
12553 * c-valprint.c (c_value_print): Likewise.
12554 * infcall.c (value_arg_coerce): Likewise.
12555 * python/py-value.c (valpy_reference_value): Likewise.
12556 * valops.c (value_cast, value_reinterpret_cast)
12557 (value_dynamic_cast, typecmp): Likewise.
12558 (value_ref): Parameterize by kind of return value reference type.
12559 * value.h (value_ref): Add new parameter "refcode".
12560
3b224330
AV
125612017-03-20 Artemiy Volkov <artemiyv@acm.org>
12562
12563 PR gdb/14441
12564 * dwarf2read.c (read_tag_reference_type): Use
12565 lookup_lvalue_reference_type() instead of lookup_reference_type().
12566 * eval.c (evaluate_subexp_standard): Likewise.
12567 * f-exp.y: Likewise.
12568 * gdbtypes.c (make_reference_type, lookup_reference_type):
12569 Generalize with rvalue reference types.
12570 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12571 convenience wrappers for lookup_reference_type().
12572 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12573 reference kind parameter.
12574 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12575 wrappers for lookup_reference_type().
12576 * guile/scm-type.c (gdbscm_type_reference): Use
12577 lookup_lvalue_reference_type() instead of lookup_reference_type().
12578 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12579 * parse.c (follow_types): Likewise.
12580 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12581 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12582 Likewise.
12583 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12584 (gdbpy_invoke_xmethod): Likewise.
12585 * stabsread.c: Provide extra argument to make_reference_type()
12586 call.
12587 * valops.c (value_ref, value_rtti_indirect_type): Use
12588 lookup_lvalue_reference_type() instead of lookup_reference_type().
12589
f9aeb8d4
AV
125902017-03-20 Artemiy Volkov <artemiyv@acm.org>
12591
12592 PR gdb/14441
12593 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12594 (TYPE_IS_REFERENCE): New macro.
12595 (struct type): Add rvalue_reference_type field.
12596 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12597
51457a05
MAL
125982017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12599
12600 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12601 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12602 New function definition.
12603 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12604 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12605 New function declaration.
12606 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12607 * mi/mi-interp.h: New file.
12608 * solib.c (info_sharedlibrary_command): Replace for loop with
12609 ALL_SO_LIBS macro
12610 * solib.h (update_solib_list): New function declaration.
12611 (so_list_head): Move macro.
12612 * solist.h (ALL_SO_LIBS): New macro.
12613
e696b3ad
MAL
126142017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12615
12616 * infcmd.c (post_create_inferior): Remove unused argument in
12617 call to solib_add.
12618 * remote.c (remote_start_remote): Likewise.
12619 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12620 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12621 (enable_break): Likewise.
12622 * solib.c (update_solib_list): Remove unused target argument
12623 and its documentation.
12624 (solib_add): Remove unused target argument. Remove unused
12625 argument in call to update_solib_list.
12626 (info_sharedlibrary_command): Remove unused argument in call
12627 to update_solib_list.
12628 (sharedlibrary_command): Remove unused argument in call to
12629 solib_add.
12630 (handle_solib_event): Likewise.
12631 (reload_shared_libraries): Likewise.
12632 * solib.h (solib_add): Remove unused target argument.
12633
dcb84eda
AA
126342017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12635
12636 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12637 (s390_displaced_step_fixup): Cover relative branches with the
12638 default fixup handling. This fixes lack of support for some
12639 relative branch instructions.
12640
d9cb6cdc
SM
126412017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12642
12643 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12644 ptid from regcache.
12645
1afaf9f4
SM
126462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12647
12648 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12649 i386_darwin_store_inferior_registers): Use ptid from regcache.
12650
aac12e24
SM
126512017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12652
12653 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12654 i386bsd_store_inferior_registers): Use ptid from regcache.
12655
bbe1eef1
SM
126562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12657
12658 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12659 hppaobsd_store_registers): Use ptid from regcache.
12660
10799020
SM
126612017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12662
12663 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12664 hppanbsd_store_registers): Use ptid from regcache.
12665
00204cf7
SM
126662017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12667
12668 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12669 from regcache. Use get_ptrace_pid.
12670
11a33714
SM
126712017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12672
12673 * corelow.c (get_core_register_section): Use ptid from regcache,
12674 update doc.
12675
317cd492
SM
126762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12677
12678 * bsd-uthread.c (bsd_uthread_fetch_registers,
12679 bsd_uthread_store_registers): Use ptid from regcache, set and
12680 restore inferior_ptid.
12681
9ac8a7c2
SM
126822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12683
12684 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12685 fetch_fp_regs, store_register, store_regs, store_fp_register,
12686 store_fp_regs): Use ptid from regcache.
12687
4ac4bb6a
SM
126882017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12689
12690 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12691 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12692 store_vfp_regs): Use ptid from regcache.
12693
9bcbdca8
PA
126942017-03-17 Pedro Alves <palves@redhat.com>
12695
12696 PR remote/21188
12697 * ser-base.c (ser_base_wait_for): Add comment.
12698 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12699 version.
12700 * ser-unix.c (hardwire_raw): Remove reference to
12701 scb->current_timeout.
12702 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12703 (hardwire_ops): Install ser_base_readchar instead of
12704 hardwire_readchar.
12705 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12706 Remove fields.
12707
7503099f
JG
127082017-03-17 Jonah Graham <jonah@kichwacoders.com>
12709
12710 PR gdb/19637
12711 * python/lib/gdb/printer/bound_registers.py: Add support for
12712 Python 3.
12713
7942e96e
AA
127142017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12715
12716 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12717 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12718 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12719 byte_offset to subobj_byte_offset. Fix the handling of
12720 DWARF_VALUE_STACK on big-endian targets when coming via an
12721 implicit pointer.
12722 (dwarf2_evaluate_loc_desc): Adjust call to
12723 dwarf2_evaluate_loc_desc_full.
12724 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12725 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12726
ba14f379
YQ
127272017-03-16 Yao Qi <yao.qi@linaro.org>
12728
12729 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12730 and REVSH instructions.
12731
b121eeb9
YQ
127322017-03-16 Yao Qi <yao.qi@linaro.org>
12733
12734 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12735 (arm_record_test): Declare.
12736 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12737 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12738 align with the manual.
12739 (thumb_record_misc): Adjust the code order to align with the
12740 manual.
12741 (thumb2_record_decode_insn_handler): Fix instruction matching.
12742 (instruction_reader_thumb): New class.
12743 (arm_record_test): New function.
12744
728a7913
YQ
127452017-03-16 Yao Qi <yao.qi@linaro.org>
12746
12747 * arm-tdep.c (abstract_memory_reader): New class.
12748 (instruction_reader): New class.
12749 (extract_arm_insn): Add argument 'reader'. Callers updated.
12750 (decode_insn): Likewise.
12751
34b43320
DE
127522017-03-16 Doug Evans <dje@google.com>
12753
a7c0469f
DE
12754 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12755 member. Change type of TYPE member to SCM. All uses updated.
12756 (lsscm_make_lazy_string_smob): Add assert.
12757 (lsscm_make_lazy_string): Flag bad length values.
12758 (lsscm_elt_type): New function.
12759 (gdbscm_lazy_string_to_value): Rewrite to use
12760 lsscm_safe_lazy_string_to_value.
12761 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12762 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12763 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12764 in incoming type.
12765 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12766 * guile/scm-type.c (tyscm_scm_to_type): New function.
12767
127682017-03-15 Doug Evans <dje@google.com>
12769
34b43320
DE
12770 PR python/17728, python/18439, python/18779
12771 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12772 member. Change type of TYPE member to PyObject *. All uses updated.
12773 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12774 (gdbpy_create_lazy_string_object): Flag bad length values.
12775 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12776 Handle typedefs in incoming type.
12777 (stpy_lazy_string_elt_type): New function.
12778 (gdbpy_extract_lazy_string): Call it.
12779 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12780 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12781 typedefs in incoming type.
12782
a3a5fecc
DE
127832017-03-16 Doug Evans <dje@google.com>
12784
12785 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12786 * guile/scm-type.c (tyscm_scm_to_type): New function.
12787
28f1c605
JW
127882017-03-16 Jiong Wang <jiong.wang@arm.com>
12789
12790 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12791 "ULONGEST" for "skip".
12792
87c336f6
AA
127932017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12794
12795 PR gdb/21220
12796 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12797 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12798 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12799 over ptrace peek/poke until end of buffer or error.
12800
cf81cf60
SM
128012017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12802
12803 * parse.c (length_of_subexp): Make static.
12804 * parser-defs.h (length_of_subexp): Remove.
12805
a379284a
AA
128062017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12807
12808 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12809 as well.
12810
8a6200ba
PA
128112017-03-14 Pedro Alves <palves@redhat.com>
12812
12813 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12814 (main): Use std::unique_ptr. Remove calls to
12815 cp_demangled_name_parse_free.
12816
f79ec206
SM
128172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12818
12819 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12820 alphabsd_store_inferior_registers): Use regcache->ptid instead
12821 of inferior_ptid.
12822
edb5fb00
SM
128232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12824
12825 * aix-thread.c (aix_thread_fetch_registers,
12826 aix_thread_store_registers): Use regcache->ptid instead of
12827 inferior_ptid.
12828
55119686
SM
128292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12830
12831 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12832 store_gregs_to_thread, fetch_fpregs_from_thread,
12833 store_fpregs_to_thread): Use regcache->ptid instead of
12834 inferior_ptid.
12835
6a06fbb7
SM
128362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12837
12838 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12839 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12840 instead of inferior_ptid.
12841
c6386875
SM
128422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12843
12844 * target.c (target_fetch_registers, target_store_registers): Add
12845 assert.
12846
ddaaf0fb
SM
128472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12848
12849 * regcache.h (regcache_get_ptid): New function.
12850 * regcache.c (regcache_get_ptid): New function.
12851
b9da89d1 128522017-03-13 Mark Wielaard <mark@klomp.org>
12853
12854 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12855
5f4d1085
KS
128562017-03-10 Keith Seitz <keiths@redhat.com>
12857
12858 PR c++/8218
12859 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12860
c65d6b55
PA
128612017-03-08 Pedro Alves <palves@redhat.com>
12862
12863 PR gdb/18360
12864 * infrun.c (start_step_over, do_target_resume, resume)
12865 (restart_threads): Assert we're not resuming a thread that is
12866 meant to be stopped.
12867 (infrun_thread_stop_requested_callback): Delete.
12868 (infrun_thread_stop_requested): If the thread is internally
12869 stopped, queue a pending stop event and clear the thread's
12870 inline-frame state.
12871 (handle_stop_requested): New function.
12872 (handle_syscall_event, handle_inferior_event_1): Use
12873 handle_stop_requested.
12874 (handle_stop_requested): New function.
12875 (handle_signal_stop): Set the thread's stop_signal here instead of
12876 at caller.
12877 (finish_step_over): Clear step over info unconditionally.
12878 (handle_signal_stop): If the user had interrupted the event
12879 thread, consider the stop a random signal.
12880 (handle_signal_stop) <signal arrived while stepping over
12881 breakpoint>: Don't restart threads here.
12882 (stop_waiting): Don't clear step-over info here.
12883
15c22686
PA
128842017-03-08 Pedro Alves <palves@redhat.com>
12885
12886 PR 21206
12887 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12888 goes to argument 2, not 1.
12889
6e5d74e7
PA
128902017-03-08 Pedro Alves <palves@redhat.com>
12891
12892 PR cli/21218
12893 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12894 display_gdb_prompt.
12895 (command_line_input): Add comment.
12896
9753a2f6
PA
128972017-03-08 Pedro Alves <palves@redhat.com>
12898
12899 PR tui/21216
12900 * tui/tui-file.c (tui_file::write): New.
12901 * tui/tui-file.h (tui_file): Override "write".
12902 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12903 factored out from ...
12904 (tui_puts): ... here.
12905 (tui_putc): Use them.
12906 (tui_write): New function.
12907 * tui/tui-io.h (tui_write): Declare.
12908
1672e0d9
SDJ
129092017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12910
12911 * Makefile.in (SFILES): Replace "environ.c" with
12912 "common/environ.c".
12913 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12914 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12915 to...
12916 * common/environ.c: ... here.
12917 * environ.h: Moved to...
12918 * common/environ.h: ... here.
12919
f7bb4e3a
PB
129202017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12921
12922 * gdbarch.sh (pstring_ptr): New static function.
12923 (gdbarch_disassembler_options): Use it.
12924 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12925 not valid_disassembler_option->name.
12926 * gdbarch.c: Regenerate.
12927
e45ced6c
PB
129282017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12929
12930 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12931
5f6fd321
PA
129322017-03-07 Pedro Alves <palves@redhat.com>
12933
12934 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12935
6dbb839a 129362017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
12937
12938 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12939 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12940 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 12941 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 12942
d274ecf4
SM
129432017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12944
12945 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12946
df97be55
SM
129472017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12948
12949 * remote.c (remote_add_target_side_commands): Use range-based
12950 for loop.
12951
7d45f3df
YQ
129522017-03-03 Yao Qi <yao.qi@linaro.org>
12953
12954 PR gdb/21165
12955 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12956 value is lazy.
12957 * valprint.c (common_val_print): Likewise.
12958
65b48a81
PB
129592017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12960
12961 * NEWS: Mention new set/show disassembler-options commands.
12962 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12963 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12964 (prospective_options): New static variable.
12965 (gdb_disassembler::gdb_disassembler): Initialize
12966 m_di.disassembler_options.
12967 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12968 (get_disassembler_options): New function.
12969 (set_disassembler_options): Likewise.
12970 (set_disassembler_options_sfunc): Likewise.
12971 (show_disassembler_options_sfunc): Likewise.
12972 (disassembler_options_completer): Likewise.
12973 (_initialize_disasm): Likewise.
12974 * disasm.h (get_disassembler_options): New prototype.
12975 (set_disassembler_options): Likewise.
12976 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12977 (gdbarch_verify_disassembler_options): Likewise.
12978 * gdbarch.c: Regenerate.
12979 * gdbarch.h: Likewise.
12980 * arm-tdep.c (num_disassembly_options): Delete.
12981 (set_disassembly_style): Likewise.
12982 (arm_disassembler_options): New static variable.
12983 (set_disassembly_style_sfunc): Convert short style name into long
12984 option name. Call set_disassembler_options.
12985 (show_disassembly_style_sfunc): New function.
12986 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12987 set_gdbarch_verify_disassembler_options.
12988 (_initialize_arm_tdep): Delete regnames variable and update callers.
12989 (arm_disassembler_options): Initialize.
12990 (disasm_options): New variable.
12991 (num_disassembly_options): Rename from this...
12992 (num_disassembly_styles): ...to this. Compute by scanning through
12993 disasm_options.
12994 (valid_disassembly_styles): Initialize using disasm_options.
12995 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12996 set_arm_regname_option.
12997 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12998 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12999 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13000 set_gdbarch_verify_disassembler_options.
13001 * s390-tdep.c (s390_disassembler_options): New static variable.
13002 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13003 set_gdbarch_verify_disassembler_options.
13004
d538e36d
SM
130052017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13006
13007 * remote.c (remote_add_target_side_condition): Remove "struct"
13008 keyword from range-based for loop.
13009
83621223
SM
130102017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13011
13012 * remote.c (remote_add_target_side_condition): Use range-based
13013 for loop. Update comment.
13014
2123df0e
YQ
130152017-02-27 Yao Qi <yao.qi@linaro.org>
13016
13017 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13018
8e368124
AH
130192017-02-26 Alan Hayward <alan.hayward@arm.com>
13020
13021 * regcache.c (regcache_raw_update): New function.
13022 (regcache_raw_read): Move code to regcache_raw_update.
13023 * regcache.h (regcache_raw_update): New declaration.
13024 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13025
a49dd8dd
JK
130262017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13027
13028 * dwarf2read.c (create_debug_type_hash_table): Initialize
13029 header.signature and header.type_offset_in_tu.
13030
34e4bae9
PA
130312017-02-24 Pedro Alves <palves@redhat.com>
13032
13033 * symtab.c (make_file_symbol_completion_list_1): Use
13034 add_symtab_completions.
13035
b0e4b369
AH
130362017-02-24 Alan Hayward <alan.hayward@arm.com>
13037
13038 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13039
975c21ab
AH
130402017-02-24 Alan Hayward <alan.hayward@arm.com>
13041
13042 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13043 I386_MAX_REGISTER_SIZE.
13044 (i386_pseudo_register_write): Likewise.
13045 (i386_process_record): Likewise.
13046 * i387-tdep.c (i387_supply_xsave): Likewise.
13047 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13048 (store_register): Likewise.
13049
14bc53a8
PA
130502017-02-23 Pedro Alves <palves@redhat.com>
13051
13052 * ada-lang.c: Include "common/function-view.h".
13053 (ada_iterate_over_symbols): Adjust to use function_view as
13054 callback type.
13055 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13056 (ada_make_symbol_completion_list): Use a lambda.
13057 (ada_exc_search_name_matches): Delete.
13058 (name_matches_regex): New.
13059 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13060 * compile/compile-c-support.c: Include "common/function-view.h".
13061 (print_one_macro): Change prototype to accept a ui_file pointer.
13062 (write_macro_definitions): Use a lambda.
13063 * dwarf2read.c: Include "common/function-view.h".
13064 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13065 (dw2_expand_symtabs_matching): Adjust to use function_view as
13066 callback type.
13067 * language.h: Include "common/function-view.h".
13068 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13069 function_view as callback type.
13070 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13071 * linespec.c: Include "common/function-view.h".
13072 (collect_info::add_symbol): New method.
13073 (struct symbol_and_data_callback, iterate_inline_only, struct
13074 symbol_matcher_data, iterate_name_matcher): Delete.
13075 (iterate_over_all_matching_symtabs): Adjust to use function_view
13076 as callback type and lambdas.
13077 (iterate_over_file_blocks): Adjust to use function_view as
13078 callback type.
13079 (decode_compound_collector): Now a class with private fields.
13080 (decode_compound_collector::release_symbols): New method.
13081 (collect_one_symbol): Rename to...
13082 (decode_compound_collector::operator()): ... this and adjust.
13083 (lookup_prefix_sym): decode_compound_collector construction bits
13084 move to decode_compound_collector ctor. Pass the
13085 decode_compound_collector object directly as callback. Remove
13086 cleanups and use decode_compound_collector::release_symbols
13087 instead.
13088 (symtab_collector): Now a class with private fields.
13089 (symtab_collector::release_symtabs): New method.
13090 (add_symtabs_to_list): Rename to...
13091 (symtab_collector::operator()): ... this and adjust.
13092 (collect_symtabs_from_filename): symtab_collector construction
13093 bits move to symtab_collector ctor. Pass the symtab_collector
13094 object directly as callback. Remove cleanups and use
13095 symtab_collector::release_symtabs instead.
13096 (collect_symbols): Delete.
13097 (add_matching_symbols_to_info): Use lambdas.
13098 * macrocmd.c (print_macro_callback): Delete.
13099 (info_macro_command): Use a lambda.
13100 (info_macros_command): Pass print_macro_definition as callable
13101 directly.
13102 (print_one_macro): Remove 'ignore' parameter.
13103 (macro_list_command): Adjust.
13104 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13105 (macro_for_each_data::user_data): Delete field.
13106 (foreach_macro): Adjust to call the function_view.
13107 (macro_for_each): Adjust to use function_view as callback type.
13108 (foreach_macro_in_scope): Adjust to call the function_view.
13109 (macro_for_each_in_scope): Adjust to use function_view as callback
13110 type.
13111 * macrotab.h: Include "common/function-view.h".
13112 (macro_callback_fn): Declare a prototype instead of a pointer.
13113 Remove "user_data" parameter.
13114 (macro_for_each, macro_for_each_in_scope): Adjust to use
13115 function_view as callback type.
13116 * psymtab.c (partial_map_expand_apply)
13117 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13118 Adjust to use function_view as callback type and to return bool.
13119 (psym_expand_symtabs_matching): Adjust to use function_view as
13120 callback types.
13121 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13122 to use function_view as callback type and to return bool.
13123 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13124 callback types.
13125 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13126 as callback types.
13127 * symfile.h: Include "common/function-view.h".
13128 (expand_symtabs_file_matcher_ftype)
13129 (expand_symtabs_symbol_matcher_ftype)
13130 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13131 return bool.
13132 (quick_symbol_functions::map_symtabs_matching_filename)
13133 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13134 function_view as callback type and return bool.
13135 (expand_symtabs_matching): Adjust to use function_view as callback
13136 type.
13137 (maintenance_expand_name_matcher)
13138 (maintenance_expand_file_matcher): Delete.
13139 (maintenance_expand_symtabs): Use lambdas.
13140 * symtab.c (iterate_over_some_symtabs): Adjust to use
13141 function_view as callback types and return bool.
13142 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13143 of a cleanup.
13144 (lookup_symtab_callback): Delete.
13145 (lookup_symtab): Use a lambda.
13146 (iterate_over_symbols): Adjust to use function_view as callback
13147 type.
13148 (struct search_symbols_data, search_symbols_file_matches)
13149 (search_symbols_name_matches): Delete.
13150 (search_symbols): Use a pair of lambdas.
13151 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13152 (symtab_expansion_callback): Delete.
13153 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13154 * symtab.h: Include "common/function-view.h".
13155 (iterate_over_some_symtabs): Adjust to use function_view as
13156 callback type and return bool.
13157 (iterate_over_symtabs): Adjust to use function_view as callback
13158 type.
13159 (symbol_found_callback_ftype): Remove 'data' parameter and return
13160 bool.
13161 (iterate_over_symbols): Adjust to use function_view as callback
13162 type.
13163
07e253aa
PA
131642017-02-23 Pedro Alves <palves@redhat.com>
13165
13166 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13167 (%.o) <unittests/%.c>: New pattern.
13168 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13169 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13170 * common/function-view.h: New file.
13171 * unittests/function-view-selftests.c: New file.
13172 * configure: Regenerate.
13173
8eaf5320
SM
131742017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13175
13176 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13177 inferior_ptid.
13178 * go32-nat.c (go32_thread_alive): Likewise.
13179
38768751
YQ
131802017-02-23 Yao Qi <yao.qi@linaro.org>
13181
13182 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13183 delete.
13184
0a8beaba
YQ
131852017-02-23 Yao Qi <yao.qi@linaro.org>
13186
13187 * varobj.c (varobj_clear_saved_item): Use delete instead of
13188 xfree.
13189 (update_dynamic_varobj_children): Likewise.
13190
58fdfd2c
JK
131912017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13192
13193 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13194
1b90b139
SM
131952017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13196
13197 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13198 m_enum_value to 0 in default constructor.
13199
2039d74e
EBM
132002017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13201
13202 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13203 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13204 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13205 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13206 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13207 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13208 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13209 IS_STORE_CONDITIONAL_INSN.
13210
7814882a
JK
132112017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13212
13213 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13214
0ae60b63
JK
132152017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13216
13217 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13218
0224619f
JK
132192017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13220
13221 * dwarf2read.c (skip_one_die, read_attribute_value)
13222 (dwarf2_const_value_attr, dump_die_shallow)
13223 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13224 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13225
0af92d60
JK
132262017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13227
13228 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13229 (dwarf_parse_macro_header): Accept DWARF version 5.
13230 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13231
216f72a1
JK
132322017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13233
13234 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13235 DW_AT_GNU_*.
13236 * common/common-exceptions.h (enum errors): Likewise.
13237 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13238 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13239 (dwarf_expr_context::execute_stack_op): Likewise.
13240 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13241 Likewise.
13242 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13243 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13244 (show_entry_values_debug, call_site_to_target_addr)
13245 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13246 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13247 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13248 (value_of_dwarf_block_entry, indirect_pieced_value)
13249 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13250 (disassemble_dwarf_expression): Likewise.
13251 * dwarf2read.c (process_die, inherit_abstract_dies)
13252 (read_call_site_scope): Likewise.
13253 * gdbtypes.h (struct func_type, struct call_site_parameter)
13254 (struct call_site): Likewise.
13255 * stack.c (read_frame_arg): Likewise.
13256 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13257
43988095
JK
132582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13259
13260 * defs.h (read_unsigned_leb128): New declaration.
13261 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13262 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13263 (dwarf2_find_location_expression): Call also
13264 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13265 * dwarf2loc.h (dwarf2_version): New declaration.
13266 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13267 rnglists.
13268 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13269 .debug_rnglists.
13270 (struct dwop_section_names): Add loclists_dwo.
13271 (dwop_section_names): Add .debug_loclists.dwo.
13272 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13273 (struct dwarf2_per_cu_data): Add dwarf_version.
13274 (struct dwo_sections): Add loclists.
13275 (struct attr_abbrev): Add implicit_const.
13276 (read_indirect_line_string): New declaration.
13277 (read_unsigned_leb128): Delete declaration.
13278 (rcuh_kind): New definition.
13279 (read_and_check_comp_unit_head): Change parameter
13280 is_debug_types_section to section_kind.
13281 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13282 (read_comp_unit_head): Change parameter abfd to section, add parameter
13283 section_kind. Handle DWARF-5.
13284 (error_check_comp_unit_head): Accept also DWARF version 5.
13285 (read_and_check_comp_unit_head): Change parameter
13286 is_debug_types_section to section_kind.
13287 (read_and_check_type_unit_head): Delete function.
13288 (read_abbrev_offset): Handle DWARF-5.
13289 (create_debug_type_hash_table): Add parameter section_kind. Process
13290 only DW_UT_type. Use signature and type_offset_in_tu from struct
13291 comp_unit_head.
13292 (create_debug_types_hash_table): Update create_debug_type_hash_table
13293 caller.
13294 (create_all_type_units): Call create_debug_type_hash_table.
13295 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13296 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13297 caller.
13298 (skip_one_die): Handle DW_FORM_implicit_const.
13299 (dwarf2_rnglists_process): New function.
13300 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13301 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13302 (read_attribute_value): Handle DW_FORM_implicit_const,
13303 DW_FORM_line_strp.
13304 (read_attribute): Handle DW_FORM_implicit_const.
13305 (read_indirect_string_at_offset_from): New function from
13306 read_indirect_string_at_offset.
13307 (read_indirect_string_at_offset): Call
13308 read_indirect_string_at_offset_from.
13309 (read_indirect_line_string_at_offset): New function.
13310 (read_indirect_string): New function comment.
13311 (read_indirect_line_string): New function.
13312 (read_unsigned_leb128): Make it global.
13313 (dwarf2_string_attr): Handle DWARF-5.
13314 (add_include_dir_stub, read_formatted_entries): New functions.
13315 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13316 Handle DWARF-5.
13317 (per_cu_header_read_in): Update read_comp_unit_head caller.
13318 (dwarf2_version): New function.
13319 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13320 rnglists.
13321 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13322 fields.
13323
22d2f3ab
JK
133242017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13325
13326 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13327
5f46c5a5
JK
133282017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13329
13330 * dwarf2read.c (dwarf2_ranges_process): New function from
13331 dwarf2_ranges_read.
13332 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13333 dwarf2_ranges_process.
13334
78d4d2c5
JK
133352017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13336
13337 * dwarf2read.c (create_debug_type_hash_table): New function from
13338 create_debug_types_hash_table.
13339 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13340 (create_all_type_units, open_and_init_dwo_file): Update
13341 create_debug_types_hash_table callers.
13342
1b076f25
SDJ
133432017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13344
13345 PR gdb/16188
13346 * fork-child.c (trace_start_error): Fix thinko. va_end should
13347 refer to 'ap', not 'args'.
13348
0db8980c
SDJ
133492017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13350 Pedro Alves <palves@redhat.com>
13351
13352 PR gdb/16188
13353 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13354 calls succeeded.
13355 * fork-child.c (trace_start_error): New function.
13356 (trace_start_error_with_name): Likewise.
13357 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13358 * inf-ptrace.c (inf_ptrace_me): Likewise.
13359 * inferior.h (trace_start_error): New prototype.
13360 (trace_start_error_with_name): Likewise.
13361
99e8a4f9
SDJ
133622017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13363
13364 PR gdb/21164
13365 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13366 NULL before using it.
13367 * symmisc.c (maintenance_print_symbols): Likewise.
13368 (maintenance_print_msymbols): Likewise.
13369
4e746bb6
TW
133702017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13371
13372 * NEWS: Add record Python bindings entry.
13373
133742017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13375
13376 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13377 py-record-full.o.
13378 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13379 * python/py-record-btrace.c, python/py-record-btrace.h,
13380 python/py-record-full.c, python/py-record-full.h: New file.
13381 * python/py-record.c: Add include for py-record-btrace.h and
13382 py-record-full.h.
13383 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13384 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13385 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13386 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13387 New definition.
13388 (gdbpy_initialize_btrace): New export.
13389 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13390
133912017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13392
13393 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13394 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13395 * python/py-record.c: New file.
13396 * python/python-internal.h (gdbpy_start_recording,
13397 gdbpy_current_recording, gdpy_stop_recording,
13398 gdbpy_initialize_record): New export.
13399 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13400 (python_GdbMethods): Add gdbpy_start_recording,
13401 gdbpy_current_recording and gdbpy_stop_recording.
13402
134032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13404
13405 * record-btrace.c (record_btrace_record_method): New function.
13406 (init_record_btrace_ops): Initialize to_record_method.
13407 * record-full.c (record_full_record_method): New function.
13408 (init_record_full_ops, init_record_full_core_ops): Add
13409 record_full_record_method.
13410 * record.h (enum record_method): New enum.
13411 * target-debug.h (target_debug_print_enum_record_method: New define.
13412 * target-delegates.c: Regenerate.
13413 * target.c (target_record_method): New function.
13414 * target.h: Include record.h.
13415 (struct target_ops) <to_record_method>: New field.
13416 (target_record_method): New export.
13417
134182017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13419
13420 * record.h (record_start, record_stop): New export.
13421 * record.c (record_start, record_stop): New function.
13422
134232017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13424
13425 * btrace.c (btrace_fetch): Copy function call segments pointer
13426 into a vector.
13427 (btrace_clear): Clear the vector.
13428 (btrace_find_insn_by_number): Use binary search to find the correct
13429 function call segment.
13430 * btrace.h (brace_fun_p): New typedef.
13431 (struct btrace_thread_info) <functions>: New field.
13432
134332017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13434
13435 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13436 * btrace.c (btrace_decode_error): ... here. New function.
13437 * btrace.h (btrace_decode_error): New export.
13438
134392017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13440
13441 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13442 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13443 btrace_find_insn_by_number): Remove special case for gaps.
13444 * btrace.h (btrace_insn_get_error): New export.
13445 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13446 * record-btrace.c (btrace_insn_history): Print number for gaps.
13447 (record_btrace_info, record_btrace_goto): Handle gaps.
13448
3f77c769
TT
134492017-02-14 Tom Tromey <tom@tromey.com>
13450
13451 PR python/13598:
13452 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13453 event.
13454 * python/py-evts.c (gdbpy_initialize_py_events): Add
13455 before_prompt registry.
13456 * python/py-events.h (events_object) <before_prompt>: New field.
13457
4c2c7ac6
MM
134582017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13459
13460 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13461
5cf30ebf
LM
134622017-02-13 Luis Machado <lgustavo@codesourcery.com>
13463
13464 * symfile (_initialize_symfile): Add usage text to the load command's
13465 help text.
13466
26a06916
SM
134672017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13468
13469 * utils.c (defaulted_query): Don't query on secondary UIs.
13470
0b145e37
TT
134712017-02-10 Tom Tromey <tom@tromey.com>
13472
13473 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13474
2d8365c4
TT
134752017-02-10 Tom Tromey <tom@tromey.com>
13476
13477 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13478 "cleanup" local.
13479 * python/py-type.c (typy_legacy_template_argument): Remove
13480 unnecessary "cleanup" local.
13481
2bb8f231
TT
134822017-02-10 Tom Tromey <tom@tromey.com>
13483
13484 * python/python.c (do_start_initialization): New function, from
13485 _initialize_python.
13486 (_initialize_python): Call do_start_initialization.
13487 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13488 goto.
13489
1bdfaf42
TT
134902017-02-10 Tom Tromey <tom@tromey.com>
13491
13492 * python/py-prettyprint.c (pretty_print_one_value): Use
13493 gdbpy_ref.
13494
88b6faea
TT
134952017-02-10 Tom Tromey <tom@tromey.com>
13496
13497 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13498 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13499 gdbpy_ref.
13500 * python/py-type.c (field_new): Use gdbpy_ref.
13501 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13502 gdbpy_ref.
13503 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13504 (py_free_pspace): Likewise.
13505 (pspace_to_pspace_object): Likewise.
13506 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13507 (py_free_objfile): Likewise.
13508 (objfile_to_objfile_object): Likewise.
13509 * python/py-inferior.c (delete_thread_object): Use
13510 gdbpy_ref.
13511 (infpy_read_memory): Likewise.
13512 (py_free_inferior): Likewise.
13513 * python/py-evtregistry.c (create_eventregistry_object): Use
13514 gdbpy_ref.
13515 * python/py-event.c (create_event_object): Use gdbpy_ref.
13516
7780f186
TT
135172017-02-10 Tom Tromey <tom@tromey.com>
13518
13519 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13520 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13521 used.
13522 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13523 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13524 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13525 python/py-framefilter.c, python/py-function.c,
13526 python/py-inferior.c, python/py-infevents.c,
13527 python/py-linetable.c, python/py-newobjfileevent.c,
13528 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13529 python/py-signalevent.c, python/py-stopevent.c,
13530 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13531 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13532 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13533 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13534
d4b0bb18
TT
135352017-02-10 Tom Tromey <tom@tromey.com>
13536
13537 * ui-out.h (ui_out_emit_type): New class.
13538 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13539 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13540 and ui_out_emit_tuple.
13541 (enumerate_locals): Likewise.
13542 (py_mi_print_variables, py_print_locals, py_print_args): Use
13543 ui_out_emit_list.
13544 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13545 ui_out_emit_list.
13546 * common/gdb_optional.h: New file.
13547
f67f945c
MG
135482017-02-10 Martin Galvan <martingalvan@sourceware.org>
13549
13550 * MAINTAINERS (Write After Approval): Update my e-mail address.
13551
18da0c51
MG
135522017-02-10 Martin Galvan <martingalvan@sourceware.org>
13553
13554 PR gdb/21122
13555 * breakpoint.c (_initialize_breakpoint): Update the help description
13556 of the 'commands' command to indicate that it takes a list argument.
13557
62c14536
SM
135582017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13559
13560 * interps.c (current_interp_set_logging): Remove "return".
13561
ff6fa247
GB
135622017-02-09 Gary Benson <gbenson@redhat.com>
13563
13564 * symtab.c (add_symtab_completions): Prevent NULL pointer
13565 dereference.
13566
a474bd8e
PA
135672017-02-08 Pedro Alves <palves@redhat.com>
13568
13569 * interps.c (interp::interp): Remove reference to quiet_p.
13570 (interp_set): Make static. Remove dead "Switching to" output
13571 code.
13572 (interp_quiet_p, interp_set_quiet): Delete.
13573 (interpreter_exec_cmd): Don't set the interpreter quiet.
13574 * interps.h (interp_quiet_p): Make static.
13575 (class interp) <quiet_p>: Remove field
13576
3d7b173c
JG
135772017-02-08 Jerome Guitton <guitton@adacore.com>
13578
604c4576
JG
13579 * cli/cli-decode.c (find_command_name_length): Make it extern.
13580 * cli/cli-decode.h (find_command_name_length): Declare.
13581 * cli/cli-script.c (command_name_equals, line_first_arg):
13582 New functions.
13583 (process_next_line): Use cli-decode to parse command names.
13584 (build_command_line): Make args a constant pointer.
13585
135862017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 13587
3d7b173c
JG
13588 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13589 Remove case-insensitive search.
13590
1291063d
JM
135912017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13592
13593 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13594 at the end of the line. Avoids an ARI warning.
13595
20b477a7
LM
135962017-02-06 Luis Machado <lgustavo@codesourcery.com>
13597
13598 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13599 rdseed instructions.
13600 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13601
3f7b46f2
IR
136022017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13603
13604 PR tdep/20936
13605 Provide and use sparc32 and sparc64 target description XML files.
13606 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13607 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13608 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13609 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13610 * features/sparc/sparc32-solaris.xml: New file.
13611 * features/sparc/sparc64-solaris.xml: New file.
13612 * features/sparc/sparc32-solaris.c: Generated.
13613 * features/sparc/sparc64-solaris.c: Generated.
13614 * sparc-tdep.h: Account for differences in target descriptions.
13615 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13616 (sparc32_register_type): Use target provided registers.
13617 (validate_tdesc_registers): New function.
13618 (sparc32_gdbarch_init): Use tdesc_has_registers.
13619 Set pseudoregister functions.
13620 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13621 (sparc64_register_type): Use target provided registers.
13622 (sparc64_init_abi): Set pseudoregister functions.
13623
f0fd41c1
TT
136242017-02-03 Tom Tromey <tom@tromey.com>
13625
13626 PR rust/21097:
13627 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13628 with a single member.
13629
d6f9b0fb
PA
136302017-02-03 Pedro Alves <palves@redhat.com>
13631
13632 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13633 (cli_interp_base::~cli_interp_base): New.
13634 (cli_interp): New struct.
13635 (as_cli_interp): Cast the interp itself to cli_interp.
13636 (cli_interpreter_pre_command_loop): Rename to ...
13637 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13638 parameter.
13639 (cli_interpreter_init): Rename to ...
13640 (cli_interp::init): ... this. Remove 'self' parameter. Use
13641 boolean. Make extern.
13642 (cli_interpreter_resume): Rename to ...
13643 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13644 extern.
13645 (cli_interpreter_suspend): Rename to ...
13646 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13647 extern.
13648 (cli_interpreter_exec): Rename to ...
13649 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13650 extern.
13651 (cli_interpreter_supports_command_editing): Rename to ...
13652 (cli_interp_base::supports_command_editing): ... this. Remove
13653 'interp' parameter. Make extern.
13654 (cli_ui_out): Rename to ...
13655 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13656 Make extern.
13657 (cli_set_logging): Rename to ...
13658 (cli_interp_base::set_logging): ... this. Remove 'interp'
13659 parameter. Make extern.
13660 (cli_interp_procs): Delete.
13661 (cli_interp_factory): Adjust to use "new".
13662 * cli/cli-interp.h: Include "interps.h".
13663 (struct cli_interp_base): New struct.
13664 * interps.c (struct interp): Delete. Fields moved to interps.h.
13665 (interp_new): Delete.
13666 (interp::interp, interp::~interp): New.
13667 (interp_set): Use bool, and return void. Assume the interpreter
13668 has suspend, init and resume methods, and that the all return
13669 void.
13670 (set_top_level_interpreter): interp_set returns void.
13671 (interp_ui_out): Adapt.
13672 (current_interp_set_logging): Adapt.
13673 (interp_data): Delete.
13674 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13675 (interp_exec): Adapt.
13676 (top_level_interpreter_data): Delete.
13677 * interps.h (interp_init_ftype, interp_resume_ftype)
13678 (interp_suspend_ftype, interp_exec_ftype)
13679 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13680 (class interp): New.
13681 (interp_new): Delete.
13682 (interp_set): Now returns void. Use bool.
13683 (interp_data, top_level_interpreter_data): Delete.
13684 * mi/mi-common.h: Include interps.h.
13685 (class mi_interp): Inherit from interp. Define a ctor. Declare
13686 init, resume, suspect, exec, interp_ui_out, set_logging and
13687 pre_command_loop methods.
13688 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13689 (mi_interpreter_init): Rename to ...
13690 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13691 bool, return void and make extern. Adjust.
13692 (mi_interpreter_resume): ... Rename to ...
13693 (mi_interp::resume): ... this. Remove the 'data' parameter,
13694 return void and make extern. Adjust.
13695 (mi_interpreter_suspend): ... Rename to ...
13696 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13697 return void and make extern. Adjust.
13698 (mi_interpreter_exec): ... Rename to ...
13699 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13700 extern. Adjust.
13701 (mi_interpreter_pre_command_loop): ... Rename to ...
13702 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13703 parameter and make extern.
13704 (mi_on_normal_stop_1): Adjust.
13705 (mi_ui_out): Rename to ...
13706 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13707 parameter and make extern. Adjust.
13708 (mi_set_logging): Rename to ...
13709 (mi_interp::set_logging): ... this. Remove the 'interp'
13710 parameter and make extern. Adjust.
13711 (mi_interp_procs): Delete.
13712 (mi_interp_factory): Adjust to use 'new'.
13713 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13714 (mi_print_exception, mi_execute_command, mi_load_progress):
13715 Adjust.
13716 * tui/tui-interp.c (tui_interp): New class.
13717 (as_tui_interp): Return a tui_interp pointer.
13718 (tui_on_normal_stop, tui_on_signal_received)
13719 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13720 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13721 to use interp::interp_ui_out.
13722 (tui_init): Rename to ...
13723 (tui_interp::init): ... this. Remove the 'self' parameter, use
13724 bool, return void and make extern. Adjust.
13725 (tui_resume): Rename to ...
13726 (tui_interp::resume): ... this. Remove the 'data' parameter,
13727 return void and make extern. Adjust.
13728 (tui_suspend): Rename to ...
13729 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13730 return void and make extern. Adjust.
13731 (tui_ui_out): Rename to ...
13732 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13733 parameter, and make extern. Adjust.
13734 (tui_exec): Rename to ...
13735 (tui_interp::exec): ... this. Remove the 'data' parameter and
13736 make extern.
13737 (tui_interp_procs): Delete.
13738 (tui_interp_factory): Use "new".
13739
65c40c95
TT
137402017-02-02 Tom Tromey <tom@tromey.com>
13741
13742 * rust-exp.y (ends_raw_string, space_then_number)
13743 (rust_identifier_start_p): Return bool.
13744 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13745 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13746 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13747 (rust_chartype_p): Return bool.
13748 (val_print_struct, rust_print_struct_def, rust_print_type):
13749 Update.
13750 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13751 Return bool.
13752
b50f188d
TT
137532017-02-02 Tom Tromey <tom@tromey.com>
13754
13755 * rust-lang.c: Reindent.
13756
03c85b11
TT
137572017-02-02 Tom Tromey <tom@tromey.com>
13758
13759 * rust-lang.h (rust_crate_for_block): Update.
13760 * rust-lang.c (rust_crate_for_block): Return std::string.
13761 (rust_get_disr_info): Use std:;string, not
13762 gdb::unique_xmalloc_ptr.
13763 * rust-exp.y (crate_name): Update.
13764
9b6da501
PA
137652017-02-02 Pedro Alves <palves@redhat.com>
13766
13767 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13768 field out of gdb_disassembler_test and make it static.
13769
ec4cb20b
PA
137702017-02-02 Pedro Alves <palves@redhat.com>
13771
13772 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13773 mi1_interp and mi_interp fields.
13774
5be5dbf0
PA
137752017-02-02 Pedro Alves <palves@redhat.com>
13776
616268b6
PA
13777 * cli/cli-interp.c (struct saved_output_files, saved_output):
13778 Moved from cli/cli-logging.c.
13779 (cli_set_logging): New function.
13780 (cli_interp_procs): Install cli_set_logging.
13781 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13782 Declare.
13783 * cli/cli-logging.c (struct saved_output_files, saved_output):
13784 Moved to cli/cli-interp.c.
13785 (pop_output_files): Don't save outputs here.
13786 (make_logging_output): New function.
13787 (handle_redirections): Don't build tee nor save previous outputs
13788 here.
13789 * interps.c (current_interp_set_logging): Change prototype.
13790 Assume there's always a set_logging_proc method installed.
13791 * interps.h (interp_set_logging_ftype): Change prototype.
13792 (current_interp_set_logging): Change prototype and adjust comment.
13793 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13794 use make_logging_output.
13795 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
137962017-02-02 Pedro Alves <palves@redhat.com>
13797
5be5dbf0
PA
13798 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13799 from ...
13800 (set_logging_overwrite): ... here.
13801 (logging_no_redirect_file): Delete.
13802 (set_logging_redirect): Don't handle redirection on the fly.
13803 Instead warn that "logging off" / "logging on" is necessary.
13804 (pop_output_files): Delete references to logging_no_redirect_file.
13805 (show_logging_command): Always speak in terms of what will happen
13806 once logging is reenabled.
13807
c99cc448
PA
138082017-02-02 Pedro Alves <palves@redhat.com>
13809
13810 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13811
8b172ce7
PA
138122017-02-02 Pedro Alves <palves@redhat.com>
13813
13814 * disasm.c (gdb_pretty_print_insn): Rename to ...
13815 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13816 Remove gdbarch parameter. Adapt to clear the object's buffers
13817 instead of allocating new buffers, and to print using the object's
13818 gdb_disassembler instead of calling gdb_print_insn.
13819 (dump_insns): Use gdb_pretty_print_disassembler.
13820 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13821 (gdb_pretty_print_disassembler): New class.
13822 * record-btrace.c (btrace_insn_history): Use
13823 gdb_pretty_print_disassembler.
13824
d7e74731
PA
138252017-02-02 Pedro Alves <palves@redhat.com>
13826
13827 * ada-lang.c (type_as_string): Use string_file.
13828 * ada-valprint.c (ada_print_floating): Use string_file.
13829 * ada-varobj.c (ada_varobj_scalar_image)
13830 (ada_varobj_get_value_image): Use string_file.
13831 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13832 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13833 * breakpoint.c (update_inserted_breakpoint_locations)
13834 (insert_breakpoint_locations, reattach_breakpoints)
13835 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13836 (print_it_watchpoint): Use string_file.
13837 (save_breakpoints): Use stdio_file.
13838 * c-exp.y (oper): Use string_file.
13839 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13840 tee_file.
13841 (pop_output_files): Use delete.
13842 (handle_redirections): Use stdio_file and tee_file.
13843 * cli/cli-setshow.c (do_show_command): Use string_file.
13844 * compile/compile-c-support.c (c_compute_program): Use
13845 string_file.
13846 * compile/compile-c-symbols.c (generate_vla_size): Take a
13847 'string_file &' instead of a 'ui_file *'.
13848 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13849 of a 'ui_file *'. Use string_file.
13850 (generate_c_for_variable_locations): Take a 'string_file &'
13851 instead of a 'ui_file *'.
13852 * compile/compile-internal.h (generate_c_for_for_one_variable):
13853 Take a 'string_file &' instead of a 'ui_file *'.
13854 * compile/compile-loc2c.c (push, pushf, unary, binary)
13855 (print_label, pushf_register_address, pushf_register)
13856 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13857 'ui_file *'. Adjust.
13858 * compile/compile.c (compile_to_object): Use string_file.
13859 * compile/compile.h (compile_dwarf_expr_to_c)
13860 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13861 'ui_file *'.
13862 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13863 (replace_typedefs_qualified_name): Use string_file and
13864 obstack_copy0.
13865 * disasm.c (gdb_pretty_print_insn): Use string_file.
13866 (gdb_disassembly): Adjust reference the null_stream global.
13867 (do_ui_file_delete): Delete.
13868 (gdb_insn_length): Use null_stream.
13869 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13870 * dwarf2loc.c (dwarf2_compile_property_to_c)
13871 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13872 'string_file &' instead of a 'ui_file *'.
13873 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13874 * dwarf2read.c (do_ui_file_peek_last): Delete.
13875 (dwarf2_compute_name): Use string_file.
13876 * event-top.c (gdb_setup_readline): Use stdio_file.
13877 * gdbarch.sh (verify_gdbarch): Use string_file.
13878 * gdbtypes.c (safe_parse_type): Use null_stream.
13879 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13880 string_file.
13881 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13882 'string_file *' instead of a 'ui_file *'.
13883 (gdbscm_arch_disassemble): Use string_file.
13884 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13885 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13886 inherits from ui_file.
13887 (ioscm_file_port_delete, ioscm_file_port_rewind)
13888 (ioscm_file_port_put): Delete.
13889 (ioscm_file_port_write): Rename to ...
13890 (ioscm_file_port::write): ... this. Remove file_port_magic
13891 checks.
13892 (ioscm_file_port_new): Delete.
13893 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13894 ui_file_up.
13895 * guile/scm-type.c (tyscm_type_name): Use string_file.
13896 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13897 Use string_file.
13898 * infcmd.c (print_return_value_1): Use string_file.
13899 * infrun.c (print_target_wait_results): Use string_file.
13900 * language.c (add_language): Use string_file.
13901 * location.c (explicit_to_string_internal): Use string_file.
13902 * main.c (captured_main_1): Use null_file.
13903 * maint.c (maintenance_print_architecture): Use stdio_file.
13904 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13905 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13906 event_channel>: Change type to mi_console_file pointer.
13907 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13908 (mi_console_file_delete): Delete.
13909 (struct mi_console_file): Delete.
13910 (mi_console_file_magic): Delete.
13911 (mi_console_file_new): Delete.
13912 (mi_console_file::mi_console_file): New.
13913 (mi_console_file_delete): Delete.
13914 (mi_console_file_fputs): Delete.
13915 (mi_console_file::write): New.
13916 (mi_console_raw_packet): Delete.
13917 (mi_console_file::flush): New.
13918 (mi_console_file_flush): Delete.
13919 (mi_console_set_raw): Rename to ...
13920 (mi_console_file::set_raw): ... this.
13921 * mi/mi-console.h (class mi_console_file): New class.
13922 (mi_console_file_new, mi_console_set_raw): Delete.
13923 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13924 (mi_set_logging): Use delete and tee_file. Adjust.
13925 * mi/mi-main.c (output_register): Use string_file.
13926 (mi_cmd_data_evaluate_expression): Use string_file.
13927 (mi_cmd_data_read_memory): Use string_file.
13928 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13929 * mi/mi-out.c (mi_ui_out::main_stream): New.
13930 (mi_ui_out::rewind): Use main_stream and
13931 string_file.
13932 (mi_ui_out::put): Use main_stream and string_file.
13933 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13934 Allocate a 'string_file' instead.
13935 (mi_out_new): Don't allocate a mem_fileopen stream here.
13936 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13937 (mi_ui_out::main_stream): Declare method.
13938 * printcmd.c (eval_command): Use string_file.
13939 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13940 * python/py-arch.c (archpy_disassemble): Use string_file.
13941 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13942 * python/py-frame.c (frapy_str): Use string_file.
13943 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13944 Use string_file.
13945 * python/py-type.c (typy_str): Use string_file.
13946 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13947 * python/py-value.c (valpy_str): Use string_file.
13948 * record-btrace.c (btrace_insn_history): Use string_file.
13949 * regcache.c (regcache_print): Use stdio_file.
13950 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13951 * remote.c (escape_buffer): Use string_file.
13952 * rust-lang.c (rust_get_disr_info): Use string_file.
13953 * serial.c (serial_open_ops_1): Use stdio_file.
13954 (do_serial_close): Use delete.
13955 * stack.c (print_frame_arg): Use string_file.
13956 (print_frame_args): Remove local mem_fileopen stream, not used.
13957 (print_frame): Use string_file.
13958 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13959 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13960 Take a 'string_file *' instead of a 'ui_file *'.
13961 * top.c (new_ui): Use stdio_file and stderr_file.
13962 (free_ui): Use delete.
13963 (execute_command_to_string): Use string_file.
13964 (quit_confirm): Use string_file.
13965 * tracepoint.c (collection_list::append_exp): Use string_file.
13966 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13967 * tui/tui-file.c: Don't include "ui-file.h".
13968 (enum streamtype, struct tui_stream): Delete.
13969 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13970 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13971 (tui_file::tui_file): New method.
13972 (tui_file_fputs): Delete.
13973 (tui_file_get_strbuf): Delete.
13974 (tui_file::puts): New method.
13975 (tui_file_adjust_strbuf): Delete.
13976 (tui_file_flush): Delete.
13977 (tui_file::flush): New method.
13978 * tui/tui-file.h: Tweak intro comment.
13979 Include ui-file.h.
13980 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13981 (tui_file_adjust_strbuf): Delete declarations.
13982 (class tui_file): New class.
13983 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13984 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13985 (tui_register_format): Use string_stream.
13986 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13987 (tui_get_function_from_frame): Use string_file.
13988 * typeprint.c (type_to_string): Use string_file.
13989 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13990 (null_stream): New global.
13991 (ui_file_delete): Delete.
13992 (ui_file::ui_file): New.
13993 (null_file_isatty): Delete.
13994 (ui_file::~ui_file): New.
13995 (null_file_rewind): Delete.
13996 (ui_file::printf): New.
13997 (null_file_put): Delete.
13998 (null_file_flush): Delete.
13999 (ui_file::putstr): New.
14000 (null_file_write): Delete.
14001 (ui_file::putstrn): New.
14002 (null_file_read): Delete.
14003 (ui_file::putc): New.
14004 (null_file_fputs): Delete.
14005 (null_file_write_async_safe): Delete.
14006 (ui_file::vprintf): New.
14007 (null_file_delete): Delete.
14008 (null_file::write): New.
14009 (null_file_fseek): Delete.
14010 (null_file::puts): New.
14011 (ui_file_data): Delete.
14012 (null_file::write_async_safe): New.
14013 (gdb_flush, ui_file_isatty): Adjust.
14014 (ui_file_put, ui_file_rewind): Delete.
14015 (ui_file_write): Adjust.
14016 (ui_file_write_for_put): Delete.
14017 (ui_file_write_async_safe, ui_file_read): Adjust.
14018 (ui_file_fseek): Delete.
14019 (fputs_unfiltered): Adjust.
14020 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14021 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14022 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14023 (set_ui_file_data): Delete.
14024 (string_file::~string_file, string_file::write)
14025 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14026 (do_ui_file_as_string, ui_file_as_string): Delete.
14027 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14028 (struct mem_file): Delete.
14029 (mem_file_new): Delete.
14030 (stdio_file::stdio_file): New.
14031 (mem_file_delete): Delete.
14032 (stdio_file::stdio_file): New.
14033 (mem_fileopen): Delete.
14034 (stdio_file::~stdio_file): New.
14035 (mem_file_rewind): Delete.
14036 (stdio_file::set_stream): New.
14037 (mem_file_put): Delete.
14038 (stdio_file::open): New.
14039 (mem_file_write): Delete.
14040 (stdio_file_magic, struct stdio_file): Delete.
14041 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14042 (stdio_file::flush): New.
14043 (stdio_file_read): Rename to ...
14044 (stdio_file::read): ... this. Adjust.
14045 (stdio_file_write): Rename to ...
14046 (stdio_file::write): ... this. Adjust.
14047 (stdio_file_write_async_safe): Rename to ...
14048 (stdio_file::write_async_safe) ... this. Adjust.
14049 (stdio_file_fputs): Rename to ...
14050 (stdio_file::puts) ... this. Adjust.
14051 (stdio_file_isatty): Delete.
14052 (stdio_file_fseek): Delete.
14053 (stdio_file::isatty): New.
14054 (stderr_file_write): Rename to ...
14055 (stderr_file::write) ... this. Adjust.
14056 (stderr_file_fputs): Rename to ...
14057 (stderr_file::puts) ... this. Adjust.
14058 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14059 (stderr_file::stderr_file): New.
14060 (tee_file_magic): Delete.
14061 (struct tee_file): Delete.
14062 (tee_file::tee_file): New.
14063 (tee_file_new): Delete.
14064 (tee_file::~tee_file): New.
14065 (tee_file_delete): Delete.
14066 (tee_file_flush): Rename to ...
14067 (tee_file::flush): ... this. Adjust.
14068 (tee_file_write): Rename to ...
14069 (tee_file::write): ... this. Adjust.
14070 (tee_file::write_async_safe): New.
14071 (tee_file_fputs): Rename to ...
14072 (tee_file::puts): ... this. Adjust.
14073 (tee_file_isatty): Rename to ...
14074 (tee_file::isatty): ... this. Adjust.
14075 * ui-file.h (struct obstack, struct ui_file): Don't
14076 forward-declare.
14077 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14078 (ui_file_write_ftype)
14079 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14080 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14081 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14082 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14083 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14084 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14085 (set_ui_file_fseek): Delete.
14086 (ui_file_data, ui_file_delete, ui_file_rewind)
14087 (struct ui_file): New.
14088 (ui_file_up): New.
14089 (class null_file): New.
14090 (null_stream): Declare.
14091 (ui_file_write_for_put, ui_file_put): Delete.
14092 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14093 Delete.
14094 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14095 (gdb_fopen, tee_file_new): Delete.
14096 (struct string_file): New.
14097 (struct stdio_file): New.
14098 (stdio_file_up): New.
14099 (struct stderr_file): New.
14100 (class tee_file): New.
14101 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14102 of a 'ui_file *'. Adjust.
14103 * ui-out.h (class ui_out) <field_stream>: Likewise.
14104 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14105 (null_stream): Delete.
14106 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14107 Adjust.
14108 * utils.h (struct ui_file): Delete forward declaration..
14109 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14110 (error_stream): Take a 'string_file &' instead of a
14111 'ui_file *'.
14112 * varobj.c (varobj_value_get_print_value): Use string_file.
14113 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14114 * gdbarch.c: Regenerate.
14115
187808b0
PA
141162017-02-02 Pedro Alves <palves@redhat.com>
14117
14118 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14119 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14120 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14121 Adjust to call gdb_print_insn instead of
14122 gdb_disassembler::print_insn.
14123 (dump_insns, do_mixed_source_and_assembly_deprecated)
14124 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14125 'gdbarch' parameter. Remove gdb_disassembler parameter.
14126 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14127 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14128 declaration.
14129 (gdb_pretty_print_insn): Re-add declaration.
14130 * record-btrace.c (btrace_insn_history): Don't allocate a
14131 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14132
7a8eb317
SM
141332017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14134
14135 * disasm.h (gdb_disassembly): Remove file_string parameter.
14136 * disasm.c (gdb_disassembly): Likewise.
14137 * cli/cli-cmds.c (print_disassembly): Adapt.
14138 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14139 * stack.c (do_gdb_disassembly): Likewise.
14140
7346ef59
AA
141412017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14142
14143 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14144 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14145 targets. And if the implicit value is longer than needed, extract
14146 the first bytes instead of the "least significant" ones.
14147
cd4007e4
MM
141482017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14149
14150 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14151 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14152 (btrace_fetch): Assert can_access_registers_ptid.
14153 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14154 validate_registers_access.
14155
cf77c34e
MM
141562017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14157
14158 * gdbthread.h (can_access_registers_ptid): New.
14159 * thread.c (can_access_registers_ptid): New.
14160
be85ce7d
PA
141612017-02-01 Pedro Alves <palves@redhat.com>
14162
14163 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14164
29b0b251
PA
141652017-01-31 Pedro Alves <palves@redhat.com>
14166
14167 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14168 Fix typos.
14169
289b5b24
PA
141702017-01-31 Pedro Alves <palves@redhat.com>
14171
14172 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14173 not used.
14174
b47413b4
PA
141752017-01-31 Pedro Alves <palves@redhat.com>
14176
14177 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14178
60adb36c
PA
141792017-01-31 Pedro Alves <palves@redhat.com>
14180
14181 * common/scoped_restore.h
14182 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14183 change the value's parameter type to T2.
14184 (make_scoped_restore): Likewise.
14185
2735833d
WT
141862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14187 Richard Henderson <rth@redhat.com>
14188
14189 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14190 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14191 GS_BASE for older kernels.
14192 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14193 GS_BASE for older kernels.
14194 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14195 and GS_BASE to the offset table.
14196 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14197 system register group.
14198 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14199 for older kernels.
14200 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14201 amd64 ABI.
14202 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14203 AMD64_GSBASE_REGNUM.
14204 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14205 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14206 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14207 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14208 i386/64bit-segments.xml in those rules.
14209 * features/i386/64bit-segments.xml: New file.
14210 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14211 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14212 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14213 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14214 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14215 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14216 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14217 * features/i386/amd64-avx-linux.c: Regenerated.
14218 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14219 * features/i386/amd64-avx-mpx.c: Regenerated.
14220 * features/i386/amd64-avx512-linux.c: Regenerated.
14221 * features/i386/amd64-linux.c: Regenerated.
14222 * features/i386/amd64-mpx-linux.c: Regenerated.
14223 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14224 * features/i386/i386-avx-mpx.c: Regenerated.
14225 * features/i386/x32-avx-linux.c: Regenerated.
14226 * features/i386/x32-avx512-linux.c: Regenerated.
14227 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14228 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14229 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14230 * regformats/i386/amd64-linux.dat: Regenerated.
14231 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14232 * regformats/i386/x32-avx-linux.dat: Regenerated.
14233 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14234 * regformats/i386/x32-linux.dat: Regenerated.
14235
8884e97e
WT
142362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14237
14238 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14239 Set to AMD64_NUM_REGS.
14240
7005d26a
WT
142412017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14242
14243 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14244 that checks validity of a register number.
14245
4bd2e1b2
KC
142462017-01-27 Kees Cook <keescook@google.com>
14247
14248 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14249 fetch_fpregs if target has fpa registers.
14250 (arm_linux_store_inferior_registers): Call store_fpregs if target
14251 has fpa registers.
14252
7cf1de6c
AA
142532017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14254
14255 * cris-tdep.c (cris_gdbarch_init): Remove check for
14256 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14257
874a1c8c
AT
142582017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14259
14260 * corelow.c (get_core_register_section): Check for regset
14261 existence before checking for REGSET_VARIABLE_SIZE.
14262
d8b49cf0
YQ
142632017-01-26 Yao Qi <yao.qi@linaro.org>
14264 Pedro Alves <palves@redhat.com>
14265
14266 PR gdb/20939
14267 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14268 call memory_error, save memaddr instead.
14269 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14270 negative, cal memory_error.
14271 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14272
658ca58c
YQ
142732017-01-26 Yao Qi <yao.qi@linaro.org>
14274
14275 * disasm-selftests.c (memory_error_test): New function.
14276 (_initialize_disasm_selftests): Register memory_error_test.
14277
79843d45
YQ
142782017-01-26 Yao Qi <yao.qi@linaro.org>
14279
14280 * Makefile.in (SFILES): Add disasm-selftests.c and
14281 selftest-arch.c.
14282 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14283 * disasm-selftests.c: New file.
14284 * selftest-arch.c: New file.
14285 * selftest-arch.h: New file.
14286
8cafda32
YQ
142872017-01-26 Yao Qi <yao.qi@linaro.org>
14288
14289 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14290 to bfd_arch_mep. Don't return 0 if section is not
14291 found. Call print_insn_mep.
14292
e47ad6c0
YQ
142932017-01-26 Pedro Alves <palves@redhat.com>
14294 Yao Qi <yao.qi@linaro.org>
14295
14296 * arm-tdep.c: Include "disasm.h".
14297 (gdb_print_insn_arm): Update code to get gdbarch.
14298 * disasm.c (dis_asm_read_memory): Change it to
14299 gdb_disassembler::dis_asm_read_memory.
14300 (dis_asm_memory_error): Likewise.
14301 (dis_asm_print_address): Likewise.
14302 (gdb_pretty_print_insn): Change it to
14303 gdb_disassembler::pretty_print_insn.
14304 (dump_insns): Add one argument gdb_disassemlber. All
14305 callers updated.
14306 (do_mixed_source_and_assembly_deprecated): Likewise.
14307 (do_mixed_source_and_assembly): Likewise.
14308 (do_assembly_only): Likewise.
14309 (gdb_disassembler::gdb_disassembler): New.
14310 (gdb_disassembler::print_insn): New.
14311 * disasm.h (class gdb_disassembler): New.
14312 (gdb_pretty_print_insn): Remove declaration.
14313 (gdb_disassemble_info): Likewise.
14314 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14315 (gdbscm_disasm_read_memory_worker): Update.
14316 (gdbscm_disasm_read_memory): Update.
14317 (gdbscm_disasm_memory_error): Remove.
14318 (gdbscm_disasm_print_address): Remove.
14319 (gdbscm_disassembler::gdbscm_disassembler): New.
14320 (gdbscm_print_insn_from_port): Update.
14321 * mips-tdep.c: Include disasm.h.
14322 (gdb_print_insn_mips): Update code to get gdbarch.
14323 * record-btrace.c (btrace_insn_history): Update.
14324 * spu-tdep.c: Include disasm.h.
14325 (struct spu_dis_asm_data): Remove.
14326 (struct spu_dis_asm_info): New.
14327 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14328 SPU id.
14329 (gdb_print_insn_spu): Cast disassemble_info to
14330 spu_dis_asm_info.
14331
80d75874
YQ
143322017-01-26 Yao Qi <yao.qi@linaro.org>
14333
14334 * disasm.c (do_ui_file_delete): Delete.
14335 (gdb_insn_length): Move code creating stream to ...
14336 * utils.c (null_stream): ... here. New function.
14337 * utils.h (null_stream): Declare.
14338
60685cd0
SM
143392017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14340
14341 * python/py-inferior.c (find_thread_object): Return directly
14342 from the loop. Remove "found" variable.
14343
eb1cdb62
JB
143442017-01-21 Joel Brobecker <brobecker@adacore.com>
14345
14346 GDB 7.12.1 released.
14347
b1ce6568
SM
143482017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14349
14350 * python/py-function.c (fnpy_call): Reorder declarations to have
14351 the gdbpy_enter object declared first.
14352 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14353
6f8b0407
SM
143542017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14355
fec93fb1 14356 PR python/21068
6f8b0407
SM
14357 * python/python-internal.h (PyMem_RawMalloc): Define for
14358 Python < 3.4.
14359 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14360 PyMem_RawMalloc instead of PyMem_Malloc.
14361
78cbbba8
LM
143622017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14363 Luis Machado <lgustavo@codesourcery.com>
14364
14365 * NEWS (New commands): Mention flash-erase.
14366 (New MI commands): Mention target-flash-erase.
14367 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14368 command.
14369 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14370 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14371 * target.c (flash_erase_command): New function.
14372 (initialize_targets): Add new flash-erase command.
14373 * target.h (flash_erase_command): New declaration.
14374
2132fe85
JB
143752017-01-20 Joel Brobecker <brobecker@adacore.com>
14376
14377 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14378 HAVE_SYS_PROCFS_H is defined.
14379
d1dff226
AH
143802017-01-18 Alan Hayward <alan.hayward@arm.com>
14381
14382 * remote.c (struct cached_reg): Change data into a pointer.
14383 * (stop_reply_dtr): Free data pointers before deleting vector.
14384 (process_stop_reply): Likewise.
14385 (remote_parse_stop_reply): Allocate space for data
14386
9890e433
AH
143872017-01-18 Alan Hayward <alan.hayward@arm.com>
14388
14389 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14390 MAX_REGISTER_SIZE.
14391 (amd64_pseudo_register_read_value): Likewise.
14392 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14393 (store_register_using_P): Likewise.
14394 * regcache.c (regcache_xfer_part): Likewise.
14395
7a36499a
IR
143962017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14397
14398 Split real and pseudo registers.
14399 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14400 (sparc32_pseudo_regnum): New enum.
14401 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14402 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14403 (SPARC32_CP0_REGISTERS): New macro.
14404 (sparc32_pseudo_register_name): New function.
14405 (sparc32_register_name): Use sparc32_pseudo_register_name.
14406 (sparc32_pseudo_register_type): New function.
14407 (sparc32_register_type): Use sparc32_pseudo_register_type.
14408 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14409 pseudo register numbers.
14410 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14411 (SPARC64_CP0_REGISTERS): New macro.
14412 (sparc64_pseudo_register_name): New function.
14413 (sparc64_register_name): Use sparc64_pseudo_register_name.
14414 (sparc64_pseudo_register_type): New function.
14415 (sparc64_register_type): Use sparc64_pseudo_register_type.
14416 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14417 pseudo register numbers.
14418 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14419 sparc64_store_arguments): Handle pseudo register numbers.
14420
6f8976bf
YQ
144212017-01-13 Yao Qi <yao.qi@linaro.org>
14422
14423 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14424 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14425 output.
14426 (getpkt_or_notif_sane_1): Likewise.
14427
e4241ace
YQ
144282017-01-13 Yao Qi <yao.qi@linaro.org>
14429
14430 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14431 of CC. Pass "-x c++-header" instead of "-x c".
14432
3015c064
SM
144332017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14434
14435 * remote.c (remote_can_async_p): Update comment.
14436
fde1b17d
SM
144372017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14438
14439 * linux-nat.c (linux_nat_can_async_p): Update comment.
14440
ca1ca08b
SM
144412017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14442
14443 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14444
4ad2da73
SM
144452017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14446
14447 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14448
c8b23b3f
TT
144492017-01-10 Tom Tromey <tom@tromey.com>
14450
14451 * python/py-type.c (typy_legacy_template_argument): Update.
14452 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14453 ~demangle_parse_info): Declare new members.
14454 (cp_demangled_name_to_comp): Return unique_ptr.
14455 (cp_demangled_name_parse_free)
14456 (make_cleanup_cp_demangled_name_parse_free)
14457 (cp_new_demangle_parse_info): Remove.
14458 * cp-support.c (do_demangled_name_parse_free_cleanup)
14459 (make_cleanup_cp_demangled_name_parse_free): Remove.
14460 (inspect_type, cp_canonicalize_string_full)
14461 (cp_canonicalize_string): Update.
14462 (mangled_name_to_comp): Change return type.
14463 (cp_class_name_from_physname, method_name_from_physname)
14464 (cp_func_name, cp_remove_params): Update.
14465 * cp-name-parser.y (demangle_parse_info): New constructor, from
14466 cp_new_demangle_parse_info.
14467 (~demangle_parse_info): New destructor, from
14468 cp_demangled_name_parse_free.
14469 (cp_merge_demangle_parse_infos): Update.
14470 (cp_demangled_name_to_comp): Change return type.
14471
1ac32117
TT
144722017-01-10 Tom Tromey <tom@tromey.com>
14473
14474 * top.c (prevent_dont_repeat): Change return type.
14475 * python/python.c (execute_gdb_command): Use std::string.
14476 Update.
14477 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14478 * command.h (prevent_dont_repeat): Change return type.
14479 * breakpoint.c (bpstat_do_actions_1): Update.
14480
0cf08227
TT
144812017-01-10 Tom Tromey <tom@tromey.com>
14482
14483 * value.h (scoped_value_mark::~scoped_value_mark): Call
14484 free_to_mark.
14485 (scoped_value_mark::free_to_mark): New method.
14486 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14487 scoped_value_mark.
14488
eb115069
TT
144892017-01-10 Tom Tromey <tom@tromey.com>
14490
14491 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14492 (valpy_reference_value, valpy_const_value, valpy_get_address)
14493 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14494 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14495 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14496 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14497 scoped_value_mark.
14498 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14499 * value.h (scoped_value_mark): New class.
14500
906768f9
TT
145012017-01-10 Tom Tromey <tom@tromey.com>
14502
14503 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14504 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14505 * psymtab.c (discard_psymtabs_upto): Remove.
14506 (make_cleanup_discard_psymtabs): Remove.
14507 (struct psymtab_state): Remove.
14508
bef155c3
TT
145092017-01-10 Tom Tromey <tom@tromey.com>
14510
14511 * record-full.c (record_full_save_cleanups): Remove.
14512 (record_full_save): Use gdb::unlinker.
14513 * gcore.c (do_bfd_delete_cleanup): Remove.
14514 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14515 cleanups.
14516 * dwarf2read.c (unlink_if_set): Remove.
14517 (write_psymtabs_to_index): Use gdb::unlinker.
14518 * common/gdb_unlinker.h: New file.
14519
192b62ce
TT
145202017-01-10 Tom Tromey <tom@tromey.com>
14521
14522 * windows-tdep.c (windows_xfer_shared_library): Update.
14523 * windows-nat.c (windows_make_so): Update.
14524 * utils.h (make_cleanup_bfd_unref): Remove.
14525 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14526 * symfile.h (symfile_bfd_open)
14527 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14528 * symfile.c (read_symbols, symbol_file_add)
14529 (separate_debug_file_exists): Update.
14530 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14531 (generic_load, reread_symbols): Update.
14532 * symfile-mem.c (symbol_file_add_from_memory): Update.
14533 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14534 (spu_symbol_file_add_from_memory): Update.
14535 * solist.h (struct target_so_ops) <bfd_open>: Return
14536 gdb_bfd_ref_ptr.
14537 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14538 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14539 gdb_bfd_ref_ptr.
14540 (solib_map_sections, reload_shared_libraries_1): Update.
14541 * solib-svr4.c (enable_break): Update.
14542 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14543 * solib-frv.c (enable_break2): Update.
14544 * solib-dsbt.c (enable_break): Update.
14545 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14546 gdb_bfd_ref_ptr.
14547 (darwin_solib_get_all_image_info_addr_at_init): Update.
14548 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14549 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14550 * record-full.c (record_full_save): Update.
14551 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14552 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14553 * minidebug.c (find_separate_debug_file_in_section): Return
14554 gdb_bfd_ref_ptr.
14555 * machoread.c (macho_add_oso_symfile): Change abfd to
14556 gdb_bfd_ref_ptr.
14557 (macho_symfile_read_all_oso): Update.
14558 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14559 (macho_symfile_read): Update.
14560 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14561 (jit_bfd_try_read_symtab): Update.
14562 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14563 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14564 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14565 gdb_bfd_ref_ptr.
14566 (gdb_bfd_ref_policy): New struct.
14567 (gdb_bfd_ref_ptr): New typedef.
14568 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14569 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14570 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14571 gdb_bfd_ref_ptr.
14572 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14573 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14574 (gcore_command): Update.
14575 * exec.c (exec_file_attach): Update.
14576 * elfread.c (elf_symfile_read): Update.
14577 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14578 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14579 (open_and_init_dwo_file): Update.
14580 (open_dwp_file): Return gdb_bfd_ref_ptr.
14581 (open_and_init_dwp_file): Update.
14582 * corelow.c (core_open): Update.
14583 * compile/compile-object-load.c (compile_object_load): Update.
14584 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14585 * coffread.c (coff_symfile_read): Update.
14586 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14587 gdb_bfd_ref_ptr. Rename.
14588 (dump_bfd_file, restore_command): Update.
14589 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14590 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14591 (find_separate_debug_file_by_buildid): Update.
14592
50315b21
TT
145932017-01-10 Tom Tromey <tom@tromey.com>
14594
14595 * common/gdb_ref_ptr.h: New file.
14596 * python/py-ref.h (struct gdbpy_ref_policy): New.
14597 (gdbpy_ref): Now a typedef.
14598
fc4007c9
TT
145992017-01-10 Tom Tromey <tom@tromey.com>
14600
14601 * utils.h (make_cleanup_htab_delete): Don't declare.
14602 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14603 Remove.
14604 * linespec.c (decode_compound_collector): Add constructor,
14605 destructor.
14606 (lookup_prefix_sym): Remove cleanup.
14607 (symtab_collector): Add constructor, destructor.
14608 (collect_symtabs_from_filename): Remove cleanup.
14609 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14610 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14611 Use htab_up.
14612 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14613 * dwarf2read.c (dw2_expand_symtabs_matching)
14614 (dw2_map_symbol_filenames, dwarf_decode_macros)
14615 (write_psymtabs_to_index): Use htab_up.
14616 * dwarf2loc.c (func_verify_no_selftailcall)
14617 (call_site_find_chain_1, func_verify_no_selftailcall)
14618 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14619 std::vector, gdb::unique_xmalloc_ptr.
14620 (call_sitep): Remove typedef.
14621 (dwarf2_locexpr_baton_eval): Remove unused variable.
14622
8dbcee67
TT
146232017-01-10 Tom Tromey <tom@tromey.com>
14624
14625 * python/python-internal.h (make_cleanup_py_decref)
14626 (make_cleanup_py_xdecref): Don't declare.
14627 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14628 (py_xdecref, make_cleanup_py_xdecref): Remove.
14629
13df46cc
TT
146302017-01-10 Tom Tromey <tom@tromey.com>
14631
14632 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14633 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14634
06fc9bf7
TT
146352017-01-10 Tom Tromey <tom@tromey.com>
14636
14637 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14638
830a4934
TT
146392017-01-10 Tom Tromey <tom@tromey.com>
14640
14641 * python/py-utils.c (unicode_to_encoded_string)
14642 (python_string_to_target_string)
14643 (python_string_to_target_python_string)
14644 (python_string_to_host_string, gdbpy_obj_to_string)
14645 (get_addr_from_python): Use gdbpy_ref.
14646
4586d543
TT
146472017-01-10 Tom Tromey <tom@tromey.com>
14648
14649 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14650 gdbpy_ref.
14651
59876f8f
TT
146522017-01-10 Tom Tromey <tom@tromey.com>
14653
14654 * python/python.c (eval_python_command, gdbpy_decode_line)
14655 (gdbpy_run_events, gdbpy_start_type_printers)
14656 (gdbpy_apply_type_printers): Use gdbpy_ref.
14657
97d83487
TT
146582017-01-10 Tom Tromey <tom@tromey.com>
14659
14660 * python/py-param.c (get_doc_string, compute_enum_values): Use
14661 gdbpy_ref.
14662
9205649a
TT
146632017-01-10 Tom Tromey <tom@tromey.com>
14664
14665 * python/py-inferior.c (find_thread_object, build_inferior_list):
14666 Use gdbpy_ref.
14667
74c49d45
TT
146682017-01-10 Tom Tromey <tom@tromey.com>
14669
14670 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14671
16361ffb
TT
146722017-01-10 Tom Tromey <tom@tromey.com>
14673
14674 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14675 gdbpy_ref.
14676
905f2cca
TT
146772017-01-10 Tom Tromey <tom@tromey.com>
14678
14679 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14680 extra incref.
14681 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14682 Use gdbpy_ref.
14683
64081434
TT
146842017-01-10 Tom Tromey <tom@tromey.com>
14685
14686 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14687 gdbpy_ref.
14688
59e9e831
TT
146892017-01-10 Tom Tromey <tom@tromey.com>
14690
14691 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14692 decref results of PyArg_ParseTupleAndKeywords.
14693
9de10f6d
TT
146942017-01-10 Tom Tromey <tom@tromey.com>
14695
14696 * python/python.c (python_run_simple_file): Use
14697 unique_xmalloc_ptr, gdbpy_ref.
14698
2bd5759d
TT
146992017-01-10 Tom Tromey <tom@tromey.com>
14700
14701 * python/py-prettyprint.c (print_stack_unless_memory_error)
14702 (print_string_repr, print_children): Use gdbpy_ref.
14703 (dummy_python_frame): New class.
14704 (dummy_python_frame::dummy_python_frame): Rename from
14705 push_dummy_python_frame.
14706 (py_restore_tstate): Remove.
14707
3b4e0e01
TT
147082017-01-10 Tom Tromey <tom@tromey.com>
14709
14710 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14711
17a22718
TT
147122017-01-10 Tom Tromey <tom@tromey.com>
14713
14714 * python/python.c (ensure_python_env, restore_python_env):
14715 Remove.
14716 * python/python-internal.h (ensure_python_env): Don't declare.
14717 * varobj.h (varobj_ensure_python_env): Don't declare.
14718 * varobj.c (varobj_ensure_python_env): Remove.
14719
68cdc557
TT
147202017-01-10 Tom Tromey <tom@tromey.com>
14721
14722 * varobj.c (varobj_value_get_print_value): Use
14723 gdbpy_enter_varobj.
14724
1eba6383
TT
147252017-01-10 Tom Tromey <tom@tromey.com>
14726
14727 * python/py-prettyprint.c (print_string_repr, print_children):
14728 Update.
14729 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14730 of "encoding".
14731 * varobj.c (varobj_value_get_print_value): Update.
14732 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14733
bde7b3e3
TT
147342017-01-10 Tom Tromey <tom@tromey.com>
14735
14736 * varobj.c (varobj_get_display_hint)
14737 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14738 (varobj_set_visualizer, free_variable): Use
14739 gdbpy_enter_varobj.
14740
a7785f8c
TT
147412017-01-10 Tom Tromey <tom@tromey.com>
14742
14743 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14744 (do_finish_initialization): New function. Use gdbpy_ref.
14745 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14746 do_finish_initialization.
14747
2865bfce
TT
147482017-01-10 Tom Tromey <tom@tromey.com>
14749
14750 * python/py-param.c (get_set_value, get_show_value): Use
14751 gdbpy_enter, gdbpy_ref.
14752
0e9dcc75
TT
147532017-01-10 Tom Tromey <tom@tromey.com>
14754
14755 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14756
12a5cedd
TT
147572017-01-10 Tom Tromey <tom@tromey.com>
14758
14759 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14760
788f2586
TT
147612017-01-10 Tom Tromey <tom@tromey.com>
14762
14763 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14764 Use gdbpy_enter_varobj.
14765
6cd67bea
TT
147662017-01-10 Tom Tromey <tom@tromey.com>
14767
14768 * varobj.c (gdbpy_enter_varobj): New constructor.
14769 * python/python-internal.h (gdbpy_enter_varobj): New class.
14770 * python/py-varobj.c (py_varobj_get_iterator): Use
14771 gdbpy_enter_varobj.
14772
14b122bf
TT
147732017-01-10 Tom Tromey <tom@tromey.com>
14774
14775 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14776 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14777 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14778 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14779 unique_xmalloc_ptr.
14780 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14781
bf1ca3b9
TT
147822017-01-10 Tom Tromey <tom@tromey.com>
14783
14784 * python/py-xmethods.c (invoke_match_method): Use
14785 gdbpy_ref.
14786
572a5524
TT
147872017-01-10 Tom Tromey <tom@tromey.com>
14788
14789 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14790 gdbpy_enter, gdbpy_ref.
14791
396a78b6
TT
147922017-01-10 Tom Tromey <tom@tromey.com>
14793
14794 * python/python.c (python_interactive_command): Use gdbpy_enter.
14795
a88b13c7
TT
147962017-01-10 Tom Tromey <tom@tromey.com>
14797
14798 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14799 gdbpy_ref.
14800
e9f0c363
TT
148012017-01-10 Tom Tromey <tom@tromey.com>
14802
14803 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14804 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14805
6349f452
TT
148062017-01-10 Tom Tromey <tom@tromey.com>
14807
14808 * utils.h (htab_deleter): New struct.
14809 (htab_up): New typedef.
14810 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14811 gdbpy_enter, gdbpy_ref, htab_up.
14812
c0171de6
TT
148132017-01-10 Tom Tromey <tom@tromey.com>
14814
14815 * python/py-unwind.c (pending_frame_invalidate): Remove.
14816 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14817
f18e226f
TT
148182017-01-10 Tom Tromey <tom@tromey.com>
14819
14820 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14821 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14822
c57af3f1
TT
148232017-01-10 Tom Tromey <tom@tromey.com>
14824
14825 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14826
60e600ec
TT
148272017-01-10 Tom Tromey <tom@tromey.com>
14828
14829 * python/python.c (gdbpy_eval_from_control_command)
14830 (gdbpy_source_script, gdbpy_run_events)
14831 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14832 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14833 gdbpy_enter.
14834
bf7da5b0
TT
148352017-01-10 Tom Tromey <tom@tromey.com>
14836
14837 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14838
2d38bced
TT
148392017-01-10 Tom Tromey <tom@tromey.com>
14840
14841 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14842
07bc7329
TT
148432017-01-10 Tom Tromey <tom@tromey.com>
14844
14845 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14846 (python_on_inferior_call_pre, python_on_inferior_call_post)
14847 (python_on_memory_change, python_on_register_change)
14848 (python_inferior_exit, python_new_objfile, add_thread_object)
14849 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14850
6e7c365e
TT
148512017-01-10 Tom Tromey <tom@tromey.com>
14852
14853 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14854 (bpfinishpy_handle_exit): Use gdbpy_enter.
14855
6ba0cd40
TT
148562017-01-10 Tom Tromey <tom@tromey.com>
14857
14858 * python/py-cmd.c (cmdpy_destroyer)
14859 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14860 gdbpy_enter.
14861
de2dc875
TT
148622017-01-10 Tom Tromey <tom@tromey.com>
14863
14864 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14865 gdbpy_enter.
14866 (gdbpy_breakpoint_has_cond): Likewise.
14867
4ecee2c4
TT
148682017-01-10 Tom Tromey <tom@tromey.com>
14869
14870 * python/python.c (gdbpy_enter): New constructor.
14871 (~gdbpy_enter): New destructor.
14872 (restore_python_env, ensure_python_env): Rewrite.
14873 * python/python-internal.h (gdbpy_enter): New class.
14874
37fce74f
TT
148752017-01-10 Tom Tromey <tom@tromey.com>
14876
14877 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14878
53a0cca3
TT
148792017-01-10 Tom Tromey <tom@tromey.com>
14880
14881 * python/py-value.c (value_has_field, get_field_flag)
14882 (get_field_type, valpy_getitem, convert_value_from_python): Use
14883 gdbpy_ref.
14884
ff3724f5
TT
148852017-01-10 Tom Tromey <tom@tromey.com>
14886
14887 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14888 gdbpy_ref.
14889
0700aea5
TT
148902017-01-10 Tom Tromey <tom@tromey.com>
14891
14892 * python/py-prettyprint.c (search_pp_list)
14893 (find_pretty_printer_from_objfiles)
14894 (find_pretty_printer_from_progspace)
14895 (find_pretty_printer_from_gdb, find_pretty_printer)
14896 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14897 gdbpy_ref.
14898
1bb44c9f
TT
148992017-01-10 Tom Tromey <tom@tromey.com>
14900
14901 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14902
87ce03fd
TT
149032017-01-10 Tom Tromey <tom@tromey.com>
14904
14905 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14906 (ltpy_get_all_source_lines): Use gdbpy_ref.
14907
ee0a3fb8
TT
149082017-01-10 Tom Tromey <tom@tromey.com>
14909
14910 * python/py-framefilter.c (extract_sym, extract_value)
14911 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14912 gdbpy_ref.
14913
bf2a52fa
TT
149142017-01-10 Tom Tromey <tom@tromey.com>
14915
14916 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14917
f59fe7f8
TT
149182017-01-10 Tom Tromey <tom@tromey.com>
14919
14920 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14921
80bd970a
TT
149222017-01-10 Tom Tromey <tom@tromey.com>
14923
14924 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14925 gdbpy_ref.
14926
d1b3de2e
TT
149272017-01-10 Tom Tromey <tom@tromey.com>
14928
14929 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14930
3bb43384
TT
149312017-01-10 Tom Tromey <tom@tromey.com>
14932
14933 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14934 (typy_range): Use gdbpy_ref.
14935
abf5651e
TT
149362017-01-10 Tom Tromey <tom@tromey.com>
14937
14938 * python/py-threadevent.c (create_thread_event_object): Use
14939 gdbpy_ref.
14940 * python/py-stopevent.c (create_stop_event_object): Simplify.
14941 (emit_stop_event): Use gdbpy_ref.
14942 * python/py-signalevent.c (create_signal_event_object): Use
14943 gdbpy_ref.
14944 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14945 (emit_new_objfile_event, create_clear_objfiles_event_object)
14946 (emit_clear_objfiles_event): Use gdbpy_ref.
14947 * python/py-infevents.c (create_inferior_call_event_object)
14948 (create_register_changed_event_object)
14949 (create_memory_changed_event_object, emit_inferior_call_event)
14950 (emit_memory_changed_event, emit_register_changed_event): Use
14951 gdbpy_ref.
14952 * python/py-exitedevent.c (create_exited_event_object)
14953 (emit_exited_event): Use gdbpy_ref.
14954 * python/py-event.h (evpy_emit_event): Remove
14955 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14956 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14957 * python/py-continueevent.c (emit_continue_event): Use
14958 gdbpy_ref.
14959 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14960 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14961 gdbpy_ref.
14962 * python/py-bpevent.c (create_breakpoint_event_object): Use
14963 gdbpy_ref.
14964
a68ff33e
TT
149652017-01-10 Tom Tromey <tom@tromey.com>
14966
14967 * python/py-ref.h: New file.
14968
7becfd03
SM
149692017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14970
14971 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14972 void.
14973 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14974 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14975 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14976 * ui-out.c (ui_out::redirect): Likewise.
14977 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14978 * cli/cli-logging.c (set_logging_redirect): Update call site of
14979 ui_out::redirect.
14980 (handle_redirections): Likewise.
14981 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14982 * top.c (execute_command_to_string): Likewise.
14983 * utils.c (do_ui_out_redirect_pop): Likewise.
14984
df294654
SM
149852017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14986
14987 * stack.c (_initialize_stack): Update "frame" command help message.
14988
f5e6296e
IB
149892017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14990
14991 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14992
0e2d6fa6
YQ
149932017-01-06 Yao Qi <yao.qi@linaro.org>
14994
14995 * x86-linux-nat.h: Include gdb_proc_service.h.
14996
44d6d3f9
YQ
149972017-01-06 Yao Qi <yao.qi@linaro.org>
14998
14999 * ser-base.h: Include serial.h.
15000
656731fe
YQ
150012017-01-06 Yao Qi <yao.qi@linaro.org>
15002
15003 * ppc-linux-tdep.h: Include ppc-tdep.h.
15004
1ca8f924
YQ
150052017-01-06 Yao Qi <yao.qi@linaro.org>
15006
15007 * nat/amd64-linux-siginfo.h: Include signal.h.
15008
bc3008c4
YQ
150092017-01-06 Yao Qi <yao.qi@linaro.org>
15010
15011 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15012
66c80d03
YQ
150132017-01-06 Yao Qi <yao.qi@linaro.org>
15014
15015 * mi/mi-parse.h: Include mi-cmds.h.
15016
051d2dda
YQ
150172017-01-06 Yao Qi <yao.qi@linaro.org>
15018
15019 * inf-loop.c: Don't include "target.h".
15020 * inf-loop.h: Include it here.
15021
8018d34f
YQ
150222017-01-06 Yao Qi <yao.qi@linaro.org>
15023
15024 * dfp.h: Include "dboulest.h" and "expression.h".
15025
c0b8369c
YQ
150262017-01-06 Yao Qi <yao.qi@linaro.org>
15027
15028 * ax-gdb.h: Include "ax.h".
15029
ad5cba2a
YQ
150302017-01-06 Yao Qi <yao.qi@linaro.org>
15031
15032 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15033 with nat/gdb_ptrace.h.
15034
1c33cd7f
YQ
150352017-01-05 Yao Qi <yao.qi@linaro.org>
15036
15037 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15038 new line.
15039 (mips64_fbsd_sigframe_init): Likewise.
15040
c988ac1d
JB
150412017-01-04 John Baldwin <jhb@FreeBSD.org>
15042
15043 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15044 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15045
b268007c
JB
150462017-01-04 John Baldwin <jhb@FreeBSD.org>
15047
15048 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15049 * NEWS: Mention new FreeBSD/mips native configuration.
15050 * config/mips/fbsd.mh: New file.
15051 * configure.host: Add mips*-*-freebsd*.
15052 * mips-fbsd-nat.c: New file.
15053
387360da
JB
150542017-01-04 John Baldwin <jhb@FreeBSD.org>
15055
15056 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15057 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15058 * NEWS: Mention new FreeBSD/mips target.
15059 * configure.tgt: Add mips*-*-freebsd*.
15060 * mips-fbsd-tdep.c: New file.
15061 * mips-fbsd-tdep.h: New file.
15062
2aaaf250
YQ
150632017-01-04 Yao Qi <yao.qi@linaro.org>
15064
15065 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15066 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15067
61baf725
JB
150682017-01-01 Joel Brobecker <brobecker@adacore.com>
15069
6dbb839a 15070 Update copyright year range in all GDB files.
61baf725 15071
c113e7ff 150722017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 15073
c113e7ff 15074 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 15075
c113e7ff 15076For older changes see ChangeLog-2016.
c906108c
SS
15077\f
15078Local Variables:
15079mode: change-log
15080left-margin: 8
15081fill-column: 74
15082version-control: never
57da7796 15083coding: utf-8
c906108c 15084End: