Remove is_remote target check from gdb.base/dprintf-non-stop.exp
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
f71c8822
TT
12017-10-09 Tom Tromey <tom@tromey.com>
2
3 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4 std::string.
5 * tui/tui-layout.c (enum tui_status): Use std::string.
6
981a3fb3
TT
72017-10-11 Tom Tromey <tom@tromey.com>
8
9 * gdbthread.h (thread_command): Constify.
10 * inferior.h (detach_command): Constify.
11 * top.h (set_history, show_history): Constify.
12 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
13 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
14 * bsd-kvm.c (bsd_kvm_cmd): Constify.
15 * printcmd.c (set_command): Constify.
16 (non_const_set_command): New function.
17 * dcache.c (set_dcache_command, show_dcache_command): Constify.
18 * breakpoint.c (enable_command, disable_command, delete_command)
19 (catch_command, tcatch_command, set_breakpoint_cmd)
20 (show_breakpoint_cmd): Constify.
21 * macrocmd.c (macro_command): Constify.
22 * infcmd.c (unset_command, kill_command, detach_command)
23 (info_proc_cmd): Constify.
24 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
25 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
26 (info_auto_load_cmd): Constify.
27 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
28 (unset_tdesc_cmd): Constify.
29 * ada-lang.c (set_ada_command, show_ada_command)
30 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
31 * guile/guile.c (set_guile_command, show_guile_command)
32 (info_guile_command): Constify.
33 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
34 Constify.
35 * skip.c (skip_command): Constify.
36 * compile/compile.c (_initialize_compile): Constify.
37 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
38 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
39 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
40 (maint_btrace_pt_show_cmd): Constify.
41 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
42 Constify.
43 * python/python.c (user_show_python, user_set_python): Constify.
44 * mips-tdep.c (set_mips_command, show_mips_command)
45 (set_mipsfpu_command): Constify.
46 * record-btrace.c (cmd_record_btrace_start)
47 (cmd_set_record_btrace, cmd_show_record_btrace)
48 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
49 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
50 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
51 Constify.
52 * symfile.c (overlay_command): Constify.
53 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
54 * cli/cli-logging.c (set_logging_command, show_logging_command):
55 Constify.
56 * cli/cli-dump.c (dump_command, append_command)
57 (srec_dump_command, ihex_dump_command, verilog_dump_command)
58 (tekhex_dump_command, binary_dump_command)
59 (binary_append_command): Constify.
60 * cli/cli-decode.c (struct cmd_list_element): Change type of
61 "fun".
62 * cli/cli-cmds.c (info_command, show_command, set_debug)
63 (show_debug): Constify.
64 (show_command): Add non-const overload.
65 * top.c (set_history, show_history): Constify.
66 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
67 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
68 * target.c (target_command): Constify.
69 * sparc64-tdep.c (info_adi_command): Constify.
70 * record-full.c (cmd_record_full_start): Constify.
71 (set_record_full_command): Constify. Fix typo.
72 (show_record_full_command): Constify.
73 * thread.c (thread_command, thread_apply_command): Constify.
74 * memattr.c (dummy_cmd): Constify.
75 * value.c (function_command): Constify.
76 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
77 * probe.c (info_probes_command): Constify.
78 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
79 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
80 (show_thread_cmd, set_thread_default_cmd)
81 (show_thread_default_cmd): Constify.
82 (check_empty): Constify.
83 * tracepoint.c (tfind_command): Constify.
84 * cp-support.c (maint_cplus_command): Constify.
85 * windows-tdep.c (info_w32_command): Constify.
86 * record.c (cmd_record_start, set_record_command)
87 (show_record_command, info_record_command, cmd_record_goto):
88 Constify.
89 * ravenscar-thread.c (set_ravenscar_command)
90 (show_ravenscar_command): Constify.
91 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
92 Constify.
93 (add_internal_problem_command): Remove casts.
94 * arc-tdep.c (maintenance_print_arc_command): Constify.
95 * valprint.c (set_print, show_print, set_print_raw)
96 (show_print_raw): Constify.
97 * maint.c (maintenance_command, maintenance_info_command)
98 (maintenance_print_command, maintenance_set_cmd)
99 (maintenance_show_cmd, set_per_command_cmd)
100 (show_per_command_cmd, maintenance_check_command): Constify.
101 * language.c (set_check, show_check): Constify.
102 * typeprint.c (show_print_type, set_print_type): Constify.
103 * go32-nat.c (go32_info_dos_command): Constify.
104
fdf44873
TT
1052017-10-11 Tom Tromey <tom@tromey.com>
106
107 * breakpoint.c (prepare_re_set_context): Remove.
108 (breakpoint_re_set_one): Update. Don't use cleanups.
109 (breakpoint_re_set): Use scoped_restore, std::string, and
110 scoped_restore_current_language.
111
81b1e71c
TT
1122017-10-11 Tom Tromey <tom@tromey.com>
113
114 * breakpoint.c (commands_command_1): Use std::string.
115 (cleanup_executing_breakpoints): Remove.
116 (bpstat_do_actions_1): Use scoped_restore.
117 (bpstat_check_watchpoint): Use std::string.
118 (decode_static_tracepoint_spec): Likewise.
119 (break_range_command): Likewise.
120 (watch_command_1): Likewise.
121 (compare_breakpoints): Change argument types.
122 (clear_command): Use std::vector.
123 (cleanup_executing_breakpoints): Remove.
124 (update_global_location_list): Use unique_xmalloc_ptr.
125 (strace_command): Remove unused declaration.
126
4f9d9906
JB
1272017-10-11 John Baldwin <jhb@FreeBSD.org>
128
129 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
130 * NEWS: Mention new FreeBSD/arm native configuration.
131 * configure.host: Add arm*-*-freebsd*.
132 * configure.nat: Likewise.
133 * arm-fbsd-nat.c: New file.
134
7176dfd2
JB
1352017-10-11 John Baldwin <jhb@FreeBSD.org>
136
137 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
138 (ALLDEPFILES): Add arm-fbsd-tdep.c.
139 * NEWS: Mention new FreeBSD/arm target.
140 * configure.tgt: Add arm*-*-freebsd*.
141 * arm-fbsd-tdep.c: New file.
142 * arm-fbsd-tdep.h: New file.
143
fe220226
MR
1442017-10-11 Maciej W. Rozycki <macro@imgtec.com>
145
146 * linux-tdep.c (linux_make_corefile_notes): Remove call to
147 `gdbarch_elfcore_write_linux_prpsinfo'.
148 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
149 method.
150 (elf_internal_linux_prpsinfo): Remove declaration.
151 * gdbarch.h: Regenerate.
152 * gdbarch.c: Regenerate.
153
a2f63b2e
MR
1542017-10-11 Maciej W. Rozycki <macro@imgtec.com>
155
156 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
157 `set_gdbarch_elfcore_write_linux_prpsinfo'.
158
458ca1d0
PA
1592017-10-11 Pedro Alves <palves@redhat.com>
160
161 * breakpoint.c (reattach_breakpoints): Delete.
162 * breakpoint.h (reattach_breakpoints): Delete.
163
905014d7
SM
1642017-10-11 Simon Marchi <simon.marchi@ericsson.com>
165
166 * symfile.c (registered_sym_fns): Make struct, not typedef.
167 (DEF_VEC_O (registered_sym_fns)): Remove.
168 (symtab_fns): Change type to std::vector.
169 (add_symtab_fns): Adjust.
170 (find_sym_fns): Adjust.
171
56d704da
AK
1722017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
173
174 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
175 * arc-tdep.h (arc_arch_is_em): New function.
176 (arc_arch_is_hs): Likewise.
177
7fa29be9
EB
1782017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
179
180 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
181 parentheses in the declaration.
182 (macro_lookup_inclusion): Likewise.
183 (macro_lookup_definition): Likewise.
184 * p-lang.h (pascal_builtin_types): Likewise.
185 * tui/tui-data.c (tui_win_list): Likewise.
186 * tui/tui-data.h (tui_win_list): Likewise.
187 * utils.h (make_cleanup_free_section_addr_info): Likewise.
188
d9b477e3
KB
1892017-10-11 Mark Rages <markrages@gmail.com>
190
191 * target-memory.c (block_boundaries): Fix for block address not
192 aligned on block size.
193
65630365
PA
1942017-10-10 Pedro Alves <palves@redhat.com>
195 Tom Tromey <tom@tromey.com>
196
197 * breakpoint.c (struct captured_breakpoint_query_args)
198 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
199 (print_breakpoint): New.
200 * breakpoint.h (print_breakpoint): Declare.
201 * common/common-exceptions.h (enum return_reason): Remove
202 references to catch_exceptions.
203 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
204 Delete.
205 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
206 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
207 * gdb.h: Delete.
208 * gdbthread.h (thread_select): Declare.
209 * mi/mi-cmd-break.c: Don't include gdb.h.
210 (breakpoint_notify): Use print_breakpoint.
211 * mi/mi-cmd-catch.c: Don't include gdb.h.
212 * mi/mi-interp.c: Don't include gdb.h.
213 (mi_print_breakpoint_for_event): New.
214 (mi_breakpoint_created, mi_breakpoint_modified): Use
215 mi_print_breakpoint_for_event.
216 * mi/mi-main.c: Don't include gdb.h.
217 (mi_cmd_thread_select): Parse the global thread ID here. Use
218 thread_select instead of gdb_thread_select.
219 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
220 of using gdb_list_thread_ids.
221 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
222 FILEIO_ENOSYS here.
223 (remote_fileio_request): Use TRY/CATCH instead of
224 catch_exceptions.
225 * symfile-mem.c (struct symbol_file_add_from_memory_args)
226 (symbol_file_add_from_memory_wrapper): Delete.
227 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
228 * thread.c: Don't include gdb.h.
229 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
230 (thread_alive): Use thread_select.
231 (do_captured_thread_select): Delete, parts salvaged as ...
232 (thread_select): ... this new function.
233 (gdb_thread_select): Delete.
234
bf469271
PA
2352017-10-10 Pedro Alves <palves@redhat.com>
236 Tom Tromey <tom@tromey.com>
237
238 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
239 and reverse logic.
240 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
241 No longer macros. Instead ...
242 (enum wp_check_result): They're now values of this new
243 enumeration.
244 (watchpoint_check): Change return type to wp_check_result and
245 parameter type to bpstat.
246 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
247 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
248 catch_errors. Reverse logic of watchpoint_check call.
249 (breakpoint_re_set_one): Now returns void and takes a breakpoint
250 pointer as parameter.
251 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
252 * common/common-exceptions.c (throw_exception_sjlj): Update
253 comments to avoid mentioning catch_errors.
254 * exceptions.c (catch_errors): Delete.
255 * exceptions.h: Update comments to avoid mentioning catch_errors.
256 (catch_errors_ftype, catch_errors): Delete.
257 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
258 (hook_stop_stub): Delete.
259 (restore_selected_frame): Change return type to void, and
260 parameter type to const frame_id &.
261 (restore_infcall_control_state): Use TRY/CATCH instead of
262 catch_errors.
263 * main.c (captured_command_loop): Return void and remove
264 parameter. Remove references to catch_errors.
265 (captured_main): Use TRY/CATCH instead of catch_errors.
266 * objc-lang.c (objc_submethod_helper_data)
267 (find_objc_msgcall_submethod_helper): Delete.
268 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
269 catch_errors.
270 * record-full.c (record_full_message): Return void.
271 (record_full_message_args, record_full_message_wrapper): Delete.
272 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
273 instead of catch_errors.
274 * solib-aix.c (solib_aix_open_symbol_file_object): Change
275 parameter type to int.
276 * solib-darwin.c (open_symbol_file_object): Ditto.
277 * solib-dsbt.c (open_symbol_file_object): Ditto.
278 * solib-frv.c (open_symbol_file_object): Ditto.
279 * solib-svr4.c (open_symbol_file_object): Ditto.
280 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
281 * solib.c (update_solib_list): Use TRY/CATCH instead of
282 catch_errors.
283 * solist.h (struct target_so_ops) <open_symbol_file_object>:
284 Change type.
285 * symmisc.c (struct print_symbol_args): Remove.
286 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
287 (print_symbol): Change type.
288 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
289 and remove parameters.
290 (catch_errors): New.
291 (get_windows_debug_event): Adjust.
292
1a56bfa5
TT
2932017-10-09 Tom Tromey <tom@tromey.com>
294
295 * mi/mi-main.c (free_splay_tree): Remove.
296 (list_available_thread_groups): Use splay_tree_up.
297 * common/gdb_splay_tree.h: New file.
298
0c478e2d
TT
2992017-10-09 Tom Tromey <tom@tromey.com>
300
301 * mi/mi-main.c (do_nothing): Remove.
302 (list_available_thread_groups): Update.
303
cbd2b4e3
PA
3042017-10-09 Pedro Alves <palves@redhat.com>
305
306 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
307 reading registers when switching context.
308
a181c0bf
JB
3092017-10-09 John Baldwin <jhb@FreeBSD.org>
310
311 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
312 (fbsd_convert_siginfo): Likewise.
313 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
314
6e66f753
SM
3152017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * configure.ac (try_guile_versions): Remove guile-2.2.
318 * configure: Regenerate.
319
890e9790
TT
3202017-10-09 Tom Tromey <tom@tromey.com>
321
322 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
323 (COMPILE.pre): Use $(CXX).
324
109483d9
PA
3252017-10-09 Pedro Alves <palves@redhat.com>
326
327 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
328 Use bool.
329 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
330 * cp-support.h (cp_remove_params): Now returns a
331 gdb::unique_xmalloc_ptr.
332 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
333 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
334 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
335 returning a gdb::unique_xmalloc_ptr.
336 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
337 * stack.c (find_frame_funname): Adjust to cp_remove_params
338 returning a gdb::unique_xmalloc_ptr.
339
791afaa2
TT
3402017-10-08 Tom Tromey <tom@tromey.com>
341
342 * dwarf2read.c (dwarf2_get_dwz_file): Use
343 gdb::unique_xmalloc_ptr.
344 (find_slot_in_mapped_hash): Likewise.
345 (dwarf2_physname): Likewise.
346 (create_dwo_unit_in_dwp_v1): Use std::string.
347 (create_dwo_unit_in_dwp_v2): Likewise.
348 (lookup_dwo_cutu): Likewise.
349 (inherit_abstract_dies): Use std::vector.
350 (read_array_type): Likewise.
351 (dwarf_decode_macros): Remove unused declaration.
352 (unsigned_int_compar): Remove.
353 (dwarf2_build_psymtabs_hard): Use scoped_restore.
354 (psymtabs_addrmap_cleanup): Remove.
355
30a9c02f
TT
3562017-10-08 Tom Tromey <tom@tromey.com>
357
358 * frame-unwind.c (frame_unwind_try_unwinder): Update.
359 * frame.h (frame_cleanup_after_sniffer): Declare.
360 (frame_prepare_for_sniffer): Return void.
361 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
362 type of argument.
363 (frame_prepare_for_sniffer): Return void.
364
757325a3
TT
3652017-10-08 Tom Tromey <tom@tromey.com>
366
367 * utils.h (make_cleanup_value_free): Remove.
368 * utils.c (do_value_free, struct cleanup): Remove.
369 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
370 Use gdb_value_up.
371 * value.h (struct value_deleter): New.
372 (gdb_value_up): New typedef.
373
b9c04fb2
TT
3742017-10-08 Tom Tromey <tom@tromey.com>
375
376 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
377 (make_cleanup_free_search_symbols): Remove.
378 (search_symbols): Return std::vector.
379 (symbol_search::compare_search_syms): Now member of
380 symbol_search. Change arguments.
381 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
382 (symtab_symbol_info, rbreak_command): Update.
383 * symtab.h (struct symbol_search) <next>: Remove.
384 Add constructors.
385 (symbol_search::operator<): New function.
386 (symbol_search::operator==): New function.
387 (search_symbols): Remove std::vector.
388 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
389 (symbol_search::compare_search_syms): Declare.
390
0d28b0a5
YQ
3912017-10-06 Yao Qi <yao.qi@linaro.org>
392
393 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
394 arch/aarch64-insn.o.
395 Remove one rule.
396 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
397
71917808
YQ
3982017-10-06 Yao Qi <yao.qi@linaro.org>
399
400 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
401 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
402 arch/arm-linux.o respectively.
403 * configure.tgt: Likewise.
404
2081b2b2
YQ
4052017-10-06 Yao Qi <yao.qi@linaro.org>
406
407 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
408 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
409
a1b85d28
PA
4102017-10-06 Pedro Alves <palves@redhat.com>
411
412 * windows-nat.c: Include <algorithm>.
413
d97987e2
YQ
4142017-10-06 Yao Qi <yao.qi@linaro.org>
415
416 * configure.tgt (i386_tobjs): New variable.
417 (amd64_tobjs): New variable.
418 Set $cpu_obs and $os_obs.
419
f38307f5
YQ
4202017-10-06 Yao Qi <yao.qi@linaro.org>
421
422 * Makefile.in (CONFIG_SRC_SUBDIR): New.
423 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
424 (clean): Remove object files and dependency files.
425 (distclean): Remove the directory.
426 * configure.ac: Invoke AC_CONFIG_COMMANDS.
427 * configure: Re-generated.
428 * configure.tgt: Replace amd64.o with arch/amd64.o.
429
2f924de6
JM
4302017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
431
432 PR build/22188
433 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
434 and SETEND.
435
2fd9d7ca
PA
4362017-10-05 Pedro Alves <palves@redhat.com>
437
438 * linux-nat.c (linux_child_follow_fork): When following the parent
439 and detaching the child, consult the parent thread's architecture
440 instead of the child's.
441
d13b8493
UW
4422017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
443
444 * ax.h: Do not include "doublest.h".
445 (union agent_val): Remove.
446
3b4b2f16
UW
4472017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
448
449 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
450 (decimal_to_string): Return std::string object.
451 (decimal_from_string): Accept std::string object. Return bool.
452 (decimal_from_integral, decimal_from_doublest): Remove.
453 (decimal_from_longest): Add prototype.
454 (decimal_from_ulongest): Likewise.
455 (decimal_to_longest): Likewise.
456 (decimal_from_doublest): Likewise.
457 * dfp.c: Do not include "gdbtypes.h" or "value.h".
458 (MAX_DECIMAL_STRING): Move here.
459 (decimal_to_string): Return std::string object.
460 (decimal_from_string): Accept std::string object. Return bool.
461 (decimal_from_integral): Remove, replace by ...
462 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
463 (decimal_to_longest): New function.
464 (decimal_from_floating): Remove, replace by ...
465 (decimal_from_doublest): ... this new function.
466 (decimal_to_doublest): Update to new decimal_to_string interface.
467
468 * value.c (unpack_long): Use decimal_to_longest.
469 * valops.c (value_cast): Use decimal_from_doublest instead of
470 decimal_from_floating. Use decimal_from_[u]longest isntead of
471 decimal_from_integral.
472 * valarith.c (value_args_as_decimal): Likewise.
473 * valprint.c (print_decimal_floating): Update to new
474 decimal_to_string interface.
475 * printcmd.c (printf_decfloat): Likewise.
476 * c-exp.y (parse_number): Update to new decimal_from_string interface.
477
1841ee5d
UW
4782017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
479
480 * doublest.h: Do not include "floatformat.h". Remove stale comments.
481 * gdbtypes.c: Include "floatformat.h".
482 * value.c: Likewise.
483 * m68k-tdep.c: Likewise.
484
485 * findvar.c: Do not include "floatformat.h".
486 * amd64-darwin-tdep.c: Likewise.
487 * arm-linux-tdep.c: Likewise.
488 * i386-darwin-tdep.c: Likewise.
489 * i387-tdep.c: Likewise.
490 * m68k-linux-tdep.c: Likewise.
491 * mep-tdep.c: Likewise.
492 * mips-tdep.c: Likewise.
493 * nios2-tdep.c: Likewise.
494 * s390-linux-tdep.c: Likewise.
495 * sparc-obsd-tdep.c: Likewise.
496 * sparc-tdep.c: Likewise.
497 * sparc64-tdep.c: Likewise.
498 * spu-tdep.c: Likewise.
499 * tic6x-tdep.c: Likewise.
500 * tilegx-tdep.c: Likewise.
501 * vax-tdep.c: Likewise.
502 * xstormy16-tdep.c: Likewise.
503 * xtensa-tdep.c: Likewise.
504
505 * top.c: Do not include "doublest.h".
506 * aarch64-tdep.c: Likewise.
507 * alpha-tdep.c: Likewise.
508 * arm-linux-tdep.c: Likewise.
509 * m68k-linux-tdep.c: Likewise.
510 * tilegx-tdep.c: Likewise.
511 * xstormy16-tdep.c: Likewise.
512
a80a6471
JB
5132017-10-05 John Baldwin <jhb@FreeBSD.org>
514
515 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
516 (mipsn32_fbsd_sigframe): Define.
517 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
518 for FreeBSD/mipsn32.
519
12c4bd7f
JB
5202017-10-05 John Baldwin <jhb@FreeBSD.org>
521
522 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
523 AT_HWCAP.
524
c91933e9
TG
5252017-10-05 Tristan Gingold <tgingold@free.fr>
526
527 * MAINTAINERS (Misc): Update my email address.
528
5cd63fda
PA
5292017-10-04 Pedro Alves <palves@redhat.com>
530
531 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
532 it instead of target_gdbarch.
533 (get_remote_state, get_remote_packet_size): Adjust
534 get_remote_arch_state calls, passing down target_gdbarch
535 explicitly.
536 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
537 'gdbarch' and use it instead of target_gdbarch.
538 (get_memory_packet_size): Adjust get_remote_arch_state calls,
539 passing down target_gdbarch explicitly.
540 (struct stop_reply) <arch>: New field.
541 (remote_parse_stop_reply): Use the stopped thread's architecture,
542 not the current inferior's. Save the architecture in the
543 stop_reply.
544 (process_stop_reply): Use the stop reply's architecture.
545 (process_g_packet, remote_fetch_registers)
546 (remote_prepare_to_store, store_registers_using_G)
547 (remote_store_registers): Adjust get_remote_arch_state calls,
548 using the regcache's architecture.
549 (remote_get_trace_status): Adjust get_remote_arch_state calls,
550 passing down target_gdbarch explicitly.
551 * spu-multiarch.c (spu_thread_architecture): Defer to the target
552 beneath instead of calling target_gdbarch.
553 * target.c (default_thread_architecture): Use the specified
554 inferior's architecture, instead of the current inferior's
555 architecture (via target_gdbarch).
556
ed4227b7
PA
5572017-10-04 Pedro Alves <palves@redhat.com>
558
559 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
560 case.
561 (regcache_print): Handle !target_has_registers here instead.
562
55b11ddf
PA
5632017-10-04 Pedro Alves <palves@redhat.com>
564
565 * frame.c (create_test_frame): Delete.
566 * frame.h (create_test_frame): Delete.
567 * gdbarch-selftests.c: Include gdbthread.h and target.h.
568 (class regcache_test): Delete.
569 (test_target_has_registers, test_target_has_stack)
570 (test_target_has_memory, test_target_prepare_to_store)
571 (test_target_store_registers): New functions.
572 (test_target_ops): New class.
573 (register_to_value_test): Error out if there's already a
574 process_stratum (or higher) target pushed. Create a fuller mock
575 environment, with mock target_ops, inferior, address space, thread
576 and inferior_ptid.
577 * progspace.c (struct address_space): Move to ...
578 * progspace.h (struct address_space): ... here.
579 * regcache.h (regcache::~regcache, regcache::raw_write)
580 [GDB_SELF_TEST]: No longer virtual.
581
4c71c105
SM
5822017-10-04 Simon Marchi <simon.marchi@ericsson.com>
583
584 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
585
73dcd72d
PA
5862017-10-04 Pedro Alves <palves@redhat.com>
587
588 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
589 out of 'between TRY and CATCH'.
590
44704526
PA
5912017-10-04 Pedro Alves <palves@redhat.com>
592
593 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
594 * common/common-exceptions.h (TRY): Open an outermost scope.
595 Expand intro comment.
596 (CATCH): Reindent.
597 (END_CATCH): Close the outermost scope.
598 * completer.c (complete_line_internal): Add missing END_CATCH.
599
bc3b087d
SDJ
6002017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
601
602 * NEWS (Changes since GDB 8.0): Add entry about new
603 'set-cwd-on-gdbserver' feature.
604 (New remote packets): Add entry for QSetWorkingDir.
605 * common/common-inferior.h (set_inferior_cwd): New prototype.
606 * infcmd.c (set_inferior_cwd): Remove "static".
607 (show_cwd_command): Expand text to include remote debugging.
608 * remote.c: Add PACKET_QSetWorkingDir.
609 (remote_protocol_features) <QSetWorkingDir>: New entry for
610 PACKET_QSetWorkingDir.
611 (extended_remote_set_inferior_cwd): New function.
612 (extended_remote_create_inferior): Call
613 "extended_remote_set_inferior_cwd".
614 (_initialize_remote): Call "add_packet_config_cmd" for
615 QSetWorkingDir.
616
d092c5a2
SDJ
6172017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
618
619 * NEWS (New commands): Mention "set/show cwd".
620 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
621 "cd" command's help text.
622 * common/common-inferior.h (get_inferior_cwd): New prototype.
623 * infcmd.c (inferior_cwd_scratch): New global variable.
624 (set_inferior_cwd): New function.
625 (get_inferior_cwd): Likewise.
626 (set_cwd_command): Likewise.
627 (show_cwd_command): Likewise.
628 (_initialize_infcmd): Add "set/show cwd" commands.
629 * inferior.h (class inferior) <cwd>: New field.
630 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
631 (fork_inferior): Change inferior's cwd before its execution.
632 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
633 to CreateProcess.
634
7da0a886
SDJ
6352017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
636
637 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
638 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
639 (COMMON_OBS): Add gdb_tilde_expand.o.
640 * common/gdb_tilde_expand.c: New file.
641 * common/gdb_tilde_expand.h: Likewise.
642
db8dd160
MR
6432017-10-03 Maciej W. Rozycki <macro@imgtec.com>
644
645 * gdbarch.sh (objfile): Remove duplicate declaration.
646 * gdbarch.h: Regenerate.
647
f8bfbf22
TT
6482017-10-03 Tom Tromey <tom@tromey.com>
649
650 * utils.c (internal_vproblem): Use string_vprintf.
651
5178ed48
TT
6522017-10-03 Tom Tromey <tom@tromey.com>
653
654 * printcmd.c (info_symbol_command): Use std::string.
655
8cff8730
TT
6562017-10-03 Tom Tromey <tom@tromey.com>
657
658 * top.c (gdb_safe_append_history): Use std::string.
659
895b8f30
TT
6602017-10-03 Tom Tromey <tom@tromey.com>
661
662 * event-top.c (stdin_event_handler): Update.
663 * main.c (captured_main_1): Update.
664 * top.h (make_delete_ui_cleanup): Remove.
665 (struct ui): Add constructor and destructor.
666 (new_ui, delete_ui): Remove.
667 * top.c (make_delete_ui_cleanup): Remove.
668 (new_ui_command): Use std::unique_ptr.
669 (delete_ui_cleanup): Remove.
670 (ui::ui): Rename from new_ui. Update.
671 (free_ui): Remove.
672 (ui::~ui): Rename from delete_ui. Update.
673
0efef640
TT
6742017-10-03 Tom Tromey <tom@tromey.com>
675
676 * symfile.c (load_progress): Use gdb::byte_vector.
677
245ad7d3
TT
6782017-10-03 Tom Tromey <tom@tromey.com>
679
680 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
681 declaration.
682 * printcmd.c (x_command): Remove unused declaration.
683 * symfile.c (symbol_file_command): Remove unused declaration.
684
e05550d7
TT
6852017-10-03 Tom Tromey <tom@tromey.com>
686
687 * utils.c (internal_vproblem): Use std::string.
688 (defaulted_query): Likewise.
689
b95de2b7
TT
6902017-10-03 Tom Tromey <tom@tromey.com>
691
692 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
693 * top.c (execute_command_to_string): Update.
694 * utils.c (make_cleanup_restore_page_info): Remove.
695 (do_restore_page_info_cleanup): Remove.
696 (set_batch_flag_and_restore_page_info):
697 New.
698 (make_cleanup_restore_page_info): Remove.
699 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
700 (~set_batch_flag_and_restore_page_info): New
701 (make_cleanup_restore_uinteger): Remove.
702 (make_cleanup_restore_integer): Remove.
703 (struct restore_integer_closure): Remove.
704 (restore_integer): Remove.
705 * utils.h (struct set_batch_flag_and_restore_page_info): New
706 class.
707 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
708 (make_cleanup_restore_page_info): Remove.
709 (make_cleanup_restore_uinteger) Remove.
710 (make_cleanup_restore_integer) Remove.
711
07036511
TT
7122017-10-03 Tom Tromey <tom@tromey.com>
713
714 * record-full.h (record_full_gdb_operation_disable_set): Return
715 scoped_restore_tmpl<int>.
716 * infrun.c (adjust_pc_after_break): Update.
717 (handle_signal_stop): Update.
718 * record-full.c (record_full_gdb_operation_disable_set): Return
719 scoped_restore_tmpl<int>.
720 (record_full_wait_1, record_full_insert_breakpoint)
721 (record_full_remove_breakpoint, record_full_save)
722 (record_full_goto_insn): Update.
723
45320ffa
TT
7242017-10-02 Tom Tromey <tom@tromey.com>
725
726 PR rust/22236:
727 * rust-lang.c (rust_val_print_str): New function.
728 (val_print_struct): Call it.
729 (rust_subscript): Preserve name of slice type.
730
b3e3859b
TT
7312017-10-02 Tom Tromey <tom@tromey.com>
732
733 * rust-lang.c (rust_subscript): Handle slices in
734 EVAL_AVOID_SIDE_EFFECTS case.
735
01af5e0d
TT
7362017-10-02 Tom Tromey <tom@tromey.com>
737
738 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
739
888e3ddb
TT
7402017-10-02 Tom Tromey <tom@tromey.com>
741
742 * rust-lang.h (rust_slice_type): Add "extern".
743
cc536b21
PA
7442017-10-02 Tom Tromey <tom@tromey.com>
745 Pedro Alves <palves@redhat.com>
746
747 * ada-lang.h (ada_exc_info::operator<): Make const.
748 (ada_exc_info::operator==): Make const.
749 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
750 Make const.
751
386c8614
TT
7522017-09-29 Tom Tromey <tom@tromey.com>
753
754 * target.c (read_whatever_is_readable): Change type of "result".
755 Update.
756 (free_memory_read_result_vector): Remove.
757 (read_memory_robust): Change return type. Update.
758 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
759 bin2hex, std::string.
760 * target.h (memory_read_result_s): Remove typedef.
761 (free_memory_read_result_vector): Remove.
762 (read_memory_robust): Return std::vector.
763
789c4b5e
TT
7642017-09-29 Tom Tromey <tom@tromey.com>
765
766 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
767
ab816a27
TT
7682017-09-29 Tom Tromey <tom@tromey.com>
769
770 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
771 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
772 operator< and operator==.
773 (ada_exceptions_list): Return a std::vector.
774 * ada-lang.c (ada_exc_info::operator<): Rename from
775 compare_ada_exception_info.
776 (ada_exc_info::operator==): New.
777 (sort_remove_dups_ada_exceptions_list): Change type of
778 "exceptions".
779 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
780 (ada_add_global_exceptions): Likewise.
781 (ada_exceptions_list_1): Return a std::vector.
782 (ada_exceptions_list): Likewise.
783
52f9abe4
TT
7842017-09-29 Tom Tromey <tom@tromey.com>
785
786 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
787 'std::set *'.
788 (print_one_inferior): Update.
789 (free_vector_of_ints): Remove.
790 (list_available_thread_groups): Change "ids" to std::set.
791 (mi_cmd_list_thread_groups): Update.
792 (struct collect_cores_data) <core>: Now a std::set.
793 (collect_cores): Update.
794 (unique): Remove.
795 (print_one_inferior): Update.
796
dcd5ddcc
TT
7972017-09-29 Tom Tromey <tom@tromey.com>
798
799 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
800 (mi_execute_async_cli_command): Likewise.
801 (mi_cmd_trace_frame_collected): Use field_fmt.
802
45d288cc
TT
8032017-09-29 Tom Tromey <tom@tromey.com>
804
805 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
806 gdb::byte_vector.
807
6afe2f4a
TT
8082017-09-29 Tom Tromey <tom@tromey.com>
809
810 * mi/mi-parse.c (mi_parse): Remove unused declaration.
811
9813429a
TT
8122017-09-29 Tom Tromey <tom@tromey.com>
813
814 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
815
2d6960b4
TT
8162017-09-29 Tom Tromey <tom@tromey.com>
817
818 * varobj.h (varobj_gen_name): Return std::string.
819 * varobj.c (varobj_gen_name): Return std::string.
820 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
821 (mi_cmd_var_delete): Don't copy "name".
822
784c453a
TT
8232017-09-29 Tom Tromey <tom@tromey.com>
824
825 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
826 (mi_cmd_break_insert_1): Update.
827
a9bc57b9
TT
8282017-09-29 Tom Tromey <tom@tromey.com>
829
830 * target.h (make_scoped_defer_target_commit_resume): Update.
831 * target.c (make_scoped_defer_target_commit_resume): Rename from
832 make_cleanup_defer_target_commit_resume. Return a
833 scoped_restore.
834 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
835
9754d8c4
TT
8362017-09-29 Tom Tromey <tom@tromey.com>
837
838 * main.c (captured_main_1): Remove unused declaration.
839 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
840
99ef965c
TT
8412017-09-29 Tom Tromey <tom@tromey.com>
842
843 * symtab.c (search_symbols): Remove unused outer cleanup.
844 (make_source_files_completion_list): Remove unused declaration.
845
42518ba7
TT
8462017-09-29 Tom Tromey <tom@tromey.com>
847
848 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
849
726b2169
TT
8502017-09-29 Tom Tromey <tom@tromey.com>
851
852 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
853 gdb::byte_vector.
854
55b06432
TT
8552017-09-29 Tom Tromey <tom@tromey.com>
856
857 * complaints.c (vcomplaint): Use std::string.
858
8abcee91
TT
8592017-09-29 Tom Tromey <tom@tromey.com>
860
861 * tracepoint.c (trace_variable_command): Use std::string.
862 (encode_actions_1): Remove unused declarations.
863 (create_tsv_from_upload): Use std::string.
864
6ad94bc7
TT
8652017-09-29 Tom Tromey <tom@tromey.com>
866
867 * cp-support.c (gdb_demangle): Use std::string.
868
2003f3d8
TT
8692017-09-29 Tom Tromey <tom@tromey.com>
870
871 * stack.c (parse_frame_specification): Use std::string
872 (info_frame_command): Use gdb::unique_xmalloc_ptr.
873
8f8accb5
TT
8742017-09-29 Tom Tromey <tom@tromey.com>
875
876 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
877
200aa7b1
TT
8782017-09-29 Tom Tromey <tom@tromey.com>
879
880 * utils.c (vfprintf_maybe_filtered): Use std::string.
881 (vfprintf_unfiltered): Likewise.
882
606aae8a
TT
8832017-09-29 Tom Tromey <tom@tromey.com>
884
885 * event-top.c (top_level_prompt): Return std::string.
886 (display_gdb_prompt): Update.
887
bd413795
TT
8882017-09-29 Tom Tromey <tom@tromey.com>
889
890 * unittests/common-utils-selftests.c (format): New function.
891 (string_vprintf_tests): New function.
892 (_initialize_common_utils_selftests): Register new tests.
893 * common/common-utils.c (string_vprintf): New function.
894 * common/common-utils.h (string_vprintf): Declare.
895
256642e8
PA
8962017-09-29 Pedro Alves <palves@redhat.com>
897
898 * common/rsp-low.c (unpack_varlen_hex): Constify.
899 * common/rsp-low.h (unpack_varlen_hex): Constify.
900 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
901 Constify.
902 * remote.c (remote_set_permissions, read_ptid)
903 (remote_current_thread, remote_get_threads_with_qthreadinfo)
904 (remote_static_tracepoint_marker_at)
905 (remote_static_tracepoint_markers_by_strid)
906 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
907 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
908 (parse_tracepoint_definition, parse_tsv_definition)
909 (parse_static_tracepoint_marker_definition): Constify.
910 * tracepoint.h (parse_static_tracepoint_marker_definition)
911 (parse_trace_status, parse_tracepoint_status)
912 (parse_tracepoint_definition, parse_tsv_definition): Constify.
913
b6bb3468
PA
9142017-09-29 Pedro Alves <palves@redhat.com>
915
916 * remote.c (target_buf, target_buf_size): Delete.
917 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
918 Use the connection's packet buffer instead.
919 All callers adjusted.
920 (_initialize_remote): Remove references to target_buf and
921 target_buf_size.
922
b2f8eb7a
PA
9232017-09-28 Pedro Alves <palves@redhat.com>
924
925 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
926 unittests/common-utils-selftests.c.
927 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
928 (COMMON_OBS): Remove utils-selftests.o.
929 * utils-selftests.c: Move to ...
930 * unittests/common-utils-selftests.c: ... here and rename self
931 test to "string_printf".
932
08302ed2
DE
9332017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
934
935 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
936 having NULL cus or tus.
937
96a5a1d3
UW
9382017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
939
940 * arm-tdep.c: (convert_from_extended): Remove.
941 (convert_to_extended): Likewise.
942 (arm_extract_return_value): Use convert_typed_floating.
943 (arm_store_return_value): Likewise.
944
945 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
946 * sh-tdep.c: Do not include "floatformat.h".
947 (sh_littlebyte_bigword_type): New function.
948 (sh_register_convert_to_virtual): Use convert_typed_floating.
949 (sh_register_convert_to_raw): Likewise.
950 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
951 (sh64_littlebyte_bigword_type): New function.
952 (sh64_extract_return_value): Use convert_typed_floating.
953 (sh64_register_convert_to_virtual): Likewise.
954 (sh64_register_convert_to_raw): Likewise.
955
0db7851f
UW
9562017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
957
958 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
959 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
960
961 * gdbtypes.h (union type_specific): Make field floatformat hold
962 just a single struct floatformat, not an array.
963 (floatformat_from_type): Move here.
964 * gdbtypes.c (floatformat_from_type): Move here. Update to
965 changed TYPE_FLOATFORMAT definition.
966 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
967 (recursive_dump_type): Likewise.
968 (init_float_type): Install correct floatformat for byte order.
969 (arch_float_type): Likewise.
970
77b7c781
UW
9712017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
972
973 * gdbtypes.c (init_type): Change incoming argument from
974 length-in-bytes to length-in-bits. Assert length is a
975 multiple of TARGET_CHAR_BITS.
976 (arch_type, arch_flags_type): Likewise.
977 (init_integer_type): Update call to init_type.
978 (init_character_type): Likewise.
979 (init_boolean_type): Likewise.
980 (init_float_type): Likewise.
981 (init_decfloat_type): Likewise.
982 (init_complex_type): Likewise.
983 (init_pointer_type): Likewise.
984 (objfile_type): Likewise.
985 (arch_integer_type): Update call to arch_type.
986 (arch_character_type): Likewise.
987 (arch_boolean_type): Likewise.
988 (arch_float_type): Likewise.
989 (arch_decfloat_type): Likewise.
990 (arch_complex_type): Likewise.
991 (arch_pointer_type): Likewise.
992 (gdbtypes_post_init): Likewise.
993
994 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
995 (read_base_type): Likewise.
996 * mdebugread.c (basic_type): Likewise.
997 * stabsread.c (dbx_init_float_type): Likewise.
998 (rs6000_builtin_type): Likewise.
999 (read_range_type): Likewise. Also, fix call to init_integer_type
1000 with erroneous length argument.
1001
1002 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1003 * d-lang.c (build_d_types): Likewise.
1004 * f-lang.c (build_fortran_types): Likewise.
1005 * go-lang.c (build_go_types): Likewise.
1006 * opencl-lang.c (build_opencl_types): Likewise.
1007 * jit.c (finalize_symtab): Likewise.
1008 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1009 (build_std_type_info_type): Likewise.
1010 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
1011 update call to arch_flags_type.
1012
1013 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1014 arch_type.
1015 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1016 * windows-tdep.c (windows_get_tlb_type): Likewise.
1017
1018 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1019 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1020 * m32c-tdep.c (make_types): Likewise.
1021 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1022 (rl78_psw_type): Update call to arch_flags_type.
1023 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1024 * rx-tdep.c (rx_psw_type): Likewise.
1025 (rx_fpsw_type): Likewise.
1026 * sparc-tdep.c (sparc_psr_type): Likewise.
1027 (sparc_fsr_type): Likewise.
1028 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1029 (sparc64_ccr_type): Likewise.
1030 (sparc64_fsr_type): Likewise.
1031 (sparc64_fprs_type): Likewise.
1032
f21b4d5c
TT
10332017-09-27 Tom Tromey <tom@tromey.com>
1034
1035 * findcmd.c (find_command): Constify.
1036
643c2ffa
TT
10372017-09-27 Tom Tromey <tom@tromey.com>
1038
1039 * ada-tasks.c (task_command_1, task_command): Constify.
1040
510e5e56
TT
10412017-09-27 Tom Tromey <tom@tromey.com>
1042
1043 * symtab.c (maintenance_print_symbol_cache)
1044 (maintenance_flush_symbol_cache)
1045 (maintenance_print_symbol_cache_statistics): Constify.
1046
e503b191
TT
10472017-09-27 Tom Tromey <tom@tromey.com>
1048
1049 * inferior.c (detach_inferior_command, kill_inferior_command)
1050 (inferior_command): Constify.
1051
4e001312
TT
10522017-09-27 Tom Tromey <tom@tromey.com>
1053
1054 * regcache.c (regcache_print, maintenance_print_registers)
1055 (maintenance_print_raw_registers)
1056 (maintenance_print_cooked_registers)
1057 (maintenance_print_register_groups)
1058 (maintenance_print_remote_registers): Constify.
1059
77763700
TT
10602017-09-27 Tom Tromey <tom@tromey.com>
1061
1062 * printcmd.c (map_display_numbers, undisplay_command)
1063 (enable_disable_display_command, enable_display_command)
1064 (disable_display_command): Constify.
1065
4495129a
TT
10662017-09-27 Tom Tromey <tom@tromey.com>
1067
1068 * breakpoint.h (delete_command): Don't declare.
1069 * breakpoint.c (delete_command, enable_once_command)
1070 (enable_count_command, enable_delete_command, breakpoint_1)
1071 (maintenance_info_breakpoints, stopin_command, stopat_command)
1072 (delete_command, delete_trace_command, save_breakpoints)
1073 (save_breakpoints_command, save_tracepoints_command): Constify.
1074
3088cf40
TT
10752017-09-27 Tom Tromey <tom@tromey.com>
1076
1077 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1078 (skip_ws, extract_identifier, macro_define_command)
1079 (macro_undef_command, macro_list_command): Constify.
1080
69f476a3
TT
10812017-09-27 Tom Tromey <tom@tromey.com>
1082
1083 * infcmd.c (environment_info, set_environment_command)
1084 (unset_environment_command, path_info, info_proc_cmd_1)
1085 (info_proc_cmd_mappings, info_proc_cmd_stat)
1086 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1087 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1088
c4a3e68e
TT
10892017-09-27 Tom Tromey <tom@tromey.com>
1090
1091 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1092 Constify.
1093
c9d31bd6
TT
10942017-09-27 Tom Tromey <tom@tromey.com>
1095
1096 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1097
1f3f85eb
TT
10982017-09-27 Tom Tromey <tom@tromey.com>
1099
1100 * demangle.c (demangle_command): Constify.
1101
9c504b5d
TT
11022017-09-27 Tom Tromey <tom@tromey.com>
1103
1104 * progspace.c (maintenance_info_program_spaces_command):
1105 Constify.
1106
6663cf91
TT
11072017-09-27 Tom Tromey <tom@tromey.com>
1108
1109 * compile/compile.c (check_raw_argument, compile_file_command)
1110 (compile_code_command, compile_print_command): Constify.
1111
34e5fa26
TT
11122017-09-27 Tom Tromey <tom@tromey.com>
1113
1114 * reggroups.c (maintenance_print_reggroups): Constify.
1115
8384c356
TT
11162017-09-27 Tom Tromey <tom@tromey.com>
1117
1118 * dwarf2read.c (save_gdb_index_command): Constify.
1119
884beb0c
TT
11202017-09-27 Tom Tromey <tom@tromey.com>
1121
1122 * stap-probe.c (info_probes_stap_command): Constify.
1123
e0b2930c
TT
11242017-09-27 Tom Tromey <tom@tromey.com>
1125
1126 * fork-child.c (unset_exec_wrapper_command): Constify.
1127
f938677d
TT
11282017-09-27 Tom Tromey <tom@tromey.com>
1129
1130 * btrace.c (get_uint, get_context_size, no_chunk)
1131 (maint_btrace_packet_history_cmd)
1132 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1133 (maint_info_btrace_cmd): Constify.
1134
8949cb87
TT
11352017-09-27 Tom Tromey <tom@tromey.com>
1136
1137 * reverse.c (delete_bookmark_command): Constify.
1138
ac88e2de
TT
11392017-09-27 Tom Tromey <tom@tromey.com>
1140
1141 * remote.c (set_memory_packet_size)
1142 (set_memory_write_packet_size, show_memory_write_packet_size)
1143 (set_memory_read_packet_size, show_memory_read_packet_size)
1144 (compare_sections_command, packet_command, remote_put_command)
1145 (remote_get_command, remote_delete_command): Constify.
1146
bd4c9dfe
TT
11472017-09-27 Tom Tromey <tom@tromey.com>
1148
1149 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1150 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1151 (set_mipsfpu_auto_command): Constify.
1152
5e93d4c6
TT
11532017-09-27 Tom Tromey <tom@tromey.com>
1154
1155 * cli/cli-cmds.h (cd_command): Constify.
1156 * cli/cli-cmds.c (cd_command): Constify.
1157
fc41a75b
TT
11582017-09-27 Tom Tromey <tom@tromey.com>
1159
1160 * thread.c (thread_name_command, thread_find_command): Constify.
1161
67810076
TT
11622017-09-27 Tom Tromey <tom@tromey.com>
1163
1164 * probe.c (enable_probes_command, disable_probes_command):
1165 Constify.
1166
1d8b34a7
TT
11672017-09-27 Tom Tromey <tom@tromey.com>
1168
1169 * symfile.c (symbol_file_command): Constify.
1170 * gdbcore.h (deprecated_file_changed_hook): Constify.
1171 * exec.c (deprecated_file_changed_hook, exec_file_command)
1172 (file_command): Constify.
1173 * defs.h (symbol_file_command): Constify.
1174
442019e1
TT
11752017-09-27 Tom Tromey <tom@tromey.com>
1176
1177 * remote-fileio.c (set_system_call_allowed)
1178 (show_system_call_allowed): Constify.
1179
2983f7cb
TT
11802017-09-27 Tom Tromey <tom@tromey.com>
1181
1182 * tracepoint.c (delete_trace_variable_command)
1183 (tfind_end_command, tfind_start_command, tfind_pc_command)
1184 (tfind_tracepoint_command, tfind_line_command)
1185 (tfind_range_command, tfind_outside_command): Constify.
1186
4fd41b24
TT
11872017-09-27 Tom Tromey <tom@tromey.com>
1188
1189 * ax-gdb.c (maint_agent_printf_command, agent_command)
1190 (agent_eval_command): Constify.
1191
f2fc3015
TT
11922017-09-27 Tom Tromey <tom@tromey.com>
1193
1194 * tracepoint.c (info_scope_command): Constify.
1195 * python/python.c (gdbpy_decode_line): Constify.
1196 * python/py-breakpoint.c (bppy_init): Constify.
1197 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1198 * location.h: (new_linespec_location)
1199 (string_to_event_location_basic, string_to_event_location):
1200 Constify.
1201 * location.c (new_linespec_location)
1202 (string_to_event_location_basic, string_to_event_location):
1203 Constify.
1204 * linespec.h (decode_line_with_current_source)
1205 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1206 * linespec.c (linespec_lex_to_end)
1207 (decode_line_with_current_source)
1208 (decode_line_with_last_displayed): Constify.
1209 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1210 Constify.
1211 * cli/cli-cmds.c (edit_command, list_command): Constify.
1212 * breakpoint.h (until_break_command, watch_command_wrapper)
1213 (awatch_command_wrapper, rwatch_command_wrapper)
1214 (init_ada_exception_breakpoint): Constify.
1215 * breakpoint.c (break_command_1, dprintf_command)
1216 (break_range_command, watch_command_wrapper)
1217 (rwatch_command_wrapper, awatch_command_wrapper)
1218 (until_break_command, init_ada_exception_breakpoint)
1219 (strace_marker_create_sals_from_location, trace_command)
1220 (ftrace_command, strace_command, struct tracepoint): Constify.
1221 * ax-gdb.c (agent_command_1): Constify.
1222 * ada-lang.c (ada_exception_sal): Constify.
1223
8c2f95f4
TT
12242017-09-27 Tom Tromey <tom@tromey.com>
1225
1226 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1227 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1228 (get_context_size, no_chunk, get_insn_history_modifiers)
1229 (cmd_record_insn_history, get_call_history_modifiers)
1230 (cmd_record_call_history): Constify.
1231
a0d65762
TT
12322017-09-27 Tom Tromey <tom@tromey.com>
1233
1234 * source.c (show_substitute_path_command)
1235 (unset_substitute_path_command, set_substitute_path_command):
1236 Constify.
1237
58971144
TT
12382017-09-27 Tom Tromey <tom@tromey.com>
1239
1240 * typeprint.c (maintenance_print_type): Constify.
1241 * maint.c (maintenance_dump_me, maintenance_demangle)
1242 (maintenance_time_display, maintenance_info_sections)
1243 (maintenance_print_statistics, maintenance_deprecate)
1244 (maintenance_undeprecate): Constify.
1245 (maintenance_do_deprecate): Constify. Use std::string.
1246 (maintenance_selftest): Constify.
1247 * gdbtypes.h (maintenance_print_type): Constify.
1248
c482f52c
TT
12492017-09-27 Tom Tromey <tom@tromey.com>
1250
1251 * hppa-tdep.c (unwind_command): Constify.
1252
e100df1a
TT
12532017-09-27 Tom Tromey <tom@tromey.com>
1254
1255 * target-descriptions.c (unset_tdesc_filename_cmd)
1256 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1257 Constify.
1258
31d56ade
TT
12592017-09-27 Tom Tromey <tom@tromey.com>
1260
1261 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1262
b961da0b
TT
12632017-09-27 Tom Tromey <tom@tromey.com>
1264
1265 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1266
e2d8ae16
TT
12672017-09-27 Tom Tromey <tom@tromey.com>
1268
1269 * tui/tui-regs.c (tui_reg_command): Constify.
1270
863779b0
TT
12712017-09-27 Tom Tromey <tom@tromey.com>
1272
1273 * skip.c (skip_file_command, skip_function_command)
1274 (skip_enable_command, skip_disable_command, skip_delete_command):
1275 Constify.
1276
cdb34d4a
TT
12772017-09-27 Tom Tromey <tom@tromey.com>
1278
1279 * record-btrace.c (cmd_record_btrace_bts_start)
1280 (cmd_record_btrace_pt_start): Constify.
1281
e99c83e7
TT
12822017-09-27 Tom Tromey <tom@tromey.com>
1283
1284 * symmisc.c (maintenance_print_symbols)
1285 (maintenance_print_msymbols, maintenance_print_objfiles)
1286 (maintenance_info_symtabs, maintenance_check_symtabs)
1287 (maintenance_expand_symtabs, maintenance_info_line_tables):
1288 Constify.
1289
32faf971
TT
12902017-09-27 Tom Tromey <tom@tromey.com>
1291
1292 * top.c (new_ui_command): Constify.
1293
2cf311eb
TT
12942017-09-27 Tom Tromey <tom@tromey.com>
1295
1296 * symfile.c (add_symbol_file_command)
1297 (remove_symbol_file_command, list_overlays_command)
1298 (map_overlay_command, unmap_overlay_command)
1299 (overlay_auto_command, overlay_manual_command)
1300 (overlay_off_command, overlay_load_command): Constify.
1301
e6738699
TT
13022017-09-27 Tom Tromey <tom@tromey.com>
1303
1304 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1305 (info_spu_mailbox_command, info_spu_dma_command)
1306 (info_spu_proxydma_command): Constify.
1307
aa360cd5
TT
13082017-09-27 Tom Tromey <tom@tromey.com>
1309
1310 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1311
898241a5
TT
13122017-09-27 Tom Tromey <tom@tromey.com>
1313
1314 * cli/cli-script.c (user_defined_command): Constify.
1315
2d0ac106
TT
13162017-09-27 Tom Tromey <tom@tromey.com>
1317
1318 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1319 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1320 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1321 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1322 (dump_binary_value, append_binary_memory, append_binary_value):
1323 Constify.
1324 (struct dump_context) <func>: Constify.
1325 (add_dump_command): Update.
1326
dede02ce
TT
13272017-09-27 Tom Tromey <tom@tromey.com>
1328
1329 * cli/cli-cmds.c (show_version, show_configuration)
1330 (source_command, show_user): Constify.
1331
d3cb6b99
TT
13322017-09-27 Tom Tromey <tom@tromey.com>
1333
1334 * target.c (maintenance_print_target_stack): Constify.
1335
1970a12f
TT
13362017-09-27 Tom Tromey <tom@tromey.com>
1337
1338 * interps.c (interpreter_exec_cmd): Constify.
1339
41243651
TT
13402017-09-27 Tom Tromey <tom@tromey.com>
1341
1342 * record-full.c (cmd_record_full_restore): Constify.
1343
4465d9db
TT
13442017-09-27 Tom Tromey <tom@tromey.com>
1345
1346 * memattr.c (enable_mem_command, disable_mem_command)
1347 (delete_mem_command): Constify.
1348
ad25e423
TT
13492017-09-27 Tom Tromey <tom@tromey.com>
1350
1351 * value.c (show_convenience): Constify.
1352
d64097b1
TT
13532017-09-27 Tom Tromey <tom@tromey.com>
1354
1355 * gdbcore.h (core_file_command): Update.
1356 * corefile.c (core_file_command): Constify.
1357
4d4589ef
TT
13582017-09-27 Tom Tromey <tom@tromey.com>
1359
1360 * user-regs.c (maintenance_print_user_registers): Constify.
1361
32a7bf17
TT
13622017-09-27 Tom Tromey <tom@tromey.com>
1363
1364 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1365
4a475551
TT
13662017-09-27 Tom Tromey <tom@tromey.com>
1367
1368 * cp-support.c (first_component_command): Constify.
1369
990b9f9f
TT
13702017-09-27 Tom Tromey <tom@tromey.com>
1371
1372 * psymtab.c (maintenance_print_psymbols)
1373 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1374 Constify.
1375
c281872e
TT
13762017-09-27 Tom Tromey <tom@tromey.com>
1377
1378 * windows-tdep.c (display_tib): Constify.
1379
5b64bf74
TT
13802017-09-27 Tom Tromey <tom@tromey.com>
1381
1382 * linux-fork.c (delete_checkpoint_command)
1383 (detach_checkpoint_command): Constify.
1384
4ada038f
TT
13852017-09-27 Tom Tromey <tom@tromey.com>
1386
1387 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1388
57f5a81b
TT
13892017-09-27 Tom Tromey <tom@tromey.com>
1390
1391 * arc-tdep.c (dump_arc_instruction_command): Constify.
1392
b0a8e6c4
TT
13932017-09-27 Tom Tromey <tom@tromey.com>
1394
1395 * valprint.c (set_radix, show_radix): Constify.
1396
8d97dc1c
TT
13972017-09-27 Tom Tromey <tom@tromey.com>
1398
1399 * dtrace-probe.c (info_probes_dtrace_command): Constify.
1400
eb7c454d
TT
14012017-09-27 Tom Tromey <tom@tromey.com>
1402
1403 * command.h (not_just_help_class_command): Update.
1404 * cli/cli-decode.h (not_just_help_class_command): Update.
1405 * cli/cli-decode.c (not_just_help_class_command): Constify.
1406
e4e33335
TT
14072017-09-27 Tom Tromey <tom@tromey.com>
1408
1409 * gdb_bfd.c (maintenance_info_bfds): Constify.
1410
0450cc4c
TT
14112017-09-27 Tom Tromey <tom@tromey.com>
1412
1413 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1414 overloads.
1415 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
1416 (do_const_cfunc): New function.
1417 (cmd_cfunc_eq): New overload.
1418 (cli_user_command_p): Check do_const_cfunc.
1419 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1420 const_cfunc.
1421 * command.h (add_cmd): Add const overload and no-function
1422 overload.
1423 (set_cmd_cfunc): Add const overload.
1424 (cmd_const_cfunc_ftype): Declare.
1425 (cmd_cfunc_eq): Add const overload.
1426 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1427 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1428 overload.
1429
a9bbfbd8
TT
14302017-09-27 Tom Tromey <tom@tromey.com>
1431
1432 * macroexp.c (get_next_token_for_substitution): New function.
1433 (substitute_args): Call it. Check for __VA_OPT__.
1434
5230b05a
WT
14352017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1436 Pedro Alves <palves@redhat.com>
1437
1438 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1439 producer_is_icc_lt_14.
1440 (producer_is_icc_lt_14): New function.
1441 (check_producer): Add code for checking version of ICC.
1442 (producer_is_icc): Move to producer.c.
1443 (read_structure_type): Restrict ICC workaround to ICC<14.
1444 * producer.c: Include selftest.h.
1445 (producer_is_icc, producer_parsing_tests, _initialize_producer):
1446 New functions.
1447 * producer.h (producer_is_icc): New declaration.
1448
b32b108a
WT
14492017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1450
1451 * Makefile.in (SFILES): Add producer.c.
1452 (COMMON_OBS): Add producer.o
1453 * amd64-tdep.c (producer.h): Add new include.
1454 * dwarf2read.c (producer.h): Add new include.
1455 * producer.c: New file.
1456 * producer.h: New file.
1457 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1458 producer.c.
1459 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1460 producer.h.
1461
5007d765
MK
14622017-09-26 Matthias Klose <doko@ubuntu.com>
1463
1464 * configure.ac: Search ncursesw before ncurses.
1465 Check ncursesw/ncurses.h before ncurses/ncurses.h.
1466 * gdb_curses.h: Include <ncursesw/ncurses.h>
1467 * config.in, configure: Regenerate.
1468
281c4447
RO
14692017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1470
1471 PR gdb/22185
1472 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1473 obsolete.
1474 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1475 Remove i386sol2 support.
1476 * configure.nat <i386sol2>: Remove.
1477 <sol2-64>: Fold into ...
1478 <sol2>: ... this.
1479 Move common settings to default section.
1480 Add sol-thread.o.
1481 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1482 x86_64-*-solaris2.1[0-9]*>: Rename to ...
1483 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1484 <i[34567]86-*-solaris*>: Remove.
1485 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1486
1487 * configure.ac: Remove wctype in libw check.
1488 (_MSE_INT_H): Don't define on Solaris 7-9.
1489 <solaris*>: Remove libthread_db.so.1 check.
1490 * configure: Regenerate.
1491 * config.in: Regenerate.
1492
1493 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1494 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1495 (gdb_ps_size_t): Remove.
1496 Use base types in users.
1497 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1498
1499 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1500
39b06c20
RO
15012017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1502
1503 PR build/22206
1504 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1505 (adi_is_addr_mapped): Likewise.
1506 (PSR_ICC): Don't redefine.
1507 (PSR_IMPL): Likewise.
1508
6c3e20f1
TT
15092017-09-25 Tom Tromey <tom@tromey.com>
1510
1511 * regcache.c (regcache::dump): Use string_printf.
1512
b292235f
TT
15132017-09-25 Tom Tromey <tom@tromey.com>
1514
1515 * regcache.c (class regcache_invalidator): New.
1516 (struct register_to_invalidate): Remove.
1517 (make_cleanup_regcache_invalidate): Remove.
1518 (regcache::raw_write): Use regcache_invalidator.
1519
9ac86b52
TT
15202017-09-25 Tom Tromey <tom@tromey.com>
1521
1522 * spu-tdep.c (spu2ppu_sniffer): Update.
1523 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1524 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1525 Remove.
1526 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1527 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1528 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1529 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1530 (frame_pop): Update.
1531
c0e383c6
TT
15322017-09-25 Tom Tromey <tom@tromey.com>
1533
1534 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1535 * regcache.h (regcache_xfree): Don't declare.
1536 * regcache.c (regcache_xfree): Remove.
1537 (do_regcache_xfree): Use delete.
1538 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1539 * linux-fork.c (free_fork): Use delete.
1540 (fork_save_infrun_state): Likewise.
1541 * jit.c (jit_dealloc_cache): Use delete.
1542 * infrun.c (discard_infcall_suspend_state): Use delete.
1543
791199cc
TT
15442017-09-25 Tom Tromey <tom@tromey.com>
1545
1546 * regcache.h (regcache_xmalloc): Don't declare.
1547 (regcache_raw_set_cached_value): Update comment.
1548 * regcache.c (regcache_xmalloc): Remove.
1549 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1550 * jit.c (jit_frame_sniffer): Use new.
1551 * frame.c (frame_save_as_regcache): Use new.
1552
289e23aa
AA
15532017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1554
1555 * NEWS: Advertise support for guarded-storage registers on IBM z.
1556
1b63490c
AA
15572017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1558
1559 * s390-linux-nat.c (have_regset_gs): New static variable.
1560 (s390_linux_fetch_inferior_registers): Handle guarded-storage
1561 control block and guarded-storage broadcast control regsets.
1562 (s390_read_description): Detect whether the target has
1563 guarded-storage support, return appropriate tdesc.
1564 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1565 (features/s390x-gs-linux64.c): Likewise.
1566 (struct gdbarch_tdep) <have_gs>: New field.
1567 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1568 (s390_gsbc_regset): New variables.
1569 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1570 and s390_gsbc_regset, if applicable.
1571 (s390_core_read_description): Check whether core file was from a
1572 target with guarded-storage support; include appropriate regsets.
1573 (s390_gdbarch_init): Add registers for guarded-storage support.
1574 (_initialize_s390_tdep): Initialize new target descriptions that
1575 include registers for guarded-storage support.
1576 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1577 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1578 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1579 (S390_NUM_REGS): Adjust macro definition.
1580 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1581 (tdesc_s390x_gs_linux64): New declarations.
1582
96235dc1
AA
15832017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1584
1585 * features/s390-gs-linux64.xml: New file.
1586 * features/s390-gs.xml: New file.
1587 * features/s390-gsbc.xml: New file.
1588 * features/s390x-gs-linux64.xml: New file.
1589 * features/Makefile (WHICH): Add s390-gs-linux64 and
1590 s390x-gs-linux64.
1591 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1592 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1593 * features/s390-gs-linux64.c: New generated file.
1594 * features/s390x-gs-linux64.c: New file.
1595 * regformats/s390-gs-linux64.dat: New file.
1596 * regformats/s390x-gs-linux64.dat: New file.
1597
b4a7c699
TT
15982017-09-23 Tom Tromey <tom@tromey.com>
1599
1600 * defs.h (make_cleanup_override_quit_handler): Don't declare.
1601
c2f97536
TT
16022017-09-22 Tom Tromey <tom@tromey.com>
1603
1604 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1605 type to scoped_restore_tmpl.
1606 <scoped_input_handler>: Initialize m_quit_handler directly.
1607
43573013
SDJ
16082017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1609
1610 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1611 (cd_command): Likewise. Free "current_directory" before
1612 assigning to it.
1613 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1614 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1615 * top.c (gdb_dirbuf): Remove global declaration.
1616 * top.h (gdb_dirbuf): Likewise.
1617
6ec2e0f5
SDJ
16182017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 * gnulib/aclocal.m4: Regenerate.
1621 * gnulib/config.in: Regenerate.
1622 * gnulib/configure: Regenerate.
1623 * gnulib/import/Makefile.am: Regenerate.
1624 * gnulib/import/Makefile.in: Regenerate.
1625 * gnulib/import/assure.h: New file.
1626 * gnulib/import/at-func.c: Likewise
1627 * gnulib/import/chdir-long.c: New file.
1628 * gnulib/import/chdir-long.h: New file.
1629 * gnulib/import/cloexec.c: New file.
1630 * gnulib/import/cloexec.h: New file.
1631 * gnulib/import/close.c: New file.
1632 * gnulib/import/closedir.c: New file.
1633 * gnulib/import/dirent-private.h: New file.
1634 * gnulib/import/dup-safer.c: New file.
1635 * gnulib/import/dup.c: New file.
1636 * gnulib/import/dup2.c: New file.
1637 * gnulib/import/error.c: New file.
1638 * gnulib/import/error.h: New file.
1639 * gnulib/import/exitfail.c: New file.
1640 * gnulib/import/exitfail.h: New file.
1641 * gnulib/import/fchdir.c: New file.
1642 * gnulib/import/fcntl.c: New file.
1643 * gnulib/import/fcntl.in.h: New file.
1644 * gnulib/import/fd-hook.c: New file.
1645 * gnulib/import/fd-hook.h: New file.
1646 * gnulib/import/fd-safer.c: New file.
1647 * gnulib/import/fdopendir.c: New file.
1648 * gnulib/import/filename.h: New file.
1649 * gnulib/import/filenamecat-lgpl.c: New file.
1650 * gnulib/import/filenamecat.h: New file.
1651 * gnulib/import/fstat.c: New file.
1652 * gnulib/import/fstatat.c: New file.
1653 * gnulib/import/getcwd-lgpl.c: New file.
1654 * gnulib/import/getcwd.c: New file.
1655 * gnulib/import/getdtablesize.c: New file.
1656 * gnulib/import/getlogin_r.c: New file.
1657 * gnulib/import/getprogname.c: New file.
1658 * gnulib/import/getprogname.h: New file.
1659 * gnulib/import/gettext.h: New file.
1660 * gnulib/import/glob-libc.h: New file.
1661 * gnulib/import/glob.c: New file.
1662 * gnulib/import/glob.in.h: New file.
1663 * gnulib/import/intprops.h: New file.
1664 * gnulib/import/m4/chdir-long.m4: New file.
1665 * gnulib/import/m4/close.m4: New file.
1666 * gnulib/import/m4/closedir.m4: New file.
1667 * gnulib/import/m4/d-ino.m4: New file.
1668 * gnulib/import/m4/d-type.m4: New file.
1669 * gnulib/import/m4/dup.m4: New file.
1670 * gnulib/import/m4/dup2.m4: New file.
1671 * gnulib/import/m4/error.m4: New file.
1672 * gnulib/import/m4/fchdir.m4: New file.
1673 * gnulib/import/m4/fcntl.m4: New file.
1674 * gnulib/import/m4/fcntl_h.m4: New file.
1675 * gnulib/import/m4/fdopendir.m4: New file.
1676 * gnulib/import/m4/filenamecat.m4: New file.
1677 * gnulib/import/m4/fstat.m4: New file.
1678 * gnulib/import/m4/fstatat.m4: New file.
1679 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1680 * gnulib/import/m4/getcwd-path-max.m4: New file.
1681 * gnulib/import/m4/getcwd.m4: New file.
1682 * gnulib/import/m4/getdtablesize.m4: New file.
1683 * gnulib/import/m4/getlogin_r.m4: New file.
1684 * gnulib/import/m4/getprogname.m4: New file.
1685 * gnulib/import/m4/glob.m4: New file.
1686 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1687 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1688 * gnulib/import/m4/mempcpy.m4: New file.
1689 * gnulib/import/m4/memrchr.m4: New file.
1690 * gnulib/import/m4/mode_t.m4: New file.
1691 * gnulib/import/m4/msvc-inval.m4: New file.
1692 * gnulib/import/m4/msvc-nothrow.m4: New file.
1693 * gnulib/import/m4/open.m4: New file.
1694 * gnulib/import/m4/openat.m4: New file.
1695 * gnulib/import/m4/opendir.m4: New file.
1696 * gnulib/import/m4/readdir.m4: New file.
1697 * gnulib/import/m4/realloc.m4: New file.
1698 * gnulib/import/m4/rewinddir.m4: New file.
1699 * gnulib/import/m4/save-cwd.m4: New file.
1700 * gnulib/import/m4/strdup.m4: New file.
1701 * gnulib/import/m4/strerror.m4: New file.
1702 * gnulib/import/m4/unistd-safer.m4: New file.
1703 * gnulib/import/mempcpy.c: New file.
1704 * gnulib/import/memrchr.c: New file.
1705 * gnulib/import/msvc-inval.c: New file.
1706 * gnulib/import/msvc-inval.h: New file.
1707 * gnulib/import/msvc-nothrow.c: New file.
1708 * gnulib/import/msvc-nothrow.h: New file.
1709 * gnulib/import/open.c: New file.
1710 * gnulib/import/openat-die.c: New file.
1711 * gnulib/import/openat-priv.h: New file.
1712 * gnulib/import/openat-proc.c: New file.
1713 * gnulib/import/openat.c: New file.
1714 * gnulib/import/openat.h: New file.
1715 * gnulib/import/opendir.c: New file.
1716 * gnulib/import/pipe-safer.c: New file.
1717 * gnulib/import/readdir.c: New file.
1718 * gnulib/import/realloc.c: New file.
1719 * gnulib/import/rewinddir.c: New file.
1720 * gnulib/import/save-cwd.c: New file.
1721 * gnulib/import/save-cwd.h: New file.
1722 * gnulib/import/strdup.c: New file.
1723 * gnulib/import/strerror-override.c: New file.
1724 * gnulib/import/strerror-override.h: New file.
1725 * gnulib/import/strerror.c: New file.
1726 * gnulib/import/unistd--.h: New file.
1727 * gnulib/import/unistd-safer.h: New file.
1728 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1729 "getcwd" and "glob".
1730 * ser-tcp.c: Undefine "close" before redefining it.
1731
432ae719
SM
17322017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1733
1734 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1735 get rid of res_val.
1736
4fa7574e
RO
17372017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1738
1739 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1740 <sol2,sparc>: Likewise.
1741 <sol2-64,i386>: Likewise.
1742
1743 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1744 -Wdeprecated-declarations on *-*-solaris*.
1745 * configure: Regenerate.
1746
1747 * procfs.c: Include "nat/inferior.h".
1748 (procfs_info_proc): Fix typo.
1749
f6327dcb
KB
17502017-09-21 Kevin Buettner <kevinb@redhat.com>
1751
1752 * remote.c (vector): Include.
1753 (struct private_thread_info): Add field, thread_handle.
1754 (free_private_thread_info): Deallocate storage associated with
1755 thread handle.
1756 (get_private_info_thread): Initialize `thread_handle' field.
1757 (struct thread_item): Add field, thread_handle.
1758 (clear_threads_listing_context): Deallocate storage associated
1759 with thread handle.
1760 (start_thread): Add support for "handle" attribute.
1761 (thread_attributes): Add "handle".
1762 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1763 field.
1764 (remote_update_thread_list): Update thread_handle.
1765 (remote_thread_handle_to_thread_info): New function.
1766 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1767
fbbe5337
KB
17682017-09-21 Kevin Buettner <kevinb@redhat.com>
1769
1770 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1771 function.
1772 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1773 * python/python-internal.h (thread_object_type): Declare.
1774
e04ee09e
KB
17752017-09-21 Kevin Buettner <kevinb@redhat.com>
1776
1777 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1778 (target_thread_handle_to_thread_info): Declare.
1779 * target.c (target_thread_handle_to_thread_info): New function.
1780 * target-delegates.c: Regenerate.
1781 * gdbthread.h (find_thread_by_handle): Declare.
1782 * thread.c (find_thread_by_handle): New function.
1783 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1784 function.
1785 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1786
1e5b66ed
SM
17872017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1788
1789 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1790
ebe48ba0
SM
17912017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1792
1793 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1794
0a0bf5dc
YQ
17952017-09-21 Yao Qi <yao.qi@linaro.org>
1796
1797 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1798 to gdb_target_obs.
1799
d1b0a7bf
TT
18002017-09-20 Tom Tromey <tom@tromey.com>
1801
1802 * breakpoint.c (struct counted_command_line): Remove.
1803 (breakpoint_commands): Update.
1804 (alloc_counted_command_line, incref_counted_command_line)
1805 (decref_counted_command_line, do_cleanup_counted_command_line)
1806 (make_cleanup_decref_counted_command_line): Remove.
1807 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1808 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1809 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1810 (save_breakpoints): Update.
1811 * breakpoint.h (counted_command_line): Now a typedef to
1812 shared_ptr.
1813 (struct breakpoint) <commands>: Now a counted_command_line.
1814 (struct bpstats) <command>: Likewise.
1815
48649e1b
TT
18162017-09-20 Tom Tromey <tom@tromey.com>
1817
1818 * breakpoint.c (struct commands_info, do_map_commands_command):
1819 Remove.
1820 (commands_command_1): Update.
1821 (iterate_over_related_breakpoints): Take a function_view.
1822 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1823 (delete_command): Update.
1824 (map_breakpoint_numbers): Take a function_view.
1825 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1826 (disable_command): Update.
1827 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1828 (enable_command): Update.
1829 (struct disp_data, do_enable_breakpoint_disp)
1830 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1831 (do_map_enable_delete_breakpoint): Remove.
1832 (enable_once_command, enable_count_command, enable_delete_command)
1833 (delete_trace_variable_command): Update.
1834
04afa70c
TT
18352017-09-20 Tom Tromey <tom@tromey.com>
1836
1837 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1838 (bpstat_clear): Use delete.
1839 (bpstats): New constructors.
1840 (bpstat_copy, bpstat_stop_status): Use new.
1841 (dprintf_after_condition_true): Update.
1842 * breakpoint.h (bpstats::bpstats): Add constructors.
1843 (bpstats::~bpstats): Add destructor.
1844
c83833f4
PA
18452017-09-20 Pedro Alves <palves@redhat.com>
1846
1847 * eval.c (make_params): Delete, refactored as ...
1848 (class fake_method): ... this new type's ctor.
1849 (fake_method::~fake_method): New.
1850 (evaluate_subexp_standard): Use 'fake_method'.
1851
223ffa71
TT
18522017-09-20 Tom Tromey <tom@tromey.com>
1853
1854 * windows-nat.c (get_windows_debug_event, windows_wait)
1855 (do_initial_windows_stuff, windows_attach): Update.
1856 * utils.c (vwarning, internal_vproblem): Update.
1857 (ui_unregister_input_event_handler_cleanup)
1858 (prepare_to_handle_input): Remove.
1859 (class scoped_input_handler): New.
1860 (defaulted_query, prompt_for_continue): Update.
1861 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1862 Update.
1863 * top.c (undo_terminal_modifications_before_exit): Update.
1864 * target/target.h (target_terminal_init, target_terminal_inferior)
1865 (target_terminal_ours): Don't declare.
1866 (class target_terminal): New.
1867 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1868 (target_terminal_ours_for_output)
1869 (make_cleanup_restore_target_terminal): Don't declare.
1870 (target_terminal_info): Remove.
1871 * target.c (enum terminal_state, terminal_state): Remove.
1872 (target_terminal::terminal_state): Define.
1873 (target_terminal::init): Rename from target_terminal_init.
1874 (target_terminal::inferior): Rename from
1875 target_terminal_inferior.
1876 (target_terminal::ours): Rename from target_terminal_ours.
1877 (target_terminal::ours_for_output): Rename from
1878 target_terminal_ours_for_output.
1879 (target_terminal::info): New method.
1880 (cleanup_restore_target_terminal)
1881 (make_cleanup_restore_target_terminal): Remove.
1882 * solib.c (handle_solib_event): Update.
1883 * remote.c (remote_serial_quit_handler): Update.
1884 (remote_terminal_inferior, remote_wait_as): Update.
1885 * record-full.c (record_full_wait_1): Update.
1886 * nto-procfs.c (procfs_create_inferior): Update.
1887 * nat/fork-inferior.c (startup_inferior): Update.
1888 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1889 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1890 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1891 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1892 (mi_breakpoint_created, mi_breakpoint_deleted)
1893 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1894 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1895 (mi_user_selected_context_changed, report_initial_inferior):
1896 Update.
1897 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1898 (linux_nat_terminal_inferior): Update.
1899 * infrun.c (follow_fork_inferior)
1900 (handle_vfork_child_exec_or_exit, do_target_resume)
1901 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1902 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1903 Update.
1904 * inflow.c (child_terminal_init, info_terminal_command): Update.
1905 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1906 (attach_command): Update.
1907 * infcall.c (call_thread_fsm_should_stop): Update.
1908 * gnu-nat.c (gnu_attach): Update.
1909 * extension.c (struct active_ext_lang_state)
1910 (restore_active_ext_lang): Update.
1911 * exceptions.c (print_flush): Update.
1912 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1913 (struct quit_handler_cleanup_data, restore_quit_handler)
1914 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1915 Remove.
1916 * cp-support.c (gdb_demangle): Update.
1917 * breakpoint.c (update_inserted_breakpoint_locations)
1918 (insert_breakpoint_locations, handle_jit_event)
1919 (disable_breakpoints_in_unloaded_shlib): Update.
1920 * annotate.c (annotate_breakpoints_invalid)
1921 (annotate_frames_invalid): Update.
1922
013af3fc
TT
19232017-09-20 Tom Tromey <tom@tromey.com>
1924
1925 * main.c (catch_command_errors): Rename from
1926 catch_command_errors_const.
1927 (captured_main_1): Update.
1928
06871ae8
PA
19292017-09-20 Pedro Alves <palves@redhat.com>
1930
1931 * cli/cli-cmds.c (list_command): Use print_sal_location.
1932 (print_sal_location): New function.
1933 (ambiguous_line_spec): Use print_sal_location.
1934 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1935 * symtab.c (find_function_start_sal): Likewise.
1936 * symtab.h (symtab_and_line::symbol): New field.
1937
e5f25bc5
PA
19382017-09-20 Pedro Alves <palves@redhat.com>
1939
1940 * linespec.c (minsym_found): Handle non-text minsyms.
1941 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1942
1b7fa39e
WT
19432017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1944
1945 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1946 backslash.
1947
37dd0825
WT
19482017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1949
1950 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1951 vmovups instead vmovaps.
1952 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1953
4e5a4f58
JB
19542017-09-19 John Baldwin <jhb@FreeBSD.org>
1955
1956 * NEWS (Changes since GDB 8.0): Add starti.
1957 * infcmd.c (enum run_break): New.
1958 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1959 case.
1960 (run_command): Use enum run_how.
1961 (start_command): Likewise.
1962 (starti_command): New function.
1963 (RUN_ARGS_HELP): New macro.
1964 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1965 commands. Add starti command.
1966
aa70c9f1
YQ
19672017-09-19 Yao Qi <yao.qi@linaro.org>
1968
1969 * Makefile.in (monitor.o): Remove the rule.
1970
d6541620
YQ
19712017-09-19 Yao Qi <yao.qi@linaro.org>
1972
1973 * annotate.h (struct annotate_arg_emitter): Use
1974 DISABLE_COPY_AND_ASSIGN.
1975 * common/refcounted-object.h (refcounted_object): Likewise.
1976 * completer.h (struct completion_result): Likewise.
1977 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1978 * filename-seen-cache.h (filename_seen_cache): Likewise.
1979 * gdbcore.h (thread_section_name): Likewise.
1980 * gdb_regex.h (compiled_regex): Likewise.
1981 * gdbthread.h (scoped_restore_current_thread): Likewise.
1982 * inferior.h (scoped_restore_current_inferior): Likewise.
1983 * jit.c (jit_reader): Likewise.
1984 * linespec.h (struct linespec_result): Likewise.
1985 * mi/mi-parse.h (struct mi_parse): Likewise.
1986 * nat/fork-inferior.c (execv_argv): Likewise.
1987 * progspace.h (scoped_restore_current_program_space): Likewise.
1988 * python/python-internal.h (class gdbpy_enter): Likewise.
1989 * regcache.h (regcache): Likewise.
1990 * target-descriptions.c (struct tdesc_reg): Likewise.
1991 (struct tdesc_type): Likewise.
1992 (struct tdesc_feature): Likewise.
1993 * ui-out.h (ui_out_emit_type): Likewise.
1994
0615127c
SM
19952017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1996
1997 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1998 label abort_expression.
1999
5e187554
SM
20002017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2001
2002 * common/buffer.c (buffer_xml_printf): Adjust.
2003 * common/xml-utils.c (xml_escape_text): Change return type to
2004 std::string, update code accordingly.
2005 * common/xml-utils.h (xml_escape_text): Change return type to
2006 std::string.
2007 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2008 * windows-tdep.c (windows_xfer_shared_library): Adjust.
2009 * unittests/xml-utils-selftests.c (test_xml_escape_text):
2010 Adjust.
2011
c3d7b541
SM
20122017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2015 (SUBDIR_UNITTESTS_OBS): Add new object file.
2016 * unittests/xml-utils-selftests.c: New file.
2017
1526853e
SM
20182017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2019
2020 * common/selftest.h (selftest): New struct/interface.
2021 (register_test): Add name parameter, add new overload.
2022 (run_tests): Add filter parameter.
2023 (for_each_selftest_ftype): New typedef.
2024 (for_each_selftest): New declaration.
2025 * common/selftest.c (tests): Change type to
2026 map<string, unique_ptr<selftest>>.
2027 (simple_selftest): New struct.
2028 (register_test): New function.
2029 (register_test): Add name parameter and use it.
2030 (run_tests): Add filter parameter and use it. Add prints.
2031 Adjust to vector -> map change.
2032 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2033 registering selftests.
2034 * arm-tdep.c (_initialize_arm_tdep): Likewise.
2035 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2036 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2037 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2038 * findvar.c (_initialize_findvar): Likewise.
2039 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2040 * maint.c (maintenance_selftest): Update call to run_tests.
2041 (maintenance_info_selftests): New function.
2042 (_initialize_maint_cmds): Register "maintenance info selftests"
2043 command. Update "maintenance selftest" doc.
2044 * regcache.c (_initialize_regcache): Add names when registering
2045 selftests.
2046 * rust-exp.y (_initialize_rust_exp): Likewise.
2047 * selftest-arch.c (gdbarch_selftest): New struct.
2048 (gdbarch_tests): Remove.
2049 (register_test_foreach_arch): Add name parameter. Call
2050 register_test.
2051 (tests_with_arch): Remove, move most content to
2052 gdbarch_selftest::operator().
2053 (_initialize_selftests_foreach_arch): Remove.
2054 * selftest-arch.h (register_test_foreach_arch): Add name
2055 parameter.
2056 (run_tests_with_arch): New declaration.
2057 * utils-selftests.c (_initialize_utils_selftests): Add names
2058 when registering selftests.
2059 * utils.c (_initialize_utils): Likewise.
2060 * unittests/array-view-selftests.c
2061 (_initialize_array_view_selftests): Likewise.
2062 * unittests/environ-selftests.c (_initialize_environ_selftests):
2063 Likewise.
2064 * unittests/function-view-selftests.c
2065 (_initialize_function_view_selftests): Likewise.
2066 * unittests/offset-type-selftests.c
2067 (_initialize_offset_type_selftests): Likewise.
2068 * unittests/optional-selftests.c
2069 (_initialize_optional_selftests): Likewise.
2070 * unittests/scoped_restore-selftests.c
2071 (_initialize_scoped_restore_selftests): Likewise.
2072 * NEWS: Document "maintenance selftest" and "maint info
2073 selftests".
2074
5846367a
SM
20752017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2076
2077 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2078 scoped_restore.
2079
bd77e8ff
SM
20802017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * mi/mi-main.c (mi_load_progress): Make uiout variable
2083 a unique_ptr.
2084
26a67918
PA
20852017-09-15 Pedro Alves <palves@redhat.com>
2086
2087 * compile/compile-c-types.c (convert_enum, convert_int)
2088 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2089
3f8a7804
SM
20902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2091
2092 * dwarf2read.c (copy_string): Remove.
2093 (parse_macro_definition): Replace copy_string with savestring.
2094
8d200706
YQ
20952017-09-15 Yao Qi <yao.qi@linaro.org>
2096
2097 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2098 gdb_target_obs.
2099 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2100 Likewise.
2101 (i[34567]86-*-linux*): Likewise.
2102
d185219d
SM
21032017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2104
2105 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2106 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2107 <stack>: Change type to std::vector.
2108 <stack_len, stack_allocated>: Remove.
2109 <grow_stack>: Remove.
2110 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2111 (dwarf_expr_context::~dwarf_expr_context): Remove.
2112 (dwarf_expr_context::grow_stack): Remove.
2113 (dwarf_expr_context::push): Adjust.
2114 (dwarf_expr_context::pop): Adjust.
2115 (dwarf_expr_context::fetch): Adjust.
2116 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2117 (dwarf_expr_context::stack_empty_p): Adjust.
2118 (dwarf_expr_context::execute_stack_op): Adjust.
2119
eccd80d6
SM
21202017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2121
2122 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2123 return type to bool.
2124 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2125
69009882
SM
21262017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2127
2128 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2129 Change type to bool.
2130 (dwarf_stack_value) <in_stack_memory>: Likewise.
2131 (dwarf_expr_context) <push_address>: Change parameter type to
2132 bool.
2133 <fetch_in_stack_memory>: Change return type to bool.
2134 <push>: Change parameter type to bool.
2135 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2136 to bool.
2137 (dwarf_expr_context::push_address): Likewise.
2138 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2139 to bool.
2140 (dwarf_expr_context::execute_stack_op): Adjust.
2141 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2142
1e467161
SM
21432017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2144
2145 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2146 (struct dwarf_expr_context) <n_pieces>: Remove.
2147 <pieces>: Change type to std::vector.
2148 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2149 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2150 pieces.
2151 (dwarf_expr_context::add_piece): Adjust.
2152 * dwarf2loc.c (struct piece_closure): Initialize fields.
2153 <n_pieces>: Remove.
2154 <pieces>: Change type to std::vector.
2155 (allocate_piece_closure): Adjust, change parameter to
2156 std::vector rvalue and std::move it to piece_closure.
2157 (rw_pieced_value): Adjust.
2158 (check_pieced_synthetic_pointer): Adjust.
2159 (indirect_synthetic_pointer): Adjust.
2160 (coerce_pieced_ref): Adjust.
2161 (free_pieced_value_closure): Adjust. Use delete to free
2162 piece_closure.
2163 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2164 to allocate_piece_closure.
2165 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2166
0782db84
SM
21672017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2168
2169 * probe.h (probe_ops_cp): Remove typedef.
2170 (DEF_VEC_P (probe_ops_cp)): Remove.
2171 (all_probe_ops): Change type to std::vector.
2172 * probe.c (info_probes_for_ops): Adjust to vector change.
2173 (probe_linespec_to_ops): Likewise.
2174 (all_probe_ops): Change type to std::vector.
2175 (_initialize_probe): Adjust to vector change.
2176 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2177 * elfread.c (elf_get_probes): Likewise.
2178 * stap-probe.c (_initialize_stap_probe): Likewise.
2179
1eac6bea
SM
21802017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2181
2182 * probe.h (struct bound_probe): Define constructors.
2183 * probe.c (bound_probe_s): Remove typedef.
2184 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2185 (collect_probes): Change return type to std::vector, remove
2186 cleanup.
2187 (compare_probes): Return bool, change parameter type. Change
2188 semantic to "less than".
2189 (gen_ui_out_table_header_info): Change parameter to std::vector
2190 and update.
2191 (exists_probe_with_pops): Likewise.
2192 (info_probes_for_ops): Update to std::vector change.
2193 (enable_probes_command): Likewise.
2194 (disable_probes_command): Likewise.
2195
aaa63a31
SM
21962017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2197
2198 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2199 vec to std::vector.
2200 * probe.c (parse_probes_in_pspace): Update.
2201 (find_probes_in_objfile): Update.
2202 (find_probe_by_pc): Update.
2203 (collect_probes): Update.
2204 (probe_any_get_probes): Update.
2205 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2206 return type to reference to std::vector.
2207 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2208 std::vector and update.
2209 (dtrace_process_dof): Likewise.
2210 (dtrace_get_probes): Likewise.
2211 * elfread.c (elf_get_probes): Change return type to std::vector,
2212 store an std::vector in bfd_data.
2213 (probe_key_free): Update to std::vector.
2214 * stap-probe.c (handle_stap_probe): Change parameter to
2215 std::vector and update.
2216 (stap_get_probes): Likewise.
2217 * symfile-debug.c (debug_sym_get_probes): Change return type to
2218 std::vector and update.
2219
cb85b21b
TT
22202017-09-11 Tom Tromey <tom@tromey.com>
2221
2222 * breakpoint.c (program_breakpoint_here_p): Update.
2223 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2224 from make_show_memory_breakpoints_cleanup. Return a
2225 scoped_restore_tmpl<int>.
2226 (restore_show_memory_breakpoints): Remove.
2227 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2228 * mem-break.c (memory_validate_breakpoint): Update.
2229 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2230 (ia64_memory_remove_breakpoint): Update.
2231 (ia64_breakpoint_from_pc): Update.
2232 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2233 from make_show_memory_breakpoints_cleanup.
2234
8fbc99ef
TT
22352017-09-11 Tom Tromey <tom@tromey.com>
2236
2237 * d-namespace.c (d_lookup_symbol): Use std::string.
2238 (find_symbol_in_baseclass): Likewise.
2239
50feb4bd
TT
22402017-09-11 Tom Tromey <tom@tromey.com>
2241
2242 * ctf.c (ctf_start): Use std::string.
2243
c6dc63a1
TT
22442017-09-11 Tom Tromey <tom@tromey.com>
2245
2246 * ada-lang.c (is_known_support_routine): Update.
2247 (ada_unhandled_exception_name_addr_from_raise): Update.
2248 * guile/scm-frame.c (gdbscm_frame_name): Update.
2249 * python/py-frame.c (frapy_name): Update.
2250 (frapy_function): Update.
2251 * stack.h (find_frame_funname): Update.
2252 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2253 (print_frame): Update.
2254
d6b9b80f
TT
22552017-09-11 Tom Tromey <tom@tromey.com>
2256
2257 * findcmd.c (put_bits): Take a gdb::byte_vector.
2258 (parse_find_args): Return gdb::byte_vector. "args" now const.
2259 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2260 cleanups.
2261 (find_command): Update.
2262
a9921622
TT
22632017-09-11 Tom Tromey <tom@tromey.com>
2264
2265 * cli/cli-script.c (class scoped_restore_hook_in): New.
2266 (clear_hook_in_cleanup): Remove.
2267 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2268 scoped_restore_hook_in.
2269
be0d7abb
TT
22702017-09-11 Tom Tromey <tom@tromey.com>
2271
2272 * cli/cli-script.c (restore_interp): Remove.
2273 (read_command_lines): Use scoped_restore_interp.
2274 * interps.c (scoped_restore_interp::set_temp): Rename from
2275 interp_set_temp.
2276 * interps.h (class scoped_restore_interp): New.
2277 (interp_set_temp): Remove.
2278
00f675ff
TT
22792017-09-11 Tom Tromey <tom@tromey.com>
2280
2281 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2282 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2283 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2284 scoped_restore.
2285 (mi_cmd_break_insert_1): Update.
2286 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2287 scoped_restore.
2288
cb791d59
TT
22892017-09-11 Tom Tromey <tom@tromey.com>
2290
2291 * demangle.c (demangle_command): Update.
2292 * breakpoint.c (disable_command): Update.
2293 (enable_command): Update.
2294 (find_location_by_number): Make "number" const. Use
2295 get_number_trailer.
2296 * cli/cli-utils.c (extract_arg): Return std::string.
2297 * probe.c (parse_probe_linespec): Update. Change types.
2298 (collect_probes): Take string arguments.
2299 (parse_probe_linespec): Likewise.
2300 (info_probes_for_ops): Update.
2301 (enable_probes_command): Update.
2302 (disable_probes_command): Update.
2303 * break-catch-sig.c (catch_signal_split_args): Update.
2304 * mi/mi-parse.c (mi_parse): Update.
2305
2039bd9f
TT
23062017-09-11 Tom Tromey <tom@tromey.com>
2307
2308 * language.h (language_enum): Make argument const.
2309 * language.c (language_enum): Make argument const.
2310
f1735a53
TT
23112017-09-11 Tom Tromey <tom@tromey.com>
2312
2313 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2314 as function.
2315 (skip_to_space): Rename from skip_to_space_const.
2316 * common/common-utils.c (skip_to_space): New function.
2317 (skip_to_space): Rename from skip_to_space_const.
2318 * cli/cli-utils.h (get_number): Rename from get_number_const.
2319 (extract_arg): Rename from extract_arg_const.
2320 * cli/cli-utils.c (get_number): Rename from get_number_const.
2321 (extract_arg): Rename from extract_arg_const.
2322 (number_or_range_parser::get_number): Use ::get_number.
2323 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2324 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2325 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2326 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2327 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2328 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2329 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2330 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2331
7d221d74
TT
23322017-09-11 Tom Tromey <tom@tromey.com>
2333
2334 * python/python.c (do_start_initialization): Use
2335 py-event-types.def to initialize types.
2336 Define all object type structures.
2337 * python/python-internal.h: Don't declare event initialization
2338 functions.
2339 * python/py-threadevent.c (thread_event_object_type): Don't
2340 define.
2341 * python/py-stopevent.c (stop_event_object_type): Don't define.
2342 * python/py-signalevent.c (signal_event_object_type): Don't
2343 declare or define.
2344 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2345 (clear_objfiles_event_object_type): Don't declare or define.
2346 * python/py-infevents.c (inferior_call_pre_event_object_type)
2347 (inferior_call_post_event_object_type)
2348 (register_changed_event_object_type)
2349 (memory_changed_event_object_type): Don't declare or define.
2350 * python/py-inferior.c (new_thread_event_object_type)
2351 (new_inferior_event_object_type)
2352 (inferior_deleted_event_object_type): Don't declare or define.
2353 * python/py-exitedevent.c (exited_event_object_type): Don't
2354 declare or define.
2355 * python/py-evts.c (gdbpy_initialize_py_events): Use
2356 py-all-events.def.
2357 * python/py-events.h (thread_event_object_type): Don't declare.
2358 (events_object): Use py-all-events.def.
2359 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2360 py-event-types.def.
2361 * python/py-event-types.def: New file.
2362 * python/py-continueevent.c (create_continue_event_object): Don't
2363 declare or define.
2364 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2365 declare or define.
2366 * python/py-all-events.def: New file.
2367
35c61a1d
TT
23682017-09-11 Tom Tromey <tom@tromey.com>
2369
2370 * python/py-threadevent.c (create_thread_event_object): Return
2371 gdbpy_ref.
2372 * python/py-stopevent.h (create_stop_event_object)
2373 (create_breakpoint_event_object, create_signal_event_object):
2374 Update.
2375 * python/py-stopevent.c (create_stop_event_object): Return
2376 gdbpy_ref.
2377 (emit_stop_event): Update.
2378 * python/py-signalevent.c (create_signal_event_object): Return
2379 gdbpy_ref.
2380 * python/py-infevents.c (create_inferior_call_event_object):
2381 Update.
2382 * python/py-event.h (create_event_object)
2383 (create_thread_event_object): Update.
2384 * python/py-event.c (create_event_object): Return gdbpy_ref.
2385 * python/py-continueevent.c: Return gdbpy_ref.
2386 * python/py-bpevent.c (create_breakpoint_event_object): Return
2387 gdbpy_ref.
2388
7c96f8c1
TT
23892017-09-11 Tom Tromey <tom@tromey.com>
2390
2391 PR python/15622:
2392 * NEWS: Add entry.
2393 * python/python.c (do_start_initialization): Initialize new event
2394 types.
2395 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2396 (gdbpy_initialize_inferior_deleted_event)
2397 (gdbpy_initialize_new_thread_event): Declare.
2398 * python/py-threadevent.c (create_thread_event_object): Add option
2399 "thread" parameter.
2400 * python/py-inferior.c (new_thread_event_object_type)
2401 (new_inferior_event_object_type)
2402 (inferior_deleted_event_object_type): Declare.
2403 (python_new_inferior, python_inferior_deleted): New functions.
2404 (add_thread_object): Emit new_thread event.
2405 (gdbpy_initialize_inferior): Attach new functions to corresponding
2406 observers.
2407 (new_thread, new_inferior, inferior_deleted): Define new event
2408 types.
2409 * python/py-evts.c (gdbpy_initialize_py_events): Add new
2410 registries.
2411 * python/py-events.h (events_object) <new_inferior,
2412 inferior_deleted, new_thread>: New fields.
2413 * python/py-event.h (create_thread_event_breakpoint): Add optional
2414 "thread" parameter.
2415
72542b8e
AB
24162017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2417
2418 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2419 check current_ui instead.
2420 (internal_vproblem): Likewise.
2421
0d64823e
SM
24222017-09-09 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * thread.c (print_thread_info_1): Remove unnecessary calls to
2425 uiout->is_mi_like_p.
2426
eb1e02fd
TT
24272017-09-09 Tom Tromey <tom@tromey.com>
2428
2429 * namespace.h (add_using_directive): Update.
2430 * namespace.c (add_using_directive): Change type of excludes to
2431 std::vector.
2432 * dwarf2read.c (read_import_statement): Use std::vector.
2433 (read_namespace): Update.
2434 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2435
0fc21fd8
TT
24362017-09-09 Tom Tromey <tom@tromey.com>
2437
2438 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2439
49663d05
TT
24402017-09-09 Tom Tromey <tom@tromey.com>
2441
2442 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2443
0b868b60
TT
24442017-09-09 Tom Tromey <tom@tromey.com>
2445
2446 * stack.c (func_command): Use gdb::def_vector.
2447
c0470d48
TT
24482017-09-09 Tom Tromey <tom@tromey.com>
2449
2450 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2451 ui_out_emit_list, ui_out_emit_tuple.
2452 (mi_cmd_var_update): Likewise.
2453
ca5909c7
TT
24542017-09-09 Tom Tromey <tom@tromey.com>
2455
2456 * mi/mi-interp.c (mi_user_selected_context_changed): Use
2457 ui_out_redirect_pop.
2458 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2459 ui_out_redirect_pop.
2460 * utils.c (do_ui_out_redirect_pop)
2461 (make_cleanup_ui_out_redirect_pop): Remove.
2462 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2463 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2464 * ui-out.h (ui_out_redirect_pop): New class.
2465
e6a2252a
TT
24662017-09-09 Tom Tromey <tom@tromey.com>
2467
2468 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2469 (list_available_thread_groups, mi_cmd_list_thread_groups)
2470 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2471 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2472 Likewise.
2473
393702cd
TT
24742017-09-09 Tom Tromey <tom@tromey.com>
2475
2476 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2477 ui_out_emit_tuple.
2478
76f9c9cf
TT
24792017-09-09 Tom Tromey <tom@tromey.com>
2480
2481 * target.c (flash_erase_command): Use ui_out_emit_tuple.
2482 * stack.c (print_frame): Use ui_out_emit_tuple.
2483 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2484 (info_spu_mailbox_command, info_spu_dma_command)
2485 (info_spu_proxydma_command): Likewise.
2486 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2487 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2488 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2489 ui_out_emit_tuple.
2490 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2491
dc9fe180
TT
24922017-09-09 Tom Tromey <tom@tromey.com>
2493
2494 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2495 (class ui_out_emit_table): Update comment.
2496 * ui-out.c (do_cleanup_table_end)
2497 (make_cleanup_ui_out_table_begin_end): Remove.
2498 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2499 (info_spu_dma_cmdlist): Likewise.
2500 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2501 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2502 ui_out_emit_table.
2503
f8cc3da6
TT
25042017-09-09 Tom Tromey <tom@tromey.com>
2505
2506 * thread.c (print_thread_info_1): Use ui_out_emit_table,
2507 ui_out_emit_list, gdb::optional.
2508
481695ed
JB
25092017-09-09 John Baldwin <jhb@FreeBSD.org>
2510
2511 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2512 prototype.
2513 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2514 prototype.
2515 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2516 prototype.
2517 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2518 * ada-exp.y: Remove _initialize_ada_exp prototype.
2519 * ada-lang.c: Remove _initialize_ada_language prototype.
2520 * ada-tasks.c: Remove _initialize_tasks prototype.
2521 * addrmap.c: Remove _initialize_addrmap prototype.
2522 * agent.c: Remove _initialize_agent prototype.
2523 * aix-thread.c: Remove _initialize_aix_thread prototype.
2524 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2525 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2526 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2527 prototype.
2528 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2529 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2530 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2531 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2532 prototype.
2533 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2534 prototype.
2535 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2536 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2537 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2538 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2539 prototype.
2540 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2541 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2542 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2543 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2544 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2545 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2546 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2547 prototype.
2548 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2549 prototype.
2550 * annotate.c: Remove _initialize_annotate prototype.
2551 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2552 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2553 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2554 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2555 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2556 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2557 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2558 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2559 prototype.
2560 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2561 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2562 * auto-load.c: Remove _initialize_auto_load prototype.
2563 * auxv.c: Remove _initialize_auxv prototype.
2564 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2565 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2566 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2567 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2568 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2569 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2570 prototype.
2571 * break-catch-throw.c: Remove _initialize_break_catch_throw
2572 prototype.
2573 * breakpoint.c: Remove _initialize_breakpoint prototype.
2574 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2575 * btrace.c: Remove _initialize_btrace prototype.
2576 * charset.c: Remove _initialize_charset prototype.
2577 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2578 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2579 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2580 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2581 * cli/cli-script.c: Remove _initialize_cli_script prototype.
2582 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2583 * coffread.c: Remove _initialize_coffread prototype.
2584 * compile/compile.c: Remove _initialize_compile prototype.
2585 * complaints.c: Remove _initialize_complaints prototype.
2586 * completer.c: Remove _initialize_completer prototype.
2587 * copying.awk: Remove _initialize_copying prototype.
2588 * copying.c: Regenerate.
2589 * core-regset.c: Remove _initialize_core_regset prototype.
2590 * corefile.c: Remove _initialize_core prototype.
2591 * corelow.c: Remove _initialize_corelow prototype.
2592 * cp-abi.c: Remove _initialize_cp_abi prototype.
2593 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2594 * cp-support.c: Remove _initialize_cp_support prototype.
2595 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2596 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2597 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2598 * ctf.c: Remove _initialize_ctf prototype.
2599 * d-lang.c: Remove _initialize_d_language prototype.
2600 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2601 prototype.
2602 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2603 * dbxread.c: Remove _initialize_dbxread prototype.
2604 * dcache.c: Remove _initialize_dcache prototype.
2605 * demangle.c: Remove _initialize_demangler prototype.
2606 * disasm-selftests.c: Remove _initialize_disasm_selftests
2607 prototype.
2608 * disasm.c: Remove _initialize_disasm prototype.
2609 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2610 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2611 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2612 prototype.
2613 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2614 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2615 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2616 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2617 * elfread.c: Remove _initialize_elfread prototype.
2618 * exec.c: Remove _initialize_exec prototype.
2619 * extension.c: Remove _initialize_extension prototype.
2620 * f-lang.c: Remove _initialize_f_language prototype.
2621 * f-valprint.c: Remove _initialize_f_valprint prototype.
2622 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2623 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2624 * filesystem.c: Remove _initialize_filesystem prototype.
2625 * findcmd.c: Remove _initialize_mem_search prototype.
2626 * fork-child.c: Remove _initialize_fork_child prototype.
2627 * frame-base.c: Remove _initialize_frame_base prototype.
2628 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2629 * frame.c: Remove _initialize_frame prototype.
2630 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2631 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2632 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2633 * gcore.c: Remove _initialize_gcore prototype.
2634 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2635 * gdbarch.c: Regenerate.
2636 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2637 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2638 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2639 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2640 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2641 * go-lang.c: Remove _initialize_go_language prototype.
2642 * go32-nat.c: Remove _initialize_go32_nat prototype.
2643 * guile/guile.c: Remove _initialize_guile prototype.
2644 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2645 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2646 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2647 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2648 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2649 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2650 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2651 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2652 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2653 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2654 prototype.
2655 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2656 prototype.
2657 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2658 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2659 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2660 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2661 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2662 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2663 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2664 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2665 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2666 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2667 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2668 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2669 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2670 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2671 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2672 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2673 prototype.
2674 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2675 prototype.
2676 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2677 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2678 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2679 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2680 * infcall.c: Remove _initialize_infcall prototype.
2681 * infcmd.c: Remove _initialize_infcmd prototype.
2682 * inferior.c: Remove _initialize_inferiors prototype.
2683 * inflow.c: Remove _initialize_inflow prototype.
2684 * infrun.c: Remove _initialize_infrun prototype.
2685 * interps.c: Remove _initialize_interpreter prototype.
2686 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2687 * jit.c: Remove _initialize_jit prototype.
2688 * language.c: Remove _initialize_language prototype.
2689 * linux-fork.c: Remove _initialize_linux_fork prototype.
2690 * linux-nat.c: Remove _initialize_linux_nat prototype.
2691 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2692 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2693 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2694 * m2-lang.c: Remove _initialize_m2_language prototype.
2695 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2696 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2697 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2698 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2699 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2700 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2701 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2702 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2703 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2704 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2705 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2706 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2707 * machoread.c: Remove _initialize_machoread prototype.
2708 * macrocmd.c: Remove _initialize_macrocmd prototype.
2709 * macroscope.c: Remove _initialize_macroscope prototype.
2710 * maint.c: Remove _initialize_maint_cmds prototype.
2711 * mdebugread.c: Remove _initialize_mdebugread prototype.
2712 * memattr.c: Remove _initialize_mem prototype.
2713 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2714 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2715 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2716 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2717 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2718 * microblaze-linux-tdep.c: Remove
2719 _initialize_microblaze_linux_tdep prototype.
2720 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2721 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2722 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2723 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2724 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2725 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2726 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2727 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2728 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2729 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2730 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2731 prototype.
2732 * mipsread.c: Remove _initialize_mipsread prototype.
2733 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2734 prototype.
2735 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2736 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2737 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2738 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2739 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2740 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2741 prototype.
2742 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2743 * nto-procfs.c: Remove _initialize_procfs prototype.
2744 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2745 * objc-lang.c: Remove _initialize_objc_language prototype.
2746 * objfiles.c: Remove _initialize_objfiles prototype.
2747 * observer.c: Remove observer_test_first_notification_function,
2748 observer_test_second_notification_function,
2749 observer_test_third_notification_function, and
2750 _initialize_observer prototypes.
2751 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2752 * osabi.c: Remove _initialize_gdb_osabi prototype.
2753 * osdata.c: Remove _initialize_osdata prototype.
2754 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2755 * parse.c: Remove _initialize_parse prototype.
2756 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2757 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2758 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2759 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2760 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2761 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2762 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2763 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2764 * printcmd.c: Remove _initialize_printcmd prototype.
2765 * probe.c: Remove _initialize_probe prototype.
2766 * proc-api.c: Remove _initialize_proc_api prototype.
2767 * proc-events.c: Remove _initialize_proc_events prototype.
2768 * proc-service.c: Remove _initialize_proc_service prototype.
2769 * procfs.c: Remove _initialize_procfs prototype.
2770 * psymtab.c: Remove _initialize_psymtab prototype.
2771 * python/python.c: Remove _initialize_python prototype.
2772 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2773 * record-btrace.c: Remove _initialize_record_btrace prototype.
2774 * record-full.c: Remove _initialize_record_full prototype.
2775 * record.c: Remove _initialize_record prototype.
2776 * regcache.c: Remove _initialize_regcache prototype.
2777 * reggroups.c: Remove _initialize_reggroup prototype.
2778 * remote-notif.c: Remove _initialize_notif prototype.
2779 * remote-sim.c: Remove _initialize_remote_sim prototype.
2780 * remote.c: Remove _initialize_remote prototype.
2781 * reverse.c: Remove _initialize_reverse prototype.
2782 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2783 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2784 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2785 prototype.
2786 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2787 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2788 * rust-exp.y: Remove _initialize_rust_exp prototype.
2789 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2790 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2791 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2792 * score-tdep.c: Remove _initialize_score_tdep prototype.
2793 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2794 prototype.
2795 * ser-go32.c: Remove _initialize_ser_dos prototype.
2796 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2797 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2798 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2799 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2800 * serial.c: Remove _initialize_serial prototype.
2801 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2802 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2803 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2804 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2805 * skip.c: Remove _initialize_step_skip prototype.
2806 * sol-thread.c: Remove _initialize_sol_thread prototype.
2807 * solib-aix.c: Remove _initialize_solib_aix prototype.
2808 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2809 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2810 * solib-frv.c: Remove _initialize_frv_solib prototype.
2811 * solib-spu.c: Remove _initialize_spu_solib prototype.
2812 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2813 * solib-target.c: Remove _initialize_solib_target prototype.
2814 * solib.c: Remove _initialize_solib prototype.
2815 * source.c: Remove _initialize_source prototype.
2816 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2817 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2818 prototype.
2819 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2820 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2821 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2822 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2823 prototype.
2824 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2825 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2826 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2827 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2828 prototype.
2829 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2830 prototype.
2831 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2832 prototype.
2833 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2834 prototype.
2835 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2836 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2837 prototype.
2838 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2839 prototype.
2840 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2841 prototype.
2842 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2843 prototype.
2844 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2845 prototype.
2846 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2847 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2848 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2849 * stabsread.c: Remove _initialize_stabsread prototype.
2850 * stack.c: Remove _initialize_stack prototype.
2851 * stap-probe.c: Remove _initialize_stap_probe prototype.
2852 * std-regs.c: Remove _initialize_frame_reg prototype.
2853 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2854 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2855 * symfile.c: Remove _initialize_symfile prototype.
2856 * symmisc.c: Remove _initialize_symmisc prototype.
2857 * symtab.c: Remove _initialize_symtab prototype.
2858 * target-dcache.c: Remove _initialize_target_dcache prototype.
2859 * target-descriptions.c: Remove _initialize_target_descriptions
2860 prototype.
2861 * thread.c: Remove _initialize_thread prototype.
2862 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2863 prototype.
2864 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2865 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2866 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2867 prototype.
2868 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2869 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2870 * tracefile.c: Remove _initialize_tracefile prototype.
2871 * tracepoint.c: Remove _initialize_tracepoint prototype.
2872 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2873 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2874 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2875 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2876 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2877 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2878 * tui/tui.c: Remove _initialize_tui prototype.
2879 * typeprint.c: Remove _initialize_typeprint prototype.
2880 * user-regs.c: Remove _initialize_user_regs prototype.
2881 * utils.c: Remove _initialize_utils prototype.
2882 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2883 * valarith.c: Remove _initialize_valarith prototype.
2884 * valops.c: Remove _initialize_valops prototype.
2885 * valprint.c: Remove _initialize_valprint prototype.
2886 * value.c: Remove _initialize_values prototype.
2887 * varobj.c: Remove _initialize_varobj prototype.
2888 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2889 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2890 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2891 * windows-nat.c: Remove _initialize_windows_nat,
2892 _initialize_check_for_gdb_ini, and _initialize_loadable
2893 prototypes.
2894 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2895 * xcoffread.c: Remove _initialize_xcoffread prototype.
2896 * xml-support.c: Remove _initialize_xml_support prototype.
2897 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2898 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2899 prototype.
2900 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2901 prototype.
2902 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2903
a611b5cb
KS
29042017-09-08 Keith Seitz <keiths@redhat.com>
2905
2906 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2907 field.
2908
469412dd
CW
29092017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2910
2911 * f-valprint.c (f_val_print): Remove check for one byte
2912 sized integers. Remove printing of character type.
2913
a5ad232b
FP
29142017-09-08 Frank Penczek <frank.penczek@intel.com>
2915 Christoph Weinmann <christoph.t.weinmann@intel.com>
2916 Bernhard Heckel <bernhard.heckel@intel.com>
2917
2918 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2919 to maintain proper indentation when printing pointers/refs.
2920
e5014227
JB
29212017-09-07 Joel Brobecker <brobecker@adacore.com>
2922
2923 GDB 8.0.1 released.
2924
63c99141
JB
29252017-09-07 Joel Brobecker <brobecker@adacore.com>
2926
2927 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2928
69c1e056
TT
29292017-09-05 Tom Tromey <tom@tromey.com>
2930
2931 * parse.c (funcall_chain): Now a std::vector.
2932 (start_arglist, end_arglist): Simplify.
2933 (free_funcalls): Remove.
2934 (parse_exp_in_context_1): Remove cleanup.
2935
fef704bf
TT
29362017-09-05 Tom Tromey <tom@tromey.com>
2937
2938 * go-exp.y (go_parse): Don't create a cleanup.
2939
5613c585
TT
29402017-09-05 Tom Tromey <tom@tromey.com>
2941
2942 * d-exp.y (PrimaryExpression): Use std::string.
2943 (d_parse): Don't create a cleanup.
2944
eae49211
TT
29452017-09-05 Tom Tromey <tom@tromey.com>
2946
2947 * utils.c (do_clear_parser_state): Remove.
2948 (make_cleanup_clear_parser_state): Remove.
2949 * p-exp.y (pascal_parse): Use scoped_restore.
2950 * m2-exp.y (m2_parse): Use scoped_restore.
2951 * f-exp.y (f_parse): Use scoped_restore.
2952 * d-exp.y (d_parse): Use scoped_restore.
2953 * c-exp.y (c_parse): Use scoped_restore.
2954 * ada-exp.y (ada_parse): Use scoped_restore.
2955 * utils.h (make_cleanup_clear_parser_state): Remove.
2956
73b9be8b
KS
29572017-09-06 Keith Seitz <keiths@redhat.com>
2958
2959 * dwarf2read.c (dw2_linkage_name_attr): New function.
2960 (dw2_linkage_name): New function.
2961 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2962 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2963 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2964
a102602b
KR
29652017-09-06 Kamil Rytarowski <n54@gmx.com>
2966
2967 * config/djgpp/djconfig.sh: Correct shell portability issue.
2968
28ad437d
KR
29692017-09-06 Kamil Rytarowski <n54@gmx.com>
2970
2971 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2972
351787dd
JB
29732017-09-06 John Baldwin <jhb@FreeBSD.org>
2974
2975 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2976 * NEWS: Mention new FreeBSD/mips native configuration.
2977 * configure.host: Add aarch64*-*-freebsd*.
2978 * configure.nat: Likewise.
2979 * aarch64-fbsd-nat.c: New file.
2980
c0f84956
JB
29812017-09-06 John Baldwin <jhb@FreeBSD.org>
2982
2983 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2984 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2985 * NEWS: Mention new FreeBSD/aarch64 target.
2986 * configure.tgt: Add aarch64*-*-freebsd*.
2987 * aarch64-fbsd-tdep.c: New file.
2988 * aarch64-fbsd-tdep.h: New file.
2989
7610297a
KR
29902017-09-06 Kamil Rytarowski <n54@gmx.com>
2991
2992 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2993
fbd1b771
JK
29942017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2995
2996 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2997 of TLS symbols.
2998
5ca79eae
PW
29992017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3000
3001 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3002 call.
3003
bf93d7ba
SM
30042017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3005
3006 * infrun.c (follow_exec): Call add_thread after
3007 target_find_description.
3008
1bb7c059
SM
30092017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3010
3011 * infrun.c (handle_inferior_event_1): When exec'ing, read
3012 stop_pc after follow_exec.
3013
fc809827
SM
30142017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * remote.c (process_g_packet): Update error message.
3017
d2fcdd85
YQ
30182017-09-05 Yao Qi <yao.qi@linaro.org>
3019
3020 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3021 targets.
3022
e69570ee
PA
30232017-09-05 Pedro Alves <palves@redhat.com>
3024
3025 * eval.c (eval_call, evaluate_funcall): New functions, factored
3026 out from ...
3027 (evaluate_subexp_standard): ... this.
3028
22916b07
YQ
30292017-09-05 Yao Qi <yao.qi@linaro.org>
3030
3031 * amd64-tdep.c (amd64_target_description): Create target
3032 descriptions.
3033 (_initialize_amd64_tdep): Don't call functions
3034 initialize_tdesc_amd64_*. Add self tests.
3035 * arch/amd64.c (amd64_create_target_description): Add parameter
3036 is_linux. Call set_tdesc_osabi if is_linux is true.
3037 * arch/amd64.h (amd64_create_target_description): Update the
3038 declaration.
3039 * arch/i386.c (i386_create_target_description): Add parameter
3040 is_linux. Call set_tdesc_osabi if is_linux is true.
3041 * arch/i386.h (i386_create_target_description): Update
3042 declaration.
3043 * configure.tgt: Add i386.o to gdb_target_obs.
3044 * features/Makefile (XMLTOC): Remove i386/*.xml.
3045 * features/i386/amd64-avx-avx512.c: Remove.
3046 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3047 * features/i386/amd64-avx-mpx.c: Remove.
3048 * features/i386/amd64-avx.c: Remove.
3049 * features/i386/amd64-mpx.c: Remove.
3050 * features/i386/amd64.c: Remove.
3051 * features/i386/i386-avx-avx512.c: Remove.
3052 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3053 * features/i386/i386-avx-mpx.c: Remove.
3054 * features/i386/i386-avx.c: Remove.
3055 * features/i386/i386-mmx.c: Remove.
3056 * features/i386/i386-mpx.c: Remove.
3057 * features/i386/i386.c: Remove.
3058 * i386-tdep.c: Don't include features/i386/i386*.c., include
3059 target-descriptions.h and arch/i386.h.
3060 (i386_target_description): Create target descriptions.
3061 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3062 functions. Do self tests.
3063
0854b7b1
YQ
30642017-09-05 Yao Qi <yao.qi@linaro.org>
3065
3066 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3067 * features/i386/amd64-avx-avx512-linux.c: Removed.
3068 * features/i386/amd64-avx-linux.c: Removed.
3069 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3070 * features/i386/amd64-avx-mpx-linux.c: Removed.
3071 * features/i386/amd64-linux.c: Removed.
3072 * features/i386/amd64-mpx-linux.c: Removed.
3073 * features/i386/x32-avx-avx512-linux.c: Removed.
3074 * features/i386/x32-avx-linux.c: Removed.
3075 * features/i386/x32-linux.c: Removed.
3076
b4570e4b
YQ
30772017-09-05 Yao Qi <yao.qi@linaro.org>
3078
3079 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
3080 features/i386/*.c.
3081 (amd64_linux_read_description): Call
3082 amd64_create_target_description.
3083 * arch/amd64.c: New file.
3084 * arch/amd64.h: New file.
3085 * configure.tgt (x86_64-*-linux*): Append amd64.o.
3086 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3087
6c73f67f
YQ
30882017-09-05 Yao Qi <yao.qi@linaro.org>
3089
3090 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3091 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
3092 (amd64_linux_read_description): Create target descriptions.
3093 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3094 functions. Add unit tests.
3095 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3096 x32-core.xml.
3097 * features/i386/64bit-avx.c: Generated.
3098 * features/i386/64bit-avx512.c: Generated.
3099 * features/i386/64bit-core.c: Generated.
3100 * features/i386/64bit-linux.c: Generated.
3101 * features/i386/64bit-mpx.c: Generated.
3102 * features/i386/64bit-pkeys.c: Generated.
3103 * features/i386/64bit-segments.c: Generated.
3104 * features/i386/64bit-sse.c: Generated.
3105 * features/i386/x32-core.c: Generated.
3106 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3107 c files for amd64-linux and x32-linux.
3108
9d3d478b
YQ
31092017-09-05 Yao Qi <yao.qi@linaro.org>
3110
3111 * amd64-linux-tdep.c (amd64_linux_read_description): New
3112 function.
3113 (amd64_linux_core_read_description): Call
3114 amd64_linux_read_description.
3115 (amd64_linux_init_abi): Likewise.
3116 (amd64_x32_linux_init_abi): Likewise.
3117 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3118 * x86-linux-nat.c (x86_linux_read_description): Call
3119 amd64_linux_read_description.
3120
b9f1d50f
YQ
31212017-09-05 Yao Qi <yao.qi@linaro.org>
3122
3123 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3124 comments.
3125
188c9e6d
YQ
31262017-09-05 Yao Qi <yao.qi@linaro.org>
3127
3128 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3129 * features/i386/i386-avx-avx512-linux.c: Remove.
3130 * features/i386/i386-avx-linux.c: Remove.
3131 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3132 * features/i386/i386-avx-mpx-linux.c: Remove.
3133 * features/i386/i386-linux.c: Remove.
3134 * features/i386/i386-mmx-linux.c: Remove.
3135 * features/i386/i386-mpx-linux.c: Remove.
3136
5f035c07
YQ
31372017-09-05 Yao Qi <yao.qi@linaro.org>
3138
3139 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3140 (SFILES): Add arch/i386.c.
3141 (HFILES_NO_SRCDIR): Add arch/i386.h.
3142 * arch/i386.c: New file.
3143 * arch/i386.h: New file.
3144 * arch/tdesc.h (allocate_target_description): Declare.
3145 (set_tdesc_architecture): Declare.
3146 (set_tdesc_osabi): Declare.
3147 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3148 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3149 include arch/i386.h.
3150 (i386_linux_read_description): Remove code and call
3151 i386_create_target_description.
3152 (set_tdesc_architecture): New function.
3153 (set_tdesc_osabi): New function.
3154 * target-descriptions.h (allocate_target_description): Remove.
3155
0abe8a89
YQ
31562017-09-05 Yao Qi <yao.qi@linaro.org>
3157
3158 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3159 * target-descriptions.c (tdesc_create_feature): Likewise, and
3160 adjust code.
3161 * features/i386/32bit-avx.c: Re-generated.
3162 * features/i386/32bit-avx512.c: Re-generated.
3163 * features/i386/32bit-core.c: Re-generated.
3164 * features/i386/32bit-linux.c: Re-generated.
3165 * features/i386/32bit-mpx.c: Re-generated.
3166 * features/i386/32bit-pkeys.c: Re-generated.
3167 * features/i386/32bit-sse.c: Re-generated.
3168
0a188386
YQ
31692017-09-05 Yao Qi <yao.qi@linaro.org>
3170
3171 * regformats/regdef.h (struct reg): Override operator == and !=.
3172
f49ff000
YQ
31732017-09-05 Yao Qi <yao.qi@linaro.org>
3174
3175 * arch/tdesc.h: New file.
3176 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3177 * target-descriptions.c: Update comments.
3178 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3179 declarations.
3180 * features/i386/32bit-avx.c: Re-generated.
3181 * features/i386/32bit-avx512.c: Re-generated.
3182 * features/i386/32bit-core.c: Re-generated.
3183 * features/i386/32bit-linux.c: Re-generated.
3184 * features/i386/32bit-mpx.c: Re-generated.
3185 * features/i386/32bit-pkeys.c: Re-generated.
3186 * features/i386/32bit-sse.c: Re-generated.
3187
f7000548
YQ
31882017-09-05 Yao Qi <yao.qi@linaro.org>
3189
3190 * regformats/regdat.sh: Update generated code.
3191
c9a5e2a5
YQ
31922017-09-05 Yao Qi <yao.qi@linaro.org>
3193
3194 * regformats/regdat.sh: Adjust code order.
3195
d6b687ac
SM
31962017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3197
3198 * expprint.c (dump_subexp_body_standard): Use constant format
3199 string in fprintf_filtered call.
3200
a379bfd0
JB
32012017-09-04 John Baldwin <jhb@FreeBSD.org>
3202
3203 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3204 NetBSD/i386.
3205 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3206
f7efc967
JB
32072017-09-04 John Baldwin <jhb@FreeBSD.org>
3208
3209 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3210
c49fbc6c
JB
32112017-09-04 John Baldwin <jhb@FreeBSD.org>
3212
3213 * bsd-kvm.o: Define _KMEMUSER.
3214 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3215 * configure: Regenerate.
3216
26562e73
JB
32172017-09-04 John Baldwin <jhb@FreeBSD.org>
3218
3219 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3220 * i386-fbsd-nat.c: Likewise.
3221
31cf1487
JB
32222017-09-04 John Baldwin <jhb@FreeBSD.org>
3223
3224 * unittests/array-view-selftests.c: Add include of <array>.
3225
5b9f8a7c
JB
32262017-09-04 John Baldwin <jhb@FreeBSD.org>
3227
3228 * spu-tdep.c (flush_ea_cache): Add missing argument to
3229 call_function_by_hand.
3230
d69cf9b2
PA
32312017-09-04 Pedro Alves <palves@redhat.com>
3232
3233 * NEWS (Safer support for debugging with no debug info): New.
3234
3693fdb3
PA
32352017-09-04 Pedro Alves <palves@redhat.com>
3236
3237 * c-exp.y (function_method, function_method_void): Add current
3238 instance flags to TYPE_INSTANCE.
3239 * dwarf2read.c (check_modifier): New.
3240 (compute_delayed_physnames): Assert that only C++ adds delayed
3241 physnames. Mark fn_fields as const/volatile depending on
3242 physname.
3243 * eval.c (make_params): New type_instance_flags parameter. Use
3244 it as the new type's instance flags.
3245 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3246 flags element and pass it to make_params.
3247 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3248 instance flags element.
3249 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3250 * gdbtypes.h: Include "enum-flags.h".
3251 (type_instance_flags): New enum-flags type.
3252 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3253 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3254 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3255 (follow_type_instance_flags): New function.
3256 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3257 * parser-defs.h (follow_type_instance_flags): Declare.
3258 * valops.c (value_struct_elt_for_reference): const/volatile must
3259 match too.
3260
e68cb8e0
PA
32612017-09-04 Pedro Alves <palves@redhat.com>
3262
3263 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3264 function/method scopes; lookup the nested name as a function local
3265 static variable.
3266
858be34c
PA
32672017-09-04 Pedro Alves <palves@redhat.com>
3268
3269 (%type <voidval>): Add function_method.
3270 * c-exp.y (exp): New production for calls with no arguments.
3271 (function_method, function_method_void_or_typelist): New
3272 productions.
3273 (exp): New production for "method()::static_var".
3274 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3275 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3276 Handle OP_FUNC_STATIC_VAR.
3277 * parse.c (operator_length_standard):
3278 Handle OP_FUNC_STATIC_VAR.
3279
dd5901a6
PA
32802017-09-04 Pedro Alves <palves@redhat.com>
3281
3282 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3283 handling.
3284 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3285 Ditto.
3286 * parse.c (operator_length_standard, operator_check_standard):
3287 Ditto.
3288 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3289
46a4882b
PA
32902017-09-04 Pedro Alves <palves@redhat.com>
3291
3292 * ax-gdb.c: Include "typeprint.h".
3293 (gen_expr_for_cast): New function.
3294 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3295 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3296 type is unknown.
3297 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3298 nodebug_data_symbol.
3299 * eval.c: Include "typeprint.h".
3300 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3301 Error out if symbol has unknown type.
3302 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3303 evaluate_subexp_for_cast.
3304 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3305 OP_VAR_MSYM_VALUE.
3306 (evaluate_subexp_for_cast): New function.
3307 * gdbtypes.c (init_nodebug_var_type): New function.
3308 (objfile_type): Use it to initialize types of variables with no
3309 debug info.
3310 * typeprint.c (error_unknown_type): New.
3311 * typeprint.h (error_unknown_type): New declaration.
3312 * compile/compile-c-types.c (convert_type_basic): Handle
3313 TYPE_CODE_ERROR; warn and fallback to int for variables with
3314 unknown type.
3315
fe13dfec
PA
33162017-09-04 Pedro Alves <palves@redhat.com>
3317
3318 * eval.c (evaluate_var_value): New function, factored out from ...
3319 (evaluate_subexp_standard): ... here.
3320
d008ee21
PA
33212017-09-04 Pedro Alves <palves@redhat.com>
3322
3323 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3324 Remove useless assignments to 'op'.
3325
827d0c51
PA
33262017-09-04 Pedro Alves <palves@redhat.com>
3327
3328 * eval.c (eval_skip_value): New function.
3329 (evaluate_subexp_standard): Use it.
3330
2c5a2be1
PA
33312017-09-04 Pedro Alves <palves@redhat.com>
3332
3333 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3334 function name from symbol/minsym and pass it to
3335 error_call_unknown_return_type.
3336
74ea4be4
PA
33372017-09-04 Pedro Alves <palves@redhat.com>
3338
3339 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3340 * ax-gdb.c (gen_msym_var_ref): New function.
3341 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3342 * eval.c (evaluate_var_msym_value): New function.
3343 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3344 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3345 to call_function_by_hand.
3346 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3347 Handle OP_VAR_MSYM_VALUE.
3348 (union exp_element) <msymbol>: New field.
3349 * minsyms.h (struct type): Forward declare.
3350 (find_minsym_type_and_address): Declare.
3351 * parse.c (write_exp_elt_msym): New function.
3352 (write_exp_msymbol): Delete, refactored as ...
3353 (find_minsym_type_and_address): ... this new function.
3354 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3355 (operator_length_standard, operator_check_standard): Handle
3356 OP_VAR_MSYM_VALUE.
3357 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3358
7022349d
PA
33592017-09-04 Pedro Alves <palves@redhat.com>
3360
3361 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3362 TYPE_GNU_IFUNC specially here. Throw error if return type is
3363 unknown.
3364 * ada-typeprint.c (print_func_type): Handle functions with unknown
3365 return type.
3366 * c-typeprint.c (c_type_print_base): Handle functions and methods
3367 with unknown return type.
3368 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3369 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3370 * compile/compile-c-types.c: Include "objfiles.h".
3371 (convert_func): For functions with unknown return type, warn and
3372 default to int.
3373 * compile/compile-object-run.c (compile_object_run): Adjust call
3374 to call_function_by_hand_dummy.
3375 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3376 call_function_by_hand.
3377 * eval.c (evaluate_subexp_standard): Adjust calls to
3378 call_function_by_hand. Handle functions and methods with unknown
3379 return type. Pass expect_type to call_function_by_hand.
3380 * f-typeprint.c (f_type_print_base): Handle functions with unknown
3381 return type.
3382 * gcore.c (call_target_sbrk): Adjust call to
3383 call_function_by_hand.
3384 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3385 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
3386 an integer address type instead of nodebug.
3387 * guile/scm-value.c (gdbscm_value_call): Adjust call to
3388 call_function_by_hand.
3389 * infcall.c (error_call_unknown_return_type): New function.
3390 (call_function_by_hand): New "default_return_type" parameter.
3391 Pass it down.
3392 (call_function_by_hand_dummy): New "default_return_type"
3393 parameter. Use it instead of defaulting to int. If there's no
3394 default and the return type is unknown, throw an error. If
3395 there's a default return type, and the called function has no
3396 debug info, then assume the function is prototyped.
3397 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3398 New "default_return_type" parameter.
3399 (error_call_unknown_return_type): New declaration.
3400 * linux-fork.c (call_lseek): Cast return type of lseek.
3401 (inferior_call_waitpid, checkpoint_command): Adjust calls to
3402 call_function_by_hand.
3403 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3404 calls to call_function_by_hand.
3405 * m2-typeprint.c (m2_procedure): Handle functions with unknown
3406 return type.
3407 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3408 (value_nsstring, print_object_command): Adjust calls to
3409 call_function_by_hand.
3410 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3411 functions with unknown return type.
3412 (pascal_type_print_func_varspec_suffix): New function.
3413 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3414 TYPE_CODE_METHOD>: Use it.
3415 * python/py-value.c (valpy_call): Adjust call to
3416 call_function_by_hand.
3417 * rust-lang.c (rust_evaluate_funcall): Adjust call to
3418 call_function_by_hand.
3419 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3420 call_function_by_hand.
3421 * valops.c (value_allocate_space_in_inferior): Adjust call to
3422 call_function_by_hand.
3423 * typeprint.c (type_print_unknown_return_type): New function.
3424 * typeprint.h (type_print_unknown_return_type): New declaration.
3425
54990598
PA
34262017-09-04 Pedro Alves <palves@redhat.com>
3427
3428 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3429 types with more than one parameter as prototyped.
3430
9a24775b
PA
34312017-09-04 Pedro Alves <palves@redhat.com>
3432
3433 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3434 (disassemble_command): Use gdb_disassembly_flags instead of bare
3435 int.
3436 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3437 (dump_insns, do_mixed_source_and_assembly_deprecated)
3438 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3439 Use gdb_disassembly_flags instead of bare int.
3440 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3441 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3442 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3443 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
3444 (enum gdb_disassembly_flag): ... values of this new enumeration.
3445 (gdb_disassembly_flags): Define.
3446 (gdb_disassembly)
3447 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3448 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3449 gdb_disassembly_flags instead of bare int.
3450 * record-btrace.c (btrace_insn_history)
3451 (record_btrace_insn_history, record_btrace_insn_history_range)
3452 (record_btrace_insn_history_from): Use gdb_disassembly_flags
3453 instead of bare int.
3454 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3455 Use gdb_disassembly_flags instead of bare int.
3456 * target-debug.h (target_debug_print_gdb_disassembly_flags):
3457 Define.
3458 * target-delegates.c: Regenerate.
3459 * target.c (target_insn_history, target_insn_history_from)
3460 (target_insn_history_range): Use gdb_disassembly_flags instead of
3461 bare int.
3462 * target.h: Include "disasm.h".
3463 (struct target_ops) <to_insn_history, to_insn_history_from,
3464 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3465 int.
3466 (target_insn_history, target_insn_history_from)
3467 (target_insn_history_range): Use gdb_disassembly_flags instead of
3468 bare int.
3469
80a65e9b
SM
34702017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3471
3472 * cli/cli-script.c (build_command_line): For if/while commands,
3473 check whether args is empty.
3474
6b66338c
SM
34752017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3478 (enum command_control_type): Likewise.
3479 (struct command_line): Likewise.
3480 (free_command_lines): Likewise.
3481 (struct command_lines_deleter): Likewise.
3482 (command_line_up): Likewise.
3483 (read_command_lines): Likewise.
3484 (read_command_lines_1): Likewise.
3485 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3486 (enum command_control_type): Likewise.
3487 (struct command_line): Likewise.
3488 (free_command_lines): Likewise.
3489 (struct command_lines_deleter): Likewise.
3490 (command_line_up): Likewise.
3491 (read_command_lines): Likewise.
3492 (read_command_lines_1): Likewise.
3493 * breakpoint.h: Include cli/cli-script.h.
3494 * extension-priv.h: Likewise.
3495 * gdbcmd.h: Likewise.
3496
51abb421
PA
34972017-09-04 Pedro Alves <palves@redhat.com>
3498
3499 * ada-lang.c (is_known_support_routine): Move sal declaration to
3500 where it is initialized.
3501 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3502 (parse_breakpoint_sals, decode_static_tracepoint_spec)
3503 (clear_command, update_static_tracepoint): Remove init_sal
3504 references. Move declarations closer to initializations.
3505 * cli/cli-cmds.c (list_command): Move sal declarations closer to
3506 initializations.
3507 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3508 references. Move sal declarations closer to initializations.
3509 * frame.c (find_frame_sal): Return a symtab_and_line via function
3510 return instead of output parameter. Remove init_sal references.
3511 * frame.h (find_frame_sal): Return a symtab_and_line via function
3512 return instead of output parameter.
3513 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3514 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3515 instead of memset.
3516 (gdbscm_find_pc_line): Remove init_sal reference.
3517 * infcall.c (call_function_by_hand_dummy): Remove init_sal
3518 references. Move declarations closer to initializations.
3519 * infcmd.c (set_step_frame): Update. Move declarations closer to
3520 initializations.
3521 (finish_backward): Remove init_sal references. Move declarations
3522 closer to initializations.
3523 * infrun.c (process_event_stop_test, handle_step_into_function)
3524 (insert_hp_step_resume_breakpoint_at_frame)
3525 (insert_step_resume_breakpoint_at_caller): Likewise.
3526 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3527 (symbol_to_sal): Likewise.
3528 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3529 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3530 to its initialization.
3531 * reverse.c (save_bookmark_command): Use new/delete. Remove
3532 init_sal references. Move declarations closer to initializations.
3533 * source.c (get_current_source_symtab_and_line): Remove brace
3534 initialization.
3535 (set_current_source_symtab_and_line): Now takes the sal by const
3536 reference. Remove brace initialization.
3537 (line_info): Remove init_sal reference.
3538 * source.h (set_current_source_symtab_and_line): Now takes a
3539 symtab_and_line via const reference.
3540 * stack.c (set_current_sal_from_frame): Adjust.
3541 (print_frame_info): Adjust.
3542 (get_last_displayed_sal): Return the sal via function return
3543 instead of via output parameter. Simplify.
3544 (frame_info): Adjust.
3545 * stack.h (get_last_displayed_sal): Return the sal via function
3546 return instead of via output parameter.
3547 * symtab.c (init_sal): Delete.
3548 (find_pc_sect_line): Remove init_sal references. Move
3549 declarations closer to initializations.
3550 (find_function_start_sal): Remove init_sal references. Move
3551 declarations closer to initializations.
3552 * symtab.h (struct symtab_and_line): In-class initialize all
3553 fields.
3554 * tracepoint.c (set_traceframe_context)
3555 (print_one_static_tracepoint_marker): Remove init_sal references.
3556 Move declarations closer to initializations.
3557 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3558 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
3559 declarations closer to initializations.
3560 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3561 init_sal references. Adjust.
3562
6c5b2ebe
PA
35632017-09-04 Pedro Alves <palves@redhat.com>
3564
3565 * ax-gdb.c (agent_command_1): Use range-for.
3566 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3567 * breakpoint.c: Include "common/array-view.h".
3568 (init_breakpoint_sal, create_breakpoint_sal): Change sals
3569 parameter from struct symtabs_and_lines to
3570 array_view<symtab_and_line>. Adjust. Use range-for. Update.
3571 (breakpoint_sals_to_pc): Change sals parameter from struct
3572 symtabs_and_lines to std::vector reference.
3573 (check_fast_tracepoint_sals): Change sals parameter from struct
3574 symtabs_and_lines to std::array_view. Use range-for.
3575 (decode_static_tracepoint_spec): Return a std::vector instead of
3576 symtabs_and_lines. Update.
3577 (create_breakpoint): Update.
3578 (break_range_command, until_break_command, clear_command): Update.
3579 (base_breakpoint_decode_location, bkpt_decode_location)
3580 (bkpt_probe_create_sals_from_location)
3581 (bkpt_probe_decode_location, tracepoint_decode_location)
3582 (tracepoint_probe_decode_location)
3583 (strace_marker_create_sals_from_location): Return a std::vector
3584 instead of symtabs_and_lines.
3585 (strace_marker_create_breakpoints_sal): Update.
3586 (strace_marker_decode_location): Return a std::vector instead of
3587 symtabs_and_lines. Update.
3588 (update_breakpoint_locations): Change struct symtabs_and_lines
3589 parameters to gdb::array_view. Adjust.
3590 (location_to_sals): Return a std::vector instead of
3591 symtabs_and_lines. Update.
3592 (breakpoint_re_set_default): Use std::vector instead of struct
3593 symtabs_and_lines.
3594 (decode_location_default): Return a std::vector instead of
3595 symtabs_and_lines. Update.
3596 * breakpoint.h: Include "common/array-view.h".
3597 (struct breakpoint_ops) <decode_location>: Now returns a
3598 std::vector instead of returning a symtabs_and_lines via output
3599 parameter.
3600 (update_breakpoint_locations): Change sals parameters to use
3601 gdb::array_view.
3602 * cli/cli-cmds.c (edit_command, list_command): Update to use
3603 std::vector and gdb::array_view.
3604 (ambiguous_line_spec): Adjust to use gdb::array_view and
3605 range-for.
3606 (compare_symtabs): Rename to ...
3607 (cmp_symtabs): ... this. Change parameters to symtab_and_line
3608 const reference and adjust.
3609 (filter_sals): Rewrite using std::vector and standard algorithms.
3610 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3611 (jump_command): Update to use std::vector.
3612 * linespec.c (struct linespec_state) <canonical_names>: Update
3613 comment.
3614 (add_sal_to_sals_basic): Delete.
3615 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3616 (decode_line_2, create_sals_line_offset)
3617 (convert_address_location_to_sals, convert_linespec_to_sals)
3618 (convert_explicit_location_to_sals, parse_linespec)
3619 (event_location_to_sals, decode_line_full, decode_line_1)
3620 (decode_line_with_current_source)
3621 (decode_line_with_last_displayed, decode_objc)
3622 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3623 (linespec_result::~linespec_result): Adjust to use std::vector
3624 instead of symtabs_and_lines.
3625 * linespec.h (linespec_sals::sals): Now a std::vector.
3626 (struct linespec_result): Use std::vector, bool, and in-class
3627 initialization.
3628 (decode_line_1, decode_line_with_current_source)
3629 (decode_line_with_last_displayed): Return std::vector.
3630 * macrocmd.c (info_macros_command): Use std::vector.
3631 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3632 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3633 std::vector.
3634 * probe.h (parse_probes): Return a std::vector.
3635 * python/python.c (gdbpy_decode_line): Use std::vector and
3636 gdb::array_view.
3637 * source.c (select_source_symtab, line_info): Use std::vector.
3638 * stack.c (func_command): Use std::vector.
3639 * symtab.h (struct symtabs_and_lines): Delete.
3640 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3641
7c44b49c
PA
36422017-09-04 Pedro Alves <palves@redhat.com>
3643
3644 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3645 unittests/array-view-selftests.c.
3646 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3647 * common/array-view.h: New file.
3648 * unittests/array-view-selftests.c: New file.
3649
e439fa14
PA
36502017-09-04 Pedro Alves <palves@redhat.com>
3651
3652 * cli/cli-cmds.c (edit_command): Pass message to
3653 ambiguous_line_spec.
3654 (list_command): Pass message to ambiguous_line_spec. Say
3655 "first"/"last" instead of "start" and "end" to be consistent with
3656 the manual.
3657 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3658 them to print formatted message.
3659
7525b645
PA
36602017-09-04 Pedro Alves <palves@redhat.com>
3661
3662 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3663 ftrace_update_insns by reference instead of pointer.
3664
badc0020
YQ
36652017-09-04 Yao Qi <yao.qi@linaro.org>
3666
3667 * i386-go32-tdep.c: Include x86-xstate.h.
3668 (i386_go32_init_abi): Call i386_target_description.
3669 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3670 if xcr0 is X86_XSTATE_X87_MASK.
3671 * i386-tdep.h (tdesc_i386): Remove the declaration.
3672 (tdesc_i386_mmx): Likewise.
3673
d78bdb54
YQ
36742017-09-04 Yao Qi <yao.qi@linaro.org>
3675
3676 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3677 X86_XSTATE_SSE_MASK instead of 0.
3678
ca1fa5ee
YQ
36792017-09-04 Yao Qi <yao.qi@linaro.org>
3680
3681 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3682 i386_target_description.
3683 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3684 i386_target_description.
3685 * i386-tdep.c (i386_gdbarch_init): Likewise.
3686
2434b019
YQ
36872017-09-04 Yao Qi <yao.qi@linaro.org>
3688
3689 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3690 (x86_darwin_init_abi_64): Call amd64_target_description.
3691 * amd64-dicos-tdep.c: Likewise.
3692 * amd64-fbsd-nat.c: Likewise.
3693 * amd64-fbsd-tdep.c: Likewise.
3694 * amd64-nbsd-tdep.c: Likewise.
3695 * amd64-obsd-tdep.c: Likewise.
3696 * amd64-sol2-tdep.c: Likewise.
3697 * amd64-windows-tdep.c: Likewise.
3698 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3699
0860c437
SM
37002017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3701
3702 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3703 (btrace_function) <insn>: Change type to use std::vector.
3704 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3705 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3706 ftrace_update_insns, ftrace_compute_global_level_offset,
3707 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3708 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3709 change to std::vector.
3710 (ftrace_update_insns): Adjust to change to std::vector, change
3711 type of INSN parameter.
3712 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3713 * record-btrace.c (btrace_call_history_insn_range,
3714 btrace_compute_src_line_range,
3715 record_btrace_frame_prev_register): Adjust to change to
3716 std::vector.
3717 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3718 to change to std::vector.
3719
0638b7f9
TT
37202017-09-03 Tom Tromey <tom@tromey.com>
3721
3722 * corefile.c (reopen_exec_file): Use std::string.
3723
8f84fb0e
TT
37242017-09-03 Tom Tromey <tom@tromey.com>
3725
3726 * compile/compile.c (compile_register_name_mangled): Return
3727 std::string.
3728 * compile/compile-loc2c.c (pushf_register_address): Update.
3729 (pushf_register): Update.
3730 * compile/compile-c-types.c (convert_array): Update.
3731 * compile/compile-c-symbols.c (generate_vla_size): Update.
3732 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3733 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3734 (convert_one_symbol): Update.
3735 (generate_c_for_for_one_variable): Update.
3736 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3737 std::string.
3738 (generate_register_struct): Update.
3739 * compile/compile-internal.h (c_get_range_decl_name): Return a
3740 std::string.
3741 (compile_register_name_mangled): Return std::string.
3742
18e9961f
TT
37432017-09-03 Tom Tromey <tom@tromey.com>
3744
3745 * utils.c (perror_string): Return a std::string.
3746 (throw_perror_with_name, perror_warning_with_name): Update.
3747
45343786
TT
37482017-09-03 Tom Tromey <tom@tromey.com>
3749
3750 * demangle.c (demangle_command): Use std::string,
3751 unique_xmalloc_ptr.
3752
b57af503
TT
37532017-09-03 Tom Tromey <tom@tromey.com>
3754
3755 * cli/cli-setshow.c (do_set_command): Use std::string.
3756
6eecf35f
TT
37572017-09-03 Tom Tromey <tom@tromey.com>
3758
3759 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3760
56496dd4
TT
37612017-09-03 Tom Tromey <tom@tromey.com>
3762
3763 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3764
e91a1fa7
TT
37652017-09-03 Tom Tromey <tom@tromey.com>
3766
3767 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3768 gdb::unique_xmalloc_ptr.
3769
7ffd83d7
TT
37702017-09-03 Tom Tromey <tom@tromey.com>
3771
3772 * thread.c (print_thread_info_1): Use string_printf.
3773 (thread_apply_command, thread_apply_all_command): Use
3774 std::string.
3775
1ccbe998
TT
37762017-09-03 Tom Tromey <tom@tromey.com>
3777
3778 * valprint.c (val_print_string): Update.
3779 * gdbcore.h (memory_error_message): Return std::string.
3780 * corefile.c (memory_error_message): Return std::string.
3781 (memory_error): Update.
3782 * breakpoint.c (insert_bp_location): Update.
3783
23fdd69e
SM
37842017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3785
3786 * target/waitstatus.h (target_waitstatus_to_string): Change
3787 return type to std::string.
3788 * target/waitstatus.c (target_waitstatus_to_string): Return
3789 std::string.
3790 * target.h (target_waitstatus_to_string): Remove declaration.
3791 * infrun.c (resume, clear_proceed_status_thread,
3792 print_target_wait_results, do_target_wait, save_waitstatus,
3793 stop_all_threads): Adjust.
3794 * record-btrace.c (record_btrace_wait): Adjust.
3795 * target-debug.h
3796 (target_debug_print_struct_target_waitstatus_p): Adjust.
3797
5c811d30
JK
37982017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3799
3800 PR gdb/22046
3801 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3802 detection.
3803
0a2dde4a
SDJ
38042017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3805
3806 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3807 for setting/unsetting environment variables on the remote target.
3808 (New remote packets): Add entries for QEnvironmentHexEncoded,
3809 QEnvironmentUnset and QEnvironmentReset.
3810 * common/environ.c (gdb_environ::operator=): Extend method to
3811 handle m_user_set_env_list and m_user_unset_env_list.
3812 (gdb_environ::clear): Likewise.
3813 (match_var_in_string): Change type of first parameter from 'char
3814 *' to 'const char *'.
3815 (gdb_environ::set): Extend method to handle
3816 m_user_set_env_list and m_user_unset_env_list.
3817 (gdb_environ::unset): Likewise.
3818 (gdb_environ::clear_user_set_env): New method.
3819 (gdb_environ::user_set_envp): Likewise.
3820 (gdb_environ::user_unset_envp): Likewise.
3821 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3822 m_user_unset_env_list on move constructor/assignment.
3823 (unset): Add new default parameter 'update_unset_list = true'.
3824 (clear_user_set_env): New method.
3825 (user_set_envp): Likewise.
3826 (user_unset_envp): Likewise.
3827 (m_user_set_env_list): New std::set.
3828 (m_user_unset_env_list): Likewise.
3829 * common/rsp-low.c (hex2str): New function.
3830 (bin2hex): New overload for bin2hex function.
3831 * common/rsp-low.c (hex2str): New prototype.
3832 (str2hex): New overload prototype.
3833 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3834 QEnvironmentUnset and QEnvironmentReset.
3835 (remote_protocol_features): Add QEnvironmentHexEncoded,
3836 QEnvironmentUnset and QEnvironmentReset packets.
3837 (send_environment_packet): New function.
3838 (extended_remote_environment_support): Likewise.
3839 (extended_remote_create_inferior): Call
3840 extended_remote_environment_support.
3841 (_initialize_remote): Add QEnvironmentHexEncoded,
3842 QEnvironmentUnset and QEnvironmentReset packet configs.
3843 * unittests/environ-selftests.c (gdb_selftest_env_var):
3844 New variable.
3845 (test_vector_initialization): New function.
3846 (test_init_from_host_environ): Likewise.
3847 (test_reinit_from_host_environ): Likewise.
3848 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3849 Likewise.
3850 (test_unset_set_empty_vector): Likewise.
3851 (test_vector_clear): Likewise.
3852 (test_std_move): Likewise.
3853 (test_move_constructor):
3854 (test_self_move): Likewise.
3855 (test_set_unset_reset): Likewise.
3856 (run_tests): Rewrite in terms of the functions above.
3857
654670a4
WP
38582017-08-31 Weimin Pan <weimin.pan@oracle.com>
3859
3860 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3861 (adi_available): Use a temp variable of type CORE_ADDR as argument
3862 3 when calling target_auxv_search.
3863 (adi_normalize_address): Use masks and xor operators to calculate
3864 normalized address.
3865 (adi_read_versions, adi_write_versions, adi_print_versions)
3866 (do_examine, do_assign): Use paddress.
3867
7755ddb7
JB
38682017-08-29 John Baldwin <jhb@FreeBSD.org>
3869
3870 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3871 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3872 out of loop and add supply of FIR.
3873 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3874 add collect of FIR.
3875
fd437cbc
SM
38762017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3877
3804a343 3878 PR gdb/21827
fd437cbc
SM
3879 * cli/cli-script.c (define_command): Don't convert command name
3880 to lower case.
3881
988f6b3d
JB
38822017-08-25 Joel Brobecker <brobecker@adacore.com>
3883
3884 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3885 Update all callers accordingly. Remove all code blocks handling
3886 the case where DISPP is not NULL.
3887
663c44ac
JK
38882017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3889
3890 PR symtab/22003
3891 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3892 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3893 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3894
f1902523
JK
38952017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3896
3897 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3898 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3899 (read_comp_units_from_section): New parameter abbrev_section, use
3900 read_and_check_comp_unit_head, allocate signatured_type if needed.
3901 (create_all_comp_units): Update read_comp_units_from_section caller.
3902
87215ad1
SDJ
39032017-08-23 Pedro Alves <palves@redhat.com>
3904
3905 PR remote/21852
3906 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3907 to null_ptid and switch to thread without reading the registers
3908 after adding the inferior.
3909
6e41ddec
JK
39102017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3911
3912 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3913 compile-gcc.
3914 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3915 (compile_to_object): Implement compile_gcc.
3916 (_initialize_compile): Install "set compile-gcc". Initialize
3917 compile_gcc.
3918
e68c32d5
JK
39192017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3920
3921 * compile/compile.c (compile_to_object): Conditionally call
3922 set_verbose. Conditionally call compile or compile_v0.
3923
58afddc6
WP
39242017-08-07 Weimin Pan <weimin.pan@oracle.com>
3925
3926 * sparc64-tdep.h: (adi_normalize_address): New export.
3927 * sparc-nat.h: (open_adi_tag_fd): New export.
3928 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3929 * sparc64-linux-tdep.c:
3930 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3931 (sparc64_linux_handle_segmentation_fault): New function.
3932 (sparc64_linux_init_abi): Register
3933 sparc64_linux_handle_segmentation_fault
3934 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3935 (sparc64_addr_bits_remove): New function.
3936 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3937 (MAX_PROC_NAME_SIZE): New macro.
3938 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3939 (sparc64adilist): New variable.
3940 (adi_proc_list): New variable.
3941 (find_adi_info): New function.
3942 (add_adi_info): New function.
3943 (get_adi_info_proc): New function.
3944 (get_adi_info): New function.
3945 (info_adi_command): New function.
3946 (read_maps_entry): New function.
3947 (adi_available): New function.
3948 (adi_normalize_address): New function.
3949 (adi_align_address): New function.
3950 (adi_convert_byte_count): New function.
3951 (adi_tag_fd): New function.
3952 (adi_is_addr_mapped): New function.
3953 (adi_read_versions): New function.
3954 (adi_write_versions): New function.
3955 (adi_print_versions): New function.
3956 (do_examine): New function.
3957 (do_assign): New function.
3958 (adi_examine_command): New function.
3959 (adi_assign_command): New function.
3960 (_initialize_sparc64_adi_tdep): New function.
3961
11db9430
SM
39622017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * breakpoint.c (breakpoints_info): Rename to ...
3965 (info_breakpoints_command): ... this.
3966 (watchpoints_info): Rename to ...
3967 (info_watchpoints_command): ... this.
3968 (tracepoints_info): Rename to ...
3969 (info_tracepoints_command): ... this.
3970 (_initialize_breakpoint): Adjust.
3971 * dcache.c (dcache_info): Rename to ...
3972 (info_display_command): ... this.
3973 (_initialize_dcache): Adjust.
3974 * frame.h (args_info): Rename to ...
3975 (info_args_command): ... this.
3976 (locals_info): Rename to ...
3977 (info_locals_command): ... this.
3978 * infcmd.c (nofp_registers_info): Rename to ...
3979 (info_registers_command): ... this.
3980 (float_info): Rename to ...
3981 (info_float_command): ... this.
3982 (program_info): Rename to ...
3983 (info_program_command): ... this.
3984 (all_registers_info): Rename to ...
3985 (info_all_registers_command): ... this.
3986 (vector_info): Rename to ...
3987 (info_vector_command): ... this.
3988 (float_info): Rename to ...
3989 (info_float_command): ... this.
3990 (_initialize_infcmd): Adjust.
3991 * inferior.h (term_info): Rename to ...
3992 (info_terminal_command): ... this.
3993 * inflow.c (term_info): Rename to ...
3994 (info_terminal_command): ... this.
3995 (_initialize_inflow): Adjust.
3996 * infrun.c (signals_info): Rename to ...
3997 (info_signals_command): ... this.
3998 (_initialize_infrun): Adjust.
3999 * objc-lang.c (classes_info): Rename to ...
4000 (info_classes_command): ... this.
4001 (selectors_info): Rename to ...
4002 (info_selectors_command): ... this.
4003 (_initialize_objc_language): Adjust.
4004 * printcmd.c (sym_info): Rename to ...
4005 (info_symbol_command): ... this.
4006 (address_info): Rename to ...
4007 (info_address_command): ... this.
4008 (display_info): Rename to ...
4009 (info_display_command): ... this.
4010 (_initialize_printcmd): Adjust.
4011 * reverse.c (bookmarks_info): Rename to ...
4012 (info_breakpoints_command): ... this.
4013 (_initialize_reverse): Adjust.
4014 * ser-go32.c (dos_info): Rename to ...
4015 (info_serial_command): ... this.
4016 (_initialize_ser_dos): Adjust.
4017 * skip.c (skip_info): Rename to ...
4018 (info_skip_command): ... this.
4019 (_initialize_step_skip): Adjust.
4020 * source.c (line_info): Rename to ...
4021 (info_line_command): ... this.
4022 (source_info): Rename to ...
4023 (info_source_command)
4024 * stack.c (frame_info): Rename to ...
4025 (info_frame_command): ... this.
4026 (locals_info): Rename to ...
4027 (info_locals_command): ... this.
4028 (args_info): Rename to ...
4029 (info_args_command): ... this.
4030 (_initialize_stack): Adjust.
4031 * symtab.c (sources_info): Rename to ...
4032 (info_sources_command): ... this.
4033 (variables_info): Rename to ...
4034 (info_variables_command): ... this.
4035 (functions_info): Rename to ...
4036 (info_functions_command): ... this.
4037 (types_info): Rename to ...
4038 (info_types_command): ... this.
4039 (_initialize_symtab): Adjust.
4040 * target.c (target_info): Rename to ...
4041 (info_target_command): ... this.
4042 (initialize_targets): Adjust.
4043 * tracepoint.c (tvariables_info): Rename to ...
4044 (info_tvariables_command): ... this.
4045 (scope_info): Rename to ...
4046 (info_scope_command): ... this.
4047 (trace_dump_actions): Adjust.
4048 (_initialize_tracepoint): Adjust.
4049
b270e6f9
TT
40502017-08-22 Tom Tromey <tom@tromey.com>
4051
4052 * breakpoint.h (install_breakpoint): Update.
4053 * breakpoint.c (add_solib_catchpoint): Update.
4054 (install_breakpoint): Change argument to a std::unique_ptr.
4055 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4056 (create_breakpoint_sal, create_breakpoint): Update.
4057 (watch_command_1, catch_exec_command_1)
4058 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4059 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4060 Return the breakpoint.
4061 (set_raw_breakpoint_without_location, set_raw_breakpoint)
4062 (new_single_step_breakpoint): Update.
4063 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4064 std::unique_ptr.
4065 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4066 std::unique_ptr.
4067 * break-catch-sig.c (create_signal_catchpoint): Use
4068 std::unique_ptr.
4069 * ada-lang.c (create_ada_exception_catchpoint): Use
4070 std::unique_ptr.
4071
36bd8eaa
TT
40722017-08-22 Tom Tromey <tom@tromey.com>
4073
4074 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4075
56f37645
TT
40762017-08-22 Tom Tromey <tom@tromey.com>
4077
4078 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4079 (lookup_partial_symbol): Update.
4080
0b581c69
TT
40812017-08-22 Tom Tromey <tom@tromey.com>
4082
4083 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4084 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4085 (find_and_open_source, symtab_to_fullname): Update.
4086 * psymtab.c (psymtab_to_fullname): Update.
4087
14278e1f
TT
40882017-08-22 Tom Tromey <tom@tromey.com>
4089
4090 * exec.c (exec_file_attach): Update.
4091 * linux-thread-db.c (try_thread_db_load): Update.
4092 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4093 * utils.c (gdb_realpath): Change return type.
4094 (gdb_realpath_keepfile): Update.
4095 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4096 (_initialize_utils): Register the new self test.
4097 * source.c (openp): Update.
4098 (find_and_open_source): Update.
4099 * nto-tdep.c (nto_find_and_open_solib): Update.
4100 * main.c (set_gdb_data_directory): Update.
4101 (captured_main_1): Update.
4102 * dwarf2read.c (dwarf2_get_dwz_file): Update
4103 (dw2_map_symbol_filenames): Update.
4104 * auto-load.c (auto_load_safe_path_vec_update): Update.
4105 (filename_is_in_auto_load_safe_path_vec): Change type of
4106 "filename_realp".
4107 (auto_load_objfile_script): Update.
4108 (file_is_auto_load_safe): Update. Use std::string.
4109 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4110
4971c9a7
TT
41112017-08-22 Tom Tromey <tom@tromey.com>
4112
4113 * utils.c (gdb_realpath_keepfile): Return a
4114 gdb::unique_xmalloc_ptr.
4115 * exec.c (exec_file_attach): Update.
4116 * utils.h (gdb_realpath_keepfile): Return a
4117 gdb::unique_xmalloc_ptr.
4118
e3e41d58
TT
41192017-08-22 Tom Tromey <tom@tromey.com>
4120
4121 * compile/compile.c (compile_file_command): Use
4122 gdb::unique_xmalloc_ptr, std::string.
4123 * utils.c (gdb_abspath): Change return type.
4124 * source.c (openp): Update.
4125 * objfiles.c (allocate_objfile): Update.
4126 * main.c (set_gdb_data_directory): Update.
4127 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4128
0d999a6e
ZZ
41292017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4130
4131 * cli-cmds.c (list_commands): List actual code around more than
4132 one location.
4133
329d5e7e
JB
41342017-08-21 John Baldwin <jhb@FreeBSD.org>
4135
4136 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4137
bf223d3e
PA
41382017-08-21 Pedro Alves <palves@redhat.com>
4139
4140 PR gdb/19487
4141 * c-exp.y (variable production): Handle function aliases.
4142 * minsyms.c (msymbol_is_text): New function.
4143 * minsyms.h (msymbol_is_text): Declare.
4144 * symtab.c (find_function_alias_target): New function.
4145 * symtab.h (find_function_alias_target): Declare.
4146
c973d0aa
PA
41472017-08-21 Pedro Alves <palves@redhat.com>
4148
4149 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4150 typedefs.
4151 * typeprint.c (whatis_exp): If handling "whatis", and expression
4152 is OP_TYPE, strip one typedef level. Otherwise don't strip
4153 typedefs here.
4154 * valops.c (value_cast): Save "to" type before resolving
4155 stubs/typedefs. Use that type as resulting value's type.
4156
2989a365
TT
41572017-08-18 Tom Tromey <tom@tromey.com>
4158 Pedro Alves <palves@redhat.com>
4159
4160 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4161 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4162 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4163 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4164 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4165 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4166 (linux_get_siginfo_data): Add "thread" argument. Use
4167 scoped_restore.
4168 * linux-nat.c (linux_child_follow_fork)
4169 (check_stopped_by_watchpoint): Use scoped_restore.
4170 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4171 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4172 (restore_inferior_ptid, save_inferior_ptid): Remove.
4173 * btrace.c (btrace_fetch): Use scoped_restore.
4174 * bsd-uthread.c (bsd_uthread_fetch_registers)
4175 (bsd_uthread_store_registers): Use scoped_restore.
4176 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4177 scoped_restore.
4178 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4179 (aix_thread_xfer_partial): Use scoped_restore.
4180 * inferior.h (save_inferior_ptid): Remove.
4181
e60eb288
YQ
41822017-08-18 Yao Qi <yao.qi@linaro.org>
4183
4184 PR tdep/21818
4185 * arm-tdep.c (gdb_print_insn_arm): Mark
4186 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4187
6d580b63
YQ
41882017-08-18 Yao Qi <yao.qi@linaro.org>
4189
4190 * NEWS: Mention GDBserver's new option "--selftest".
4191 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4192 * selftest.c: Move it to common/selftest.c.
4193 * selftest.h: Move it to common/selftest.h.
4194 * selftest-arch.c (reset): New function.
4195 (tests_with_arch): Call reset.
4196
86dcbf50
YQ
41972017-08-18 Yao Qi <yao.qi@linaro.org>
4198
4199 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4200 instead of exception_fprintf and printf_filtered.
4201
7649770c
YQ
42022017-08-18 Yao Qi <yao.qi@linaro.org>
4203
4204 * selftest.c (register_self_test): Rename it to
4205 selftests::register_test.
4206 (run_self_tests): selftest::run_tests.
4207 * selftest.h: Update declarations.
4208 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4209 selftests::register_test_foreach_arch.
4210 * selftest-arch.h: Update declaration.
4211 * aarch64-tdep.c: Update.
4212 * arm-tdep.c: Likewise.
4213 * disasm-selftests.c: Likewise.
4214 * dwarf2loc.c: Likewise.
4215 * dwarf2-frame.c: Likewise.
4216 * findvar.c: Likewise.
4217 * gdbarch-selftests.c: Likewise.
4218 * maint.c (maintenance_selftest): Likewise.
4219 * regcache.c: Likewise.
4220 * rust-exp.y: Likewise.
4221 * selftest-arch.c: Likewise.
4222 * unittests/environ-selftests.c: Likewise.
4223 * unittests/function-view-selftests.c: Likewise.
4224 * unittests/offset-type-selftests.c: Likewise.
4225 * unittests/optional-selftests.c: Likewise.
4226 * unittests/scoped_restore-selftests.c: Likewise.
4227 * utils-selftests.c: Likewise.
4228
b0cba12e
PA
42292017-08-17 Pedro Alves <palves@redhat.com>
4230
4231 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4232 local.
4233
4c8aa72d
PA
42342017-08-17 Pedro Alves <palves@redhat.com>
4235
4236 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4237 field.
4238 (reset_die_in_process): Delete, replaced by ...
4239 (process_die_scope): ... this new class. Make it responsible for
4240 freeing cu->line_header too.
4241 (process_die): Use process_die_scope.
4242 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4243 cu->line_header_die_owner. Don't release the line header if it's
4244 owned by the CU.
4245 (setup_type_unit_groups): Make the CU/DIE own the line header.
4246 Don't release the line header here.
4247
ba713918
AL
42482017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4249
4250 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4251
44d0fb3a
RK
42522017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4253
4254 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4255 Single-Key mode
4256
a5afdb16
RK
42572017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4258
4259 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4260 mode command list.
4261
47613aeb
SH
42622017-08-15 Stafford Horne <shorne@gmail.com>
4263
4264 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4265
9c3cc999
SH
42662017-08-15 Stafford Horne <shorne@gmail.com>
4267
4268 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4269
206726fb
SDJ
42702017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4271
4272 PR gdb/21954
4273 * infcmd.c (unset_environment_command): Use the 'clear' method on
4274 the environment instead of resetting it.
4275
0335ac6d
JB
42762017-08-15 John Baldwin <jhb@FreeBSD.org>
4277
4278 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4279 platforms.
4280
d3abe1c8
TT
42812017-08-14 Tom Tromey <tom@tromey.com>
4282
4283 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4284 (print_binary_chars): Likewise.
4285 (BITS_IN_BYTES): Remove.
4286
d6382fff
TT
42872017-08-14 Tom Tromey <tom@tromey.com>
4288
4289 PR gdb/21675
4290 * valprint.c (LOW_ZERO): Change value to 034.
4291 (print_octal_chars): Add static_asserts for octal constants.
4292 * printcmd.c (print_scalar_formatted): Add 'd' case.
4293
f978cb06
TT
42942017-08-11 Tom Tromey <tom@tromey.com>
4295
4296 * symfile.c (add_symbol_file_command): Use std::vector.
4297
2f5404b3
TT
42982017-08-14 Tom Tromey <tom@tromey.com>
4299
4300 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4301 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4302 std::move.
4303 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4304
de7985c3
PA
43052017-08-11 Pedro Alves <palves@redhat.com>
4306
4307 * infrun.c (process_event_stop_test): Adjust
4308 function_name_is_marked_for_skip call.
4309 * skip.c: Include <list>.
4310 (skiplist_entry): Make it a class with private fields, and
4311 getters/setters.
4312 (skiplist_entry_chain): Delete.
4313 (skiplist_entries): New.
4314 (skiplist_entry_count): Delete.
4315 (highest_skiplist_entry_num): New.
4316 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4317 (add_skiplist_entry): Delete.
4318 (skiplist_entry::skiplist_entry): New.
4319 (skiplist_entry::add_entry): New.
4320 (skip_file_command, skip_function): Adjust.
4321 (compile_skip_regexp): Delete.
4322 (skip_command): Don't compile regexp here. Adjust to use
4323 skiplist_entry::add_entry.
4324 (skip_info): Adjust to use range-for and getters.
4325 (skip_enable_command, skip_disable_command): Adjust to use
4326 range-for and setters.
4327 (skip_delete_command): Adjust to use std::list.
4328 (add_skiplist_entry): Delete.
4329 (skip_file_p): Delete, refactored as ...
4330 (skiplist_entry::do_skip_file_p): ... this new method.
4331 (skip_gfile_p): Delete, refactored as ...
4332 (skiplist_entry::do_gskip_file_p): ... this new method.
4333 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4334 (skiplist_entry::skip_function_p): ... this new method.
4335 (function_name_is_marked_for_skip): Now returns bool, and takes
4336 the function sal by const reference. Adjust to use range-for and
4337 skiplist_entry methods.
4338 (_initialize_step_skip): Remove references to
4339 skiplist_entry_chain, skiplist_entry_count.
4340 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4341 takes the function sal by const reference.
4342
be7d3cd5
YQ
43432017-08-11 Yao Qi <yao.qi@linaro.org>
4344
4345 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4346 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4347 (dwarf2_frame_cache):
4348 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4349 RETURN_MASK_ALL and set *this_case to NULL.
4350 * frame-unwind.h: Update comments.
4351
1c90d9f0
YQ
43522017-08-11 Yao Qi <yao.qi@linaro.org>
4353
4354 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4355 (dwarf2_frame_state_copy_regs): Remove.
4356 (dwarf2_frame_state_free_regs): Remove.
4357 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4358 (dwarf2_restore_rule): Call method .alloc_regs instead of
4359 dwarf2_frame_state_alloc_regs.
4360 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4361 constructor. Call std::move.
4362 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4363 (dwarf2_frame_cache): Likewise.
4364
4365 [GDB_SELF_TEST]: Include selftest.h and
4366 selftest-arch.h.
4367 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4368 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4369 execute_cfa_program_test.
4370
4371 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4372 copy ctor, assignment operator, move assignment.
4373 <alloc_regs>: New method.
4374 <swap>: New method.
4375 (struct dwarf2_frame_state): Delete dtor.
4376 (dwarf2_frame_state_alloc_regs): Remove declaration.
4377 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4378 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4379
afe37d6b
YQ
43802017-08-11 Yao Qi <yao.qi@linaro.org>
4381
4382 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4383 (dwarf2_frame_state::dwarf2_frame_state): New.
4384 (dwarf2_frame_state::~dwarf2_frame_state): New.
4385 (dwarf2_fetch_cfa_info): Update.
4386 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
4387 rather than a pointer. Update code.
4388 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4389 dtor.
4390 <data_align, code_align, retaddr_column>: Change them to const.
4391 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4392 to bool.
4393
b348037f
YQ
43942017-08-11 Yao Qi <yao.qi@linaro.org>
4395
4396 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4397 <loc.exp>: New field.
4398 * dwarf2-frame.c (execute_cfa_program): Update.
4399 (dwarf2_frame_prev_register): Update.
4400
e7c9de26
PA
44012017-08-10 Pedro Alves <palves@redhat.com>
4402
4403 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4404
e8c6b620
JB
44052017-08-09 John Baldwin <jhb@FreeBSD.org>
4406
4407 * fbsd-nat.c (struct fbsd_fork_info): Remove.
4408 (fbsd_pending_children): Use std::list.
4409 (fbsd_remember_child): Likewise.
4410 (fbsd_is_child_pending): Likewise.
4411 (fbsd_pending_vfork_done): Use std::forward_list.
4412 (fbsd_add_vfork_done): Likewise.
4413 (fbsd_is_vfork_done_pending): Likewise.
4414 (fbsd_next_vfork_done): Likewise.
4415
e4a26669
JB
44162017-08-09 John Baldwin <jhb@FreeBSD.org>
4417
4418 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4419 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4420 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4421 for `mapfilename'.
4422 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 4423 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 4424
142311d3
JB
44252017-08-09 John Baldwin <jhb@FreeBSD.org>
4426
4427 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4428 "filestuff.h".
4429 (fbsd_find_memory_regions): Fix `mapfile' initialization.
4430
42fa2e0e
TT
44312017-08-09 Tom Tromey <tom@tromey.com>
4432
4433 * skip.c (skiplist_entry): New constructor.
4434 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4435 (skiplist_entry::file_is_glob): Now bool.
4436 (skiplist_entry::file, skiplist_entry::function): Now
4437 std::string.
4438 (make_skip_entry): Return a unique_ptr. Use new.
4439 (free_skiplist_entry, free_skiplist_entry_cleanup)
4440 (make_free_skiplist_entry_cleanup): Remove.
4441 (skip_command, skip_disable_command, add_skiplist_entry)
4442 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4443 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4444 (function_name_is_marked_for_skip): Update.
4445 (skip_delete_command): Update. Use delete.
4446
cd3af38d
JW
44472017-08-09 Jiong Wang <jiong.wang@arm.com>
4448
4449 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4450 (aarch64_linux_core_read_description): New function.
4451 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4452
29592bde
PA
44532017-08-09 Pedro Alves <palves@redhat.com>
4454
4455 * cp-name-parser.y (cp_comp_to_string): Return a
4456 gdb::unique_xmalloc_ptr<char>.
4457 * cp-support.c (replace_typedefs_qualified_name)
4458 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4459 (cp_canonicalize_string_full): Use op= instead of explicit
4460 convertion.
4461 (cp_class_name_from_physname, method_name_from_physname)
4462 (cp_func_name, cp_remove_params): Adjust to use
4463 gdb::unique_xmalloc_ptr<char>.
4464 * cp-support.h (cp_comp_to_string): Return a
4465 gdb::unique_xmalloc_ptr<char>.
4466 * python/py-type.c (typy_lookup_type): Adjust to use
4467 gdb::unique_xmalloc_ptr<char>.
4468
b3340438
L
44692017-08-09 H.J. Lu <hongjiu.lu@intel.com>
4470
4471 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4472
e88e8651
YQ
44732017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
4474 Yao Qi <yao.qi@linaro.org>
4475
4476 * cp-support.c (cp_canonicalize_string_full): Use
4477 gdb::unique_xmalloc_ptr<char>.
4478 (cp_canonicalize_string): Likewise.
4479
f5a29eb0
YQ
44802017-08-09 Yao Qi <yao.qi@linaro.org>
4481
4482 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4483 * regformats/i386/amd64-avx-avx512.dat: Remove.
4484 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4485 * regformats/i386/amd64-avx-mpx.dat:Remove.
4486 * regformats/i386/amd64-avx.dat: Remove.
4487 * regformats/i386/amd64-mpx.dat: Remove.
4488 * regformats/i386/i386-avx-avx512.dat: Remove.
4489 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4490 * regformats/i386/i386-avx-mpx.dat: Remove.
4491 * regformats/i386/i386-mmx.dat: Remove.
4492 * regformats/i386/i386-mpx.dat: Remove.
4493
57757c2f
YQ
44942017-08-09 Yao Qi <yao.qi@linaro.org>
4495
4496 * amd64-tdep.h (tdesc_x32): Remove the declaration.
4497 * amd64-tdep.c: Don't include features/i386/x32*.c.
4498 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4499 functions.
4500 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4501 and i386/x32-avx-avx512.
4502 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4503 and i386/x32.xml.
4504 * features/i386/x32-avx-avx512.c: Removed.
4505 * features/i386/x32-avx-avx512.xml: Removed.
4506 * features/i386/x32-avx.c: Removed.
4507 * features/i386/x32-avx.xml: Removed.
4508 * features/i386/x32.c: Removed.
4509 * features/i386/x32.xml: Removed.
4510 * regformats/i386/x32-avx-avx512.dat: Removed.
4511 * regformats/i386/x32-avx.dat: Removed.
4512 * regformats/i386/x32.dat: Removed.
4513
ba7b109b
MR
45142017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4515
4516 PR breakpoints/21886
4517 * mem-break.c (default_memory_insert_breakpoint): Use
4518 `->placed_address' rather than `->reqstd_address' for the
4519 breakpoint location.
4520
e347efc3
MR
45212017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4522
4523 * arch-utils.c (default_print_insn): Remove arch/mach/endian
4524 assertions.
4525
0dba2a6c
MR
45262017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4527
4528 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4529 a union of `tdep_info', `tdesc_data' and `id'.
4530 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4531 rather than `info.tdep_info'.
4532 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4533 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4534 * i386-tdep.c (i386_gdbarch_init): Likewise.
4535 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4536 * mips-tdep.c (mips_gdbarch_init): Likewise.
4537 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4538 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4539 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4540 `info.tdep_info'.
4541 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4542 `info.tdep_info'.
4543 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4544 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4545 `info.tdep_info'.
4546 * spu-tdep.c (spu_gdbarch_init): Likewise.
4547 * gdbarch.h: Regenerate.
4548
16eb6b2d
LS
45492017-08-07 Leszek Swirski <leszeks@google.com>
4550
7b005726 4551 PR symtab/20899
16eb6b2d
LS
4552 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4553
74cbb09e
SM
45542017-08-07 Simon Marchi <simon.marchi@ericsson.com>
4555
4556 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4557 (gdbsim_open): Rename gdb_argv args object to argv.
4558
ee0c3293
TT
45592017-08-05 Tom Tromey <tom@tromey.com>
4560
4561 * compile/compile-object-load.c (compile_object_load): Use
4562 gdb::unique_xmalloc_ptr.
4563 * cli/cli-dump.c (scan_filename): Rename from
4564 scan_filename_with_cleanup. Change return type.
4565 (scan_expression): Rename from scan_expression_with_cleanup.
4566 Change return type.
4567 (dump_memory_to_file, dump_value_to_file, restore_command):
4568 Use gdb::unique_xmalloc_ptr. Update.
4569 * cli/cli-cmds.c (find_and_open_script): Use
4570 gdb::unique_xmalloc_ptr.
4571 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4572 * symmisc.c (maintenance_print_symbols)
4573 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4574 * symfile.c (symfile_bfd_open, generic_load)
4575 (add_symbol_file_command, remove_symbol_file_command): Use
4576 gdb::unique_xmalloc_ptr.
4577 * source.c (openp): Use gdb::unique_xmalloc_ptr.
4578 * psymtab.c (maintenance_print_psymbols): Use
4579 gdb::unique_xmalloc_ptr.
4580 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4581 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4582 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4583 (reload_shared_libraries_1): Likewise.
4584
3232fabd
TT
45852017-08-05 Tom Tromey <tom@tromey.com>
4586
4587 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4588 (rust_op_vector, rust_set_vector): New typedefs.
4589 (current_parser): New global.
4590 (work_obstack): Change to pointer type. Update all users.
4591 (rust_ast, pstate): Remove globals.
4592 (struct rust_parser): New.
4593 (%union) <params, field_inits>: Change type.
4594 (start, tuple_expr, unit_expr, struct_expr_list, literal)
4595 (field_expr, expr_list, maybe_expr_list, type_list): Update.
4596 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4597 (convert_params_to_types, convert_params_to_expression): Change
4598 type of "params".
4599 (ast_string): Change type of "fields".
4600 (rust_parse): Make a rust_parser. Remove cleanups.
4601 (rust_lex_tests): Make and install an auto_obstack.
4602
f02fd774
YQ
46032017-08-04 Yao Qi <yao.qi@linaro.org>
4604
4605 * configure.srv (ipa_x32_linux_regobj): New.
4606 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4607 instead of X86_TDESC_AVX512.
4608 (initialize_low_tracepoint): Call
4609 init_registers_x32_avx_avx512_linux.
4610
91975afd
YQ
46112017-08-04 Yao Qi <yao.qi@linaro.org>
4612
4613 * utils.h (gdb_argv): Add namespace std for nullptr_t.
4614
2331fa3a
RK
46152017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4616
4617 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4618
744e4fe1
TT
46192017-08-03 Tom Tromey <tom@tromey.com>
4620
4621 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4622 Remove.
4623 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4624
1c034b67
TT
46252017-08-03 Tom Tromey <tom@tromey.com>
4626
4627 * python/py-param.c (compute_enum_values): Use gdb_argv.
4628
773a1edc
TT
46292017-08-03 Tom Tromey <tom@tromey.com>
4630
4631 * utils.h (struct gdb_argv_deleter): New.
4632 (gdb_argv): New class.
4633 * utils.c (gdb_argv::reset): New method.
4634 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4635 * tracefile.c (tsave_command): Use gdb_argv.
4636 * top.c (new_ui_command): Use gdb_argv.
4637 * symmisc.c (maintenance_print_symbols)
4638 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4639 * symfile.c (symbol_file_command, generic_load)
4640 (remove_symbol_file_command): Use gdb_argv.
4641 * stack.c (backtrace_command): Use gdb_argv.
4642 * source.c (add_path, show_substitute_path_command)
4643 (unset_substitute_path_command, set_substitute_path_command):
4644 Use gdb_argv.
4645 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4646 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4647 * remote.c (extended_remote_run, remote_put_command)
4648 (remote_get_command, remote_delete_command): Use gdb_argv.
4649 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4650 (gdbsim_open): Use gdb_argv.
4651 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4652 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4653 * procfs.c (procfs_info_proc): Use gdb_argv.
4654 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4655 * infrun.c (handle_command): Use gdb_argv.
4656 * inferior.c (add_inferior_command, clone_inferior_command):
4657 Use gdb_argv.
4658 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4659 * exec.c (exec_file_command): Use gdb_argv.
4660 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4661 * compile/compile.c (build_argc_argv): Use gdb_argv.
4662
0d50bde3
TT
46632017-08-03 Tom Tromey <tom@tromey.com>
4664
4665 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4666
7f968c89
TT
46672017-08-03 Tom Tromey <tom@tromey.com>
4668
4669 * python/python.c (compute_python_string): Return std::string.
4670 (gdbpy_eval_from_control_command): Update.
4671 (do_start_initialization): Use std::string.
4672 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4673 xstrprintf.
4674 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4675 xstrprintf.
4676
3c9ebddd
TT
46772017-08-03 Tom Tromey <tom@tromey.com>
4678
4679 * top.h (do_restore_instream_cleanup): Remove.
4680 * top.c (do_restore_instream_cleanup): Remove.
4681 (read_command_file): Use scoped_restore.
4682 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4683
b51b225e
TT
46842017-08-03 Tom Tromey <tom@tromey.com>
4685
4686 * cli/cli-script.c (execute_user_command)
4687 (execute_control_command): Use scoped_restore.
4688
ac991630
TT
46892017-08-03 Tom Tromey <tom@tromey.com>
4690
4691 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4692 (execute_user_command): Remove user_call_depth; use
4693 user_args_stack's size instead.
4694
898e0c8e
TT
46952017-08-03 Tom Tromey <tom@tromey.com>
4696
4697 * top.h (in_user_command): Remove.
4698 * top.c (in_user_command): Remove.
4699 * cli/cli-script.c (do_restore_user_call_depth)
4700 (execute_user_command): Update.
4701
26fcd5d7
TT
47022017-08-03 Tom Tromey <tom@tromey.com>
4703
4704 * valops.c (search_struct_method): Use gdb::byte_vector.
4705 * valarith.c (value_concat): Use std::vector.
4706 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4707 (simple_search_memory): Likewise.
4708 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4709 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4710 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4711 * elfread.c (elf_rel_plt_read): Use std::string.
4712 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4713 * cli/cli-dump.c (restore_section_callback): Use
4714 gdb::byte_vector.
4715
7c218e6c
TT
47162017-08-03 Tom Tromey <tom@tromey.com>
4717
4718 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4719
31b68d4a
TT
47202017-08-03 Tom Tromey <tom@tromey.com>
4721
4722 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4723 (tui_register_format): Use scoped_restore.
4724
2ec845e7
TT
47252017-08-03 Tom Tromey <tom@tromey.com>
4726
4727 * reverse.c (exec_direction_default): Remove.
4728 (exec_reverse_once): Use scoped_restore.
4729 * remote.c (restore_remote_timeout): Remove.
4730 (remote_flash_erase, remote_flash_write, remote_flash_done)
4731 (readchar, remote_serial_write): Use scoped_restore.
4732 * cli/cli-script.c (struct source_cleanup_lines_args)
4733 (source_cleanup_lines): Remove.
4734 (script_from_file): Use scoped_restore.
4735 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4736 (source_command): Use scoped_restore.
4737
b3bc8453
TT
47382017-08-03 Tom Tromey <tom@tromey.com>
4739
4740 * utils.h (make_cleanup_free_so): Remove.
4741 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4742 * solist.h (struct so_deleter): New.
4743 (so_list_up): New typedef.
4744 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4745
e3ad2841
TT
47462017-08-03 Tom Tromey <tom@tromey.com>
4747
4748 * utils.h (make_cleanup_restore_current_language): Remove.
4749 * utils.c (do_restore_current_language)
4750 (make_cleanup_restore_current_language): Remove.
4751 * parse.c (parse_exp_in_context_1)
4752 (parse_expression_with_language): Use
4753 scoped_restore_current_language.
4754 * mi/mi-main.c (mi_cmd_execute): Use
4755 scoped_restore_current_language.
4756 * language.h (scoped_restore_current_language): New class.
4757
b80cf838
TT
47582017-08-03 Tom Tromey <tom@tromey.com>
4759
4760 * compile/compile.c (cleanup_unlink_file): Remove.
4761 (compile_to_object): Use gdb::unlinker.
4762 (eval_compile_command): Likewise.
4763
fad0444a
TT
47642017-08-03 Tom Tromey <tom@tromey.com>
4765
4766 * utils.h (make_cleanup_fclose): Remove.
4767 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4768
6e7bc05c
TT
47692017-08-03 Tom Tromey <tom@tromey.com>
4770
4771 * top.c (open_terminal_stream): Return gdb_file_up.
4772 (new_ui_command): Update.
4773
4a45905b
TT
47742017-08-03 Tom Tromey <tom@tromey.com>
4775
4776 * source.c (print_source_lines_base, forward_search_command)
4777 (reverse_search_command): Use gdb_file_up.
4778
7cd06d6e
TT
47792017-08-03 Tom Tromey <tom@tromey.com>
4780
4781 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4782
ed166945
TT
47832017-08-03 Tom Tromey <tom@tromey.com>
4784
4785 * cli/cli-cmds.c (find_and_open_script): Change return type.
4786 Remove "streamp" and "full_path" parameters.
4787 (source_script_with_search): Update.
4788 * auto-load.c (source_script_file): Update.
4789 * cli/cli-cmds.h (find_and_open_script): Change type.
4790 (open_script): New struct.
4791
d419f42d
TT
47922017-08-03 Tom Tromey <tom@tromey.com>
4793
4794 * xml-support.c (xml_fetch_content_from_file): Update.
4795 * ui-file.c (stdio_file::open): Update.
4796 * tracefile-tfile.c (tfile_start): Update.
4797 * remote.c (remote_file_put, remote_file_get): Update.
4798 * nat/linux-procfs.c (linux_proc_get_int)
4799 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4800 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4801 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4802 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4803 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4804 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4805 * linux-nat.c (linux_proc_pending_signals): Update.
4806 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4807 (file_closer): Remove.
4808 * compile/compile.c (compile_to_object): Update.
4809 * common/filestuff.h (struct gdb_file_deleter): New.
4810 (gdb_file_up): New typedef.
4811 (gdb_fopen_cloexec): Change return type.
4812 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4813 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4814 (dump_binary_file, restore_binary_file): Update.
4815 * auto-load.c (auto_load_objfile_script_1): Update.
4816
4a2b031d
TT
48172017-08-03 Tom Tromey <tom@tromey.com>
4818
4819 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4820 (info_static_tracepoint_markers_command): Likewise.
4821 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4822 * skip.c (skip_info): Use ui_out_emit_table.
4823 * progspace.c (print_program_space): Use ui_out_emit_table.
4824 * osdata.c (info_osdata): Use ui_out_emit_table.
4825 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4826 ui_out_emit_table.
4827 * linux-thread-db.c (info_auto_load_libthread_db): Use
4828 ui_out_emit_table.
4829 * inferior.c (print_inferior): Use ui_out_emit_table.
4830 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4831 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4832 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4833 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4834 * ui-out.h (class ui_out_emit_table): New.
4835
a4f320fd
MR
48362017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4837
4838 * mips-tdep.c (mips_fpu_type_str): New function.
4839 (mips_dump_tdep): Call it.
4840
a2f1f308
MR
48412017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4842
4843 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4844 `->mips_fpu_type'.
4845
7e5ed83b
XR
48462017-07-31 Xavier Roirand <roirand@adacore.com>
4847
4848 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4849
4c9dc811
XR
48502017-07-27 Xavier Roirand <roirand@adacore.com>
4851
4852 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4853
27d41eac
YQ
48542017-07-26 Yao Qi <yao.qi@linaro.org>
4855
4856 * cli/cli-cmds.c (maintenancechecklist): New variable.
4857 * gdbcmd.h (maintenancechecklist): Declare it.
4858 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4859 Call i386_linux_read_description with different masks.
4860 * maint.c (maintenance_check_command): New function.
4861 (_initialize_maint_cmds): Call add_prefix_cmd.
4862 * target-descriptions.c (tdesc_reg): override operator != and ==.
4863 (tdesc_type): Likewise.
4864 (tdesc_feature): Likewise.
4865 (target_desc): Likewise.
4866 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4867 (maintenance_check_xml_descriptions): New function.
4868 (_initialize_target_descriptions) Add command "xml-descriptions".
4869 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4870
ea03d0d3
YQ
48712017-07-26 Yao Qi <yao.qi@linaro.org>
4872
4873 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4874 Include features/i386/32bit-*.c.
4875 (i386_linux_read_description): Generate target description if it
4876 doesn't exist.
4877 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4878 functions.
4879 * features/i386/32bit-linux.c: Re-generated.
4880 * features/i386/32bit-sse.c: Likewise.
4881 * target-descriptions.c (print_c_feature::visit): Print code to
4882 set register number if needed.
4883 (print_c_feature) <m_next_regnum>: New field.
4884
25aa13e5
YQ
48852017-07-26 Yao Qi <yao.qi@linaro.org>
4886
4887 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4888 (FEATURE_XMLFILES): New.
4889 (FEATURE_CFILES): New.
4890 New rules.
4891 (clean-cfiles): Remove generated c files.
4892 * features/i386/32bit-avx.c: Generated.
4893 * features/i386/32bit-avx512.c: Generated.
4894 * features/i386/32bit-core.c: Generated.
4895 * features/i386/32bit-linux.c: Generated.
4896 * features/i386/32bit-mpx.c: Generated.
4897 * features/i386/32bit-pkeys.c: Generated.
4898 * features/i386/32bit-sse.c: Generated.
4899 * target-descriptions.c: Include algorithm.
4900 (tdesc_element_visitor): Add method visit_end.
4901 (print_c_tdesc): Implement visit_end.
4902 (print_c_tdesc:: m_filename_after_features): Move it to
4903 protected.
4904 (print_c_feature): New class.
4905 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4906 name starts with "i386/32bit-".
4907
6eb1e6a8
YQ
49082017-07-26 Yao Qi <yao.qi@linaro.org>
4909
4910 * target-descriptions.c (tdesc_element_visitor): New class.
4911 (tdesc_element): New class.
4912 (tdesc_reg): Inherit from tdesc_element.
4913 (tdesc_reg::accept): New function.
4914 (tdesc_type): Inherit from tdesc_element.
4915 (tdesc_type::accept): New function.
4916 (tdesc_feature): Inherit from tdesc_element.
4917 (tdesc_feature::accept): New function.
4918 (target_desc): Inherit from tdesc_element.
4919 (target_desc::target_desc): New.
4920 (target_desc::~target_desc): New.
4921 (target_desc::accept): New.
4922 (allocate_target_description): Use new.
4923 (free_target_description): Use delete.
4924 (print_c_tdesc): New class.
4925 (maint_print_c_tdesc_cmd): Adjust.
4926
4927 * features/aarch64.c: Re-generated.
4928 * features/arc-arcompact.c: Re-generated.
4929 * features/arc-v2.c: Re-generated.
4930 * features/arm/arm-with-iwmmxt.c: Re-generated.
4931 * features/arm/arm-with-m.c: Re-generated.
4932 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4933 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4934 * features/arm/arm-with-neon.c: Re-generated.
4935 * features/arm/arm-with-vfpv2.c: Re-generated.
4936 * features/arm/arm-with-vfpv3.c: Re-generated.
4937 * features/i386/amd64-avx-avx512.c: Re-generated.
4938 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4939 * features/i386/amd64-avx.c: Re-generated.
4940 * features/i386/amd64-avx-linux.c: Re-generated.
4941 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4942 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4943 * features/i386/amd64-avx-mpx.c: Re-generated.
4944 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4945 * features/i386/amd64.c: Re-generated.
4946 * features/i386/amd64-linux.c: Re-generated.
4947 * features/i386/amd64-mpx.c: Re-generated.
4948 * features/i386/amd64-mpx-linux.c: Re-generated.
4949 * features/i386/i386-avx-avx512.c: Re-generated.
4950 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4951 * features/i386/i386-avx.c: Re-generated.
4952 * features/i386/i386-avx-linux.c: Re-generated.
4953 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4954 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4955 * features/i386/i386-avx-mpx.c: Re-generated.
4956 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4957 * features/i386/i386.c: Re-generated.
4958 * features/i386/i386-linux.c: Re-generated.
4959 * features/i386/i386-mmx.c: Re-generated.
4960 * features/i386/i386-mmx-linux.c: Re-generated.
4961 * features/i386/i386-mpx.c: Re-generated.
4962 * features/i386/i386-mpx-linux.c: Re-generated.
4963 * features/i386/x32-avx-avx512.c: Re-generated.
4964 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4965 * features/i386/x32-avx.c: Re-generated.
4966 * features/i386/x32-avx-linux.c: Re-generated.
4967 * features/i386/x32.c: Re-generated.
4968 * features/i386/x32-linux.c: Re-generated.
4969 * features/microblaze.c: Re-generated.
4970 * features/microblaze-with-stack-protect.c: Re-generated.
4971 * features/mips64-dsp-linux.c: Re-generated.
4972 * features/mips64-linux.c: Re-generated.
4973 * features/mips-dsp-linux.c: Re-generated.
4974 * features/mips-linux.c: Re-generated.
4975 * features/nds32.c: Re-generated.
4976 * features/nios2.c: Re-generated.
4977 * features/nios2-linux.c: Re-generated.
4978 * features/rs6000/powerpc-32.c: Re-generated.
4979 * features/rs6000/powerpc-32l.c: Re-generated.
4980 * features/rs6000/powerpc-403.c: Re-generated.
4981 * features/rs6000/powerpc-403gc.c : Re-generated.
4982 * features/rs6000/powerpc-405.c: Re-generated.
4983 * features/rs6000/powerpc-505.c: Re-generated.
4984 * features/rs6000/powerpc-601.c: Re-generated.
4985 * features/rs6000/powerpc-602.c: Re-generated.
4986 * features/rs6000/powerpc-603.c: Re-generated.
4987 * features/rs6000/powerpc-604.c: Re-generated.
4988 * features/rs6000/powerpc-64.c: Re-generated.
4989 * features/rs6000/powerpc-64l.c: Re-generated.
4990 * features/rs6000/powerpc-7400.c: Re-generated.
4991 * features/rs6000/powerpc-750.c: Re-generated.
4992 * features/rs6000/powerpc-860.c: Re-generated.
4993 * features/rs6000/powerpc-altivec32.c: Re-generated.
4994 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4995 * features/rs6000/powerpc-altivec64.c: Re-generated.
4996 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4997 * features/rs6000/powerpc-cell32l.c: Re-generated.
4998 * features/rs6000/powerpc-cell64l.c: Re-generated.
4999 * features/rs6000/powerpc-e500.c: Re-generated.
5000 * features/rs6000/powerpc-e500l.c: Re-generated.
5001 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5002 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5003 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5004 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5005 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5006 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5007 * features/rs6000/powerpc-vsx32.c: Re-generated.
5008 * features/rs6000/powerpc-vsx32l.c: Re-generated.
5009 * features/rs6000/powerpc-vsx64.c: Re-generated.
5010 * features/rs6000/powerpc-vsx64l.c: Re-generated.
5011 * features/rs6000/rs6000.c: Re-generated.
5012 * features/s390-linux32.c: Re-generated.
5013 * features/s390-linux32v1.c: Re-generated.
5014 * features/s390-linux32v2.c: Re-generated.
5015 * features/s390-linux64.c: Re-generated.
5016 * features/s390-linux64v1.c: Re-generated.
5017 * features/s390-linux64v2.c: Re-generated.
5018 * features/s390-te-linux64.c: Re-generated.
5019 * features/s390-tevx-linux64.c: Re-generated.
5020 * features/s390-vx-linux64.c: Re-generated.
5021 * features/s390x-linux64.c: Re-generated.
5022 * features/s390x-linux64v1.c: Re-generated.
5023 * features/s390x-linux64v2.c: Re-generated.
5024 * features/s390x-te-linux64.c: Re-generated.
5025 * features/s390x-tevx-linux64.c: Re-generated.
5026 * features/s390x-vx-linux64.c: Re-generated.
5027 * features/sparc/sparc32-solaris.c: Re-generated.
5028 * features/sparc/sparc64-solaris.c: Re-generated.
5029 * features/tic6x-c62x.c: Re-generated.
5030 * features/tic6x-c62x-linux.c: Re-generated.
5031 * features/tic6x-c64x.c: Re-generated.
5032 * features/tic6x-c64x-linux.c: Re-generated.
5033 * features/tic6x-c64xp.c: Re-generated.
5034 * features/tic6x-c64xp-linux.c: Re-generated.
5035
35b4818d
YQ
50362017-07-26 Yao Qi <yao.qi@linaro.org>
5037
5038 * i386-linux-tdep.c (i386_linux_read_description): New function.
5039 (i386_linux_core_read_description): Call
5040 i386_linux_read_description.
5041 * i386-linux-tdep.h (i386_linux_read_description): Declare.
5042 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5043 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5044 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5045 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5046 * x86-linux-nat.c (x86_linux_read_description): Call
5047 i386_linux_read_description.
5048
8e2141c6
YQ
50492017-07-26 Yao Qi <yao.qi@linaro.org>
5050
5051 * NEWS: Mention it.
5052 * features/Makefile (%.c: %.xml): Pass the xml file name to
5053 command "maint print c-tdesc".
5054 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5055 name from 'arg'.
5056
b468ff4c
YQ
50572017-07-26 Yao Qi <yao.qi@linaro.org>
5058
5059 * target-descriptions.c (target_desc): Add ctor and dtor. Do
5060 in-class initialization.
5061 (tdesc_create_feature): Call new instead of XCNEW.
5062 (free_target_description): Ue delete.
5063
b9c0e1b4
JB
50642017-07-25 John Baldwin <jhb@FreeBSD.org>
5065
5066 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5067
a04b5337
YQ
50682017-07-25 Yao Qi <yao.qi@linaro.org>
5069
5070 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5071 constant.
5072 (amd64_x32_init_abi): Likewise.
5073 * amd64-tdep.h (amd64_init_abi): Update declaration.
5074 (amd64_x32_init_abi): Likewise.
5075
02ad7fc2
YQ
50762017-07-25 Yao Qi <yao.qi@linaro.org>
5077
5078 PR tdep/21717
5079 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5080 condition for FPSCR.
5081 (arm_linux_store_inferior_registers): Likewise.
5082
b6f48cb0
TT
50832017-07-22 Tom Tromey <tom@tromey.com>
5084
5085 * break-catch-syscall.c (struct catch_syscall_inferior_data)
5086 <syscalls_counts>: Now a std::vector.
5087 (get_catch_syscall_inferior_data): Use "new".
5088 (catch_syscall_inferior_data_cleanup): Use "delete".
5089 (insert_catch_syscall, remove_catch_syscall)
5090 (clear_syscall_counts): Update.
5091
e12c9b7a
TT
50922017-07-22 Tom Tromey <tom@tromey.com>
5093
5094 * break-catch-syscall.c (syscall_catchpoint)
5095 <syscalls_to_be_caught>: Now a std::vector<int>
5096 (~syscall_catchpoint): Remove.
5097 (insert_catch_syscall, remove_catch_syscall)
5098 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5099 (print_mention_catch_syscall, print_recreate_catch_syscall):
5100 Update.
5101 (create_syscall_event_catchpoint): Change type of "filter"
5102 parameter.
5103 (catch_syscall_split_args): Return a std::vector.
5104 (catch_syscall_command_1, catching_syscall_number_1): Update.
5105
4fa8aeac
TT
51062017-07-22 Tom Tromey <tom@tromey.com>
5107
5108 * break-catch-throw.c (struct exception_catchpoint)
5109 <exception_rx>: Now a std::string.
5110 (~exception_catchpoint): Remove.
5111 (print_one_detail_exception_catchpoint): Update.
5112 (handle_gnu_v3_exceptions): Change type of except_rx.
5113 (extract_exception_regexp): Return a std::string.
5114 (catch_exception_command_1): Update.
5115
f746a154
TT
51162017-07-22 Tom Tromey <tom@tromey.com>
5117
5118 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5119 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5120 std::vector.
5121 <catch_all>: Now a bool.
5122 (~signal_catchpoint): Remove.
5123 (signal_catchpoint_insert_location)
5124 (signal_catchpoint_remove_location)
5125 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5126 (signal_catchpoint_print_mention)
5127 (signal_catchpoint_print_recreate)
5128 (signal_catchpoint_explains_signal): Update.
5129 (create_signal_catchpoint): Change type of "filter" and
5130 "catch_all".
5131 (catch_signal_split_args): Return a std::vector. Change type of
5132 "catch_all".
5133 (catch_signal_command): Update.
5134
47e77640
PA
51352017-07-20 Pedro Alves <palves@redhat.com>
5136
5137 * ada-lang.c (ada_language_defn): Make extern.
5138 (_initialize_ada_language): Remove add_language call.
5139 * c-lang.c (c_language_defn, cplus_language_defn)
5140 (asm_language_defn, minimal_language_defn): Make extern.
5141 (_initialize_c_language): Delete.
5142 * completer.c (compare_cstrings): Delete, moved to utils.h.
5143 * d-lang.c (d_language_defn): Make extern.
5144 (_initialize_d_language): Remove add_language calls.
5145 * defs.h (enum language): Add comment.
5146 * f-lang.c (f_language_defn): Make extern.
5147 (_initialize_f_language): Remove add_language call.
5148 * go-lang.c (go_language_defn): Make extern.
5149 (_initialize_go_language): Remove add_language call.
5150 * language.c: Include <algorithm>.
5151 (languages): Redefine as const array.
5152 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5153 (set_language_command): Handle "local". Use for-range loop.
5154 (set_language): Remove loop.
5155 (language_enum): Rewrite.
5156 (language_def, language_str): Remove loops.
5157 (add_language): Delete.
5158 (add_set_language_command): New, based on add_languages.
5159 (skip_language_trampoline): Adjust.
5160 (local_language_defn): Delete.
5161 (language_gdbarch_post_init): Adjust.
5162 (_initialize_language): Remove add_language calls. Call
5163 add_set_language_command.
5164 * language.h (add_language): Delete.
5165 (auto_language_defn)
5166 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5167 (asm_language_defn, c_language_defn, cplus_language_defn)
5168 (d_language_defn, f_language_defn, go_language_defn)
5169 (m2_language_defn, objc_language_defn, opencl_language_defn)
5170 (pascal_language_defn, rust_language_defn): Declare.
5171 * m2-lang.c (m2_language_defn): Make extern.
5172 (_initialize_m2_language): Remove add_language call.
5173 * objc-lang.c (objc_language_defn): Make extern.
5174 (_initialize_objc_language): Remove add_language call.
5175 * opencl-lang.c (opencl_language_defn): Make extern.
5176 (_initialize_opencl_language): Remove add_language call.
5177 * p-lang.c (pascal_language_defn): Make extern.
5178 (_initialize_pascal_language): Delete.
5179 * rust-lang.c (rust_language_defn): Make extern.
5180 (_initialize_rust_language): Delete.
5181 * utils.h (compare_cstrings): New static inline function.
5182
edb0c9cb
PA
51832017-07-20 Pedro Alves <palves@redhat.com>
5184
5185 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5186 (get_var_value): Constify parameters.
5187 (get_int_var_value): Change prototype.
5188 (to_fixed_range_type): Adjust.
5189 * ada-lang.h (get_int_var_value): Change prototype.
5190
a778f165
PA
51912017-07-20 Pedro Alves <palves@redhat.com>
5192
5193 * dwarf2read.c (dw2_lookup_symbol): Use
5194 SYMBOL_MATCHES_SEARCH_NAME.
5195 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5196
42edd901
PA
51972017-07-20 Pedro Alves <palves@redhat.com>
5198
5199 * block.c (block_iter_name_step, block_iter_name_first)
5200 (block_iter_name_next): Delete.
5201 (block_lookup_symbol_primary): Adjust to use
5202 dict_iter_match_first/dict_iter_match_next.
5203 * block.h (block_iter_name_first, block_iter_name_next): Delete
5204 declarations.
5205 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5206 dict_iter_match_first/dict_iter_match_next.
5207
cf325299
PA
52082017-07-20 Pedro Alves <palves@redhat.com>
5209
5210 * cp-support.c (cp_find_first_component_aux): Add missing case for
5211 end of string.
5212
c5ed0576
DB
52132017-07-18 David Blaikie <dblaikie@gmail.com>
5214
5215 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5216 of dwo_cu's dwo_file.
5217
27841e76
YQ
52182017-07-18 Yao Qi <yao.qi@linaro.org>
5219
5220 * remote.c (store_registers_using_G): Remove one line comment.
5221
cfb7e58b
YQ
52222017-07-18 Yao Qi <yao.qi@linaro.org>
5223
5224 * regcache.c (regcache_cpy): Simplify it.
5225 (regcache::cpy_no_passthrough): Remove it.
5226 * regcache.h (cpy_no_passthrough): Remove it.
5227 (regcache_dup, regcache_cpy): Update comments.
5228
386535dd
PA
52292017-07-18 Pedro Alves <palves@redhat.com>
5230
5231 * remote-sim.c (sim_command_completer): Adjust to work with a
5232 completion_tracker instead of a VEC.
5233
c45ec17c
PA
52342017-07-17 Pedro Alves <palves@redhat.com>
5235
5236 * completer.c (complete_source_filenames): New function.
5237 (complete_address_and_linespec_locations): New function.
5238 (location_completer): Use complete_address_and_linespec_locations.
5239 (completion_tracker::build_completion_result): Honor the tracker's
5240 request to suppress append.
5241 * completer.h (completion_tracker::suppress_append_ws)
5242 (completion_tracker::set_suppress_append_ws): New methods.
5243 (completion_tracker::m_suppress_append_ws): New field.
5244 (complete_source_filenames): New declaration.
5245 * linespec.c (linespec_complete_what): New.
5246 (struct ls_parser) <complete_what, completion_word,
5247 completion_quote_char, completion_quote_end, completion_tracker>:
5248 New fields.
5249 (string_find_incomplete_keyword_at_end): New.
5250 (linespec_lexer_lex_string): Record quote char. If in completion
5251 mode, don't throw.
5252 (linespec_lexer_consume_token): Advance the completion word point.
5253 (linespec_lexer_peek_token): Save/restore completion info.
5254 (save_stream_and_consume_token): New.
5255 (set_completion_after_number): New.
5256 (linespec_parse_basic): Set what to complete next depending on
5257 token. Handle function and label completions specially.
5258 (parse_linespec): Disable objc shortcut in completion mode. Set
5259 what to complete next depending on token type. Skip keyword if in
5260 completion mode.
5261 (complete_linespec_component, linespec_complete): New.
5262 * linespec.h (linespec_complete): Declare.
5263
be966d42
PA
52642017-07-17 Pedro Alves <palves@redhat.com>
5265
5266 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5267 Handle 'operator<' / 'operator<<'.
5268
a2459270
PA
52692017-07-17 Pedro Alves <palves@redhat.com>
5270
5271 * completer.c (collect_explicit_location_matches): Handle
5272 MATCH_LABEL.
5273 (convert_explicit_location_to_linespec): New, factored out from
5274 ...
5275 (convert_explicit_location_to_sals): ... this.
5276 (complete_label): New.
5277 (linespec_complete_label, find_label_symbols_in_block): New.
5278 (find_label_symbols): Add completion_mode parameter and adjust to
5279 call find_label_symbols_in_block.
5280 * linespec.h (linespec_complete_label): Declare.
5281
c6756f62
PA
52822017-07-17 Pedro Alves <palves@redhat.com>
5283
5284 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5285 complete_symbol_mode parameter.
5286 * cli/cli-cmds.c (complete_command): Get the completion result out
5287 of the handle_brkchars tracker if used a custom word point.
5288 * completer.c: Include "linespec.h".
5289 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5290 (advance_to_expression_complete_word_point): New.
5291 (completion_tracker::completes_to_completion_word): New.
5292 (complete_files_symbols): Pass down
5293 complete_symbol_mode::EXPRESSION.
5294 (explicit_options, probe_options): New.
5295 (collect_explicit_location_matches): Complete on the
5296 explictit_loc->foo instead of word. Use
5297 linespec_complete_function. Handle MATCH_LINE. Handle offering
5298 keyword and options completions.
5299 (backup_text_ptr): Delete.
5300 (skip_keyword): New.
5301 (complete_explicit_location): Remove 'word' parameter. Add
5302 language, quoted_arg_start and quoted_arg_end parameters.
5303 Rewrite, parsing left to right.
5304 (location_completer): Rewrite.
5305 (location_completer_handle_brkchars): New function.
5306 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5307 (enum complete_line_internal_reason): Adjust comments.
5308 (completion_tracker::discard_completions): New.
5309 (completer_handle_brkchars_func_for_completer): Handle
5310 location_completer.
5311 (gdb_custom_word_point_brkchars)
5312 (gdb_org_rl_basic_quote_characters): New.
5313 (gdb_completion_word_break_characters_throw)
5314 (completion_find_completion_word): Handle trackers that use a
5315 custom word point.
5316 (completion_tracker::advance_custom_word_point_by): New.
5317 (completion_tracker::build_completion_result): Don't rely on
5318 readline appending the quote char.
5319 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5320 use a custom word point.
5321 (gdb_rl_attempted_completion_function): Restore
5322 rl_basic_quote_characters.
5323 * completer.h (class completion_tracker): Extend intro comment.
5324 (completion_tracker::set_quote_char)
5325 (completion_tracker::quote_char)
5326 (completion_tracker::set_use_custom_word_point)
5327 (completion_tracker::use_custom_word_point)
5328 (completion_tracker::custom_word_point)
5329 (completion_tracker::set_custom_word_point)
5330 (completion_tracker::advance_custom_word_point_by)
5331 (completion_tracker::completes_to_completion_word)
5332 (completion_tracker::discard_completions): New methods.
5333 (completion_tracker::m_quote_char)
5334 (completion_tracker::m_use_custom_word_point)
5335 (completion_tracker::m_custom_word_point): New fields.
5336 (advance_to_expression_complete_word_point): Declare.
5337 * f-lang.c (f_collect_symbol_completion_matches): Add
5338 complete_symbol_mode parameter.
5339 * language.h (struct language_defn)
5340 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5341 parameter.
5342 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5343 (linespec_complete_function): New function.
5344 (linespec_lexer_lex_keyword): Adjust.
5345 * linespec.h (linespec_keywords, linespec_complete_function): New
5346 declarations.
5347 * location.c (find_end_quote): New function.
5348 (explicit_location_lex_one): Add explicit_completion_info
5349 parameter. Save quoting info. Don't throw if being called for
5350 completion. Don't handle Ada operators here.
5351 (is_cp_operator, skip_op_false_positives, first_of)
5352 (explicit_location_lex_one_function): New function.
5353 (string_to_explicit_location): Replace 'dont_throw' parameter with
5354 an explicit_completion_info pointer parameter. Handle it. Don't
5355 use explicit_location_lex_one to lex function names. Use
5356 explicit_location_lex_one_function instead.
5357 * location.h (struct explicit_completion_info): New.
5358 (string_to_explicit_location): Replace 'dont_throw' parameter with
5359 an explicit_completion_info pointer parameter.
5360 * symtab.c (default_collect_symbol_completion_matches_break_on):
5361 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5362 (default_collect_symbol_completion_matches)
5363 (collect_symbol_completion_matches): Add complete_symbol_mode
5364 parameter.
5365 (collect_symbol_completion_matches_type): Pass down
5366 complete_symbol_mode::EXPRESSION.
5367 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5368 parameter. Handle LINESPEC mode.
5369 * symtab.h (complete_symbol_mode): New.
5370 (default_collect_symbol_completion_matches_break_on)
5371 (default_collect_symbol_completion_matches)
5372 (collect_symbol_completion_matches)
5373 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5374 parameter.
5375
1d550c82
PA
53762017-07-17 Pedro Alves <palves@redhat.com>
5377
5378 * utils.c (enum class strncmp_iw_mode): New.
5379 (strcmp_iw): Rename to ...
5380 (strncmp_iw_with_mode): ... this. Add string2_len and mode
5381 parameters. Handle them.
5382 (strncmp_iw): New.
5383 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5384 * utils.h (strncmp_iw): Declare.
5385 (strcmp_iw): Move describing comments here.
5386
8090b426
PA
53872017-07-17 Pedro Alves <palves@redhat.com>
5388
5389 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5390 CP_OPERATOR_STR.
5391 * c-typeprint.c (is_type_conversion_operator): Use
5392 CP_OPERATOR_STR.
5393 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5394 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5395 CP_OPERATOR_LEN.
5396 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5397 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5398 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5399 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5400 CP_OPERATOR_STR.
5401 * location.c: Include "cp-support.h".
5402 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5403 CP_OPERATOR_STR.
5404 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5405 CP_OPERATOR_LEN.
5406
6a2c1b87
PA
54072017-07-17 Pedro Alves <palves@redhat.com>
5408
5409 * cli/cli-cmds.c (complete_command): Use a completion tracker
5410 along with completion_find_completion_word for handle_brkchars
5411 phase.
5412 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5413 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5414 (struct gdb_rl_completion_word_info): New.
5415 (gdb_rl_find_completion_word): New.
5416 (completion_find_completion_word): New.
5417 * completer.h (completion_find_completion_word): Declare.
5418
eb3ff9a5
PA
54192017-07-17 Pedro Alves <palves@redhat.com>
5420
5421 * ada-lang.c (symbol_completion_match): Adjust comments.
5422 (symbol_completion_add): Replace vector parameter with
5423 completion_tracker parameter. Use it.
5424 (ada_make_symbol_completion_list): Rename to...
5425 (ada_collect_symbol_completion_matches): ... this. Add
5426 completion_tracker parameter and use it.
5427 (ada_language_defn): Adjust.
5428 * break-catch-syscall.c (catch_syscall_completer): Adjust
5429 prototype and work with completion_tracker instead of VEC.
5430 * breakpoint.c (condition_completer): Adjust prototype and work
5431 with completion_tracker instead of VEC.
5432 * c-lang.c (c_language_defn, cplus_language_defn)
5433 (asm_language_defn, minimal_language_defn): Adjust to renames.
5434 * cli/cli-cmds.c (complete_command): Rework using
5435 completion_tracker. Catch exceptions when completing.
5436 * cli/cli-decode.c (integer_unlimited_completer)
5437 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5438 with completion_tracker instead of VEC.
5439 * command.h (struct completion_tracker): Forward declare.
5440 (completer_ftype, completer_handle_brkchars_ftype): Change
5441 types.
5442 (complete_on_cmdlist, complete_on_enum): Adjust.
5443 * completer.c: Include <algorithm>.
5444 (struct gdb_completer_state): New.
5445 (current_completion): New global.
5446 (readline_line_completion_function): Delete.
5447 (noop_completer, filename_completer)
5448 (filename_completer_handle_brkchars, complete_files_symbols)
5449 (linespec_location_completer): Adjust to work with a
5450 completion_tracker instead of a VEC.
5451 (string_or_empty): New.
5452 (collect_explicit_location_matches): Adjust to work with a
5453 completion_tracker instead of a VEC.
5454 (explicit_location_completer): Rename to ...
5455 (complete_explicit_location): ... this and adjust to work with a
5456 completion_tracker instead of a VEC.
5457 (location_completer): Adjust to work with a completion_tracker
5458 instead of a VEC.
5459 (add_struct_fields): Adjust to work with a completion_list instead
5460 of VEC.
5461 (expression_completer): Rename to ...
5462 (complete_expression): ... this and adjust to work with a
5463 completion_tracker instead of a VEC. Use complete_files_symbols.
5464 (expression_completer): Reimplement on top of complete_expression.
5465 (symbol_completer): Adjust to work with a completion_tracker
5466 instead of a VEC.
5467 (enum complete_line_internal_reason): Add describing comments.
5468 (complete_line_internal_normal_command): Adjust to work with a
5469 completion_tracker instead of a VEC.
5470 (complete_line_internal): Rename to ...
5471 (complete_line_internal_1): ... this and adjust to work with a
5472 completion_tracker instead of a VEC. Assert TEXT is NULL in the
5473 handle_brkchars phase.
5474 (new_completion_tracker): Delete.
5475 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5476 complete_line_internal_1.
5477 (free_completion_tracker): Delete.
5478 (INITIAL_COMPLETION_HTAB_SIZE): New.
5479 (completion_tracker::completion_tracker)
5480 (completion_tracker::~completion_tracker): New.
5481 (maybe_add_completion): Delete.
5482 (completion_tracker::maybe_add_completion)
5483 (completion_tracker::add_completion)
5484 (completion_tracker::add_completions): New.
5485 (throw_max_completions_reached_error): Delete.
5486 (complete_line): Adjust to work with a completion_tracker instead
5487 of a VEC. Don't create a completion_tracker_t or check for max
5488 completions here.
5489 (command_completer, command_completer_handle_brkchars)
5490 (signal_completer, reg_or_group_completer_1)
5491 (reg_or_group_completer, default_completer_handle_brkchars):
5492 Adjust to work with a completion_tracker.
5493 (gdb_completion_word_break_characters_throw): New.
5494 (gdb_completion_word_break_characters): Reimplement.
5495 (line_completion_function): Delete.
5496 (completion_tracker::recompute_lowest_common_denominator)
5497 (expand_preserving_ws)
5498 (completion_tracker::build_completion_result)
5499 (completion_result::completion_result)
5500 (completion_result::completion_result)
5501 (completion_result::~completion_result)
5502 (completion_result::completion_result)
5503 (completion_result::release_match_list, compare_cstrings)
5504 (completion_result::sort_match_list)
5505 (completion_result::reset_match_list)
5506 (gdb_rl_attempted_completion_function_throw)
5507 (gdb_rl_attempted_completion_function): New.
5508 * completer.h (completion_list, struct completion_result)
5509 (class completion_tracker): New.
5510 (complete_line): Add completion_tracker parameter.
5511 (readline_line_completion_function): Delete.
5512 (gdb_rl_attempted_completion_function): New.
5513 (noop_completer, filename_completer, expression_completer)
5514 (location_completer, symbol_completer, command_completer)
5515 (signal_completer, reg_or_group_completer): Update prototypes.
5516 (completion_tracker_t, new_completion_tracker)
5517 (make_cleanup_free_completion_tracker): Delete.
5518 (enum maybe_add_completion_enum): Delete.
5519 (maybe_add_completion): Delete.
5520 (throw_max_completions_reached_error): Delete.
5521 * corefile.c (complete_set_gnutarget): Adjust to work with a
5522 completion_tracker instead of a VEC.
5523 * cp-abi.c (cp_abi_completer): Adjust to work with a
5524 completion_tracker instead of a VEC.
5525 * d-lang.c (d_language_defn): Adjust.
5526 * disasm.c (disassembler_options_completer): Adjust to work with a
5527 completion_tracker instead of a VEC.
5528 * f-lang.c (f_make_symbol_completion_list): Rename to ...
5529 (f_collect_symbol_completion_matches): ... this. Adjust to work
5530 with a completion_tracker instead of a VEC.
5531 (f_language_defn): Adjust.
5532 * go-lang.c (go_language_defn): Adjust.
5533 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5534 Adjust to work with a completion_tracker instead of a VEC.
5535 * infrun.c (handle_completer): Likewise.
5536 * interps.c (interpreter_completer): Likewise.
5537 * interps.h (interpreter_completer): Likewise.
5538 * language.c (unknown_language_defn, auto_language_defn)
5539 (local_language_defn): Adjust.
5540 * language.h (language_defn::la_make_symbol_completion_list):
5541 Rename to ...
5542 (language_defn::la_collect_symbol_completion_matches): ... this
5543 and adjust to work with a completion_tracker instead of a VEC.
5544 * m2-lang.c (m2_language_defn): Adjust.
5545 * objc-lang.c (objc_language_defn): Adjust.
5546 * opencl-lang.c (opencl_language_defn): Adjust.
5547 * p-lang.c (pascal_language_defn): Adjust.
5548 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5549 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5550 with a completion_tracker.
5551 * rust-lang.c (rust_language_defn): Adjust.
5552 * symtab.c (free_completion_list, do_free_completion_list)
5553 (return_val, completion_tracker): Delete.
5554 (completion_list_add_name, completion_list_add_symbol)
5555 (completion_list_add_msymbol, completion_list_objc_symbol)
5556 (completion_list_add_fields, add_symtab_completions): Add
5557 completion_tracker parameter and use it.
5558 (default_make_symbol_completion_list_break_on_1): Rename to...
5559 (default_collect_symbol_completion_matches_break_on): ... this.
5560 Add completion_tracker parameter and use it instead of allocating
5561 a completion tracker here.
5562 (default_make_symbol_completion_list_break_on): Delete old
5563 implementation.
5564 (default_make_symbol_completion_list): Delete.
5565 (default_collect_symbol_completion_matches): New.
5566 (make_symbol_completion_list): Delete.
5567 (collect_symbol_completion_matches): New.
5568 (make_symbol_completion_type): Rename to ...
5569 (collect_symbol_completion_matches_type): ... this. Add
5570 completion_tracker parameter and use it instead of VEC.
5571 (make_file_symbol_completion_list_1): Rename to...
5572 (collect_file_symbol_completion_matches): ... this. Add
5573 completion_tracker parameter and use it instead of VEC.
5574 (make_file_symbol_completion_list): Delete.
5575 (add_filename_to_list): Use completion_list instead of a VEC.
5576 (add_partial_filename_data::list): Now a completion_list.
5577 (make_source_files_completion_list): Work with a completion_list
5578 instead of a VEC.
5579 * symtab.h: Include "completer.h".
5580 (default_make_symbol_completion_list_break_on)
5581 (default_make_symbol_completion_list, make_symbol_completion_list)
5582 (make_symbol_completion_type, make_file_symbol_completion_list)
5583 (make_source_files_completion_list): Delete.
5584 (default_collect_symbol_completion_matches_break_on)
5585 (default_collect_symbol_completion_matches)
5586 (collect_symbol_completion_matches)
5587 (collect_symbol_completion_matches_type)
5588 (collect_file_symbol_completion_matches)
5589 (make_source_files_completion_list): New.
5590 * top.c (init_main): Don't install a rl_completion_entry_function
5591 hook. Install a rl_attempted_completion_function hook instead.
5592 * tui/tui-layout.c (layout_completer): Adjust to work with a
5593 completion_tracker.
5594 * tui/tui-regs.c (tui_reggroup_completer):
5595 * tui/tui-win.c (window_name_completer, focus_completer)
5596 (winheight_completer): Adjust to work with a completion_tracker.
5597 * value.c: Include "completer.h".
5598 (complete_internalvar): Adjust to work with a completion_tracker.
5599 * value.h (complete_internalvar): Likewise.
5600
6e1dbf8c
PA
56012017-07-17 Pedro Alves <palves@redhat.com>
5602
5603 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5604 renames.
5605 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5606 comments to completer_ftype's declaration.
5607 <completer_handle_brkchars>: Change type to
5608 completer_handle_brkchars_ftype.
5609 * command.h (completer_ftype): Add describing comment and give
5610 names to parameters.
5611 (completer_ftype_void): Rename to ...
5612 (completer_handle_brkchars_ftype) ... this. Add describing comment.
5613 (set_cmd_completer_handle_brkchars): Adjust.
5614 * completer.c (filename_completer_handle_brkchars): New function.
5615 (complete_line_internal_normal_command): New function, factored
5616 out from ...
5617 (complete_line_internal): ... here.
5618 (command_completer_handle_brkchars)
5619 (default_completer_handle_brkchars)
5620 (completer_handle_brkchars_func_for_completer): New functions.
5621 * completer.h (set_gdb_completion_word_break_characters): Delete
5622 declaration.
5623 (completer_handle_brkchars_func_for_completer): New declaration.
5624 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5625 completer_handle_brkchars_func_for_completer.
5626
78b13106
PA
56272017-07-17 Pedro Alves <palves@redhat.com>
5628
5629 * completer.c (symbol_completer): New function, based on
5630 make_symbol_completion_list_fn.
5631 * completer.h (symbol_completer): New declaration.
5632 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5633 * python/py-cmd.c (completers): Adjust.
5634 * symtab.c (make_symbol_completion_list_fn): Delete.
5635 * symtab.h (make_symbol_completion_list_fn): Delete.
5636 * cli/cli-decode.c (add_cmd): Adjust.
5637
bbf2f4df
PA
56382017-07-17 Pedro Alves <palves@redhat.com>
5639
5640 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5641 * dwarf2read.c: Include "filename-seen-cache.h".
5642 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5643 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5644 * filename-seen-cache.c: New file.
5645 * filename-seen-cache.h: New file.
5646 * symtab.c: Include "filename-seen-cache.h".
5647 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5648 (create_filename_seen_cache, clear_filename_seen_cache)
5649 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5650 to filename-seen-cache.h/filename-seen-cache.c.
5651 (output_source_filename, sources_info)
5652 (maybe_add_partial_symtab_filename)
5653 (make_source_files_completion_list): Adjust to use
5654 filename_seen_cache.
5655
330cdd98
PA
56562017-07-17 Pedro Alves <palves@redhat.com>
5657
5658 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5659 fields.
5660 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5661 dwarf2_debug_sections*)): New.
5662 (dwarf2_per_objfile::dwarf2_per_objfile(const
5663 dwarf2_per_objfile&)): Declare as deleted.
5664 (dwarf2_per_objfile::operator=): Declare as deleted.
5665 (dwarf2_per_objfile::dwarf2_per_objfile)
5666 (dwarf2_per_objfile::~dwarf2_per_objfile)
5667 (dwarf2_per_objfile::free_cached_comp_units): New.
5668 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5669 ctor. Call dwarf2_per_objfile's ctor manually.
5670 (dwarf2_locate_sections): Deleted/refactored as ...
5671 (dwarf2_per_objfile::locate_sections): ... this new method.
5672 (free_cached_comp_units): Defer to
5673 dwarf2_per_objfile::free_cached_comp_units.
5674 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5675
8880f2a9
TT
56762017-07-14 Tom Tromey <tom@tromey.com>
5677
5678 PR rust/21764:
5679 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5680 parameter.
5681 <UNOP_SIZEOF>: Split into separate case.
5682 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5683
65547233
TT
56842017-07-14 Tom Tromey <tom@tromey.com>
5685
5686 PR rust/21763:
5687 * symtab.c (symbol_matches_domain): Add language_rust to special
5688 case.
5689 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5690 treat LOC_TYPEDEF symbols as variables.
5691
8f14146e
PA
56922017-07-14 Pedro Alves <palves@redhat.com>
5693
5694 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5695 symtabs matching all symtabs with SRCFILE as file name instead of
5696 only considering the first hit, with lookup_symtab.
5697
2347965c
SM
56982017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5699
5700 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5701 operator_name parameters.
5702 (gen_expr): Update function call.
5703
40f4af28
SM
57042017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5707 parameter.
5708 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5709 Likewise.
5710 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5711 parameter, use agent_expr::gdbarch instead, update function
5712 calls.
5713 (locexpr_tracepoint_var_ref): Likewise.
5714 (loclist_tracepoint_var_ref): Likewise.
5715 * ax-gdb.c (gen_trace_static_fields): Likewise.
5716 (gen_traced_pop): Likewise.
5717 (gen_frame_args_address): Likewise.
5718 (gen_frame_locals_address): Likewise.
5719 (gen_var_ref): Likewise.
5720 (gen_struct_ref_recursive): Likewise.
5721 (gen_static_field): Likewise.
5722 (gen_maybe_namespace_elt): Likewise.
5723 (gen_expr): Likewise.
5724 (gen_trace_for_var): Likewise.
5725 (gen_trace_for_expr): Likewise.
5726 (gen_trace_for_return_address): Likewise.
5727
053f8057
SM
57282017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5729
5730 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5731 parameter.
5732 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5733
6661ad48
SM
57342017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5735
5736 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5737 from ax, update calls.
5738 (gen_usual_arithmetic): Likewise.
5739 (gen_integral_promotions): Likewise.
5740 (gen_bitfield_ref): Likewise.
5741 (gen_primitive_field): Likewise.
5742 (gen_struct_ref_recursive): Likewise.
5743 (gen_struct_ref): Likewise.
5744 (gen_maybe_namespace_elt): Likewise.
5745 (gen_struct_elt_for_reference): Likewise.
5746 (gen_namespace_elt): Likewise.
5747 (gen_aggregate_elt_ref): Likewise.
5748 (gen_expr): Get gdbarch from ax, update calls.
5749 (gen_expr_binop_rest): Likewise.
5750
c55a47e7
PA
57512017-07-13 Pedro Alves <palves@redhat.com>
5752
5753 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5754 as default tdesc.
5755 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5756 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5757 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5758 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5759 tdep.
5760 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5761 Get final tdesc from the tdep.
5762 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5763 default tdesc.
5764 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5765 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5766 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5767 Use it as default tdesc.
5768 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5769 down to amd_init_abi. No longer handle fallback tdesc here.
5770 * amd64-tdep.h (tdesc_x32): Declare.
5771 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5772 parameter.
5773 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5774 as default tdesc.
5775
55efceab
AA
57762017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5777
5778 * s390-linux-tdep.c (s390_process_record): Add support for
5779 instructions new in arch12.
5780
0aa37b65
JB
57812017-07-11 John Baldwin <jhb@FreeBSD.org>
5782
5783 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5784 PT_GETFSBASE and PT_GETGSBASE.
5785 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5786 PT_SETGSBASE.
5787
48aeef91
JB
57882017-07-11 John Baldwin <jhb@FreeBSD.org>
5789
5790 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5791 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5792 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5793 those rules.
5794 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5795 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5796 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5797 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5798 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5799 * features/i386/amd64.xml: Add 64bit-segments.xml.
5800 * features/i386/amd64-avx-avx512.c: Regenerated.
5801 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5802 * features/i386/amd64-avx-mpx.c: Regenerated.
5803 * features/i386/amd64-avx.c: Regenerated.
5804 * features/i386/amd64-mpx.c: Regenerated.
5805 * features/i386/amd64.c: Regenerated.
5806 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5807 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5808 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5809 * regformats/i386/amd64-avx.dat: Regenerated.
5810 * regformats/i386/amd64-mpx.dat: Regenerated.
5811 * regformats/i386/amd64.dat: Regenerated.
5812
77c501bc
YQ
58132017-07-10 Yao Qi <yao.qi@linaro.org>
5814
5815 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5816 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5817
6dc8d757
AK
58182017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5819
5820 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5821 unsetenv.
5822 * gnulib/aclocal.m4: Regenerate.
5823 * gnulib/config.in: Regenerate.
5824 * gnulib/configure: Regenerate.
5825 * gnulib/import/Makefile.am: Regenerate.
5826 * gnulib/import/Makefile.in: Regenerate.
5827 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5828 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5829 * gnulib/import/m4/environ.m4: New file.
5830 * gnulib/import/m4/setenv.m4: New file.
5831 * gnulib/import/setenv.c: New file.
5832 * gnulib/import/unsetenv.c: New file.
5833
266934d1
SM
58342017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5835
5836 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5837 address when op is DW_OP_addr.
5838
03278692
TT
58392017-07-09 Tom Tromey <tom@tromey.com>
5840
5841 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5842 check and apply to outer type.
5843
4b654465
JB
58442017-07-07 John Baldwin <jhb@FreeBSD.org>
5845
5846 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5847 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5848 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5849 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5850
2af9fc44
JB
58512017-07-07 John Baldwin <jhb@FreeBSD.org>
5852
5853 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5854
382b69bb
JB
58552017-07-07 John Baldwin <jhb@FreeBSD.org>
5856
5857 * corelow.c (get_core_siginfo): Remove.
5858 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5859 instead of get_core_siginfo.
5860 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5861 * gdbarch.h: Re-generate.
5862 * gdbarch.c: Re-generate.
5863 * linux-tdep.c (linux_core_xfer_siginfo): New.
5864 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5865
6e5eab33
JB
58662017-07-07 John Baldwin <jhb@FreeBSD.org>
5867
5868 * corelow.c (thread_section_name): Move to ...
5869 * gdbcore.h (thread_section_name): ... here.
5870
929edea9
JB
58712017-07-07 John Baldwin <jhb@FreeBSD.org>
5872
5873 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5874 (struct siginfo32): New.
5875 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5876 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5877 via ptrace(PT_LWPINFO).
5878
762c974a
JB
58792017-07-07 John Baldwin <jhb@FreeBSD.org>
5880
5881 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5882 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5883 (fbsd_get_siginfo_type): New.
5884 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5885 (_initialize_fbsd_tdep): New.
5886
33c5cd75
DB
58872017-07-06 David Blaikie <dblaikie@gmail.com>
5888
5889 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5890 a singular dwo_unit*) to support multiple CUs in the same way that
5891 multiple TUs are supported.
5892 (create_cus_hash_table): Replace create_dwo_cu with a function for
5893 parsing multiple CUs from a DWO file.
5894 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5895 create_dwo_cu.
5896 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5897 htab_find, rather than comparing the signature to a singleton CU in
5898 the dwo_file.
5899
8455d262
PA
59002017-07-06 Pedro Alves <palves@redhat.com>
5901
5902 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5903
4da3eb35
PA
59042017-07-04 Pedro Alves <palves@redhat.com>
5905
5906 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5907 * gdbtypes.h (TYPE_STATIC): Delete.
5908 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5909 is_synchronized, is_native>: Delete.
5910 <dummy>: Bump.
5911 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5912 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5913 (TYPE_FN_FIELD_ABSTRACT): Delete.
5914
5bfd255c
SM
59152017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5916
5917 * buffer.h (buffer_finish): Fix spelling mistakes.
5918
25c54127
EZ
59192017-07-01 Eli Zaretskii <eliz@gnu.org>
5920
5921 * .dir-locals.el: Automatically switch to C-style comments in
5922 versions of Emacs that support the feature.
5923
dc4bde35
SDJ
59242017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5925 Pedro Alves <palves@redhat.com>
5926
5927 PR cli/21688
5928 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5929 (process_next_line): New variable 'inline_cmd'.
5930 Adjust 'if' clauses for "python", "compile" and "guile" to use
5931 'command_name_equals' and check for '!inline_cmd'.
5932
51ed89aa
SDJ
59332017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5934
5935 PR cli/21688
5936 * cli/cli-script.c (command_name_equals_not_inline): New function.
5937 (process_next_line): Adjust 'if' clauses for "python", "compile"
5938 and "guile" to use command_name_equals_not_inline.
5939
eb17d413
PA
59402017-06-29 Pedro Alves <palves@redhat.com>
5941
5942 * completer.c (expression_completer): Call
5943 linespec_location_completer instead of location_completer.
5944
195bcdd5
PA
59452017-06-29 Pedro Alves <palves@redhat.com>
5946
5947 * completer.c (expression_completer): Remove code that recomputes
5948 'text' from 'word'.
5949
adc764e7
YQ
59502017-06-29 Yao Qi <yao.qi@linaro.org>
5951
5952 * regformats/regdat.sh: Generate code with
5953 "ifndef IN_PROCESS_AGENT".
5954
6e75794e
PA
59552017-06-28 Pedro Alves <palves@redhat.com>
5956
5957 * command.h: Include "common/scoped_restore.h".
5958
bc491f2e
YQ
59592017-06-28 Yao Qi <yao.qi@linaro.org>
5960
5961 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5962 instead of obstack_grow.
5963
41664b45
DG
59642017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5965
5966 PR gdb/21337
5967 * symfile.c (reread_symbols): Call objfiles_changed just before
5968 read_symbols.
5969
6da67eb1
PA
59702017-06-27 Pedro Alves <palves@redhat.com>
5971
5972 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5973 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5974 (completion_list_add_symbol, completion_list_add_msymbol):
5975 ... these new functions.
5976 (add_symtab_completions)
5977 (default_make_symbol_completion_list_break_on_1): Adjust.
5978
23732b1e
PA
59792017-06-27 Pedro Alves <palves@redhat.com>
5980
5981 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5982 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5983 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5984 dtor.
5985 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5986 'storage_obstack' field an auto_obstack. In-class initialize all
5987 non-bitfield fields. Make minsyms_read bool.
5988 * symfile.c (read_symbols): Adjust.
5989
a4d1e79a
AH
59902017-06-27 Alan Hayward <alan.hayward@arm.com>
5991
5992 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5993 (gdbsim_store_register): Likewise.
5994
8268c778
PA
59952017-06-27 Pedro Alves <palves@redhat.com>
5996
5997 * c-exp.y (name_obstack): Now an auto_obstack.
5998 (yylex): Use auto_obstack::clear.
5999 (c_parse): Use auto_obstack::clear instead of reinitializing and
6000 freeing the obstack.
6001 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6002 * d-exp.y (name_obstack): Now an auto_obstack.
6003 (yylex): Use auto_obstack::clear.
6004 (d_parse): Use auto_obstack::clear instead of reinitializing and
6005 freeing the obstack.
6006 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6007 auto_obstack.
6008 * dwarf2read.c (create_addrmap_from_index)
6009 (dwarf2_build_psymtabs_hard)
6010 (update_enumeration_type_from_children): Likewise.
6011 * gdb_obstack.h (auto_obstack): New type.
6012 * go-exp.y (name_obstack): Now an auto_obstack.
6013 (build_packaged_name): Use auto_obstack::clear.
6014 (go_parse): Use auto_obstack::clear instead of reinitializing and
6015 freeing the obstack.
6016 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6017 auto_obstack.
6018 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6019 * rust-exp.y (work_obstack): Now an auto_obstack.
6020 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6021 reinitializing and freeing the obstack.
6022 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6023 (host_char_to_target): Use auto_obstack.
6024 * utils.h (make_cleanup_obstack_free): Delete declaration.
6025 * valprint.c (generic_emit_char, generic_printstr): Use
6026 auto_obstack.
6027
db665f42
SM
60282017-06-27 Simon Marchi <simon.marchi@ericsson.com>
6029
6030 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6031 thread.
6032 (darwin_init_thread_list): Don't update dummy thread.
6033 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6034
873c0814
SM
60352017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6036
6037 * record-full.c (netorder16): Remove.
6038
8b5a7a6e
SM
60392017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6040
6041 * common/diagnostics.h: Define macros for GCC.
6042 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6043 * common/vec.h: Include diagnostics.h.
6044 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6045 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6046 warning.
6047
d1435379
SM
60482017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6049
6050 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6051 New macro.
6052 * ada-lex.l: Ignore deprecated register warnings.
6053
cc75e0fd
SM
60542017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6055
6056 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6057 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6058
07809eaf
SM
60592017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6060
6061 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6062 its own line.
6063
f076f034
SM
60642017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6065
6066 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6067
0dd5cbc5
AH
60682017-06-23 Alan Hayward <alan.hayward@arm.com>
6069
6070 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6071 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6072 (xtensa_register_read_masked): Likewise.
6073
d4c6ce5b
SDJ
60742017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
6075
6076 * common/environ.c (gdb_environ::unset): Update comment.
6077
16892a03
AH
60782017-06-22 Alan Hayward <alan.hayward@arm.com>
6079
6080 * python/py-unwind.c (pyuw_sniffer): Allocate space for
6081 registers.
6082
d7dcbefc
AH
60832017-06-22 Alan Hayward <alan.hayward@arm.com>
6084
6085 * record-full.c (record_full_exec_insn): Use byte_vector.
6086
b30ff123
YQ
60872017-06-22 Yao Qi <yao.qi@linaro.org>
6088
6089 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6090 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6091
4fa847d7
AH
60922017-06-22 Alan Hayward <alan.hayward@arm.com>
6093
6094 * remote.c (cached_reg): Move from here...
6095 * regcache.h (cached_reg): ...to here.
6096 * python/py-unwind.c (struct reg_info): Remove.
6097 (cached_frame_info): Use cached_reg_t.
6098 (pyuw_prev_register): Likewise.
6099 (pyuw_sniffer): Use cached_reg_t and allocate registers.
6100 (pyuw_dealloc_cache): Free all registers.
6101
f4906a9a
PA
61022017-06-22 Pedro Alves <palves@redhat.com>
6103 Simon Marchi <simon.marchi@ericsson.com>
6104
6105 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6106 warning.
6107 * common/diagnostics.h: New file.
6108
b45a1208
PA
61092017-06-22 Pedro Alves <palves@redhat.com>
6110
6111 * common/agent.h: Add include guards.
6112
e4da2c61
SM
61132017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6114
6115 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6116 talk about addressable units instead of bytes.
6117
96160d60
SDJ
61182017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6119
6120 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6121 of '::const_iterator'.
6122
9a6c7d9c
SDJ
61232017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6124
6125 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6126 'unittests/environ-selftests.c'.
6127 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6128 * charset.c (find_charset_names): Declare object 'iconv_env'.
6129 Update code to use 'iconv_env' object. Remove call to
6130 'free_environ'.
6131 * common/environ.c: Include <utility>.
6132 (make_environ): Delete function.
6133 (free_environ): Delete function.
6134 (gdb_environ::clear): New function.
6135 (gdb_environ::operator=): New function.
6136 (gdb_environ::get): Likewise.
6137 (environ_vector): Delete function.
6138 (set_in_environ): Delete function.
6139 (gdb_environ::set): New function.
6140 (unset_in_environ): Delete function.
6141 (gdb_environ::unset): New function.
6142 (gdb_environ::envp): Likewise.
6143 * common/environ.h: Include <vector>.
6144 (struct gdb_environ): Delete; transform into...
6145 (class gdb_environ): ... this class.
6146 (free_environ): Delete prototype.
6147 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6148 environ_vector): Likewise.
6149 * infcmd.c (run_command_1): Update code to call
6150 'envp' from 'gdb_environ' class.
6151 (environment_info): Update code to call methods from 'gdb_environ'
6152 class.
6153 (unset_environment_command): Likewise.
6154 (path_info): Likewise.
6155 (path_command): Likewise.
6156 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6157 (inferior::inferior): Initialize 'environment' using the host's
6158 information.
6159 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6160 Include "environ.h".
6161 (class inferior) <environment>: Change type from 'struct
6162 gdb_environ' to 'gdb_environ'.
6163 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6164 methods from 'gdb_environ' class.
6165 * solib.c (solib_find_1): Likewise
6166 * unittests/environ-selftests.c: New file.
6167
75c554cf
YQ
61682017-06-20 Yao Qi <yao.qi@linaro.org>
6169
6170 * features/i386/i386-linux.xml: Exchange the order of including
6171 32bit-linux.xml and 32bit-sse.xml.
6172 * features/i386/i386-linux.c: Regenerated.
6173
72ddacb7
YQ
61742017-06-20 Yao Qi <yao.qi@linaro.org>
6175
6176 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6177 Delete copy ctor and assignment operator.
6178 (tdesc_type): Likewise.
6179 (tdesc_feature): Likewise.
6180 (tdesc_free_reg): Remove.
6181 (tdesc_create_reg): Use new.
6182 (tdesc_free_type): Remove.
6183 (tdesc_create_vector): Use new.
6184 (tdesc_create_union): Likewise.
6185 (tdesc_create_flags): Likewise.
6186 (tdesc_create_enum): Likewise.
6187 (tdesc_free_feature): Delete.
6188 (free_target_description): Use delete.
6189
325c9fd4
JB
61902017-06-19 John Baldwin <jhb@FreeBSD.org>
6191
6192 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6193 registers.
6194
16b7a719
PA
61952017-06-19 Pedro Alves <palves@redhat.com>
6196
6197 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6198 after gdb::unlinker.
6199
1c8e01c9
SDJ
62002017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6201
6202 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6203 gdb_environ to access an environment variable.
6204
ffce45d2
TP
62052017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6206
6207 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6208 gdb_byte*.
6209
1d4fbac9
SM
62102017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6211
6212 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6213
8465943a
SM
62142017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6215
6216 * configure: Re-generate.
6217 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6218
3e019bdc
SM
62192017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6220
6221 * configure: Re-generate.
6222 * warning.m4: Pass -Werror to compiler when checking for
6223 supported warning flags.
6224
cf0dd6f0
SM
62252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6226
6227 * Makefile.in (COMPILE.pre): Add "-x c++".
6228
6f98355c
YQ
62292017-06-16 Alan Hayward <alan.hayward@arm.com>
6230 Pedro Alves <palves@redhat.com>
6231 Yao Qi <yao.qi@linaro.org>
6232
6233 * defs.h (RequireLongest): New.
6234 (extract_integer): Declare function template.
6235 (extract_signed_integer): Remove the declaration, but define it
6236 static inline.
6237 (extract_unsigned_integer): Likewise.
6238 (store_integer): Declare function template.
6239 (store_signed_integer): Remove the declaration, but define it
6240 static inline.
6241 (store_unsigned_integer): Likewise.
6242 * findvar.c (extract_integer): New function template.
6243 (extract_signed_integer): Remove.
6244 (extract_unsigned_integer): Remove.
6245 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6246 instantiations.
6247 (store_integer): New function template.
6248 (store_signed_integer): Remove.
6249 (store_unsigned_integer): Remove.
6250 (store_integer): Explicit instantiations.
6251 * regcache.c (regcache_raw_read_signed): Update.
6252 (regcache::raw_read): New function.
6253 (regcache::raw_read_signed): Remove.
6254 (regcache::raw_read_unsigned): Remove.
6255 (regcache_raw_read_unsigned): Update.
6256 (regcache_raw_write_unsigned): Update.
6257 (regcache::raw_write_signed): Remove.
6258 (regcache::raw_write): New function.
6259 (regcache_cooked_read_signed): Update.
6260 (regcache::raw_write_unsigned): Remove.
6261 (regcache::cooked_read_signed): Remove.
6262 (regcache_cooked_read_unsigned): Update.
6263 (regcache::cooked_read_unsigned): Remove.
6264 (regcache_cooked_write_signed): Update.
6265 (regcache_cooked_write_unsigned): Update.
6266 * regcache.h (regcache) <raw_read_signed>: Remove.
6267 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6268 <raw_read, raw_write>: New.
6269 <cooked_read_signed, cooked_write_signed>: Remove.
6270 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6271 <cooked_read, cooked_write>: New.
6272 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6273 (sh64_pseudo_register_write): Update.
6274
a87dc45a
AK
62752017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6276
6277 * arc-tdep.c (arc_disassembler_options): New variable.
6278 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6279 of default_print_insn.
6280 (arc_delayed_print_insn): Set info->section when needed,
6281 use default_print_insn to retrieve a disassembler.
6282
45159d6a
SDJ
62832017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6284
6285 PR gdb/21574
6286 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6287 to mention $SHELL and startup-with-shell.
6288
b46c4cf0
MF
62892017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6290
6291 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6292
6394c606
YQ
62932017-06-14 Yao Qi <yao.qi@linaro.org>
6294
6295 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6296 default_print_insn instead of print_insn_aarch64.
6297 * arm-tdep.c (gdb_print_insn_arm): Call
6298 default_print_insn instead of print_insn_big_arm
6299 and print_insn_little_arm.
6300 * i386-tdep.c (i386_print_insn): Call default_print_insn
6301 instead of print_insn_i386.
6302 * ia64-tdep.c (ia64_print_insn): Call
6303 default_print_insn instead of print_insn_ia64.
6304 * mips-tdep.c (gdb_print_insn_mips): Call
6305 default_print_insn instead of print_insn_big_mips
6306 and print_insn_little_mips.
6307 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6308 instead of print_insn_spu.
6309
d5722aa2
PA
63102017-06-14 Pedro Alves <palves@redhat.com>
6311
6312 * ada-lang.c: Include "common/byte-vector.h".
6313 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6314 * charset.c (wchar_iterator::iterate): Resize the vector instead
6315 of reserving it.
6316 * common/byte-vector.h: Include "common/def-vector.h".
6317 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6318 * cli/cli-dump.c: Include "common/byte-vector.h".
6319 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6320 * common/byte-vector.h: New file.
6321 * common/def-vector.h: New file.
6322 * common/default-init-alloc.h: New file.
6323 * dwarf2loc.c: Include "common/byte-vector.h".
6324 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6325 instead of reserving it.
6326 * dwarf2read.c: Include "common/byte-vector.h".
6327 (data_buf::m_vec): Now a gdb::byte_vector.
6328 * gdb_regex.c: Include "common/def-vector.h".
6329 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6330 * mi/mi-main.c: Include "common/byte-vector.h".
6331 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6332 * printcmd.c: Include "common/byte-vector.h".
6333 (print_scalar_formatted): Use gdb::byte_vector.
6334 * valprint.c: Include "common/byte-vector.h".
6335 (maybe_negate_by_bytes, print_decimal_chars): Use
6336 gdb::byte_vector.
6337
01ec7a27
SM
63382017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6339
6340 * darwin-nat.c: Include "nat/fork-inferior.h".
6341
848d9074
SM
63422017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6343
6344 * configure.nat: Factor out Darwin bits that are not
6345 architecture-specific. Add fork-inferior.o.
6346
3b912944
SM
63472017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6348
6349 * configure.nat: Factor out AIX bits that are not
6350 architecture-specific. Add fork-inferior.o.
6351
55acdf22
AA
63522017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6353
6354 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6355 (read_pieced_value, write_pieced_value): ...here. Reduce to
6356 wrappers that just call rw_pieced_value.
6357
f65e2044
AA
63582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6359
6360 * dwarf2loc.c (write_pieced_value): When writing the data for a
6361 memory piece, use write_memory_with_notification instead of
6362 write_memory.
6363
23f945bf
AA
63642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6365
6366 * valops.c (read_value_memory): Change embedded_offset to
6367 represent a bit offset instead of a byte offset.
6368 * value.h (read_value_memory): Adjust comment.
6369
f236533e
AA
63702017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6371
6372 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6373 dest_offset_bits and source_offset_bits.
6374 (write_pieced_value): Likewise.
6375
65d84b76
AA
63762017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6377
6378 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6379 given by DW_OP_bit_piece.
6380 (write_pieced_value): Likewise.
6381
242d31ab
AA
63822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6383
6384 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6385 some other preparations to the places where sufficient information
6386 is available.
6387 (write_pieced_value): Likewise.
6388
03c8af18
AA
63892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6390
6391 * dwarf2loc.c (bits_to_bytes): New function.
6392 (read_pieced_value): Fix offset calculations for register pieces
6393 on big-endian targets.
6394 (write_pieced_value): Likewise.
6395
840989c1
AA
63962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6397
6398 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6399 (write_pieced_value): Likewise.
6400
359b19bb
AA
64012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6402
6403 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6404 transfer the source value's least significant bits, instead of its
6405 lowest-addressed ones. Rename type_len to max_offset.
6406 (read_pieced_value): Mirror above changes to write_pieced_value as
6407 applicable.
6408
07c9ca3b
AA
64092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6410
6411 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6412 truncate full bytes from dest_offset_bits before using it as an
6413 offset into the buffer.
6414
f1cc9874
AA
64152017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6416
6417 * dwarf2loc.c (write_pieced_value): Include transfer size in
6418 byte-wise check.
6419
cdaac320
AA
64202017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6421
6422 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6423 calculation of this_size.
6424
af547a96
AA
64252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6426
6427 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6428 when targeting a bit-field.
6429 (write_pieced_value): Likewise.
6430
ddd7882a
AA
64312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6432
6433 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6434 (allocate_piece_closure): Drop addr_size parameter.
6435 (dwarf2_evaluate_loc_desc_full): Adjust call to
6436 allocate_piece_closure.
6437
e9352324
AA
64382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6439
6440 PR gdb/21226
6441 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6442 the LSB end, independent of endianness.
6443
d5d1163e
AA
64442017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6445
6446 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6447 size capping.
6448
032bb6ea
YQ
64492017-06-13 Yao Qi <yao.qi@linaro.org>
6450
6451 * mips-linux-nat.c: Move include features/mips*-linux.c to
6452 mips-linux-tdep.c.
6453 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6454 to mips-linux-tdep.c.
6455 * mips-linux-tdep.c: Include features/mips*-linux.c
6456 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6457 functions.
6458 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6459 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6460 (tdesc_mips64_dsp_linux): Declare.
6461
f12f6bad
TT
64622017-06-12 Tom Tromey <tom@tromey.com>
6463
6464 * valprint.h (val_print_type_code_int): Remove.
6465 * valprint.c (generic_val_print_int): Always call
6466 val_print_scalar_formatted.
6467 (val_print_type_code_int): Remove.
6468 * printcmd.c (print_scalar_formatted): Handle options->format==0.
6469 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6470 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6471 * ada-valprint.c (ada_val_print_num): Use
6472 val_print_scalar_formatted.
6473
d9109c80
TT
64742017-06-12 Tom Tromey <tom@tromey.com>
6475
6476 * printcmd.c (print_scalar_formatted): Unify the two switches.
6477 Don't convert scalars to LONGEST.
6478
4ac0cb1c
TT
64792017-06-12 Tom Tromey <tom@tromey.com>
6480
6481 PR exp/16225:
6482 * valprint.h (print_decimal_chars): Update.
6483 * valprint.c (maybe_negate_by_bytes): New function.
6484 (print_decimal_chars): Add "is_signed" argument.
6485 * printcmd.c (print_scalar_formatted): Update.
6486
30a25466
TT
64872017-06-12 Tom Tromey <tom@tromey.com>
6488
6489 PR exp/16225:
6490 * valprint.h (print_binary_chars, print_hex_chars): Update.
6491 * valprint.c (val_print_type_code_int): Update.
6492 (print_binary_chars): Add "zero_pad" argument.
6493 (emit_octal_digit): New function.
6494 (print_octal_chars): Don't zero-pad.
6495 (print_decimal_chars): Likewise.
6496 (print_hex_chars): Add "zero_pad" argument.
6497 * sh64-tdep.c (sh64_do_fp_register): Update.
6498 * regcache.c (regcache::dump): Update.
6499 * printcmd.c (print_scalar_formatted): Update.
6500 * infcmd.c (default_print_one_register_info): Update.
6501
b3464d03
PA
65022017-06-12 Pedro Alves <palves@redhat.com>
6503 Alan Hayward <alan.hayward@arm.com>
6504
6505 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6506 (mips_eabi_push_dummy_call): Rename local 'regsize' to
6507 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
6508 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6509 Assert that abi_regsize bytes fit in 'ref_valbuf'.
6510
4b76cda9
PA
65112017-06-12 Pedro Alves <palves@redhat.com>
6512
6513 * dwarf2read.c (mapped_symtab::data): Now a vector of
6514 symtab_index_entry instead of vector of
6515 std::unique_ptr<symtab_index_entry>. All users adjusted to check
6516 whether an element's name is NULL instead of checking whether the
6517 element itself is NULL.
6518 (find_slot): Change return type. Adjust.
6519 (hash_expand, , add_index_entry, uniquify_cu_indices)
6520 (write_hash_table): Adjust.
6521
e8f8bcb3
PA
65222017-06-12 Pedro Alves <palves@redhat.com>
6523
6524 * dwarf2read.c (recursively_count_psymbols): New function.
6525 (write_psymtabs_to_index): Call it to compute number of psyms and
6526 pass estimate size of psyms_seen to unordered_set's ctor.
6527
70a1152b
PA
65282017-06-12 Pedro Alves <palves@redhat.com>
6529
6530 * dwarf2read.c (write_hash_table): Check if key already exists
6531 before emplacing.
6532
c2f134ac
PA
65332017-06-12 Pedro Alves <palves@redhat.com>
6534
6535 * dwarf2read.c (data_buf::append_space): Rename to...
6536 (data_buf::grow): ... this, and make private. Adjust all callers.
6537 (data_buf::append_uint): New method.
6538 (add_address_entry, write_one_signatured_type)
6539 (write_psymtabs_to_index): Use it.
6540
a81e6d4d
PA
65412017-06-12 Pedro Alves <palves@redhat.com>
6542
6543 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6544 (file_write (FILE *, const std::vector<Elem>&)): Delete.
6545 (data_buf::file_write): Call ::fwrite directly.
6546
6fd931f2
PA
65472017-06-12 Pedro Alves <palves@redhat.com>
6548
6549 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6550 std::vector::erase.
6551
bc8f2430
JK
65522017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6553
6554 Code cleanup: C++ify .gdb_index producer.
6555 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6556 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6557 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6558 (create_strtab, add_string): Remove.
6559 (file_write, data_buf): New.
6560 (struct symtab_index_entry): Use std::vector for cu_indices.
6561 (struct mapped_symtab): Use std::vector for data.
6562 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6563 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6564 Remove.
6565 (find_slot): Change return type. Update it to the new data structures.
6566 (hash_expand, add_index_entry): Update it to the new data structures.
6567 (offset_type_compare): Remove.
6568 (uniquify_cu_indices): Update it to the new data structures.
6569 (c_str_view, c_str_view_hasher, vector_hasher): New.
6570 (add_indices_to_cpool): Remove.
6571 (write_hash_table): Update it to the new data structures.
6572 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6573 (eq_psymtab_cu_index): Remove.
6574 (psym_index_map): New typedef.
6575 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6576 reference and std::unordered_map for cu_index_htab.
6577 (add_address_entry, add_address_entry_worker, write_address_map)
6578 (write_psymbols): Update it to the new data structures.
6579 (write_obstack): Remove.
6580 (struct signatured_type_index_data): Change types_list to a data_buf
6581 reference and psyms_seen to a std::unordered_set reference.
6582 (write_one_signatured_type, recursively_write_psymbols)
6583 (write_psymtabs_to_index): Update it to the new data structures.
6584
c4dcb155
SM
65852017-06-11 Simon Marchi <simon.marchi@ericsson.com>
6586
6587 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6588 separate-debug-file commands.
6589 * symfile.h (separate_debug_file_debug): New global.
6590 * symfile.c (separate_debug_file_debug): New global.
6591 (separate_debug_file_exists, find_separate_debug_file): Add
6592 debug output.
6593 (_initialize_symfile): Add "set debug separate-debug-file"
6594 command.
6595 * build-id.c (build_id_to_debug_bfd,
6596 find_separate_debug_file_by_buildid): Add debug output.
6597
6d45d4b4
SM
65982017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6599
6600 * gdbarch.sh (displaced_step_free_closure): Remove.
6601 * gdbarch.h, gdbarch.c: Re-generate.
6602 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6603 displaced_step_free_closure.
6604 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6605 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6606 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6607 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6608 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6609 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6610 * arch-utils.h (simple_displaced_step_free_closure): Remove.
6611 * arch-utils.c (simple_displaced_step_free_closure): Remove.
6612 * infrun.c (displaced_step_clear): Call xfree instead of
6613 gdbarch_displaced_step_free_closure.
6614
2f91880f
SDJ
66152017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6616
6617 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6618 NULL".
6619
b8b6e72f
AH
66202017-06-08 Alan Hayward <alan.hayward@arm.com>
6621
6622 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6623 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6624 (mn10300_push_dummy_call): Likewise.
6625
5369082e
AH
66262017-06-08 Alan Hayward <alan.hayward@arm.com>
6627
6628 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6629
ff4ca5ac
AH
66302017-06-08 Alan Hayward <alan.hayward@arm.com>
6631
6632 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6633
aefd8b33
SDJ
66342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6635
6636 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6637 able to start inferiors using a shell.
6638 (New remote packets): Announce new packet "QStartupWithShell".
6639 * remote.c: Add PACKET_QStartupWithShell.
6640 (extended_remote_create_inferior): Handle new
6641 PACKET_QStartupWithShell.
6642 (remote_protocol_features) <QStartupWithShell>: New entry for
6643 PACKET_QStartupWithShell.
6644 (_initialize_remote): Call "add_packet_config_cmd" for
6645 QStartupShell.
6646
2090129c
SDJ
66472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6648 Pedro Alves <palves@redhat.com>
6649
6650 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6651 and "nat/fork-inferior.h".
6652 * common/common-inferior.h: New file, with contents from
6653 "gdb/inferior.h".
6654 * commom/common-utils.c: Include "common-utils.h".
6655 (stringify_argv): New function.
6656 * common/common-utils.h (stringify_argv): New prototype.
6657 * configure.nat: Add "fork-inferior.o" as a dependency for
6658 "*linux*", "fbsd*" and "nbsd*" hosts.
6659 * corefile.c (get_exec_file): Update comment.
6660 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6661 instead of "startup_inferior".
6662 (darwin_create_inferior): Call "add_thread_silent" after
6663 "fork_inferior".
6664 * fork-child.c: Cleanup unnecessary includes.
6665 (SHELL_FILE): Move to "common/common-fork-child.c".
6666 (environ): Likewise.
6667 (exec_wrapper): Initialize.
6668 (get_exec_wrapper): New function.
6669 (breakup_args): Move to "common/common-fork-child.c"; rename to
6670 "breakup_args_for_exec".
6671 (escape_bang_in_quoted_argument): Move to
6672 "common/common-fork-child.c".
6673 (saved_ui): New variable.
6674 (prefork_hook): New function.
6675 (postfork_hook): Likewise.
6676 (postfork_child_hook): Likewise.
6677 (gdb_startup_inferior): Likewise.
6678 (fork_inferior): Move to "common/common-fork-child.c". Update
6679 function to support gdbserver.
6680 (startup_inferior): Likewise.
6681 * gdbcore.h (get_exec_file): Remove declaration.
6682 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6683 instead of "startup_inferior". Call "add_thread_silent" after
6684 "fork_inferior".
6685 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6686 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6687 instead of "startup_inferior". Call "add_thread_silent" after
6688 "fork_inferior".
6689 * inferior.h: Include "common-inferior.h".
6690 (trace_start_error): Move to "common/common-utils.h".
6691 (trace_start_error_with_name): Likewise.
6692 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6693 (startup_inferior): Likewise.
6694 (gdb_startup_inferior): New prototype.
6695 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6696 * nat/fork-inferior.h: New file.
6697 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6698 instead of "startup_inferior". Call "add_thread_silent" after
6699 "fork_inferior".
6700 * target.h (target_terminal_init): Move prototype to
6701 "target/target.h".
6702 (target_terminal_inferior): Likewise.
6703 (target_terminal_ours): Likewise.
6704 * target/target.h (target_terminal_init): New prototype, moved
6705 from "target.h".
6706 (target_terminal_inferior): Likewise.
6707 (target_terminal_ours): Likewise.
6708 * utils.c (gdb_flush_out_err): New function.
6709
043a4934
SDJ
67102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6711
6712 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6713 * common/common-gdbthread.h: New file, with parts from
6714 "gdb/gdbthread.h".
6715 * gdbthread.h: Include "common-gdbthread.h".
6716 (switch_to_thread): Moved to "common/common-gdbthread.h".
6717
15652511
SDJ
67182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6719
6720 * Makefile.in (SFILES): Add "common/job-control.c".
6721 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6722 (COMMON_OBS): Add "job-control.o".
6723 * common/job-control.c: New file, with contents from
6724 "gdb/inflow.c".
6725 * common/job-control.h: New file, with contents from "terminal.h".
6726 * fork-child.c: Include "job-control.h".
6727 * inflow.c: Include "job-control.h".
6728 (gdb_setpgid): Move to "common/common-inflow.c".
6729 (_initialize_inflow): Move setting of "job_control" to
6730 "handle_job_control".
6731 * terminal.h (job_control): Moved to "common/common-terminal.h".
6732 (gdb_setpgid): Likewise.
6733 * top.c: Include "job_control.h".
6734 * utils.c: Likewise.
6735 (job_control): Moved to "job-control.c".
6736
2d7cc5c7
PA
67372017-06-07 Pedro Alves <palves@redhat.com>
6738
6739 * Makefile.in (SFILES): Add gdb_regex.c.
6740 (COMMON_OBS): Add gdb_regex.o.
6741 * ada-lang.c (ada_add_standard_exceptions)
6742 (ada_add_exceptions_from_frame, name_matches_regex)
6743 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6744 parameter type to compiled_regex. Adjust.
6745 (ada_exceptions_list): Use compiled_regex.
6746 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6747 std::unique_ptr<compiled_regex>.
6748 (exception_catchpoint::~exception_catchpoint): Remove regfree
6749 call.
6750 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6751 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6752 * breakpoint.c (solib_catchpoint::compiled): Now a
6753 std::unique_ptr<compiled_regex>.
6754 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6755 (check_status_catch_solib): Adjust to use compiled_regex.
6756 (add_solib_catchpoint): Adjust to use compiled_regex.
6757 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6758 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6759 compiled_regex reference. Adjust to use it.
6760 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6761 declaration. Include "gdb_regex.h".
6762 (apropos_cmd): Change regex parameter to compiled_regex reference.
6763 * gdb_regex.c: New file.
6764 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6765 declarations.
6766 (class compiled_regex): New.
6767 * linux-tdep.c: Include "common/gdb_optional.h".
6768 (struct mapping_regexes): New, factored out from
6769 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6770 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6771 gdb::optional and remove cleanups. Adjust to compiled_regex.
6772 * probe.c: Include "common/gdb_optional.h".
6773 (collect_probes): Use compiled_regex and gdb::optional and remove
6774 cleanups.
6775 * skip.c: Include "common/gdb_optional.h".
6776 (skiplist_entry::compiled_function_regexp): Now a
6777 gdb::optional<compiled_regex>.
6778 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6779 (free_skiplist_entry): Remove regfree call.
6780 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6781 compiled_regex and gdb::optional.
6782 * symtab.c: Include "common/gdb_optional.h".
6783 (search_symbols): Use compiled_regex and gdb::optional.
6784 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6785 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6786 to gdb_regex.c.
6787
50d6adef
AH
67882017-06-07 Alan Hayward <alan.hayward@arm.com>
6789
6790 * regcache.c (regcache::save): Avoid buffer use.
6791 (regcache::dump): Likewise.
6792
4a8a33c8
AH
67932017-06-07 Alan Hayward <alan.hayward@arm.com>
6794
6795 * sh-tdep.c (sh_pseudo_register_read): Remove
6796 MAX_REGISTER_SIZE.
6797 (sh_pseudo_register_write): Likewise.
6798 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6799 (sh64_pseudo_register_write): Likewise
6800
d1be909e
AH
68012017-06-07 Alan Hayward <alan.hayward@arm.com>
6802
6803 * aarch64-tdep.c (aarch64_store_return_value): Use
6804 V_REGISTER_SIZE.
6805 (aarch64_pseudo_read_value): Likewise.
6806 (aarch64_pseudo_write): Likewise.
6807
f4a65042
YQ
68082017-06-06 Yao Qi <yao.qi@linaro.org>
6809
6810 * regformats/regdef.h (set_register_cache): Remove the
6811 declaration.
6812
9f7fb0aa
AH
68132017-06-06 Alan Hayward <alan.hayward@arm.com>
6814
6815 * frame.c (frame_unwind_register_signed): Use
6816 frame_unwind_register_value.
6817
e1e01040
PA
68182017-06-06 Pedro Alves <palves@redhat.com>
6819
6820 PR breakpoints/21553
6821 * breakpoint.c (create_breakpoints_sal_default)
6822 (init_breakpoint_sal, create_breakpoint_sal): Use
6823 gdb::unique_xmalloc_ptr for string parameters.
6824 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6825 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6826 (base_breakpoint_create_breakpoints_sal)
6827 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6828 (strace_marker_create_breakpoints_sal)
6829 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6830 string parameters.
6831 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6832 gdb::unique_xmalloc_ptr for string parameters.
6833 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6834 parameters.
6835
fbe654c8
AH
68362017-06-06 Alan Hayward <alan.hayward@arm.com>
6837
6838 * alpha-tdep.c (alpha_register_to_value): Use
6839 get_frame_register_value.
6840 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6841
ae0d01d6
AH
68422017-06-06 Alan Hayward <alan.hayward@arm.com>
6843
6844 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6845 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6846 (ia64_value_to_register): Likewise.
6847 (ia64_extract_return_value): Likewise.
6848 (ia64_store_return_value): Likewise.
6849 (ia64_push_dummy_call): Likewise.
6850
49cf576c
JB
68512017-06-04 Joel Brobecker <brobecker@adacore.com>
6852
6853 GDB 8.0 released.
6854
26b6a6ab
SM
68552017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6856
6857 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6858
22827c51
SM
68592017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6860
6861 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6862 parameter.
6863 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6864
0e05cf3a
SM
68652017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6866
6867 * event-loop.c (poll_timers): Unallocate timer using delete
6868 instead of xfree.
6869
c1fc2657
SM
68702017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6871
6872 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6873 (struct breakpoint) <~breakpoint>: New.
6874 (struct watchpoint): Inherit from breakpoint.
6875 <~watchpoint>: New.
6876 <base>: Remove.
6877 (struct tracepoint): Inherit from breakpoint.
6878 <base>: Remove.
6879 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6880 (struct longjmp_breakpoint): Inherit from breakpoint.
6881 <~longjmp_breakpoint>: New.
6882 <base>: Remove.
6883 (new_breakpoint_from_type): Remove casts.
6884 (watchpoint_in_thread_scope): Remove reference to base field.
6885 (watchpoint_del_at_next_stop): Likewise.
6886 (update_watchpoint): Likewise.
6887 (watchpoint_check): Likewise.
6888 (bpstat_check_watchpoint): Likewise.
6889 (set_longjmp_breakpoint): Likewise.
6890 (struct fork_catchpoint): Inherit from breakpoint.
6891 <base>: Remove.
6892 (struct solib_catchpoint): Inherit from breakpoint.
6893 <~solib_catchpoint>: New.
6894 <base>: Remove.
6895 (dtor_catch_solib): Change to ...
6896 (solib_catchpoint::~solib_catchpoint): ... this.
6897 (breakpoint_hit_catch_solib): Remove reference to base field.
6898 (add_solib_catchpoint): Likewise.
6899 (create_fork_vfork_event_catchpoint): Likewise.
6900 (struct exec_catchpoint): Inherit from breakpoint.
6901 <~exec_catchpoint>: New.
6902 <base>: Remove.
6903 (dtor_catch_exec): Change to ...
6904 (exec_catchpoint::~exec_catchpoint): ... this.
6905 (dtor_watchpoint): Change to ...
6906 (watchpoint::~watchpoint): ... this.
6907 (watch_command_1): Remove reference to base field.
6908 (catch_exec_command_1): Likewise.
6909 (base_breakpoint_dtor): Change to ...
6910 (breakpoint::~breakpoint): ... this.
6911 (base_breakpoint_ops): Remove dtor field value.
6912 (longjmp_bkpt_dtor): Change to ...
6913 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6914 (strace_marker_create_breakpoints_sal): Remove reference to base
6915 field.
6916 (delete_breakpoint): Don't manually call breakpoint destructor.
6917 (create_tracepoint_from_upload): Remove reference to base field.
6918 (trace_pass_set_count): Likewise.
6919 (initialize_breakpoint_ops): Don't initialize
6920 momentary_breakpoint_ops, don't set dtors.
6921 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6922 <~ada_catchpoint>: New.
6923 <base>: Remove.
6924 (create_excep_cond_exprs): Remove reference to base field.
6925 (dtor_exception): Change to ...
6926 (ada_catchpoint::~ada_catchpoint): ... this.
6927 (dtor_catch_exception): Remove.
6928 (dtor_catch_exception_unhandled): Remove.
6929 (dtor_catch_assert): Remove.
6930 (create_ada_exception_catchpoint): Remove reference to base
6931 field.
6932 (initialize_ada_catchpoint_ops): Don't set dtors.
6933 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6934 breakpoint.
6935 <~signal_catchpoint>: New.
6936 <base>: Remove.
6937 (signal_catchpoint_dtor): Change to ...
6938 (signal_catchpoint::~signal_catchpoint): ... this.
6939 (create_signal_catchpoint): Remove reference to base field.
6940 (initialize_signal_catchpoint_ops): Don't set dtor.
6941 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6942 from breakpoint.
6943 <~syscall_catchpoint>: New.
6944 <base>: Remove.
6945 (dtor_catch_syscall): Change to ...
6946 (syscall_catchpoint::~syscall_catchpoint): ... this.
6947 (create_syscall_event_catchpoint): Remove reference to base
6948 field.
6949 (initialize_syscall_catchpoint_ops): Don't set dtor.
6950 * break-catch-throw.c (struct exception_catchpoint): Inherit
6951 from breakpoint.
6952 <~exception_catchpoint>: New.
6953 <base>: Remove.
6954 (dtor_exception_catchpoint): Change to ...
6955 (exception_catchpoint::~exception_catchpoint): ... this.
6956 (handle_gnu_v3_exceptions): Remove reference to base field.
6957 (initialize_throw_catchpoint_ops): Don't set dtor.
6958 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6959 field.
6960 * remote.c (remote_get_tracepoint_status): Likewise.
6961 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6962 * tracefile.c (tracefile_fetch_registers): Likewise.
6963 * tracepoint.c (actions_command): Likewise.
6964 (validate_actionline): Likewise.
6965 (tfind_1): Likewise.
6966 (get_traceframe_location): Likewise.
6967 (find_matching_tracepoint_location): Likewise.
6968 (parse_tracepoint_status): Likewise.
6969 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6970
3b0871f4
SM
69712017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6972
6973 * breakpoint.c (struct longjmp_breakpoint): New struct.
6974 (is_tracepoint_type): Change return type to bool.
6975 (is_longjmp_type): New function.
6976 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6977 (set_raw_breakpoint_without_location): Use
6978 new_breakpoint_from_type.
6979 (set_raw_breakpoint): Likewise.
6980
a5e364af
SM
69812017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6982
6983 * breakpoint.c (new_breakpoint_from_type): New function.
6984 (create_breakpoint_sal): Use new_breakpoint_from_type and
6985 unique_ptr.
6986 (create_breakpoint): Likewise.
6987
ae3b3f34
SM
69882017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6989
6990 * memattr.c (mem_info_command): Rename to ...
6991 (info_mem_command): ... this.
6992 (mem_enable_command): Rename to ...
6993 (enable_mem_command): ... this.
6994 (mem_disable_command): Rename to ...
6995 (disable_mem_command): ... this.
6996 (mem_delete_command): Rename to ...
6997 (delete_mem_command): ... this.
6998 (_initialize_mem): Adjust function names.
6999
13ace077
MM
70002017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7001
7002 * btrace.c (handle_pt_insn_events): New.
7003 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
7004 STATUS. Split into this and ...
7005 (handle_pt_insn_event_flags): ... this.
7006
c56ccc05
MM
70072017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7008
7009 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7010 and struct pt_insn.resynced.
7011 * configure: Regenerated.
7012 * config.in: Regenerated.
7013
08c3f6d2
TW
70142017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7015
7016 * btrace.c (ftrace_find_call_by_number): New function.
7017 (ftrace_new_function): Store objects, not pointers.
7018 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7019 ftrace_new_gap, ftrace_update_function,
7020 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7021 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7022 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7023 btrace_ends_with_single_insn, btrace_call_get): Account for
7024 btrace_thread_info::functions now storing objects.
7025 * btrace.h (struct btrace_thread_info): Add constructor.
7026 (struct btrace_thread_info) <functions>: Make std::vector.
7027 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7028 Initialize with default values.
7029 * record-btrace.c (record_btrace_frame_sniffer): Account for
7030 btrace_thread_info::functions now storing objects.
7031
8ffd39f2
TW
70322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7033
7034 * btrace.c: Remove typedef bfun_s.
7035 (ftrace_new_gap): Directly add gaps to the list of gaps.
7036 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7037 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7038 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7039 instead of gdb VEC.
7040
4aeb0dfc
TW
70412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7042
7043 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7044 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7045 with btrace_thread_info::next_segment and
7046 btrace_thread_info::prev_segment.
7047 * btrace.h: Remove struct btrace_func_link.
7048 (struct btrace_function): Replace pair of function segment pointers
7049 with pair of indices.
7050 * python/py-record-btrace.c (btpy_call_prev_sibling,
7051 btpy_call_next_sibling): Replace references to
7052 btrace_thread_info::segment with btrace_thread_info::next_segment and
7053 btrace_thread_info::prev_segment.
7054 * record-btrace.c (record_btrace_frame_this_id): Use
7055 btrace_find_call_by_number.
7056
eb8f2b9c
TW
70572017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7058
7059 * btrace.c (ftrace_new_function, ftrace_fixup_level,
7060 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7061 btrace_insn_next, btrace_insn_prev): Remove references to
7062 btrace_thread_info::flow.
7063 * btrace.h (struct btrace_function): Remove FLOW.
7064
42bfe59e
TW
70652017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7066
7067 * btrace.c (ftrace_find_call_by_number): New function.
7068 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7069 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7070 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7071 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7072 index.
7073 * btrace.h (struct btrace_function): Turn UP into an index.
7074 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7075 as an index.
7076 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7077 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7078 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7079
b54b03bd
TW
70802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7081
7082 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7083 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7084 ftrace_update_function, ftrace_compute_global_level_offset,
7085 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7086 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7087 btrace_insn_end, btrace_is_empty): Remove references to
7088 btrace_thread_info::begin and btrace_thread_info::end.
7089 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7090 (struct btrace_thread_info) <functions>: Adjust comment.
7091 * record-btrace.c (record_btrace_start_replaying): Remove reference to
7092 btrace_thread_info::begin.
7093
8286623c
TW
70942017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7095
7096 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7097 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7098 ftrace_update_function): Remove arguments that implicitly were always
7099 BTINFO->END.
7100 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7101 Don't pass BTINFO->END.
7102
a0f1b963
TW
71032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7104
7105 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7106 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7107 btrace_find_insn_by_number): Replace function segment pointer with
7108 index.
7109 (btrace_insn_cmp): Simplify.
7110 * btrace.h: (struct btrace_insn_iterator) Rename index to
7111 insn_index. Replace function segment pointer with index into function
7112 segment vector.
7113 * record-btrace.c (record_btrace_call_history): Replace function
7114 segment pointer use with index.
7115 (record_btrace_frame_sniffer): Retrieve function call segment through
7116 vector.
7117 (record_btrace_set_replay): Remove defunc't safety check.
7118
f158f208
TW
71192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7120
7121 * btrace.c (btrace_ends_with_single_insn): New function.
7122 (btrace_call_get, btrace_call_number, btrace_call_begin,
7123 btrace_call_end, btrace_call_next, btrace_call_prev,
7124 btrace_find_call_by_number): Use index into call segment vector
7125 instead of pointer.
7126 (btrace_call_cmp): Simplify.
7127 * btrace.h (struct btrace_call_iterator): Replace function call segment
7128 pointer with index into vector.
7129 * record-btrace.c (record_btrace_call_history): Use index instead of
7130 pointer.
7131
521103fd
TW
71322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7133
7134 * btrace.c (btrace_insn_begin, btrace_insn_end,
7135 btrace_find_insn_by_number): Add btinfo to iterator.
7136 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7137
17b89b34
TW
71382017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7139
7140 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7141 and save pointers directly.
7142 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7143 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7144 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7145 changed signature of functions.
7146 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7147 (btrace_fetch): Remove code that adds btrace_function pointers to
7148 vector of btrace_functions.
7149 (btrace_clear): Simplify freeing vector of btrace_functions.
7150
2b51eddc
TW
71512017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7152
7153 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7154 Replace VEC_* with std::vector functions.
7155 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7156 (struct btrace_thread_info)<functions>: Change type to std::vector.
7157
db6be0d5
SM
71582017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7159
7160 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7161 "Removed targets and native configurations" up. Merge duplicate
7162 "New commands" sub-sections. Add "New options" sub-sections.
7163
b057297a
AH
71642017-05-26 Alan Hayward <alan.hayward@arm.com>
7165
7166 * defs.h (copy_integer_to_size): New declaration.
7167 * findvar.c (copy_integer_to_size): New function.
7168 (do_cint_test): New selftest function.
7169 (copy_integer_to_size_test): Likewise.
7170 (_initialize_findvar): Likewise.
7171 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7172 (mips_fbsd_collect_reg): Use raw_collect_integer.
7173 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7174 (mips64_fill_gregset): Use raw_collect_integer
7175 (mips64_fill_fpregset): Use raw_supply_integer.
7176 * regcache.c (regcache::raw_supply_integer): New function.
7177 (regcache::raw_collect_integer): Likewise.
7178 * regcache.h: (regcache::raw_supply_integer): New declaration.
7179 (regcache::raw_collect_integer): Likewise.
7180
b77b02a5
YQ
71812017-05-24 Yao Qi <yao.qi@linaro.org>
7182
7183 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7184 (COMMON_OBS): Add gdbarch-selftests.o.
7185 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7186 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7187 * gdbarch-selftests.c: New file.
7188 * regcache.h (regcache) <~regcache>: Mark it virtual if
7189 GDB_SELF_TEST.
7190 <raw_write>: Likewise.
7191
e521e87e
YQ
71922017-05-24 Yao Qi <yao.qi@linaro.org>
7193
7194 * regcache.c (current_regcache): Change it to
7195 regcache::current_regcache.
7196 (regcache_observer_target_changed): Update.
7197 (regcache_thread_ptid_changed): Make it a regcache static
7198 method.
7199 (regcache_thread_ptid_changed): Update.
7200 (class regcache_access): New.
7201 (current_regcache_test): Update.
7202 (_initialize_regcache): Update.
7203 * regcache.h: Include forward_list.
7204 (regcache): Declare regcache_thread_ptid_changed and declare
7205 registers_changed_ptid as friend.
7206
d8e07dda
YQ
72072017-05-24 Yao Qi <yao.qi@linaro.org>
7208
7209 * i387-tdep.c (i387_register_to_value): Use register_size
7210 instead of TYPE_LENGTH.
7211 * m68k-tdep.c (m68k_register_to_value): Likewise.
7212
8c8f9122
YQ
72132017-05-24 Yao Qi <yao.qi@linaro.org>
7214
7215 * i387-tdep.c (i387_convert_register_p): Return false if type
7216 code isn't TYPE_CODE_FLT.
7217
68fce50f
YQ
72182017-05-24 Yao Qi <yao.qi@linaro.org>
7219
7220 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7221 length is 4.
7222 (alpha_register_to_value): Remove type length check.
7223 (alpha_value_to_register): Likewise.
7224
88954b49
YQ
72252017-05-24 Yao Qi <yao.qi@linaro.org>
7226
7227 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7228 TYPE_CODE_FLT.
7229
e3ec9b69
YQ
72302017-05-24 Yao Qi <yao.qi@linaro.org>
7231
7232 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7233 TYPE_CODE_FLT or not.
7234
cdd238da
YQ
72352017-05-24 Yao Qi <yao.qi@linaro.org>
7236
7237 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7238 * avr-tdep.c (avr_gdbarch_init): Likewise.
7239 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7240 * cris-tdep.c (cris_gdbarch_init): Likewise.
7241 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7242 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7243 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7244 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7245 * mep-tdep.c (mep_gdbarch_init): Likewise.
7246 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7247 * mips-tdep.c (mips_gdbarch_init): Likewise.
7248 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7249 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7250 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7251 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7252 * v850-tdep.c (v850_gdbarch_init): Likewise.
7253
7a3929c4
YQ
72542017-05-24 Yao Qi <yao.qi@linaro.org>
7255
7256 * selftest-arch.c (tests_with_arch): Call registers_changed
7257 and reinit_frame_cache.
7258 * selftest.c (run_self_tests): Likewise.
7259
f4985dba
YQ
72602017-05-24 Yao Qi <yao.qi@linaro.org>
7261
7262 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7263 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7264
ab20fa4a
YQ
72652017-05-24 Yao Qi <yao.qi@linaro.org>
7266
7267 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7268 set_gdbarch_print_insn.
7269
f532ab94
YQ
72702017-05-24 Yao Qi <yao.qi@linaro.org>
7271
7272 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7273 set_gdbarch_print_insn.
7274
39503f82
YQ
72752017-05-24 Yao Qi <yao.qi@linaro.org>
7276
7277 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7278 set_gdbarch_print_insn.
7279 * arc-tdep.c (arc_gdbarch_init): Likewise.
7280 * arch-utils.c: include dis-asm.h.
7281 (default_print_insn): New function.
7282 * arch-utils.h (default_print_insn): Declare.
7283 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7284 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7285 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7286 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7287 * frv-tdep.c (frv_gdbarch_init): Likewise.
7288 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7289 * gdbarch.sh (print_insn): Use default_print_insn.
7290 * gdbarch.c: Regenerated.
7291 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7292 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7293 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7294 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7295 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7296 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7297 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7298 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7299 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7300 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7301 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7302 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7303 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7304 * mt-tdep.c (mt_gdbarch_init): Likewise.
7305 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7306 * nios2-tdep.c (nios2_print_insn): Remove.
7307 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7308 * rx-tdep.c (rx_gdbarch_init): Likewise.
7309 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7310 * score-tdep.c (score_print_insn): Remove.
7311 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7312 * sh-tdep.c (sh_gdbarch_init): Likewise.
7313 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7314 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7315 * tic6x-tdep.c (tic6x_print_insn): Remove.
7316 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7317 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7318 * v850-tdep.c (v850_gdbarch_init): Likewise.
7319 * vax-tdep.c (vax_gdbarch_init): Likewise.
7320 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7321 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7322
f7241d4f
JB
73232017-05-23 John Baldwin <jhb@FreeBSD.org>
7324
7325 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7326 (MIPS_FP0_REGNUM): Remove.
7327 (MIPS_FSR_REGNUM): Remove.
7328 (mips_fbsd_supply_fpregs): Use mips_regnum.
7329 (mips_fbsd_supply_gregs): Likewise.
7330 (mips_fbsd_collect_fpregs): Likewise.
7331 (mips_fbsd_collect_gregs): Likewise.
7332
d489d81d
JB
73332017-05-23 John Baldwin <jhb@FreeBSD.org>
7334
7335 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7336 (getpfpregs_supplies): New function.
7337 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7338 getfpregs_supplies.
7339 (mips_fbsd_store_inferior_registers): Likewise.
7340
e11b3cdc
PA
73412017-05-22 Pedro Alves <palves@redhat.com>
7342
7343 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7344 maintainer.
7345
0f068fb5
AH
73462017-05-22 Alan Hayward <alan.hayward@arm.com>
7347
7348 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7349 (store_register): Likewise.
7350 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7351 (get_decimal_float_return_value): Likewise.
7352 (do_ppc_sysv_return_value): Likewise.
7353 (ppc64_sysv_abi_push_integer): Likewise.
7354 (ppc64_sysv_abi_push_freg): Likewise.
7355 (ppc64_sysv_abi_return_value_base): Likewise.
7356 (ppc64_sysv_abi_return_value): Likewise.
7357 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7358 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7359 * rs6000-nat.c: Likewise.
7360 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7361 (rs6000_value_to_register): Likewise.
7362 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7363
e6cf65f2
TT
73642017-05-21 Tom Tromey <tom@tromey.com>
7365
7366 PR rust/21466:
7367 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7368 arrays as "[T]", not "[T; ]".
7369
43cc5389
TT
73702017-05-19 Tom Tromey <tom@tromey.com>
7371
7372 PR rust/21484:
7373 * rust-lang.c (exp_descriptor_rust): New function.
7374 (rust_language_defn): Use it.
7375 * p-lang.c (pascal_language_defn): Update.
7376 * opencl-lang.c (opencl_language_defn): Update.
7377 * objc-lang.c (objc_language_defn): Update.
7378 * m2-lang.c (m2_language_defn): Update.
7379 * language.h (struct language_defn)
7380 <la_watch_location_expression>: New member.
7381 * language.c (unknown_language_defn, auto_language_defn)
7382 (local_language_defn): Update.
7383 * go-lang.c (go_language_defn): Update.
7384 * f-lang.c (f_language_defn): Update.
7385 * d-lang.c (d_language_defn): Update.
7386 * c-lang.h (c_watch_location_expression): Declare.
7387 * c-lang.c (c_watch_location_expression): New function.
7388 (c_language_defn, cplus_language_defn, asm_language_defn)
7389 (minimal_language_defn): Use it.
7390 * breakpoint.c (watch_command_1): Call
7391 la_watch_location_expression.
7392 * ada-lang.c (ada_language_defn): Update.
7393
7a6e7fcc
RO
73942017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7395
6e7e1744
RO
7396 PR tui/21482
7397 * gdb_curses.h (NOMACROS): Define.
7398 (NCURSES_NOMACROS): Define.
7399
74002017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7401
7402 PR tui/21482
7a6e7fcc
RO
7403 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7404 arg to char *.
7405 * tui/tui-wingeneral.c (box_win): Likewise.
7406 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7407 (tui_show_source_line): Likewise.
7408 (tui_show_exec_info_content): Likewise.
7409
1933fd8e
VM
74102017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7411
7412 * sparc-tdep.c (sparc_structure_return_p)
7413 (sparc_arg_on_registers_p): New functions.
7414 (sparc32_store_arguments): Use them.
7415 * sparc64-tdep.c (sparc64_16_byte_align_p)
7416 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7417 Handle TYPE_CODE_ARRAY.
7418
21873064
YQ
74192017-05-17 Yao Qi <yao.qi@linaro.org>
7420
7421 * cli/cli-decode.c (add_alias_cmd): New function.
7422 * command.h (add_alias_cmd): Declare.
7423 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7424 instead call add_alias_cmd.
7425
2b351b19
PA
74262017-05-17 Pedro Alves <palves@redhat.com>
7427
7428 * Makefile.in (nat_extra_makefile_frag): Rename to ...
7429 (nat_makefile_frag): ... this. All references updated.
7430 * configure.ac: Likewise.
7431 * configure.nat: Likewise. Enhance comments.
7432 * configure: Regenerate.
7433
5f2ad7a3
RO
74342017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7435
7436 * procfs.c (procfs_create_inferior): Change prototype to match
7437 definition.
7438
adf3dde5
EZ
74392017-05-13 Eli Zaretskii <eliz@gnu.org>
7440
7441 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7442 C++ compiler warning.
7443
6830f270
TT
74442017-05-12 Tom Tromey <tom@tromey.com>
7445
7446 PR rust/21483:
7447 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7448 recurse, just call value_struct_elt directly.
7449
68f2f2e3
TT
74502017-05-12 Tom Tromey <tom@tromey.com>
7451
7452 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7453 OP_RUST_ARRAY>: Fix.
7454
256afbc2
TT
74552017-05-12 Tom Tromey <tom@tromey.com>
7456
7457 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7458
94bb8dfe
YQ
74592017-05-09 Yao Qi <yao.qi@linaro.org>
7460
7461 * regcache.c: Include <forward_list>.
7462 (struct regcache_list): Remove.
7463 (current_regcache): Update.
7464 (get_thread_arch_aspace_regcache): Update for std::forward_list.
7465 (regcache_thread_ptid_changed): Likewise.
7466 (registers_changed_ptid): Likewise.
7467 (current_regcache_size): Likewise.
7468
8248946c
YQ
74692017-05-09 Yao Qi <yao.qi@linaro.org>
7470
7471 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7472 (current_regcache_size): New function.
7473 (current_regcache_test): New function.
7474 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7475
313c5961
AH
74762017-05-08 Alan Hayward <alan.hayward@arm.com>
7477
7478 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7479 (print_gp_register_row): Use get_frame_register_value.
7480
27bfc1d1
AH
74812017-05-08 Alan Hayward <alan.hayward@arm.com>
7482
7483 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7484 (mips_supply_fpregset): Likewise.
7485 (mips64_supply_gregset): Likewise.
7486
146e6c5c
AH
74872017-05-08 Alan Hayward <alan.hayward@arm.com>
7488
7489 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
7490 regcache->raw_supply_zeroed.
7491
e50f25ec
SDJ
74922017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7493
7494 * configure.nat: Rearrange 'case' statements to match
7495 host before cpu.
7496
21ea5acd
SDJ
74972017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7498
7499 * Makefile.in: Remove "@host_makefile_frag@". Add variables
7500 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7501 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
7502 "@nat_extra_makefile_frag@".
7503 (Makefile): Remove dependency on "@frags@".
7504 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7505 (data-directory/Makefile): Likewise.
7506 * config/aarch64/linux.mh: Deleted; moved contents to
7507 "gdb/configure.nat".
7508 * config/alpha/alpha-linux.mh: Likewise.
7509 * config/alpha/nbsd.mh: Likewise.
7510 * config/arm/linux.mh: Likewise.
7511 * config/arm/nbsdelf.mh: Likewise.
7512 * config/i386/cygwin.mh: Likewise.
7513 * config/i386/cygwin64.mh: Likewise.
7514 * config/i386/darwin.mh: Likewise.
7515 * config/i386/fbsd.mh: Likewise.
7516 * config/i386/fbsd64.mh: Likewise.
7517 * config/i386/go32.mh: Likewise.
7518 * config/i386/i386gnu.mh: Likewise.
7519 * config/i386/i386sol2.mh: Likewise.
7520 * config/i386/linux.mh: Likewise.
7521 * config/i386/linux64.mh: Likewise.
7522 * config/i386/mingw.mh: Likewise.
7523 * config/i386/mingw64.mh: Likewise.
7524 * config/i386/nbsd64.mh: Likewise.
7525 * config/i386/nbsdelf.mh: Likewise.
7526 * config/i386/nto.mh: Likewise.
7527 * config/i386/obsd.mh: Likewise.
7528 * config/i386/obsd64.mh: Likewise.
7529 * config/i386/sol2-64.mh: Likewise.
7530 * config/ia64/linux.mh: Likewise.
7531 * config/m32r/linux.mh: Likewise.
7532 * config/m68k/linux.mh: Likewise.
7533 * config/m68k/nbsdelf.mh: Likewise.
7534 * config/m68k/obsd.mh: Likewise.
7535 * config/m88k/obsd.mh: Likewise.
7536 * config/mips/fbsd.mh: Likewise.
7537 * config/mips/linux.mh: Likewise.
7538 * config/mips/nbsd.mh: Likewise.
7539 * config/mips/obsd64.mh: Likewise.
7540 * config/pa/linux.mh: Likewise.
7541 * config/pa/nbsd.mh: Likewise.
7542 * config/pa/obsd.mh: Likewise.
7543 * config/powerpc/aix.mh: Likewise.
7544 * config/powerpc/fbsd.mh: Likewise.
7545 * config/powerpc/linux.mh: Likewise.
7546 * config/powerpc/nbsd.mh: Likewise.
7547 * config/powerpc/obsd.mh: Likewise.
7548 * config/powerpc/ppc64-linux.mh: Likewise.
7549 * config/powerpc/spu-linux.mh: Likewise.
7550 * config/s390/linux.mh: Likewise.
7551 * config/sh/nbsd.mh: Likewise.
7552 * config/sparc/fbsd.mh: Likewise.
7553 * config/sparc/linux.mh: Likewise.
7554 * config/sparc/linux64.mh: Likewise.
7555 * config/sparc/nbsd64.mh: Likewise.
7556 * config/sparc/nbsdelf.mh: Likewise.
7557 * config/sparc/obsd64.mh: Likewise.
7558 * config/sparc/sol2.mh: Likewise.
7559 * config/tilegx/linux.mh: Likewise.
7560 * config/vax/nbsdelf.mh: Likewise.
7561 * config/vax/obsd.mh: Likewise.
7562 * config/xtensa/linux.mh: Likewise.
7563 * config/i386/i386gnu.mn: New file, with excerpts from
7564 "config/i386/i386gnu.mh".
7565 * configure: Regenerate.
7566 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7567 *.mh files under "gdb/config".
7568 * configure.nat: New file, with contents from the
7569 "gdb/config/*/*.mh" files.
7570
7ed1acaf
TW
75712017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
7572
7573 * btrace.c (btrace_clear): Free insn vector.
7574
e13cb306
PA
75752017-05-05 Pedro Alves <palves@redhat.com>
7576
7577 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7578 * configure: Regenerate.
7579
5ed8105e
PA
75802017-05-04 Pedro Alves <palves@redhat.com>
7581
7582 * Makefile.in (SFILES): Add progspace-and-thread.c.
7583 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7584 (COMMON_OBS): Add progspace-and-thread.o.
7585 * breakpoint.c: Include "progspace-and-thread.h".
7586 (update_inserted_breakpoint_locations)
7587 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7588 Use scoped_restore_current_pspace_and_thread.
7589 (create_std_terminate_master_breakpoint): Use
7590 scoped_restore_current_program_space.
7591 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7592 (print_breakpoint_location): Use
7593 scoped_restore_current_program_space.
7594 (bp_loc_is_permanent): Use
7595 scoped_restore_current_pspace_and_thread.
7596 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7597 (download_tracepoint_locations): Use
7598 scoped_restore_current_pspace_and_thread.
7599 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7600 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7601 (enum step_over_calls_kind): Moved from inferior.h.
7602 (class scoped_restore_current_thread): New class.
7603 * gdbthread.h (make_cleanup_restore_current_thread): Delete
7604 declaration.
7605 (scoped_restore_current_thread): New class.
7606 * infcmd.c: Include "common/gdb_optional.h".
7607 (continue_1, proceed_after_attach): Use
7608 scoped_restore_current_thread.
7609 (notice_new_inferior): Use scoped_restore_current_thread.
7610 * inferior.c: Include "progspace-and-thread.h".
7611 (restore_inferior, save_current_inferior): Delete.
7612 (add_inferior_command, clone_inferior_command): Use
7613 scoped_restore_current_pspace_and_thread.
7614 * inferior.h (scoped_restore_current_inferior): New class.
7615 * infrun.c: Include "progspace-and-thread.h" and
7616 "common/gdb_optional.h".
7617 (follow_fork_inferior): Use
7618 scoped_restore_current_pspace_and_thread.
7619 (scoped_restore_exited_inferior): New class.
7620 (handle_vfork_child_exec_or_exit): Use
7621 scoped_restore_exited_inferior,
7622 scoped_restore_current_pspace_and_thread,
7623 scoped_restore_current_thread and scoped_restore.
7624 (fetch_inferior_event): Use scoped_restore_current_thread.
7625 * linespec.c (decode_line_full, decode_line_1): Use
7626 scoped_restore_current_program_space.
7627 * mi/mi-main.c: Include "progspace-and-thread.h".
7628 (exec_continue): Use scoped_restore_current_thread.
7629 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7630 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7631 * proc-service.c (ps_pglobal_lookup): Use
7632 scoped_restore_current_program_space.
7633 * progspace-and-thread.c: New file.
7634 * progspace-and-thread.h: New file.
7635 * progspace.c (release_program_space, clone_program_space): Use
7636 scoped_restore_current_program_space.
7637 (restore_program_space, save_current_program_space)
7638 (save_current_space_and_thread): Delete.
7639 (switch_to_program_space_and_thread): Moved to
7640 progspace-and-thread.c.
7641 * progspace.h (save_current_program_space)
7642 (save_current_space_and_thread): Delete declarations.
7643 (scoped_restore_current_program_space): New class.
7644 * remote.c (remote_btrace_maybe_reopen): Use
7645 scoped_restore_current_thread.
7646 * symtab.c: Include "progspace-and-thread.h".
7647 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7648 * thread.c (print_thread_info_1): Use
7649 scoped_restore_current_thread.
7650 (struct current_thread_cleanup): Delete.
7651 (do_restore_current_thread_cleanup)
7652 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7653 (scoped_restore_current_thread::~scoped_restore_current_thread):
7654 ... this new dtor.
7655 (make_cleanup_restore_current_thread): Rename/convert to ...
7656 (scoped_restore_current_thread::scoped_restore_current_thread):
7657 ... this new ctor.
7658 (thread_apply_all_command): Use scoped_restore_current_thread.
7659 (thread_apply_command): Use scoped_restore_current_thread.
7660 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7661 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7662
f6223dbb
PA
76632017-05-04 Pedro Alves <palves@redhat.com>
7664
7665 * thread.c (make_cleanup_restore_current_thread): Move
7666 find_thread_ptid call before the is_stopped call. Assert that the
7667 thread is found. Replace is_stopped call by checking the thread's
7668 state directly. Remove unnecessary NULL-thread check.
7669
3c3ae77e
PA
76702017-05-04 Pedro Alves <palves@redhat.com>
7671
7672 * corelow.c (thread_section_name): New class.
7673 (get_core_register_section, get_core_siginfo): Use it.
7674
45eba0ab
AA
76752017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7676
7677 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7678 (get_core_register_section): Remove xfree of NULL pointer.
7679
f81fdd35
AH
76802017-05-03 Alan Hayward <alan.hayward@arm.com>
7681
7682 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7683 * regcache.c (regcache::raw_supply_zeroed): New function.
7684 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7685
35837774
SM
76862017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7687
7688 * gdbarch.sh: Remove commented out definition of
7689 TARGET_CHAR_BIT.
7690 * gdbarch.h: Re-generate.
7691
c94fee56
SDJ
76922017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7693
7694 * configure: Regenerate.
7695
d17f7b36
SM
76962017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7697
7698 * solib-target.c (solib_target_relocate_section_addresses):
7699 Remove num_section_bases, num_bases, segment_bases variables.
7700
b560ebd6
SM
77012017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7702
7703 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7704
f2f46dfc
SM
77052017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7706
7707 * solib-target.c: Include <vector>
7708 (struct lm_info_target) <~lm_info_target>: Remove.
7709 <segment_bases, section_bases>: Change type to
7710 std::vector<CORE_ADDR>.
7711 (library_list_start_segment, library_list_start_section,
7712 library_list_end_library,
7713 solib_target_relocate_section_addresses): Adjust.
7714
a0ff9e1a
SM
77152017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7716
7717 * gdbarch.sh (software_single_step): Change return type to
7718 std::vector<CORE_ADDR>.
7719 * gdbarch.c, gdbarch.h: Re-generate.
7720 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7721 Adjust.
7722 (arm_deal_with_atomic_sequence_raw): Adjust.
7723 (thumb_get_next_pcs_raw): Adjust.
7724 (arm_get_next_pcs_raw): Adjust.
7725 (arm_get_next_pcs): Adjust.
7726 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7727 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7728 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7729 (alpha_software_single_step): Adjust.
7730 * alpha-tdep.h (alpha_software_single_step): Adjust.
7731 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7732 * arm-tdep.c (arm_software_single_step): Adjust.
7733 (arm_breakpoint_kind_from_current_state): Adjust.
7734 * arm-tdep.h (arm_software_single_step): Adjust.
7735 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7736 * cris-tdep.c (cris_software_single_step): Adjust.
7737 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7738 (micromips_deal_with_atomic_sequence): Adjust.
7739 (deal_with_atomic_sequence): Adjust.
7740 (mips_software_single_step): Adjust.
7741 * mips-tdep.h (mips_software_single_step): Adjust.
7742 * moxie-tdep.c (moxie_software_single_step): Adjust.
7743 * nios2-tdep.c (nios2_software_single_step): Adjust.
7744 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7745 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7746 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7747 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7748 * sparc-tdep.c (sparc_software_single_step): Adjust.
7749 * spu-tdep.c (spu_software_single_step): Adjust.
7750 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7751
ea480a30
SM
77522017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7753
7754 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7755 * gdbarch.h: Re-generate.
7756
d050f7d7
TW
77572017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7758
7759 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7760 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7761 * python/py-instruction.c, python/py-instruction.h: New file.
7762 * python/py-record.c: Add py-instruction.h include.
7763 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7764 gdb.RecordInstruction.
7765 * python/python-internal.h: Add gdbpy_initialize_instruction
7766 declaration.
7767 * python/python.c (do_start_initialization): Add
7768 gdbpy_initialize_instruction.
7769
14f819c8
TW
77702017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7771
7772 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7773 Remove.
7774 (btrace_func_from_recpy_func): New function.
7775 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7776 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7777 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7778 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7779 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7780 Also, use new helper functions.
7781 (btpy_list_item): Use new helper functions.
7782 (recpy_bt_function_call_history): Use new type name.
7783 (btpy_call_getset): Remove.
7784 (gdbpy_initialize_btrace): Remove code to initialize
7785 gdb.BtraceFunctionCall.
7786 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7787 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7788 recpy_bt_func_prev, recpy_bt_func_next): New export.
7789 * python/py-record.c (recpy_func_type): New static object.
7790 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7791 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7792 recpy_func_next): New function.
7793 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7794 (recpy_func_getset): New static object.
7795 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7796 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7797
0ed5da75
TW
77982017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7799
7800 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7801 (btpy_object, btpy_insn_type, btpy_new): Remove.
7802 (btpy_list_object): Use gdb.RecordInstruction type instead of
7803 gdb.BtraceInstruction type.
7804 (btrace_insn_from_recpy_insn): New function.
7805 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7806 btpy_new.
7807 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7808 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7809 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7810 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7811 instead of btpy_object.
7812 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7813 btpy_insn_data, btpy_insn_decode): Rename to ...
7814 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7815 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7816 recpy_bt_insn_decode): This. Also, use new helper functions.
7817 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7818 recpy_insn_type.
7819 (btpy_insn_getset): Remove.
7820 (gdbpy_initialize_btrace): Remove code to initialize
7821 gdb.BtraceInstruction. Use recpy_element_object.
7822 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7823 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7824 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7825 * python/py-record.c (recpy_insn_type): New static object.
7826 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7827 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7828 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7829 New function.
7830 (recpy_insn_getset): New static object.
7831 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7832 * python/py-record.h (recpy_element_object): New typedef.
7833 (recpy_insn_type, recpy_insn_new): New export.
7834
913aeadd
TW
78352017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7836
7837 * py-record-btrace.c (btpy_insn_new): Removed.
7838 (btpy_insn_or_gap_new): New function.
7839 (btpy_insn_error): Removed.
7840 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7841 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7842 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7843 btpy_insn_or_gap_new instead of btpy_insn_new.
7844 (btpy_insn_getset): Remove btpy_insn_error.
7845 * py-record.c (recpy_gap_type): New static object.
7846 (recpy_gap_object): New typedef.
7847 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7848 recpy_gap_reason_string): New function.
7849 (recpy_gap_getset): New static object.
7850 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7851 * py-record.h (recpy_gap_new): New export.
7852
a3be24ad
TW
78532017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7854
7855 * python/py-record.c (recpy_ptid): Remove.
7856 (recpy_record_getset): Remove recpy_ptid.
7857
ae20e79a
TW
78582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7859
7860 * btrace.c (btrace_fetch): Set inferior_ptid.
7861 * python/py-record-btrace.c: Add "py-record.h" include.
7862 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7863 recpy_bt_end, recpy_bt_instruction_history,
7864 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7865 in gdb.Record object instead of current ptid.
7866 * python/py-record.c: Include new "py-record.h" file.
7867 (recpy_record_object): Moved to py-record.h.
7868 * python/py-record.h: New file.
7869
8d0050ea
TW
78702017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7871
7872 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7873 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7874 indentation.
7875
3f380b50
JB
78762017-05-01 Joel Brobecker <brobecker@adacore.com>
7877
7878 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7879 the past maintainers section.
7880
07495424
YQ
78812017-04-28 Yao Qi <yao.qi@linaro.org>
7882
7883 * infcmd.c (get_return_value): Use regcache ctor, and remove
7884 cleanup.
7885
deb1fa3e
YQ
78862017-04-28 Yao Qi <yao.qi@linaro.org>
7887 Pedro Alves <palves@redhat.com>
7888
7889 * regcache.c (regcache::regcache): New tag dispatch ctor.
7890 (do_cooked_read): Moved above.
7891 (regcache_dup): Use the tag dispatch ctor..
7892 * regcache.h (regcache): Declare ctor, delete copy ctor and
7893 assignment operator, remove friend regcache_dup.
7894
b421c83c
YQ
78952017-04-28 Yao Qi <yao.qi@linaro.org>
7896
7897 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7898 call method save instead of regcache_cpy.
7899 * regcache.h (struct regcache): Make regcache_dup a friend.
7900
ef79d9a3
YQ
79012017-04-28 Yao Qi <yao.qi@linaro.org>
7902
7903 * regcache.c (struct regcache): Move to regcache.h
7904 (regcache::arch): New method.
7905 (regcache_get_ptid): Update.
7906 (get_regcache_arch): Call arch method.
7907 (get_regcache_aspace): Call method aspace.
7908 (register_buffer): Change it to method.
7909 (regcache_save): Change it to regcache::save.
7910 (regcache_restore): Likewise.
7911 (regcache_cpy_no_passthrough): Remove the declaration.
7912 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7913 (regcache_cpy_no_passthrough): Change it to method
7914 cpy_no_passthrough.
7915 (regcache_register_status): Change it to method
7916 get_register_status.
7917 (regcache_invalidate): Change it to method invalidate.
7918 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7919 (regcache_raw_update): Change it to method raw_update.
7920 (regcache_raw_read): Likewise.
7921 (regcache_raw_read_signed): Likewise.
7922 (regcache_raw_read_unsigned): Likewise.
7923 (regcache_raw_write_signed): Likewise.
7924 (regcache_raw_write_unsigned): Likewise.
7925 (regcache_cooked_read): Likewise.
7926 (regcache_cooked_read_value): Likewise.
7927 (regcache_cooked_read_signed): Likewise.
7928 (regcache_cooked_read_unsigned): Likewise.
7929 (regcache_cooked_write_signed): Likewise.
7930 (regcache_cooked_write_unsigned): Likewise.
7931 (regcache_raw_set_cached_value): Likewise.
7932 (regcache_raw_write): Likewise.
7933 (regcache_cooked_write): Likewise.
7934 (regcache_xfer_part): Likewise.
7935 (regcache_raw_read_part): Likewise.
7936 (regcache_raw_write_part): Likewise.
7937 (regcache_cooked_read_part): Likewise.
7938 (regcache_cooked_write_part): Likewise.
7939 (regcache_raw_supply): Likewise.
7940 (regcache_raw_collect): Likewise.
7941 (regcache_transfer_regset): Likewise.
7942 (regcache_supply_regset): Likewise.
7943 (regcache_collect_regset): Likewise.
7944 (regcache_debug_print_register): Likewise.
7945 (enum regcache_dump_what): Move it to regcache.h.
7946 (regcache_dump): Change it to method dump.
7947 * regcache.h (enum regcache_dump_what): New.
7948 (class regcache): New.
7949 * target.c (target_fetch_registers): Call method
7950 debug_print_register.
7951 (target_store_registers): Likewise.
7952
f8fdb78e
SM
79532017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7954
7955 * windows-nat.c (struct lm_info_windows): Initialize field.
7956 (windows_make_so): Allocate lm_info_windows with new.
7957 (windows_free_so): Free lm_info_windows with delete.
7958
9ccbfd7b
SM
79592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7960
7961 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7962 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7963 cleanup.
7964 (darwin_free_so): Free lm_info_darwin with delete.
7965
76e75227
SM
79662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7967
7968 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7969 <l_addr_p>: Change type to bool.
7970 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7971 (svr4_free_so): Free lm_info_svr4 with delete.
7972 (svr4_copy_library_list): Replace memcpy with call to copy
7973 constructor.
7974 (library_list_start_library, svr4_default_sos): Allocate
7975 lm_info_svr4 with new.
7976
51046d9e
SM
79772017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7978
7979 * solib-target.c (struct lm_info_target): Add destructor,
7980 initialize fields.
7981 <name>: Change type to std::string.
7982 (library_list_start_library): Allocate lm_info_target with new.
7983 (solib_target_free_library_list): Free lm_info_target with
7984 delete.
7985 (solib_target_current_sos): Adapt to std::string.
7986 (solib_target_free_so): Free lm_info_target with delete.
7987
4023ae76
SM
79882017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7989
7990 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7991 fields.
7992 (frv_current_sos): Allocate lm_info_frv with new.
7993 (frv_relocate_main_executable): Free lm_info_frv with delete,
7994 allocate with new.
7995 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7996
af43057b
SM
79972017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7998
7999 * solib-frv.c (struct lm_info_frv): Fix indentation.
8000
b0911207
SM
80012017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8002
8003 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8004 map field.
8005 (dsbt_current_sos): Allocate lm_info_dsbt with new.
8006 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8007 and allocate with new.
8008 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8009
6c401f72
SM
80102017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8011
8012 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8013 <filename, member_name>: Change type to std::string.
8014 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8015 (library_list_start_library): Allocate lm_info_aix with new.
8016 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8017 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8018 with copy constructor.
8019
d0e449a1
SM
80202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8021
8022 * solist.h (struct lm_info): Remove.
8023 (struct lm_info_base): New class.
8024 (struct so_list) <lm_info>: Change type to lm_info_base *.
8025 * nto-tdep.c (struct lm_info): Remove.
8026 (lm_addr): Adjust.
8027 * solib-aix.c (struct lm_info): Rename to ...
8028 (struct lm_info_aix): ... this. Extend lm_info_base.
8029 (lm_info_p): Rename to ...
8030 (lm_info_aix_p): ... this, and adjust.
8031 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8032 solib_aix_parse_libraries, library_list_start_library,
8033 solib_aix_free_library_list, solib_aix_parse_libraries,
8034 solib_aix_get_library_list,
8035 solib_aix_relocate_section_addresses, solib_aix_free_so,
8036 solib_aix_get_section_offsets,
8037 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8038 Adjust.
8039 (struct solib_aix_inferior_data) <library_list>: Adjust.
8040 * solib-darwin.c (struct lm_info): Rename to ...
8041 (struct lm_info_darwin): ... this. Extend lm_info_base.
8042 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8043 * solib-dsbt.c (struct lm_info): Rename to ...
8044 (struct lm_info_dsbt): ... this. Extend lm_info_base.
8045 (struct dsbt_info) <main_executable_lm_info): Adjust.
8046 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8047 dsbt_relocate_section_addresses): Adjust.
8048 * solib-frv.c (struct lm_info): Rename to ...
8049 (struct lm_info_frv): ... this. Extend lm_info_base.
8050 (main_executable_lm_info): Adjust.
8051 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8052 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8053 find_canonical_descriptor_in_load_object,
8054 frv_fdpic_find_canonical_descriptor): Adjust.
8055 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8056 to lm_info_svr4.
8057 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8058 svr4_clear_so, svr4_copy_library_list,
8059 library_list_start_library, svr4_default_sos, svr4_read_so_list,
8060 svr4_current_sos, svr4_fetch_objfile_link_map,
8061 solist_update_incremental): Adjust.
8062 * solib-svr4.h (struct lm_info_svr4): Move here from
8063 solib-svr4.c.
8064 * solib-target.c (struct lm_info): Rename to ...
8065 (struct lm_info_target): ... this. Extend lm_info_base.
8066 (lm_info_p): Rename to ...
8067 (lm_info_target_p): ... this.
8068 (solib_target_parse_libraries, library_list_start_segment,
8069 library_list_start_section, library_list_start_library,
8070 library_list_end_library, solib_target_free_library_list,
8071 solib_target_current_sos, solib_target_free_so,
8072 solib_target_relocate_section_addresses): Adjust.
8073 * windows-nat.c (struct lm_info): Rename to ...
8074 (struct lm_info_windows): ... this. Extend lm_info_base.
8075 (windows_make_so, handle_load_dll, handle_unload_dll,
8076 windows_xfer_shared_libraries): Adjust.
8077
434a4023
SM
80782017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8079
8080 * solib-darwin.c (struct darwin_so_list): Remove.
8081 (darwin_current_sos): Allocate an so_list object instead of a
8082 darwin_so_list, separately allocate an lm_info object.
8083 (darwin_free_so): Free lm_info.
8084
428544e8
JB
80852017-04-28 John Baldwin <jhb@FreeBSD.org>
8086
8087 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8088 with fprintf_filtered.
8089
4621115f
YQ
80902017-04-28 Yao Qi <yao.qi@linaro.org>
8091
8092 * regcache.c (regcache::regcache): New function.
8093 (regcache::~regcache): New function.
8094 (regcache_xmalloc_1): Remove.
8095 (regcache_xmalloc): Call new regcache.
8096 (regcache_xfree): Call delete regcache.
8097 (get_thread_arch_aspace_regcache): Call new regcache.
8098
339053c2
YQ
80992017-04-28 Yao Qi <yao.qi@linaro.org>
8100
8101 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8102 lwp instead of ptid_get_lwp.
8103
7974a605
YQ
81042017-04-28 Yao Qi <yao.qi@linaro.org>
8105
8106 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8107 lwp_info instead of getting from inferior_ptid.
8108
e15c3eb4
KS
81092017-04-27 Keith Seitz <keiths@redhat.com>
8110
8111 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8112 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8113 (CV_CONVERSION_BADNESS): Define.
8114 (rank_one_type): Remove overly restrictive rvalue reference
8115 rank checks.
8116 Add cv-qualifier checks and subranks for type equality.
8117 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8118 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8119 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8120
72bc1d24
SM
81212017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8122
8123 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8124 count when creating the object.
8125
55bcecda
UW
81262017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8127 Ulrich Weigand <uweigand@de.ibm.com>
8128
8129 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8130 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8131 is used in AIX.
8132 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8133 (process_xcoff_symbol): Likewise.
8134 (scan_xcoff_symtab): Likewise.
8135
5c99fcf8
AH
81362017-04-26 Alan Hayward <alan.hayward@arm.com>
8137
8138 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8139 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8140 (ia64_access_reg): Use get_frame_register_unsigned.
8141 (ia64_access_rse_reg): Likewise.
8142 (ia64_libunwind_frame_prev_register): Likewise.
8143
b41c5a85
JW
81442017-04-26 Jiong Wang <jiong.wang@arm.com>
8145
8146 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8147 * gdbarch.c: Regenerated.
8148 * gdbarch.h: Regenerated.
8149 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8150 visibility external.
8151 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8152 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8153 (enum cfa_how_kind): Move to ...
8154 (struct dwarf2_frame_state_reg_info): Likewise.
8155 (struct dwarf2_frame_state): Likewise.
8156 * dwarf2-frame.h: ... here.
8157 (dwarf2_frame_state_alloc_regs): New declaration.
8158 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8159 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8160
c185f580
AH
81612017-04-26 Alan Hayward <alan.hayward@arm.com>
8162
8163 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8164 regcache_raw_read_unsigned.
8165 (xtensa_pseudo_register_write): Likewise.
8166
19c45594
AH
81672017-04-26 Alan Hayward <alan.hayward@arm.com>
8168
8169 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8170 (nds32_pseudo_register_write): Likewise.
8171
4658f12e
YQ
81722017-04-25 Yao Qi <yao.qi@linaro.org>
8173
8174 * regcache.c (struct regcache) <readonly_p>: Change its type
8175 to bool.
8176 (regcache_xmalloc_1): Update parameter type and callers update.
8177
d581dda8
YQ
81782017-04-25 Yao Qi <yao.qi@linaro.org>
8179
8180 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8181 set_gdbarch_wchar_bit.
8182 * arm-tdep.c (arm_gdbarch_init): Likewise.
8183
debed3db
PA
81842017-04-25 Pedro Alves <palves@redhat.com>
8185
8186 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8187 (BothAreRelocatable, memcopy, memmove): Don't define.
8188 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8189 macros.
8190
b0b92aeb
PA
81912017-04-25 Pedro Alves <palves@redhat.com>
8192
8193 * common/common-defs.h: Include "common/poison.h".
8194 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8195 and adjust.
8196 * common/poison.h: New file.
8197 * common/traits.h: Include <type_traits>.
8198 (Not, Or, Requires): New, moved from common/function-view.h.
8199
16c4d54a
PA
82002017-04-25 Pedro Alves <palves@redhat.com>
8201
8202 * breakpoint.h (struct breakpoint): In-class initialize all
8203 fields. Make boolean fields "bool".
8204 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8205 memset call and initializations no longer necessary.
8206
b5c36682
PA
82072017-04-25 Pedro Alves <palves@redhat.com>
8208
8209 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8210 reference.
8211 (pt_btrace_insn): New function.
8212 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8213
5625a286
PA
82142017-04-25 Pedro Alves <palves@redhat.com>
8215
8216 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8217 "base" field and inherit from "bp_location" instead. Add
8218 non-default ctor.
8219 (allocate_location_exception): Use new non-default ctor.
8220 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8221 (init_bp_location): Convert to ...
8222 (bp_location::bp_location): ... this new ctor, and remove memset
8223 call.
8224 (base_breakpoint_allocate_location): Use the new non-default ctor.
8225 * breakpoint.h (bp_location): Now a class. Declare default and
8226 non-default ctors. In-class initialize all members.
8227 (init_bp_location): Remove declaration.
8228
23bcc18f
PA
82292017-04-25 Pedro Alves <palves@redhat.com>
8230
8231 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8232 assignment operator.
8233
e1ba3053
YQ
82342017-04-24 Yao Qi <yao.qi@linaro.org>
8235
8236 * doublest.c (convert_doublest_to_floatformat): Call
8237 floatformat_totalsize_bytes.
8238
10f489e5
TT
82392017-04-22 Tom Tromey <tom@tromey.com>
8240
8241 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8242 ui_out_emit_list.
8243 * stack.c (print_frame): Use ui_out_emit_list.
8244 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8245 ui_out_emit_list.
8246 * mi/mi-main.c (print_one_inferior)
8247 (mi_cmd_data_list_register_names)
8248 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8249 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8250 ui_out_emit_list.
8251 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8252 (mi_output_solib_attribs): Use ui_out_emit_list,
8253 ui_out_emit_tuple.
8254 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8255 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8256 (mi_cmd_stack_list_args, list_args_or_locals): Use
8257 ui_out_emit_list.
8258 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8259 * breakpoint.c (print_solib_event, output_thread_groups): Use
8260 ui_out_emit_list.
8261
0092b74d
TT
82622017-04-22 Tom Tromey <tom@tromey.com>
8263
8264 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8265 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8266 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8267
a14a62dd
TT
82682017-04-22 Tom Tromey <tom@tromey.com>
8269
8270 * tracepoint.c (tvariables_info_1)
8271 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8272
46b9c129
TT
82732017-04-22 Tom Tromey <tom@tromey.com>
8274
8275 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8276 annotate_arg_emitter.
8277 * breakpoint.c (print_mention_watchpoint)
8278 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8279 * annotate.h (struct annotate_arg_emitter): New.
8280
2e783024
TT
82812017-04-22 Tom Tromey <tom@tromey.com>
8282
8283 * record-btrace.c (record_btrace_insn_history)
8284 (record_btrace_insn_history_range, record_btrace_call_history)
8285 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8286 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8287 ui_out_emit_tuple.
8288 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8289 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8290 * skip.c (skip_info): Use ui_out_emit_tuple.
8291 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8292 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8293 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8294 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8295 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8296 ui_out_emit_tuple.
8297 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8298 (output_register, mi_cmd_data_read_memory)
8299 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8300 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8301 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8302 Use ui_out_emit_tuple.
8303 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8304 ui_out_emit_tuple.
8305 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8306 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8307 * linux-thread-db.c (info_auto_load_libthread_db): Use
8308 ui_out_emit_tuple.
8309 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8310 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8311 * disasm.c (do_mixed_source_and_assembly_deprecated)
8312 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8313 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8314 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8315 * breakpoint.c (print_one_breakpoint_location)
8316 (print_one_breakpoint): Use ui_out_emit_tuple.
8317 * auto-load.c (print_script, info_auto_load_cmd): Use
8318 ui_out_emit_tuple.
8319 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8320
9be21bb4
SM
83212017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8322
8323 * thread.c (print_thread_info_1): Remove dead code.
8324
0d4c07af
JK
83252017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8326
8327 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8328 GDB_SELF_TEST.
8329 * arm-tdep.c (selftests::arm_record_test): Likewise.
8330
4daf993d
YQ
83312017-04-21 Yao Qi <yao.qi@linaro.org>
8332
8333 * regcache.c (regcache_restore): Remove argument 2. Replace
8334 argument 3 with regcache. Get register status from
8335 src->register_status and get register contents from
8336 register_buffer (src, regnum).
8337 (regcache_cpy): Update.
8338
a6c21d4a
PA
83392017-04-19 Pedro Alves <palves@redhat.com>
8340
8341 * gdbthread.h (thread): Add missing closing parenthesis in
8342 comment.
8343
3a3fd0fd
PA
83442017-04-19 Pedro Alves <palves@redhat.com>
8345
8346 * common/refcounted-object.h: New file.
8347 * gdbthread.h: Include "common/refcounted-object.h".
8348 (thread_info): Inherit from refcounted_object and add comments.
8349 (thread_info::incref, thread_info::decref)
8350 (thread_info::m_refcount): Delete.
8351 (thread_info::deletable): Use the refcounted_object::refcount()
8352 method.
8353 * inferior.c (current_inferior_): Add comment.
8354 (set_current_inferior): Increment/decrement refcounts.
8355 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8356 not-deletable instead of comparing with the current inferior.
8357 (initialize_inferiors): Increment the initial inferior's refcount.
8358 * inferior.h (struct inferior): Forward declare.
8359 Include "common/refcounted-object.h".
8360 (current_inferior, set_current_inferior): Move declaration to
8361 before struct inferior's definition, and fix comment.
8362 (inferior): Inherit from refcounted_object. Add comments.
8363 * thread.c (switch_to_thread_no_regs): Reference the thread's
8364 inferior pointer directly instead of doing a ptid lookup.
8365 (switch_to_no_thread): New function.
8366 (switch_to_thread(thread_info *)): New function, factored out
8367 from ...
8368 (switch_to_thread(ptid_t)): ... this.
8369 (restore_current_thread): Delete.
8370 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8371 fields, and add 'inf' field.
8372 (do_restore_current_thread_cleanup): Check whether old->inf is
8373 alive instead of looking up an inferior by ptid. Use
8374 switch_to_thread and switch_to_no_thread.
8375 (restore_current_thread_cleanup_dtor): Use old->inf directly
8376 instead of lookup up an inferior by id. Decref the inferior.
8377 Don't restore 'removable'.
8378 (make_cleanup_restore_current_thread): Same the inferior pointer
8379 in old, instead of the inferior number. Incref the inferior.
8380 Don't save/clear 'removable'.
8381
9bcb1f16
PA
83822017-04-19 Pedro Alves <palves@redhat.com>
8383
8384 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8385 unittests/scoped_restore-selftests.c.
8386 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8387 * common/scoped_restore.h (scoped_restore_base): Make "class".
8388 (scoped_restore_base::release): New public method.
8389 (scoped_restore_base::scoped_restore_base): New protected ctor.
8390 (scoped_restore_base::m_saved_var): New protected field.
8391 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8392 scoped_restore_base base class instead of m_saved_var directly.
8393 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8394 (scoped_restore_tmpl::scoped_restore_tmpl(const
8395 scoped_restore_tmpl<T>&)): Likewise.
8396 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8397 method.
8398 (scoped_restore_tmpl::saved_var): New method.
8399 (scoped_restore_tmpl::m_saved_var): Delete.
8400 * inferior.h (inferior::detaching): Now a bool.
8401 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8402 cleanup.
8403 * unittests/scoped_restore-selftests.c: New file.
8404
26fcd539
PA
84052017-04-19 Pedro Alves <palves@redhat.com>
8406
8407 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8408 Re-sort in alphabetic order.
8409
fdd243b0
PA
84102017-04-18 Pedro Alves <palves@redhat.com>
8411
8412 * xml-support.c (obstack_xml_printf): Delete.
8413 * xml-support.h (obstack_xml_printf): Delete.
8414
4895cde2
PA
84152017-04-18 Pedro Alves <palves@redhat.com>
8416
8417 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8418 vdebug, verror, body_text, start_element, end_element, name,
8419 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8420 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8421 is_xinclude>: Make private and add m_ prefix.
8422 (gdb_xml_parser::body_text): New method, based on ...
8423 (gdb_xml_body_text): ... this. Adjust.
8424 (gdb_xml_parser::vdebug): New method, based on ...
8425 (gdb_xml_debug): ... this. Adjust.
8426 (gdb_xml_parser::verror): New method, based on ...
8427 (gdb_xml_error): ... this. Adjust.
8428 (gdb_xml_parser::start_element): New method, based on ...
8429 (gdb_xml_start_element): ... this. Adjust.
8430 (gdb_xml_start_element_wrapper): Defer to
8431 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8432 (gdb_xml_parser::end_element): New method, based on ...
8433 (gdb_xml_end_element_wrapper): ... this. Adjust.
8434 (gdb_xml_parser::~gdb_xml_parser): Adjust.
8435 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8436 (gdb_xml_parser::use_dtd): New method, based on ...
8437 (gdb_xml_use_dtd): ... this. Adjust.
8438 (gdb_xml_parser::parse): New method, based on ...
8439 (gdb_xml_parse): ... this. Adjust.
8440 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8441 (xinclude_start_include): Adjust to call the parser's name method.
8442 (xml_xinclude_default, xml_xinclude_start_doctype)
8443 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8444 method.
8445 (xml_process_xincludes): Adjust to call parser methods.
8446 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8447 declarations.
8448
bd8a901f
PA
84492017-04-18 Pedro Alves <palves@redhat.com>
8450
8451 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8452 gdb::optional<std::string>.
8453 * xml-support.c: Include <string>.
8454 (scope_level::scope_level(scope_level &&))
8455 (scope_level::~scope_level): Delete.
8456 (scope_level::body): Now a std::string.
8457 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8458 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8459 parameter.
8460 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8461 (xinclude_parsing_data::output): Now a std::string reference.
8462 (xinclude_start_include): Adjust.
8463 (xml_xinclude_default): Adjust.
8464 (xml_process_xincludes): Add 'output' parameter, and return bool.
8465 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8466 and return bool.
8467 * xml-tdesc.c: Include <unordered_map> and <string>.
8468 (tdesc_xml_cache): Delete.
8469 (tdesc_xml_cache_s): Delete.
8470 (xml_cache): Now an std::unordered_map.
8471 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8472 (target_fetch_description_xml): Change return type to
8473 gdb::optional<std::string>, and adjust.
8474 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8475 (target_fetch_description_xml): Change return type to
8476 gdb::optional<std::string>.
8477
d35d1958
PA
84782017-04-18 Pedro Alves <palves@redhat.com>
8479
8480 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8481 unittests/optional-selftests.c.
8482 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8483 * unittests/optional-selftests.c: New file.
8484 * unittests/optional/assignment/1.cc: New file.
8485 * unittests/optional/assignment/2.cc: New file.
8486 * unittests/optional/assignment/3.cc: New file.
8487 * unittests/optional/assignment/4.cc: New file.
8488 * unittests/optional/assignment/5.cc: New file.
8489 * unittests/optional/assignment/6.cc: New file.
8490 * unittests/optional/assignment/7.cc: New file.
8491 * unittests/optional/cons/copy.cc: New file.
8492 * unittests/optional/cons/default.cc: New file.
8493 * unittests/optional/cons/move.cc: New file.
8494 * unittests/optional/cons/value.cc: New file.
8495 * unittests/optional/in_place.cc: New file.
8496 * unittests/optional/observers/1.cc: New file.
8497 * unittests/optional/observers/2.cc: New file.
8498
22796e97
PA
84992017-04-18 Pedro Alves <palves@redhat.com>
8500
8501 * common/gdb_optional.h: Include common/traits.h.
8502 (in_place_t): New type.
8503 (in_place): New constexpr variable.
8504 (optional::optional): Remove member initialization of
8505 m_instantiated.
8506 (optional::optional(in_place_t...)): New constructor.
8507 (optional::~optional): Use reset.
8508 (optional::optional(const optional&)): New.
8509 (optional::optional(const optional&&)): New.
8510 (optional::optional(T &)): New.
8511 (optional::optional(T &&)): New.
8512 (operator::operator=(const optional &)): New.
8513 (operator::operator=(optional &&)): New.
8514 (operator::operator= (const T &))
8515 (operator::operator= (T &&))
8516 (operator::emplace (Args &&... args)): Return a T&. Use reset.
8517 (operator::reset): New.
8518 (operator::m_instantiated):: Add in-class initializer.
8519 * common/traits.h: Include <type_traits>.
8520 (struct And): New types.
8521
a7fc9b61
PA
85222017-04-18 Pedro Alves <palves@redhat.com>
8523
8524 * xml-support.c: Include <vector>.
8525 (scope_level::scope_level(const gdb_xml_element *))
8526 (scope_level::scope_level(scope_level&&)): New.
8527 (scope_level::~scope_level): New.
8528 (scope_level_s): Delete.
8529 (gdb_xml_parser::scopes): Now a std::vector.
8530 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8531 Use std::vector.
8532 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8533 scope cleanup code.
8534 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8535 of the scopes member. Use std::vector::emplace_back.
8536
010151c9
PA
85372017-04-18 Pedro Alves <palves@redhat.com>
8538
8539 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
8540 a bool.
8541 (gdb_xml_end_element): Change type of first parameter.
8542 (gdb_xml_cleanup): Rename to ...
8543 (gdb_xml_parser::~gdb_xml_parser): ... this.
8544 (gdb_xml_create_parser_and_cleanup): Delete with ...
8545 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8546 to this new ctor.
8547 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8548 using gdb_xml_create_parser_and_cleanup.
8549 (xinclude_parsing_data): Add ctor/dtor.
8550 (xml_xinclude_cleanup): Delete.
8551 (xml_process_xincludes): Create a local xinclude_parsing_data
8552 instead of heap-allocating one. Create a local gdb_xml_parser
8553 instead of heap-allocating one with
8554 gdb_xml_create_parser_and_cleanup.
8555
d56060f0
JB
85562017-04-18 John Baldwin <jhb@FreeBSD.org>
8557
8558 PR threads/20743
8559 * fbsd-nat.c (resume_one_thread_cb): Remove.
8560 (resume_all_threads_cb): Remove.
8561 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8562 iterate_over_threads.
8563
305d16a9
JB
85642017-04-17 Joel Brobecker <brobecker@adacore.com>
8565
8566 * NEWS: Create a new section for the next release branch.
8567 Rename the section of the current branch, now that it has
8568 been cut.
8569
8bb57231
JB
85702017-04-17 Joel Brobecker <brobecker@adacore.com>
8571
8572 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8573 * version.in: Bump version to 8.0.50.DATE-git.
8574
096c92dd
SDJ
85752017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
8576
8577 PR gdb/21385
8578 * windows-nat.c (windows_create_inferior): Declare 'allargs'
8579 independently of the host, and fix build breakage on Cygwin.
8580
0550c955
PA
85812017-04-13 Pedro Alves <palves@redhat.com>
8582
8583 * inferior.c (free_inferior): Convert to ...
8584 (inferior::~inferior): ... this dtor.
8585 (inferior::inferior): New ctor, factored out from ...
8586 (add_inferior_silent): ... here. Allocate the inferior with a new
8587 expression.
8588 (delete_inferior): Call delete instead of free_inferior.
8589 * inferior.h (gdb_environ, continuation): Forward declare.
8590 (inferior): Now a class. Add in-class initialization to all
8591 members. Make boolean fields bool, except 'detaching'.
8592 (inferior::inferior): New explicit ctor.
8593 (inferior::~inferior): New.
8594
e3d60dfc
PA
85952017-04-13 Pedro Alves <palves@redhat.com>
8596
8597 * inferior.c (init_inferior_list): Delete.
8598 * inferior.h (init_inferior_list): Delete.
8599
5fd69d0a
PA
86002017-04-13 Pedro Alves <palves@redhat.com>
8601
8602 PR threads/13217
8603 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8604 (top level): Call it twice, with different thread sets.
8605
c6609450
PA
86062017-04-13 Pedro Alves <palves@redhat.com>
8607
8608 * thread.c: Include <algorithm>.
8609 (thread_array_cleanup): Delete.
8610 (scoped_inc_dec_ref): New class.
8611 (live_threads_count): New function.
8612 (set_thread_refcount): Delete.
8613 (tp_array_compar_ascending): Now a bool.
8614 (tp_array_compar): Convert to a std::sort comparison function.
8615 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8616 and live_threads_count.
8617
2a00d7ce
PA
86182017-04-13 Pedro Alves <palves@redhat.com>
8619
8620 * infrun.c (follow_fork_inferior): Also switch the current
8621 inferior.
8622
441d7c93
PA
86232017-04-13 Pedro Alves <palves@redhat.com>
8624
8625 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8626 before calling create_internal_breakpoint.
8627
808480f6
PA
86282017-04-13 Pedro Alves <palves@redhat.com>
8629
8630 * fork-child.c (execv_argv): New class.
8631 (breakup_args): Refactored as ...
8632 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8633 Copy arguments to storage and replace separators with NULL
8634 terminators in place.
8635 (escape_bang_in_quoted_argument): Adjust to return bool.
8636 (execv_argv::execv_argv): New ctor.
8637 (execv_argv::init_for_shell): New method, factored out from
8638 fork_inferior. Don't strdup strings into the vector.
8639 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8640 Remove free_vector_argv call.
8641
ad3d022a
YQ
86422017-04-13 Yao Qi <yao.qi@linaro.org>
8643
8644 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8645 tdep->rx_psw_type.
8646
e6ddc3bf
YQ
86472017-04-13 Yao Qi <yao.qi@linaro.org>
8648
8649 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8650 * rx-tdep.c (rx_gdbarch_init): Likewise.
8651
bfb8cf90
PA
86522017-04-13 Pedro Alves <palves@redhat.com>
8653
8654 * breakpoint.h (struct breakpoint): Reindent.
8655
f5336ca5
PA
86562017-04-13 Pedro Alves <palves@redhat.com>
8657
8658 * breakpoint.c (bp_location): Rename to ...
8659 (bp_locations): ... this. All references updated.
8660 (bp_location_count): Rename to ...
8661 (bp_locations_count): ... this. All references updated.
8662 (bp_location_placed_address_before_address_max): Rename to ...
8663 (bp_locations_placed_address_before_address_max): ... this. All
8664 references updated.
8665 (bp_location_shadow_len_after_address_max): Rename to ...
8666 (bp_locations_shadow_len_after_address_max): ... this. All
8667 references updated.
8668 (bp_location_compare_addrs): Rename to ...
8669 (bp_locations_compare_addrs): ... this. All references updated.
8670 (bp_location_compare):Rename to ...
8671 (bp_locations_compare): ... this. All references updated.
8672 (bp_location_target_extensions_update): Rename to ...
8673 (bp_locations_target_extensions_update): ... this. All references
8674 updated.
8675
be628ab8
SDJ
86762017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8677
8678 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8679 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8680 'sgtty.h'.
8681 * common/gdb_termios.h: New file, with parts of "terminal.h".
8682 * inflow.c: Include "gdb_termios.h".
8683 * ser-unix.c: Include "gdb_termios.h".
8684 * terminal.h: Move terminal-related defines to
8685 "common/gdb_termios.h".
8686
8e9e35b1
TT
86872017-04-12 Tom Tromey <tom@tromey.com>
8688
8689 * probe.c (parse_probes): Update.
8690 * location.h (delete_event_location): Don't declare.
8691 (event_location_deleter::operator()): Update.
8692 * location.c (event_location_deleter::operator()): Rename from
8693 delete_event_location.
8694 * linespec.h (linespec_result) <location>: Change type to
8695 event_location_up.
8696 * linespec.c (canonicalize_linespec, event_location_to_sals)
8697 (decode_objc): Update.
8698 (linespec_result): Don't call delete_event_location.
8699 * breakpoint.c (create_breakpoints_sal)
8700 (bkpt_probe_create_sals_from_location)
8701 (strace_marker_create_sals_from_location): Update.
8702
16e802b9
TT
87032017-04-12 Tom Tromey <tom@tromey.com>
8704
8705 * linespec.h (struct linespec_result): Add constructor and
8706 destructor.
8707 (init_linespec_result, destroy_linespec_result)
8708 (make_cleanup_destroy_linespec_result): Don't declare.
8709 * linespec.c (init_linespec_result): Remove.
8710 (linespec_result::~linespec_result): Rename from
8711 destroy_linespec_result. Update.
8712 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8713 Remove.
8714 * breakpoint.c (create_breakpoint, break_range_command)
8715 (decode_location_default): Update.
8716 * ax-gdb.c (agent_command_1): Update.
8717
d28cd78a
TT
87182017-04-12 Tom Tromey <tom@tromey.com>
8719
8720 * remote.c (remote_download_tracepoint): Update.
8721 * python/py-breakpoint.c (bppy_get_location): Update.
8722 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8723 (gdbscm_breakpoint_location): Update.
8724 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8725 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8726 Change type to event_location_up.
8727 * breakpoint.c (create_overlay_event_breakpoint)
8728 (create_longjmp_master_breakpoint)
8729 (create_std_terminate_master_breakpoint)
8730 (create_exception_master_breakpoint)
8731 (breakpoint_event_location_empty_p, print_breakpoint_location)
8732 (print_one_breakpoint_location, create_thread_event_breakpoint)
8733 (init_breakpoint_sal, create_breakpoint)
8734 (print_recreate_ranged_breakpoint, break_range_command)
8735 (init_ada_exception_breakpoint, say_where): Update.
8736 (base_breakpoint_dtor): Don't call delete_event_location.
8737 (bkpt_print_recreate, tracepoint_print_recreate)
8738 (dprintf_print_recreate, update_static_tracepoint)
8739 (breakpoint_re_set_default): Update.
8740
711799d5
TT
87412017-04-12 Tom Tromey <tom@tromey.com>
8742
8743 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8744 type of "to_do". Update.
8745 (compute_stack_depth): Use std::vector.
8746
52d214d3
TT
87472017-04-12 Tom Tromey <tom@tromey.com>
8748
8749 * printcmd.c (find_instruction_backward): Use std::vector.
8750
4c404b8b
TT
87512017-04-12 Tom Tromey <tom@tromey.com>
8752
8753 * symfile.c (objfilep): Remove typedef.
8754 (reread_symbols): Use a std::vector.
8755
156d9eab
TT
87562017-04-12 Tom Tromey <tom@tromey.com>
8757
8758 * mi/mi-main.c (exec_direction_forward): Remove.
8759 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8760 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8761 scoped_restore.
8762 * guile/guile.c (guile_repl_command, guile_command)
8763 (gdbscm_execute_gdb_command): Use scoped_restore.
8764 * go-exp.y (go_parse): Use scoped_restore.
8765 * d-exp.y (d_parse): Use scoped_restore.
8766 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8767 * c-exp.y (c_parse): Use scoped_restore.
8768
4d89769a
TT
87692017-04-12 Tom Tromey <tom@tromey.com>
8770
8771 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8772 (mi_parse): Update return type.
8773 (mi_parse_free): Remove.
8774 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8775 (mi_parse::~mi_parse): Rename from mi_parse_free.
8776 (mi_parse_cleanup): Remove.
8777 (mi_parse): Return a unique_ptr. Use new.
8778 * mi/mi-main.c (mi_execute_command): Update.
8779
4b217cc7
TT
87802017-04-12 Tom Tromey <tom@tromey.com>
8781
8782 * location.c (explicit_location_lex_one): Return a
8783 unique_xmalloc_ptr.
8784 (string_to_explicit_location): Update. Remove cleanups.
8785
59d3651b
TT
87862017-04-12 Tom Tromey <tom@tromey.com>
8787
8788 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8789 (compare_value_and_voffset): Change type. Update.
8790 (compute_vtable_size): Change type of "offset_vec".
8791 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8792 (gnuv3_get_typeid): Remove extraneous declaration.
8793
b24b0d6c
TT
87942017-04-12 Tom Tromey <tom@tromey.com>
8795
8796 * charset.h (wchar_iterator): Fix comment.
8797
80a3b8c5
TT
87982017-04-12 Tom Tromey <tom@tromey.com>
8799
8800 * charset.c (iconv_wrapper): New class.
8801 (cleanup_iconv): Remove.
8802 (convert_between_encodings): Use it.
8803
c83dd867
TT
88042017-04-12 Tom Tromey <tom@tromey.com>
8805
8806 * symfile.h (increment_reading_symtab): Update type.
8807 * symfile.c (decrement_reading_symtab): Remove.
8808 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8809 * psymtab.c (psymtab_to_symtab): Update.
8810 * dwarf2read.c (dw2_instantiate_symtab): Update.
8811
0e8621a0
TT
88122017-04-12 Tom Tromey <tom@tromey.com>
8813
8814 * jit.c (struct jit_reader): Declare separately. Add constructor
8815 and destructor. Change type of "handle".
8816 (loaded_jit_reader): Define separately.
8817 (jit_reader_load): Update. New "new".
8818 (jit_reader_unload_command): Use "delete".
8819 * gdb-dlfcn.h (struct dlclose_deleter): New.
8820 (gdb_dlhandle_up): New typedef.
8821 (gdb_dlopen, gdb_dlsym): Update types.
8822 (gdb_dlclose): Remove.
8823 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8824 (gdb_dlsym): Change type of "handle".
8825 (make_cleanup_dlclose): Remove.
8826 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8827 * compile/compile-c-support.c (load_libcc): Update.
8828
67d89901
TT
88292017-04-12 Tom Tromey <tom@tromey.com>
8830
8831 * symtab.h (find_pcs_for_symtab_line): Change return type.
8832 * symtab.c (find_pcs_for_symtab_line): Change return type.
8833 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8834 type of "vec". Update.
8835 (ltpy_get_pcs_for_line): Update.
8836 * linespec.c (decode_digits_ordinary): Update.
8837
93921405
TT
88382017-04-12 Tom Tromey <tom@tromey.com>
8839
8840 * tracepoint.c (actions_command): Update.
8841 * python/python.c (python_command, python_interactive_command):
8842 Update.
8843 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8844 * guile/guile.c (guile_command): Update.
8845 * defs.h (read_command_lines, read_command_lines_1): Return
8846 command_line_up.
8847 (command_lines_deleter): New struct.
8848 (command_line_up): New typedef.
8849 * compile/compile.c (compile_code_command)
8850 (compile_print_command): Update.
8851 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8852 command_line_up.
8853 (make_cleanup_free_command_lines): Remove.
8854 * cli/cli-script.c (get_command_line, read_command_lines_1)
8855 (copy_command_lines): Return command_line_up.
8856 (while_command, if_command, read_command_lines, define_command)
8857 (document_command): Update.
8858 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8859 Remove.
8860 * breakpoint.h (breakpoint_set_commands): Change type of
8861 "commands".
8862 * breakpoint.c (breakpoint_set_commands): Change type of
8863 "commands". Update.
8864 (do_map_commands_command, update_dprintf_command_list)
8865 (create_tracepoint_from_upload): Update.
8866
ffc2605c
TT
88672017-04-12 Tom Tromey <tom@tromey.com>
8868
8869 * tracepoint.c (scope_info): Update.
8870 * spu-tdep.c (spu_catch_start): Update.
8871 * python/python.c (gdbpy_decode_line): Update.
8872 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8873 * python/py-breakpoint.c (bppy_init): Update.
8874 * probe.c (parse_probes): Update.
8875 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8876 * location.h (event_location_deleter): New struct.
8877 (event_location_up): New typedef.
8878 (new_linespec_location, new_address_location, new_probe_location)
8879 (new_explicit_location, copy_event_location)
8880 (string_to_event_location, string_to_event_location_basic)
8881 (string_to_explicit_location): Update return type.
8882 (make_cleanup_delete_event_location): Remove.
8883 * location.c (new_linespec_location, new_address_location)
8884 (new_probe_location, new_explicit_location, copy_event_location):
8885 Return event_location_up.
8886 (delete_event_location_cleanup)
8887 (make_cleanup_delete_event_location): Remove.
8888 (string_to_explicit_location, string_to_event_location_basic)
8889 (string_to_event_location): Return event_location_up.
8890 * linespec.c (canonicalize_linespec, event_location_to_sals)
8891 (decode_line_with_current_source)
8892 (decode_line_with_last_displayed, decode_objc): Update.
8893 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8894 * completer.c (location_completer): Update.
8895 * cli/cli-cmds.c (edit_command, list_command): Update.
8896 * breakpoint.c (create_overlay_event_breakpoint)
8897 (create_longjmp_master_breakpoint)
8898 (create_std_terminate_master_breakpoint)
8899 (create_exception_master_breakpoint)
8900 (create_thread_event_breakpoint): Update.
8901 (init_breakpoint_sal): Update. Remove some dead code.
8902 (create_breakpoint_sal): Change type of "location". Update.
8903 (create_breakpoints_sal, create_breakpoint, break_command_1)
8904 (dprintf_command, break_range_command, until_break_command)
8905 (init_ada_exception_breakpoint)
8906 (strace_marker_create_sals_from_location)
8907 (update_static_tracepoint, trace_command, ftrace_command)
8908 (strace_command, create_tracepoint_from_upload): Update.
8909 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8910 * ax-gdb.c (agent_command_1): Update.
8911
8f10c932
PA
89122017-04-12 Pedro Alves <palves@redhat.com>
8913
8914 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8915 * configure.tgt: Handle i[34567]86-*-go32* and
8916 i[34567]86-*-msdosdjgpp*.
8917 * i386-tdep.c (i386_svr4_reg_to_regnum):
8918 Make extern.
8919 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8920 i386-go32-tdep.c.
8921 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8922 * i386-go32-tdep.c: New file.
8923 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8924 declarations.
8925
0a31ccfb
SM
89262017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8927
8928 * aix-thread.c (pd_status2str): Change return type to const char *.
8929
e9bb3fbb
PA
89302017-04-12 Pedro Alves <palves@redhat.com>
8931
8932 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8933 calls to set_gdbarch_gnu_triplet_regexp.
8934
53375380
PA
89352017-04-12 Pedro Alves <palves@redhat.com>
8936
8937 PR gdb/21323
8938 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8939 New enum value.
8940 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8941 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8942 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8943 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8944 * gdbarch.h, gdbarch.c: Regenerate.
8945 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8946 gdbarch_wchar_bit and gdbarch_wchar_signed.
8947 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8948 * arm-tdep.c (arm_gdbarch_init): Likewise.
8949 * avr-tdep.c (avr_gdbarch_init): Likewise.
8950 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8951 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8952 * i386-tdep.c (i386_go32_init_abi): Likewise.
8953 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8954 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8955 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8956 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8957 * sh-tdep.c (sh_gdbarch_init): Likewise.
8958 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8959 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8960 * windows-tdep.c (windows_init_abi): Likewise.
8961 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8962
53e710ac
PA
89632017-04-12 Pedro Alves <palves@redhat.com>
8964
8965 PR c++/21323
8966 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8967 cplus_primitive_type_char32_t>: New enum values.
8968 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8969 and cplus_primitive_type_char32_t.
8970 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8971 32, use the archtecture's built-in type for char16_t and char32_t,
8972 respectively. Otherwise, fallback to init_integer_type as before,
8973 but make the type unsigned, and issue a complaint.
8974 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8975
ab0538b8
AH
89762017-04-12 Alan Hayward <alan.hayward@arm.com>
8977
5e0e0422 8978 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8979 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8980
5430098f
SDJ
89812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8982
8983 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8984 'const char *'.
8985
7c5ded6a
SDJ
89862017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8987
8988 * common/common-utils.c (free_vector_argv): New function.
8989 * common/common-utils.h: Include <vector>.
8990 (free_vector_argv): New prototype.
8991 * darwin-nat.c (darwin_create_inferior): Rewrite function
8992 prototype in order to constify "exec_file" and accept a
8993 "std::string" for "allargs".
8994 * fork-child.c: Include <vector>.
8995 (breakup_args): Rewrite function, using C++.
8996 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8997 and accept "std::string" for "allargs". Update the code to
8998 calculate "argv" based on "allargs". Update calls to "exec_fun"
8999 and "execvp".
9000 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9001 order to constify "exec_file" and accept a "std::string" for
9002 "allargs".
9003 * go32-nat.c (go32_create_inferior): Likewise.
9004 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9005 * infcmd.c (run_command_1): Constify "exec_file". Use
9006 "std::string" for inferior arguments.
9007 * inferior.h (fork_inferior): Update prototype.
9008 * linux-nat.c (linux_nat_create_inferior): Rewrite function
9009 prototype in order to constify "exec_file" and accept a
9010 "std::string" for "allargs".
9011 * nto-procfs.c (procfs_create_inferior): Likewise.
9012 * procfs.c (procfs_create_inferior): Likewise.
9013 * remote-sim.c (gdbsim_create_inferior): Likewise.
9014 * remote.c (extended_remote_run): Update code to accept
9015 "std::string" as argument.
9016 (extended_remote_create_inferior): Rewrite function prototype in
9017 order to constify "exec_file" and accept a "std::string" for
9018 "allargs".
9019 * rs6000-nat.c (super_create_inferior): Likewise.
9020 (rs6000_create_inferior): Likewise.
9021 * target.h (struct target_ops) <to_create_inferior>: Likewise.
9022 * windows-nat.c (windows_create_inferior): Likewise.
9023
ae0eee42
PA
90242017-04-11 Pedro Alves <palves@redhat.com>
9025
9026 * thread.c: Fix whitespace throughout.
9027
a6acac06
PR
90282017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
9029
9030 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9031
64403bd1
AH
90322017-04-11 Alan Hayward <alan.hayward@arm.com>
9033
9034 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9035
a5bef50f
SDJ
90362017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
9037
9038 PR gdb/21364
9039 * osdata.c (info_osdata): Check if 'type' is an empty string
9040 instead of NULL.
9041
9295a5a9
PA
90422017-04-10 Pedro Alves <palves@redhat.com>
9043
9044 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9045 (ptid_to_global_thread_id, in_thread_list)
9046 (do_captured_list_thread_ids, set_resumed, set_running)
9047 (set_executing, set_stop_requested, finish_thread_state)
9048 (validate_registers_access, can_access_registers_ptid)
9049 (print_thread_info_1, switch_to_thread)
9050 (do_restore_current_thread_cleanup)
9051 (make_cleanup_restore_current_thread, thread_command)
9052 (thread_name_command): Use operator== instead of ptid_equal.
9053
996812e3
PA
90542017-04-10 Pedro Alves <palves@redhat.com>
9055
9056 * thread.c (struct current_thread_cleanup) <next>: Delete field.
9057 (current_thread_cleanup_chain): Delete.
9058 (restore_current_thread_cleanup_dtor)
9059 (make_cleanup_restore_current_thread): Remove references to
9060 current_thread_cleanup_chain.
9061
845b344f
AH
90622017-04-10 Alan Hayward <alan.hayward@arm.com>
9063
9064 * msp430-tdep.c (msp430_pseudo_register_read): Never return
9065 REG_UNKNOWN.
9066
803bdfe4
YQ
90672017-04-10 Yao Qi <yao.qi@linaro.org>
9068
9069 PR gdb/19942
9070 * gdbthread.h (thread_info::deletable): New method.
9071 (thread_info::incref): New method.
9072 (thread_info::decref): New method.
9073 (thread_info::refcount): Move it to private.
9074 * infrun.c (save_stop_context): Call inc_refcount.
9075 (release_stop_context_cleanup): Likewise.
9076 * thread.c (set_thread_exited): New function.
9077 (init_thread_list): Delete "tp" only it is deletable, otherwise
9078 call set_thread_exited.
9079 (delete_thread_1): Call set_thread_exited.
9080 (current_thread_cleanup) <inferior_pid>: Remove.
9081 <thread>: New field.
9082 (restore_current_thread_ptid_changed): Removed.
9083 (do_restore_current_thread_cleanup): Adjust.
9084 (restore_current_thread_cleanup_dtor): Don't call
9085 find_thread_ptid.
9086 (set_thread_refcount): Use dec_refcount.
9087 (make_cleanup_restore_current_thread): Adjust.
9088 (thread_apply_all_command): Call inc_refcount.
9089 (_initialize_thread): Don't call
9090 observer_attach_thread_ptid_changed.
9091
8c25b497
YQ
90922017-04-10 Yao Qi <yao.qi@linaro.org>
9093
9094 * thread.c (delete_thread_1): Hoist code on marking thread as
9095 exited.
9096
8473b447
SM
90972017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9098
9099 * windows-nat.c (windows_detach): Initialize ptid with
9100 minus_one_ptid.
9101
6670ec13
SM
91022017-04-07 Simon Marchi <simon.marchi@ericsson.com>
9103
9104 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9105
ba2f91bb
AH
91062017-04-07 Alan Hayward <alan.hayward@arm.com>
9107
9108 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9109 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9110 (bfin_pseudo_register_write): Likewise
9111
436252de
SM
91122017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9113
9114 * common/ptid.h (struct ptid): Change to...
9115 (class ptid_t): ... this.
9116 <ptid_t>: New constructors.
9117 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9118 matches>: New methods.
9119 <make_null, make_minus_one>: New static methods.
9120 <pid>: Rename to...
9121 <m_pid>: ...this.
9122 <lwp>: Rename to...
9123 <m_lwp>: ...this.
9124 <tid>: Rename to...
9125 <m_tid>: ...this.
9126 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9127 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9128 as references, move comment to class ptid_t.
9129 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9130 ptid_t static methods.
9131 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9132 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9133 Take ptid arguments as references, implement using ptid_t methods.
9134 * unittests/ptid-selftests.c: New file.
9135 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9136 unittests/ptid-selftests.c.
9137 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9138
0dedf377
TP
91392017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9140
9141 * python/python.c (python_run_simple_file): Cast mode literal to
9142 non-const char pointer as expected by PyFile_FromString.
9143
4e9868d4
SM
91442017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9145
9146 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9147 minus_one_ptid and null_ptid.
9148
9bf2a700
PA
91492017-04-05 Pedro Alves <palves@redhat.com>
9150
9151 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9152 * configure: Regenerate.
9153
a121b7c1
PA
91542017-04-05 Pedro Alves <palves@redhat.com>
9155
9156 * ada-exp.y (yyerror): Constify.
9157 * ada-lang.c (bound_name, get_selections)
9158 (ada_variant_discrim_type)
9159 (ada_variant_discrim_name, ada_value_struct_elt)
9160 (ada_lookup_struct_elt_type, is_unchecked_variant)
9161 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9162 (catch_ada_exception_command_split)
9163 (catch_ada_assert_command_split, catch_assert_command)
9164 (ada_op_name): Constify.
9165 * ada-lang.h (ada_yyerror, get_selections)
9166 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9167 * arc-tdep.c (arc_print_frame_cache): Constify.
9168 * arm-tdep.c (arm_skip_stub): Constify.
9169 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9170 (gen_aggregate_elt_ref): Constify.
9171 * bcache.c (print_bcache_statistics): Constify.
9172 * bcache.h (print_bcache_statistics): Constify.
9173 * break-catch-throw.c (catch_exception_command_1):
9174 * breakpoint.c (struct ep_type_description::description):
9175 Constify.
9176 (add_solib_catchpoint): Constify.
9177 (catch_fork_command_1): Add cast.
9178 (add_catch_command): Constify.
9179 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9180 Constify.
9181 * bsd-uthread.c (bsd_uthread_state): Constify.
9182 * buildsym.c (patch_subfile_names): Constify.
9183 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9184 Constify.
9185 * c-exp.y (yyerror): Constify.
9186 (token::oper): Constify.
9187 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9188 * c-varobj.c (cplus_describe_child): Constify.
9189 * charset.c (find_charset_names): Add cast.
9190 (find_charset_names): Constify array and add const_cast.
9191 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9192 (edit_command): Constify.
9193 * cli/cli-decode.c (lookup_cmd): Constify.
9194 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9195 Constify.
9196 (struct dump_context): Constify.
9197 (add_dump_command, restore_command): Constify.
9198 * cli/cli-script.c (get_command_line): Constify.
9199 * cli/cli-script.h (get_command_line): Constify.
9200 * cli/cli-utils.c (check_for_argument): Constify.
9201 * cli/cli-utils.h (check_for_argument): Constify.
9202 * coff-pe-read.c (struct read_pe_section_data): Constify.
9203 * command.h (lookup_cmd): Constify.
9204 * common/print-utils.c (decimal2str): Constify.
9205 * completer.c (gdb_print_filename): Constify.
9206 * corefile.c (set_gnutarget): Constify.
9207 * cp-name-parser.y (yyerror): Constify.
9208 * cp-valprint.c (cp_print_class_member): Constify.
9209 * cris-tdep.c (cris_register_name, crisv32_register_name):
9210 Constify.
9211 * d-exp.y (yyerror): Constify.
9212 (struct token::oper): Constify.
9213 * d-lang.h (d_yyerror): Constify.
9214 * dbxread.c (struct header_file_location::name): Constify.
9215 (add_old_header_file, add_new_header_file, last_function_name)
9216 (dbx_next_symbol_text, add_bincl_to_list)
9217 (find_corresponding_bincl_psymtab, set_namestring)
9218 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9219 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9220 * defs.h (command_line_input, print_address_symbolic)
9221 (deprecated_readline_begin_hook): Constify.
9222 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9223 Constify.
9224 * event-top.c (handle_line_of_input): Constify and add cast.
9225 * exceptions.c (catch_errors): Constify.
9226 * exceptions.h (catch_errors): Constify.
9227 * expprint.c (print_subexp_standard, op_string, op_name)
9228 (op_name_standard, dump_raw_expression, dump_raw_expression):
9229 * expression.h (op_name, op_string, dump_raw_expression):
9230 Constify.
9231 * f-exp.y (yyerror): Constify.
9232 (struct token::oper): Constify.
9233 (struct f77_boolean_val::name): Constify.
9234 * f-lang.c (f_word_break_characters): Constify.
9235 * f-lang.h (f_yyerror): Constify.
9236 * fork-child.c (fork_inferior): Add cast.
9237 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9238 (new_variant): Constify.
9239 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9240 * gdbarch.c: Regenerate.
9241 * gdbcore.h (set_gnutarget): Constify.
9242 * go-exp.y (yyerror): Constify.
9243 (token::oper): Constify.
9244 * go-lang.h (go_yyerror): Constify.
9245 * go32-nat.c (go32_sysinfo): Constify.
9246 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9247 * guile/scm-cmd.c (cmdscm_function): Constify.
9248 * guile/scm-param.c (pascm_param_value): Constify.
9249 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9250 (h8300sx_register_name): Constify.
9251 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9252 Constify.
9253 * ia64-tdep.c (ia64_register_names): Constify.
9254 * infcmd.c (construct_inferior_arguments): Constify.
9255 (path_command, attach_post_wait): Constify.
9256 * language.c (show_range_command, show_case_command)
9257 (unk_lang_error): Constify.
9258 * language.h (language_defn::la_error)
9259 (language_defn::la_name_of_this): Constify.
9260 * linespec.c (decode_line_2): Constify.
9261 * linux-thread-db.c (thread_db_err_str): Constify.
9262 * lm32-tdep.c (lm32_register_name): Constify.
9263 * m2-exp.y (yyerror): Constify.
9264 * m2-lang.h (m2_yyerror): Constify.
9265 * m32r-tdep.c (m32r_register_names): Constify and make static.
9266 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9267 * m88k-tdep.c (m88k_register_name): Constify.
9268 * macroexp.c (appendmem): Constify.
9269 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9270 (upgrade_type, parse_external, parse_partial_symbols)
9271 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9272 (new_symbol): Constify.
9273 * memattr.c (mem_info_command): Constify.
9274 * mep-tdep.c (register_name_from_keyword): Constify.
9275 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9276 Constify.
9277 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9278 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9279 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9280 cast.
9281 (mi_execute_async_cli_command): Constify.
9282 * mips-tdep.c (mips_register_name): Constify.
9283 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9284 (am33_register_name, am33_2_register_name)
9285 * moxie-tdep.c (moxie_register_names): Constify.
9286 * nat/linux-osdata.c (osdata_type): Constify fields.
9287 * nto-tdep.c (nto_parse_redirection): Constify.
9288 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9289 (lookup_child_selector): Constify.
9290 (objc_methcall::name): Constify.
9291 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9292 (lookup_struct_typedef): Constify.
9293 * objfiles.c (pc_in_section): Constify.
9294 * objfiles.h (pc_in_section): Constify.
9295 * p-exp.y (struct token::oper): Constify.
9296 (yyerror): Constify.
9297 * p-lang.h (pascal_yyerror): Constify.
9298 * parser-defs.h (op_name_standard): Constify.
9299 (op_print::string): Constify.
9300 (exp_descriptor::op_name): Constify.
9301 * printcmd.c (print_address_symbolic): Constify.
9302 * psymtab.c (print_partial_symbols): Constify.
9303 * python/py-breakpoint.c (stop_func): Constify.
9304 (bppy_get_expression): Constify.
9305 * python/py-cmd.c (cmdpy_completer::name): Constify.
9306 (cmdpy_function): Constify.
9307 * python/py-event.c (evpy_add_attribute)
9308 (gdbpy_initialize_event_generic): Constify.
9309 * python/py-event.h (evpy_add_attribute)
9310 (gdbpy_initialize_event_generic): Constify.
9311 * python/py-evts.c (add_new_registry): Constify.
9312 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9313 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9314 * python/py-inferior.c (get_buffer): Add cast.
9315 * python/py-param.c (parm_constant::name): Constify.
9316 * python/py-unwind.c (fprint_frame_id): Constify.
9317 * python/python.c (gdbpy_parameter_value): Constify.
9318 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9319 * remote.c (memory_packet_config::name): Constify.
9320 (show_packet_config_cmd, remote_write_bytes)
9321 (remote_buffer_add_string):
9322 * reverse.c (exec_reverse_once): Constify.
9323 * rs6000-tdep.c (variant::name, variant::description): Constify.
9324 * rust-exp.y (rustyyerror): Constify.
9325 * rust-lang.c (rust_op_name): Constify.
9326 * rust-lang.h (rustyyerror): Constify.
9327 * serial.h (serial_ops::name): Constify.
9328 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9329 (sh_sh3e_register_name, sh_sh2e_register_name)
9330 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9331 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9332 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9333 (sh_sh4al_dsp_register_name): Constify.
9334 * sh64-tdep.c (sh64_register_name): Constify.
9335 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9336 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9337 * stabsread.c (patch_block_stabs, read_type_number)
9338 (ref_map::stabs, ref_add, process_reference)
9339 (symbol_reference_defined, define_symbol, define_symbol)
9340 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9341 (read_one_struct_field, read_struct_fields, read_baseclasses)
9342 (read_tilde_fields, read_struct_type, read_array_type)
9343 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9344 (read_huge_number, read_range_type, read_args, common_block_start)
9345 (find_name_end): Constify.
9346 * stabsread.h (common_block_start, define_symbol)
9347 (process_one_symbol, symbol_reference_defined, ref_add):
9348 * symfile.c (get_section_index, add_symbol_file_command):
9349 * symfile.h (get_section_index): Constify.
9350 * target-descriptions.c (tdesc_type::name): Constify.
9351 (tdesc_free_type): Add cast.
9352 * target.c (find_default_run_target):
9353 (add_deprecated_target_alias, find_default_run_target)
9354 (target_announce_detach): Constify.
9355 (do_option): Constify.
9356 * target.h (add_deprecated_target_alias): Constify.
9357 * thread.c (print_thread_info_1): Constify.
9358 * top.c (deprecated_readline_begin_hook, command_line_input):
9359 Constify.
9360 (init_main): Add casts.
9361 * top.h (handle_line_of_input): Constify.
9362 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9363 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9364 (tfind_command): Rename to ...
9365 (tfind_command_1): ... this and constify.
9366 (tfind_command): New function.
9367 (tfind_end_command, tfind_start_command): Adjust.
9368 (encode_source_string): Constify.
9369 * tracepoint.h (encode_source_string): Constify.
9370 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9371 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9372 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9373 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9374 * tui/tui-win.c (parse_scrolling_args): Constify.
9375 * tui/tui-windata.c (tui_erase_data_content): Constify.
9376 * tui/tui-windata.h (tui_erase_data_content): Constify.
9377 * tui/tui-winsource.c (tui_erase_source_content): Constify.
9378 * tui/tui.c (tui_enable): Add cast.
9379 * utils.c (defaulted_query): Constify.
9380 (init_page_info): Add cast.
9381 (puts_debug, subset_compare): Constify.
9382 * utils.h (subset_compare): Constify.
9383 * varobj.c (varobj_format_string): Constify.
9384 * varobj.h (varobj_format_string): Constify.
9385 * vax-tdep.c (vax_register_name): Constify.
9386 * windows-nat.c (windows_detach): Constify.
9387 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9388 * xml-support.c (gdb_xml_end_element): Constify.
9389 * xml-tdesc.c (tdesc_start_reg): Constify.
9390 * xstormy16-tdep.c (xstormy16_register_name): Constify.
9391 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9392 * xtensa-tdep.h (xtensa_register_t::name): Constify.
9393
995816ba
PA
93942017-04-05 Pedro Alves <palves@redhat.com>
9395
9396 * proc-api.c (struct trans): Constify.
9397 (procfs_note): Constify.
9398 * proc-events.c (struct trans, syscall_table):
9399 * proc-flags.c (struct trans): Constify.
9400 * proc-utils.h (procfs_note): Constify.
9401 * proc-why.c (struct trans): Constify.
9402 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9403 (procfs_detach): Constify.
9404 * sol-thread.c (struct string_map): Constify.
9405 (td_err_string, td_state_string): Constify.
9406
3e83a920
PA
94072017-04-05 Pedro Alves <palves@redhat.com>
9408
9409 * proc-api.c (procfs_filename): Don't initialize
9410 procfs_filename.
9411 (prepare_to_trace): Assume procfs_filename is non-NULL.
9412 (_initialize_proc_api): Give procfs_filename a default value here.
9413
63160a43
PA
94142017-04-05 Pedro Alves <palves@redhat.com>
9415
9416 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9417 'cond_string' parameter.
9418 (extract_exception_regexp): Constify 'string' parameter.
9419 (catch_exception_command_1): Constify.
9420 * breakpoint.c (init_catchpoint)
9421 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9422 parameter.
9423 (ep_parse_optional_if_clause, catch_fork_command_1)
9424 (catch_exec_command_1): Constify.
9425 * breakpoint.h (init_catchpoint): Constify 'cond_string'
9426 parameter.
9427 (ep_parse_optional_if_clause): Constify.
9428 * cli/cli-utils.c (remove_trailing_whitespace)
9429 (check_for_argument): Constify.
9430 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9431 non-const overload.
9432 (check_for_argument): Likewise.
9433
9b2eba3d
PA
94342017-04-05 Pedro Alves <palves@redhat.com>
9435
9436 * event-top.c (command_line_handler): Add cast to execute_command
9437 call.
9438 * record-btrace.c (cmd_record_btrace_bts_start)
9439 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9440 (cmd_record_btrace_start): Add cast to execute_command call.
9441 * record-full.c (record_full_goto_insn):
9442 * record.c (record_start, record_stop): Add cast to
9443 execute_command_to_string calls.
9444 (cmd_record_start): Add cast to execute_command calls.
9445
2adadf51
PA
94462017-04-05 Pedro Alves <palves@redhat.com>
9447
9448 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9449 static inline function.
9450 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9451 array and use gdb_PyArg_ParseTupleAndKeywords.
9452 * python/py-cmd.c (cmdpy_init): Likewise.
9453 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9454 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9455 (infpy_search_memory): Likewise.
9456 * python/py-objfile.c (objfpy_add_separate_debug_file)
9457 (gdbpy_lookup_objfile): Likewise.
9458 * python/py-symbol.c (gdbpy_lookup_symbol)
9459 (gdbpy_lookup_global_symbol): Likewise.
9460 * python/py-type.c (gdbpy_lookup_type): Likewise.
9461 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9462 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9463 Likewise.
9464
0d1f4ceb
PA
94652017-04-05 Pedro Alves <palves@redhat.com>
9466
9467 * python/python-internal.h (gdb_PyGetSetDef): New type.
9468 * python/py-block.c (block_object_getset)
9469 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9470 * python/py-event.c (event_object_getset)
9471 (finish_breakpoint_object_getset): Likewise.
9472 * python/py-inferior.c (inferior_object_getset): Likewise.
9473 * python/py-infthread.c (thread_object_getset): Likewise.
9474 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9475 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9476 * python/py-objfile.c (objfile_getset): Likewise.
9477 * python/py-progspace.c (pspace_getset): Likewise.
9478 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9479 Likewise.
9480 * python/py-record.c (recpy_record_getset): Likewise.
9481 * python/py-symbol.c (symbol_object_getset): Likewise.
9482 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9483 Likewise.
9484 * python/py-type.c (type_object_getset, field_object_getset):
9485 Likewise.
9486 * python/py-value.c (value_object_getset): Likewise.
9487
4d759979
PA
94882017-04-05 Pedro Alves <palves@redhat.com>
9489
9490 * python/python-internal.h (gdb_PyObject_CallMethod)
9491 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9492 New functions.
9493 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9494 (PySys_GetObject, PySys_SetPath): New macros.
9495
fdf9e36f
PA
94962017-04-05 Pedro Alves <palves@redhat.com>
9497
9498 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9499 info_osdata_command.
9500 * osdata.c (info_osdata_command): Rename to ...
9501 (info_osdata): ... this. Constify 'type' parameter, and remove
9502 the 'from_tty' parameter. Accept NULL TYPE.
9503 (info_osdata_command): New function.
9504 * osdata.h (info_osdata_command): Remove declaration.
9505 (info_osdata): New declaration.
9506
9f33b8b7
PA
95072017-04-05 Pedro Alves <palves@redhat.com>
9508
9509 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9510 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9511 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9512 parameter.
9513 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9514 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9515 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9516 parameter.
9517 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9518 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9519 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9520 (mi_cmd_file_list_exec_source_files)
9521 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9522 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9523 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9524 parameter.
9525 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9526 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9527 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9528 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9529 (mi_cmd_stack_info_frame): Constify 'command' parameter.
9530 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9531 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9532 'command' parameter.
9533 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9534 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9535 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9536 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9537 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9538 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9539 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9540 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9541 (mi_cmd_var_set_update_range): Constify 'command' parameter.
9542 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9543 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9544 parameter.
9545 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9546 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9547 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9548 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9549 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9550 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9551 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9552 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9553 (mi_cmd_data_list_changed_registers)
9554 (mi_cmd_data_write_register_values)
9555 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9556 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9557 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9558 (mi_cmd_list_features, mi_cmd_list_target_features)
9559 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9560 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9561 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9562 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9563 (mi_cmd_trace_frame_collected): Constify 'command'
9564 parameter.
9565 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9566 'command' parameter.
9567
67cb5b2d
PA
95682017-04-05 Pedro Alves <palves@redhat.com>
9569
9570 * ada-lang.c (ada_completer_word_break_characters): Now a const
9571 array.
9572 (ada_get_gdb_completer_word_break_characters): Constify.
9573 * completer.c (gdb_completer_command_word_break_characters)
9574 (gdb_completer_file_name_break_characters)
9575 (gdb_completer_quote_characters): Now const arrays.
9576 (get_gdb_completer_quote_characters): Constify.
9577 (set_rl_completer_word_break_characters): New function.
9578 (set_gdb_completion_word_break_characters)
9579 (complete_line_internal): Use it.
9580 * completer.h (get_gdb_completer_quote_characters): Constify.
9581 (set_rl_completer_word_break_characters): Declare.
9582 * f-lang.c (f_word_break_characters): Constify.
9583 * language.c (default_word_break_characters): Constify.
9584 * language.h (language_defn::la_word_break_characters): Constify.
9585 (default_word_break_characters): Constify.
9586 * top.c (init_main): Use set_rl_completer_word_break_characters.
9587
7a114964
PA
95882017-04-05 Pedro Alves <palves@redhat.com>
9589
9590 * aix-thread.c (aix_thread_pid_to_str)
9591 (aix_thread_extra_thread_info): Constify.
9592 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9593 * bsd-uthread.c (bsd_uthread_extra_thread_info)
9594 (bsd_uthread_pid_to_str): Constify.
9595 * corelow.c (core_pid_to_str): Constify.
9596 * darwin-nat.c (darwin_pid_to_str): Constify.
9597 * fbsd-nat.c (fbsd_pid_to_str): Constify.
9598 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9599 Constify.
9600 * gnu-nat.c (gnu_pid_to_str): Constify.
9601 * go32-nat.c (go32_pid_to_str): Constify.
9602 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9603 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9604 * inferior.c (inferior_pid_to_str): Constify.
9605 * linux-nat.c (linux_nat_pid_to_str): Constify.
9606 * linux-tdep.c (linux_core_pid_to_str): Constify.
9607 * linux-thread-db.c (thread_db_pid_to_str)
9608 (thread_db_extra_thread_info): Constify.
9609 * nto-tdep.c (nto_extra_thread_info): Constify.
9610 * nto-tdep.h (nto_extra_thread_info): Constify.
9611 * obsd-nat.c (obsd_pid_to_str): Constify.
9612 * procfs.c (procfs_pid_to_str): Constify.
9613 * ravenscar-thread.c (ravenscar_extra_thread_info)
9614 (ravenscar_pid_to_str): Constify.
9615 * remote-sim.c (gdbsim_pid_to_str): Constify.
9616 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9617 Constify.
9618 * sol-thread.c (solaris_pid_to_str): Constify.
9619 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9620 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9621 * target.c (default_pid_to_str, target_pid_to_str)
9622 (normal_pid_to_str, default_pid_to_str): Constify.
9623 * target.h (target_ops::to_pid_to_str)
9624 (target_ops::to_extra_thread_info): Constify.
9625 (target_pid_to_str, normal_pid_to_str): Constify.
9626 * windows-nat.c (windows_pid_to_str): Constify.
9627 * gdbarch.sh (core_pid_to_str): Constify.
9628 * target-delegates.c: Regenerate.
9629 * gdbarch.h, gdbarch.c: Regenerate.
9630
69bbf465
PA
96312017-04-05 Pedro Alves <palves@redhat.com>
9632
9633 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9634 the memory of the temporary warning_pre_print override.
9635 * utils.c (warning_pre_print): Constify.
9636 * utils.h (warning_pre_print): Constify.
9637
be47f9e8
PA
96382017-04-05 Pedro Alves <palves@redhat.com>
9639
9640 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9641 (shell_command): New function.
9642 (make_command): Use std::string.
9643 (init_cli_cmds): Register shell_command instead of shell_escape.
9644
bde6261a
PA
96452017-04-05 Pedro Alves <palves@redhat.com>
9646
9647 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9648 * tracepoint.c (default_collect): Don't initialize.
9649
b38ef47f
PA
96502017-04-05 Pedro Alves <palves@redhat.com>
9651
9652 * macroexp.c (macro_buffer::shared): Now a bool.
9653 (init_buffer): Update.
9654 (init_shared_buffer): Constify 'addr' parameter.
9655 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9656 casts.
9657
f995bbe8
PA
96582017-04-05 Pedro Alves <palves@redhat.com>
9659
9660 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9661 * disasm.c (set_disassembler_options): Constify local.
9662 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9663
4a596fe2
SDJ
96642017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9665
9666 PR gdb/21352
9667 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9668 option.
9669
2cad08ea
YQ
96702017-04-05 Yao Qi <yao.qi@linaro.org>
9671
9672 * frame.c (frame_unwind_register_unsigned): Call
9673 frame_unwind_register_value.
9674
55a98976
YQ
96752017-04-05 Yao Qi <yao.qi@linaro.org>
9676
9677 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9678 Use gdb_test_multiple, and don't match anchor.
9679
4ac40124
PA
96802017-04-05 Pedro Alves <palves@redhat.com>
9681
9682 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9683 (Write After Approval): Remove Simon Marchi.
9684
c053b654
PA
96852017-04-05 Pedro Alves <palves@redhat.com>
9686
9687 * common/gdb_optional.h (optional::optional): Make constexpr and
9688 initialize m_dummy.
9689
4c7bf4f9
JB
96902017-04-04 John Baldwin <jhb@FreeBSD.org>
9691
9692 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9693 (amd64fbsd_jmp_buf_reg_offset): Remove.
9694 (amd64fbsd_supply_uthread): Remove function.
9695 (amd64fbsd_collect_uthread): Remove function.
9696 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9697 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9698 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9699 (fbsd-nat.c): Update comment.
9700 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9701 (i386fbsd_jmp_buf_reg_offset): Remove.
9702 (i386fbsd_supply_uthread): Remove function.
9703 (i386fbsd_collect_uthread): Remove function.
9704 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9705
1e1a8bef
JB
97062017-04-04 John Baldwin <jhb@FreeBSD.org>
9707
9708 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9709 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9710 * NEWS: Mention that support for FreeBSD/alpha was removed.
9711 * alpha-fbsd-tdep.c: Delete file.
9712 * config/alpha/fbsd.mh: Delete file.
9713 * configure.host: Delete alpha*-*-freebsd* and
9714 alpha*-*-kfreebsd*-gnu.
9715 * configure.tgt: Delete alpha*-*-freebsd* and
9716 alpha*-*-kfreebsd*-gnu.
9717
49907934
JB
97182017-04-04 John Baldwin <jhb@FreeBSD.org>
9719
9720 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9721 amd64bsd_store_inferior_registers): Use ptid from regcache.
9722
6f77053d
PA
97232017-04-04 Pedro Alves <palves@redhat.com>
9724
9725 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9726 data fields, make them private and add "m_" prefixes.
9727 (lnp_state_machine::lnp_state_machine): New ctor.
9728 (record_line, check_line_address, handle_set_discriminator)
9729 (handle_set_address, handle_advance_pc, handle_special_opcode)
9730 (handle_advance_line, handle_set_file, handle_negate_stmt)
9731 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9732 (end_sequence, advance_line): New methods.
9733 (m_gdbarch, m_record_lines_p): New fields.
9734 (lnp_reader_state): Delete.
9735 (dwarf_record_line): Rename to ...
9736 (lnp_state_machine::record_line): ... adjust.
9737 (init_lnp_state_machine): Delete.
9738 (lnp_state_machine::lnp_state_machine): New.
9739 (check_line_address): Rename to ...
9740 (lnp_state_machine::check_line_address): This.
9741 (dwarf_decode_lines_1): Remove reference to "reader_state".
9742 Adjust lnp_state_machine having a non-default ctor. Use bool.
9743 State machine internal state manipulation moved to
9744 lnp_state_machine methods.
9745
9c541725
PA
97462017-04-04 Pedro Alves <palves@redhat.com>
9747
9748 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9749 unittests/offset-type-selftests.c.
9750 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9751 * common/offset-type.h: New file.
9752 * common/preprocessor.h: New file.
9753 * common/traits.h: New file.
9754 * common/valid-expr.h: New file.
9755 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9756 sect_offset and cu_offset strong typedefs throughout.
9757 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9758 typedefs throughout.
9759 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9760 sect_offset and cu_offset strong typedefs throughout.
9761 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9762 typedefs throughout.
9763 * gdbtypes.h: Include "common/offset-type.h".
9764 (cu_offset): Now an offset type (strong typedef) instead of a
9765 struct.
9766 (sect_offset): Likewise.
9767 (union call_site_parameter_u): Rename "param_offset" field to
9768 "param_cu_off".
9769 * unittests/offset-type-selftests.c: New file.
9770
ecfb656c
PA
97712017-04-04 Pedro Alves <palves@redhat.com>
9772
9773 * common/underlying.h: New file.
9774 * dwarf2read.c: Include "common/gdb_optional.h" and
9775 "common/underlying.h".
9776 (dir_index, file_name_index): New types.
9777 (file_entry): Use them.
9778 (file_entry::include): Use to_underlying.
9779 (line_header::add_file_name): Use dir_index.
9780 (read_formatted_entries): Use gdb::optional. Read form before
9781 writting to file_entry.
9782 (dwarf_decode_line_header): Use dir_index.
9783 (lnp_state_machine::current_file): Use to_underlying.
9784 (lnp_state_machine::file): Change type to file_name_index.
9785 (dwarf_record_line): Use to_underlying.
9786 (init_lnp_state_machine): Use file_name_index.
9787 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9788
d194f1fe
PA
97892017-04-04 Pedro Alves <palves@redhat.com>
9790
9791 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9792 operator bool, has_value and get methods.
9793
fff8551c
PA
97942017-04-04 Pedro Alves <palves@redhat.com>
9795
9796 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9797 fields.
9798 (line_header): Initialize all data fields. Change type of
9799 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9800 Change type of include_dirs to std::vector<const char *>. Remove
9801 num_include_dirs, include_dirs_size. Change type of file_names to
9802 std::vector<file_entry>. Remove num_file_names, file_names_size.
9803 (line_header::line_header): New.
9804 (line_header::add_include_dir, line_header::add_file_name): New
9805 methods.
9806 (line_header::include_dir_at): Remove NULL check.
9807 (line_header::file_name_at): Add const overload.
9808 (line_header_up): New unique_ptr typedef.
9809 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9810 std::vector. Remove free_line_header call.
9811 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9812 free_line_header call.
9813 (free_cu_line_header): Delete.
9814 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9815 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9816 Adjust to use std::vector.
9817 (free_line_header): Delete.
9818 (free_line_header_voidp): Use delete.
9819 (add_include_dir): Replace with ...
9820 (line_header::add_include_dir): ... this method. Use std::vector.
9821 (add_file_name): Replace with ...
9822 (line_header::add_file_name): ... this method. Use std::vector.
9823 (add_include_dir_stub): Delete.
9824 (read_formatted_entries): Remove memset.
9825 (dwarf_decode_line_header): Return a line_header_up instead of a
9826 raw pointer. Remove cleanup handling. Pass lambdas to
9827 read_formatted_entries. Adjust to use line_header methods.
9828 (dwarf_decode_lines_1): Adjust to use line_header methods.
9829 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9830 use std::vector.
9831
d62a8ae2
SM
98322017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9833
9834 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9835 instead of struct ptid.
9836
db3a1dc7
AH
98372017-05-04 Alan Hayward <alan.hayward@arm.com>
9838
9839 * frame.c (get_frame_register_bytes): Unwind using value.
9840 (put_frame_register_bytes): Likewise.
9841
b1b45502
IB
98422017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9843
9844 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9845 aggregate-like.
9846
ec13808e
JK
98472017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9848
9849 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9850
12316564
YQ
98512017-03-29 Yao Qi <yao.qi@linaro.org>
9852
9853 * gdbthread.h (struct thread_info): Declare constructor and
9854 destructor. Add some in-class member initializers.
9855 * thread.c (free_thread): Remove.
9856 (init_thread_list): Call delete instead of free_thread.
9857 (new_thread): Call thread_info constructor.
9858 (thread_info::thread_info): New function.
9859 (thread_info::~thread_info): New function.
9860 (delete_thread_1): Call delete instead of free_thread.
9861 (make_cleanup_restore_current_thread): Move tp and frame to
9862 inner block.
9863
fe5f7374
AK
98642017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9865
9866 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9867 (arc_skip_prologue): Likewise.
9868 (arc_make_frame_cache): Likewise.
9869 (arc_pv_get_operand): New function.
9870 (arc_is_in_prologue): Likewise.
9871 (arc_analyze_prologue): Likewise.
9872 (arc_print_frame_cache): Likewise.
9873 (MAX_PROLOGUE_LENGTH): New constant.
9874
eea78757
AK
98752017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9876
9877 * configure.tgt: Add arc-insn.o.
9878 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9879 (dump_arc_instruction_command): New function.
9880 (arc_fprintf_disasm): Likewise.
9881 (arc_disassemble_info): Likewise.
9882 (arc_insn_get_operand_value): Likewise.
9883 (arc_insn_get_operand_value_signed): Likewise.
9884 (arc_insn_get_memory_base_reg): Likewise.
9885 (arc_insn_get_memory_offset): Likewise.
9886 (arc_insn_get_branch_target): Likewise.
9887 (arc_insn_dump): Likewise.
9888 (arc_insn_get_linear_next_pc): Likewise.
9889 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9890 (arc_disassemble_info): Likewise.
9891 (arc_insn_get_branch_target): Likewise.
9892 (arc_insn_get_linear_next_pc): Likewise.
9893 * NEWS: Mention new "maint print arc arc-instruction".
9894
3be78afd
AK
98952017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9896
9897 * arc-tdep (maintenance_print_arc_list): New variable.
9898 (maintenance_print_arc_command): New function.
9899
296ec4fa
AK
99002017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9901
9902 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9903 Add "limm" and "reserved".
9904 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9905 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9906 * arc-tdep.h (arc_regnum): Likewise.
9907
f74f865e
MF
99082017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9909
9910 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9911 for THREADPTR register.
9912 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9913 register.
9914 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9915 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9916 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9917
0d0bf81a
MF
99182017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9919
9920 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9921 registers above gdbarch_num_regs (gdbarch) as privileged in
9922 call0 ABI.
9923
0ce4291e
MF
99242017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9925
9926 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9927 for a single specified register or for all registers in
9928 a0_base..a0_base + C0_NREGS range.
9929 (supply_gregset_reg): Call regcache_raw_supply for a single
9930 specified register or for all registers in a0_base..a0_base +
9931 C0_NREGS range.
9932
c56054f9
MF
99332017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9934
9935 * arch/xtensa.h (C0_NREGS): Add definition.
9936 * xtensa-tdep.c (C0_NREGS): Remove definition.
9937
a4398628
MF
99382017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9939
9940 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9941 Drop xtensa_default_isa initialization.
9942 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9943
8c43009f
PA
99442017-03-27 Pedro Alves <palves@redhat.com>
9945
9946 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9947 (file_entry::include_dir): New method.
9948 (line_header::include_dir_at, line_header::file_name_at): New
9949 methods.
9950 (setup_type_unit_groups, setup_type_unit_groups)
9951 (psymtab_include_file_name): Simplify using the new methods.
9952 (lnp_state_machine) <the_line_header>: New field.
9953 <file>: Add comment.
9954 (lnp_state_machine::current_file): New method.
9955 (dwarf_record_line): Simplify using the new methods.
9956 (init_lnp_state_machine): Initialize the "the_line_header" field.
9957 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9958 Simplify using the new methods.
9959
a7e80b9e
PA
99602017-03-27 Pedro Alves <palves@redhat.com>
9961
9962 * cp-name-parser.y (make_empty): Delete.
9963 (demangler_special, nested_name, ptr_operator, array_indicator)
9964 (direct_declarator, declarator_1): Use fill_comp instead of
9965 make_empty.
9966
21047726
PA
99672017-03-27 Pedro Alves <palves@redhat.com>
9968
9969 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9970 to ATTRIBUTE_PRINTF.
9971 * solib-target.c (library_list_start_list): Print "string" not
9972 "version".
9973 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9974 gdb_xml_error call.
9975
d721ba37
PA
99762017-03-27 Pedro Alves <palves@redhat.com>
9977
9978 * dwarf2read.c (struct file_and_directory): New.
9979 (dwarf2_get_dwz_file): Adjust to use std::string.
9980 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9981 (find_file_and_directory): Adjust to return a file_and_directory
9982 object.
9983 (read_file_scope): Adjust to use file_and_directory. Remove
9984 make_cleanup/do_cleanups calls.
9985 (open_and_init_dwp_file): Adjust to use std::string. Remove
9986 make_cleanup/do_cleanups calls.
9987 * python/python.c (do_start_initialization): Adjust to ldirname
9988 returning a std::string.
9989 * utils.c (ldirname): Now returns a std::string.
9990 * utils.h (ldirname): Change return type to std::string.
9991 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9992 returning a std::string.
9993 * xml-tdesc.c (file_read_description_xml): Likewise.
9994
ed771251
AH
99952017-03-24 Alan Hayward <alan.hayward@arm.com>
9996
9997 * regcache.c (regcache_debug_print_register): New function.
9998 * regcache.h (regcache_debug_print_register): New declaration.
9999 * target.c (debug_print_register): Remove.
10000 (target_fetch_registers): Call regcache_debug_print_register.
10001 (target_store_registers): Likewise.
10002
568c1b9f
PB
100032017-03-24 Pádraig Brady <pbrady@fb.com>
10004
10005 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10006 reference beyond the 'lh->include_dirs' array before accessing to
10007 it.
10008 (psymtab_include_file_name): Likewise.
10009 (dwarf_decode_lines_1): Likewise.
10010 (dwarf_decode_lines): Likewise.
10011 (file_file_name): Likewise.
10012
3e00d44f
SM
100132017-03-23 Simon Marchi <simon.marchi@ericsson.com>
10014
10015 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10016 inferior_ptid.
10017 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10018 ps_lsetfpregs): Likewise.
10019 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10020 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10021 ps_lsetfpregs): Likewise.
10022 * target.c (target_fetch_registers, target_store_registers):
10023 Remove asserts.
10024
077ae656
AH
100252017-03-23 Alan Hayward <alan.hayward@arm.com>
10026
10027 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10028
1e2b521d
YQ
100292017-03-23 Yao Qi <yao.qi@linaro.org>
10030
10031 * aarch64-tdep.c (aarch64_process_record_test): Declare.
10032 (_initialize_aarch64_tdep): Register it.
10033 (aarch64_record_load_store): Handle PRFM instruction.
10034 (aarch64_process_record_test): New function.
10035
33877125
YQ
100362017-03-23 Yao Qi <yao.qi@linaro.org>
10037
10038 * aarch64-tdep.c (aarch64_record_load_store): Fix code
10039 indentation.
10040
a0eef940
YQ
100412017-03-23 Yao Qi <yao.qi@linaro.org>
10042
10043 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10044
3f2a3564
PR
100452017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10046
10047 python/python.c (do_start_initialization): Fix memory leak.
10048
b67aeab0
SM
100492017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10050
10051 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10052 using get_ptrace_pid.
10053 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10054 inferior_ptid.
10055 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10056 inferior_ptid instead of pid.
10057
ffdbe864
YQ
100582017-03-22 Yao Qi <yao.qi@linaro.org>
10059
10060 * aarch64-tdep.c: Wrap locally used classes in anonymous
10061 namespace.
10062 * arm-tdep.c: Likewise.
10063 * linespec.c: Likewise.
10064 * ui-out.c: Likewise.
10065
9d736fbf
JG
100662017-03-22 Jonah Graham <jonah@kichwacoders.com>
10067
10068 PR gdb/19637
10069 * python/lib/gdb/printer/bound_registers.py: Import sys.
10070
3de88e9a
SM
100712017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10072
10073 * windows-nat.c (do_windows_fetch_inferior_registers): Add
10074 windows_thread_info parameter and use it instead of
10075 current_thread.
10076 (windows_fetch_inferior_registers): Don't set current_thread,
10077 pass the thread to do_windows_fetch_inferior_registers. Use
10078 ptid from regcache instead of inferior_ptid.
10079 (do_windows_store_inferior_registers): Add windows_thread_info
10080 parameter and use it instead of current_thread.
10081 (windows_store_inferior_registers): Don't set current_thread,
10082 pass the thread to do_windows_store_inferior_registers. Use
10083 ptid from regcache instead of inferior_ptid.
10084
0e7b8f61
SM
100852017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10086
10087 * ser-mingw.c (ser_windows_raw): Remove reference to
10088 struct serial::current_timeout.
10089
5badf10a
IR
100902017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
10091
10092 PR tdep/20928
10093 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10094 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10095 (sparc64_fsr_type): Fix %fsr decoding.
10096
cee59b3f
TW
100972017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
10098
10099 * python/py-record-btrace.c (btpy_insn_data): Change return type
10100 for Python 2.
10101
639a9038
SM
101022017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10103
10104 * spu-linux-nat.c (spu_fetch_inferior_registers,
10105 spu_store_inferior_registers): Use ptid from regcache, set and
10106 restore inferior_ptid.
10107 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10108 Likewise.
10109
bcc0c096
SM
101102017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10111
10112 * i386-linux-nat.c (fetch_register, store_register,
10113 i386_linux_fetch_inferior_registers,
10114 i386_linux_store_inferior_registers): Use ptid from regcache.
10115 * ia64-linux-nat.c (ia64_linux_fetch_register,
10116 ia64_linux_store_register): Likewise.
10117 * inf-ptrace.c (inf_ptrace_fetch_register,
10118 inf_ptrace_store_register): Likewise.
10119 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10120 m32r_linux_store_inferior_registers): Likewise.
10121 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10122 m68kbsd_store_inferior_registers): Likewise.
10123 * m68k-linux-nat.c (fetch_register, store_register,
10124 m68k_linux_fetch_inferior_registers,
10125 m68k_linux_store_inferior_registers): Likewise.
10126 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10127 m88kbsd_store_inferior_registers): Likewise.
10128 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10129 mips_fbsd_store_inferior_registers): Likewise.
10130 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10131 mips64_linux_regsets_store_registers): Likewise.
10132 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10133 mipsnbsd_store_inferior_registers): Likewise.
10134 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10135 mips64obsd_store_inferior_registers): Likewise.
10136 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10137 Likewise.
10138 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10139 ppcfbsd_store_inferior_registers): Likewise.
10140 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10141 ppc_linux_store_inferior_registers): Likewise.
10142 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10143 ppcnbsd_store_inferior_registers): Likewise.
10144 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10145 ppcobsd_store_registers): Likewise.
10146 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10147 Likewise.
10148 * ravenscar-thread.c (ravenscar_fetch_registers,
10149 ravenscar_store_registers, ravenscar_prepare_to_store):
10150 Likewise.
10151 * record-btrace.c (record_btrace_fetch_registers,
10152 record_btrace_store_registers, record_btrace_prepare_to_store):
10153 Likewise.
10154 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10155 Lookup inferior using ptid from regcache, instead of
10156 current_inferior.
10157 * remote.c (remote_fetch_registers, remote_store_registers): Use
10158 ptid from regcache.
10159 * rs6000-nat.c (fetch_register, store_register): Likewise.
10160 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10161 s390_linux_store_inferior_registers): Likewise.
10162 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10163 shnbsd_store_inferior_registers): Likewise.
10164 * sol-thread.c (sol_thread_fetch_registers,
10165 sol_thread_store_registers): Likewise.
10166 * sparc-nat.c (sparc_fetch_inferior_registers,
10167 sparc_store_inferior_registers): Likewise.
10168 * tilegx-linux-nat.c (fetch_inferior_registers,
10169 store_inferior_registers): Likewise.
10170 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10171 vaxbsd_store_inferior_registers): Likewise.
10172 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10173 store_xtregs): Likewise.
10174
c0f55cc6
AV
101752017-03-20 Artemiy Volkov <artemiyv@acm.org>
10176
10177 PR gdb/14441
10178 * NEWS: Mention support for rvalue references in GDB and python.
10179 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10180 supports both lvalue and rvalue references.
10181
15c0a2a9
AV
101822017-03-20 Artemiy Volkov <artemiyv@acm.org>
10183
10184 PR gdb/14441
10185 * gdbtypes.c (rank_one_type): Implement overloading
10186 resolution rules regarding rvalue references.
10187
aa006118
AV
101882017-03-20 Artemiy Volkov <artemiyv@acm.org>
10189
10190 PR gdb/14441
10191 * aarch64-tdep.c (aarch64_type_align)
10192 (aarch64_extract_return_value, aarch64_store_return_value): Change
10193 lvalue reference type checks to general reference type checks.
10194 * amd64-tdep.c (amd64_classify): Likewise.
10195 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10196 Likewise.
10197 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10198 (arm_store_return_value): Likewise.
10199 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10200 * c-typeprint.c (c_print_type): Likewise.
10201 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10202 (cplus_number_of_children, cplus_describe_child): Likewise.
10203 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10204 * completer.c (expression_completer): Likewise.
10205 * cp-support.c (make_symbol_overload_list_adl_namespace):
10206 Likewise.
10207 * darwin-nat-info.c (info_mach_region_command): Likewise.
10208 * dwarf2loc.c (entry_data_value_coerce_ref)
10209 (value_of_dwarf_reg_entry): Likewise.
10210 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10211 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10212 Likewise.
10213 * findvar.c (extract_typed_address, store_typed_address):
10214 Likewise.
10215 * gdbtypes.c (rank_one_type): Likewise.
10216 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10217 * infcall.c (value_arg_coerce): Likewise.
10218 * language.c (pointer_type): Likewise.
10219 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10220 Likewise.
10221 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10222 * mn10300-tdep.c (mn10300_type_align): Likewise.
10223 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10224 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10225 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10226 Likewise.
10227 * printcmd.c (print_formatted, x_command): Likewise.
10228 * python/py-type.c (typy_get_composite, typy_template_argument):
10229 Likewise.
10230 * python/py-value.c (valpy_referenced_value)
10231 (valpy_get_dynamic_type, value_has_field): Likewise.
10232 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10233 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10234 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10235 * spu-tdep.c (spu_scalar_value_p): Likewise.
10236 * symtab.c (lookup_symbol_aux): Likewise.
10237 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10238 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10239 Likewise.
10240 * valops.c (value_cast_pointers, value_cast)
10241 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10242 (value_struct_elt, value_struct_elt_bitpos)
10243 (value_find_oload_method_list, find_overload_match)
10244 (value_rtti_indirect_type): Likewise.
10245 * valprint.c (val_print_scalar_type_p, generic_val_print):
10246 Likewise.
10247 * value.c (value_actual_type, value_as_address, unpack_long)
10248 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10249 (coerce_ref): Likewise.
10250 * varobj.c (varobj_get_value_type): Likewise.
10251
3fcf899d
AV
102522017-03-20 Artemiy Volkov <artemiyv@acm.org>
10253
10254 PR gdb/14441
10255 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10256 table of constants.
10257 * python/lib/gdb/command/explore.py: Support exploring values
10258 of rvalue reference types.
10259 * python/lib/gdb/types.py: Implement get_basic_type() for
10260 rvalue reference types.
10261 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10262 constant.
10263 * python/py-value.c (valpy_getitem): Add an rvalue reference
10264 check.
10265 (valpy_reference_value): Add new parameter "refcode".
10266 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10267 New wrappers for valpy_reference_value().
10268 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10269 (gdbpy_invoke_xmethod): Likewise.
10270
4297a3f0
AV
102712017-03-20 Artemiy Volkov <artemiyv@acm.org>
10272
10273 PR gdb/14441
10274 * dwarf2read.c (process_die, read_type_die_1): Handle the
10275 DW_TAG_rvalue_reference_type DIE.
10276 (read_tag_reference_type): Add new parameter "refcode".
10277
e1cb3213
AV
102782017-03-20 Artemiy Volkov <artemiyv@acm.org>
10279
10280 PR gdb/14441
10281 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10282 (c_type_print_modifier, c_type_print_varspec_suffix)
10283 (c_type_print_base): Support printing rvalue reference types.
10284 * c-valprint.c (c_val_print, c_value_print): Support printing
10285 rvalue reference values.
10286
e4347c89
AV
102872017-03-20 Artemiy Volkov <artemiyv@acm.org>
10288
10289 PR gdb/14441
10290 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10291 typename.
10292 * cp-support.c (replace_typedefs): Handle
10293 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10294 * python/py-type.c (typy_lookup_type): Likewise.
10295
53cc15f5
AV
102962017-03-20 Artemiy Volkov <artemiyv@acm.org>
10297
10298 PR gdb/14441
10299 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10300 * parse.c (insert_type): Change assert statement.
10301 (follow_types): Handle rvalue reference types.
10302 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10303 constant.
10304
a65cfae5
AV
103052017-03-20 Artemiy Volkov <artemiyv@acm.org>
10306
10307 PR gdb/14441
10308 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10309 value_ref() interface.
10310 * c-valprint.c (c_value_print): Likewise.
10311 * infcall.c (value_arg_coerce): Likewise.
10312 * python/py-value.c (valpy_reference_value): Likewise.
10313 * valops.c (value_cast, value_reinterpret_cast)
10314 (value_dynamic_cast, typecmp): Likewise.
10315 (value_ref): Parameterize by kind of return value reference type.
10316 * value.h (value_ref): Add new parameter "refcode".
10317
3b224330
AV
103182017-03-20 Artemiy Volkov <artemiyv@acm.org>
10319
10320 PR gdb/14441
10321 * dwarf2read.c (read_tag_reference_type): Use
10322 lookup_lvalue_reference_type() instead of lookup_reference_type().
10323 * eval.c (evaluate_subexp_standard): Likewise.
10324 * f-exp.y: Likewise.
10325 * gdbtypes.c (make_reference_type, lookup_reference_type):
10326 Generalize with rvalue reference types.
10327 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10328 convenience wrappers for lookup_reference_type().
10329 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10330 reference kind parameter.
10331 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10332 wrappers for lookup_reference_type().
10333 * guile/scm-type.c (gdbscm_type_reference): Use
10334 lookup_lvalue_reference_type() instead of lookup_reference_type().
10335 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10336 * parse.c (follow_types): Likewise.
10337 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10338 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10339 Likewise.
10340 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10341 (gdbpy_invoke_xmethod): Likewise.
10342 * stabsread.c: Provide extra argument to make_reference_type()
10343 call.
10344 * valops.c (value_ref, value_rtti_indirect_type): Use
10345 lookup_lvalue_reference_type() instead of lookup_reference_type().
10346
f9aeb8d4
AV
103472017-03-20 Artemiy Volkov <artemiyv@acm.org>
10348
10349 PR gdb/14441
10350 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10351 (TYPE_IS_REFERENCE): New macro.
10352 (struct type): Add rvalue_reference_type field.
10353 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10354
51457a05
MAL
103552017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10356
10357 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10358 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10359 New function definition.
10360 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10361 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10362 New function declaration.
10363 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10364 * mi/mi-interp.h: New file.
10365 * solib.c (info_sharedlibrary_command): Replace for loop with
10366 ALL_SO_LIBS macro
10367 * solib.h (update_solib_list): New function declaration.
10368 (so_list_head): Move macro.
10369 * solist.h (ALL_SO_LIBS): New macro.
10370
e696b3ad
MAL
103712017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10372
10373 * infcmd.c (post_create_inferior): Remove unused argument in
10374 call to solib_add.
10375 * remote.c (remote_start_remote): Likewise.
10376 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10377 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10378 (enable_break): Likewise.
10379 * solib.c (update_solib_list): Remove unused target argument
10380 and its documentation.
10381 (solib_add): Remove unused target argument. Remove unused
10382 argument in call to update_solib_list.
10383 (info_sharedlibrary_command): Remove unused argument in call
10384 to update_solib_list.
10385 (sharedlibrary_command): Remove unused argument in call to
10386 solib_add.
10387 (handle_solib_event): Likewise.
10388 (reload_shared_libraries): Likewise.
10389 * solib.h (solib_add): Remove unused target argument.
10390
dcb84eda
AA
103912017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
10392
10393 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10394 (s390_displaced_step_fixup): Cover relative branches with the
10395 default fixup handling. This fixes lack of support for some
10396 relative branch instructions.
10397
d9cb6cdc
SM
103982017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10399
10400 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10401 ptid from regcache.
10402
1afaf9f4
SM
104032017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10404
10405 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10406 i386_darwin_store_inferior_registers): Use ptid from regcache.
10407
aac12e24
SM
104082017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10409
10410 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10411 i386bsd_store_inferior_registers): Use ptid from regcache.
10412
bbe1eef1
SM
104132017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10414
10415 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10416 hppaobsd_store_registers): Use ptid from regcache.
10417
10799020
SM
104182017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10419
10420 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10421 hppanbsd_store_registers): Use ptid from regcache.
10422
00204cf7
SM
104232017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10424
10425 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10426 from regcache. Use get_ptrace_pid.
10427
11a33714
SM
104282017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10429
10430 * corelow.c (get_core_register_section): Use ptid from regcache,
10431 update doc.
10432
317cd492
SM
104332017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10434
10435 * bsd-uthread.c (bsd_uthread_fetch_registers,
10436 bsd_uthread_store_registers): Use ptid from regcache, set and
10437 restore inferior_ptid.
10438
9ac8a7c2
SM
104392017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10440
10441 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10442 fetch_fp_regs, store_register, store_regs, store_fp_register,
10443 store_fp_regs): Use ptid from regcache.
10444
4ac4bb6a
SM
104452017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10446
10447 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10448 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10449 store_vfp_regs): Use ptid from regcache.
10450
9bcbdca8
PA
104512017-03-17 Pedro Alves <palves@redhat.com>
10452
10453 PR remote/21188
10454 * ser-base.c (ser_base_wait_for): Add comment.
10455 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10456 version.
10457 * ser-unix.c (hardwire_raw): Remove reference to
10458 scb->current_timeout.
10459 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10460 (hardwire_ops): Install ser_base_readchar instead of
10461 hardwire_readchar.
10462 * serial.h (struct serial) <current_timeout, timeout_remaining>:
10463 Remove fields.
10464
7503099f
JG
104652017-03-17 Jonah Graham <jonah@kichwacoders.com>
10466
10467 PR gdb/19637
10468 * python/lib/gdb/printer/bound_registers.py: Add support for
10469 Python 3.
10470
7942e96e
AA
104712017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
10472
10473 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10474 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10475 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10476 byte_offset to subobj_byte_offset. Fix the handling of
10477 DWARF_VALUE_STACK on big-endian targets when coming via an
10478 implicit pointer.
10479 (dwarf2_evaluate_loc_desc): Adjust call to
10480 dwarf2_evaluate_loc_desc_full.
10481 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10482 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10483
ba14f379
YQ
104842017-03-16 Yao Qi <yao.qi@linaro.org>
10485
10486 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10487 and REVSH instructions.
10488
b121eeb9
YQ
104892017-03-16 Yao Qi <yao.qi@linaro.org>
10490
10491 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10492 (arm_record_test): Declare.
10493 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10494 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10495 align with the manual.
10496 (thumb_record_misc): Adjust the code order to align with the
10497 manual.
10498 (thumb2_record_decode_insn_handler): Fix instruction matching.
10499 (instruction_reader_thumb): New class.
10500 (arm_record_test): New function.
10501
728a7913
YQ
105022017-03-16 Yao Qi <yao.qi@linaro.org>
10503
10504 * arm-tdep.c (abstract_memory_reader): New class.
10505 (instruction_reader): New class.
10506 (extract_arm_insn): Add argument 'reader'. Callers updated.
10507 (decode_insn): Likewise.
10508
34b43320
DE
105092017-03-16 Doug Evans <dje@google.com>
10510
a7c0469f
DE
10511 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10512 member. Change type of TYPE member to SCM. All uses updated.
10513 (lsscm_make_lazy_string_smob): Add assert.
10514 (lsscm_make_lazy_string): Flag bad length values.
10515 (lsscm_elt_type): New function.
10516 (gdbscm_lazy_string_to_value): Rewrite to use
10517 lsscm_safe_lazy_string_to_value.
10518 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10519 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10520 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
10521 in incoming type.
10522 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10523 * guile/scm-type.c (tyscm_scm_to_type): New function.
10524
105252017-03-15 Doug Evans <dje@google.com>
10526
34b43320
DE
10527 PR python/17728, python/18439, python/18779
10528 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10529 member. Change type of TYPE member to PyObject *. All uses updated.
10530 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10531 (gdbpy_create_lazy_string_object): Flag bad length values.
10532 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10533 Handle typedefs in incoming type.
10534 (stpy_lazy_string_elt_type): New function.
10535 (gdbpy_extract_lazy_string): Call it.
10536 * python/py-value.c (valpy_lazy_string): Flag bad length values.
10537 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
10538 typedefs in incoming type.
10539
a3a5fecc
DE
105402017-03-16 Doug Evans <dje@google.com>
10541
10542 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10543 * guile/scm-type.c (tyscm_scm_to_type): New function.
10544
28f1c605
JW
105452017-03-16 Jiong Wang <jiong.wang@arm.com>
10546
10547 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10548 "ULONGEST" for "skip".
10549
87c336f6
AA
105502017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10551
10552 PR gdb/21220
10553 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10554 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10555 (inf_ptrace_peek_poke): ...here. New function. Now also loop
10556 over ptrace peek/poke until end of buffer or error.
10557
cf81cf60
SM
105582017-03-14 Simon Marchi <simon.marchi@ericsson.com>
10559
10560 * parse.c (length_of_subexp): Make static.
10561 * parser-defs.h (length_of_subexp): Remove.
10562
a379284a
AA
105632017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10564
10565 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10566 as well.
10567
8a6200ba
PA
105682017-03-14 Pedro Alves <palves@redhat.com>
10569
10570 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10571 (main): Use std::unique_ptr. Remove calls to
10572 cp_demangled_name_parse_free.
10573
f79ec206
SM
105742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10575
10576 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10577 alphabsd_store_inferior_registers): Use regcache->ptid instead
10578 of inferior_ptid.
10579
edb5fb00
SM
105802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10581
10582 * aix-thread.c (aix_thread_fetch_registers,
10583 aix_thread_store_registers): Use regcache->ptid instead of
10584 inferior_ptid.
10585
55119686
SM
105862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10587
10588 * aarch64-linux-nat.c (fetch_gregs_from_thread,
10589 store_gregs_to_thread, fetch_fpregs_from_thread,
10590 store_fpregs_to_thread): Use regcache->ptid instead of
10591 inferior_ptid.
10592
6a06fbb7
SM
105932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10594
10595 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10596 amd64_linux_fetch_inferior_registers): Use regcache->ptid
10597 instead of inferior_ptid.
10598
c6386875
SM
105992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10600
10601 * target.c (target_fetch_registers, target_store_registers): Add
10602 assert.
10603
ddaaf0fb
SM
106042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10605
10606 * regcache.h (regcache_get_ptid): New function.
10607 * regcache.c (regcache_get_ptid): New function.
10608
b9da89d1 106092017-03-13 Mark Wielaard <mark@klomp.org>
10610
10611 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10612
5f4d1085
KS
106132017-03-10 Keith Seitz <keiths@redhat.com>
10614
10615 PR c++/8218
10616 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10617
c65d6b55
PA
106182017-03-08 Pedro Alves <palves@redhat.com>
10619
10620 PR gdb/18360
10621 * infrun.c (start_step_over, do_target_resume, resume)
10622 (restart_threads): Assert we're not resuming a thread that is
10623 meant to be stopped.
10624 (infrun_thread_stop_requested_callback): Delete.
10625 (infrun_thread_stop_requested): If the thread is internally
10626 stopped, queue a pending stop event and clear the thread's
10627 inline-frame state.
10628 (handle_stop_requested): New function.
10629 (handle_syscall_event, handle_inferior_event_1): Use
10630 handle_stop_requested.
10631 (handle_stop_requested): New function.
10632 (handle_signal_stop): Set the thread's stop_signal here instead of
10633 at caller.
10634 (finish_step_over): Clear step over info unconditionally.
10635 (handle_signal_stop): If the user had interrupted the event
10636 thread, consider the stop a random signal.
10637 (handle_signal_stop) <signal arrived while stepping over
10638 breakpoint>: Don't restart threads here.
10639 (stop_waiting): Don't clear step-over info here.
10640
15c22686
PA
106412017-03-08 Pedro Alves <palves@redhat.com>
10642
10643 PR 21206
10644 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10645 goes to argument 2, not 1.
10646
6e5d74e7
PA
106472017-03-08 Pedro Alves <palves@redhat.com>
10648
10649 PR cli/21218
10650 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10651 display_gdb_prompt.
10652 (command_line_input): Add comment.
10653
9753a2f6
PA
106542017-03-08 Pedro Alves <palves@redhat.com>
10655
10656 PR tui/21216
10657 * tui/tui-file.c (tui_file::write): New.
10658 * tui/tui-file.h (tui_file): Override "write".
10659 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10660 factored out from ...
10661 (tui_puts): ... here.
10662 (tui_putc): Use them.
10663 (tui_write): New function.
10664 * tui/tui-io.h (tui_write): Declare.
10665
1672e0d9
SDJ
106662017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10667
10668 * Makefile.in (SFILES): Replace "environ.c" with
10669 "common/environ.c".
10670 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10671 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10672 to...
10673 * common/environ.c: ... here.
10674 * environ.h: Moved to...
10675 * common/environ.h: ... here.
10676
f7bb4e3a
PB
106772017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10678
10679 * gdbarch.sh (pstring_ptr): New static function.
10680 (gdbarch_disassembler_options): Use it.
10681 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10682 not valid_disassembler_option->name.
10683 * gdbarch.c: Regenerate.
10684
e45ced6c
PB
106852017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10686
10687 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10688
5f6fd321
PA
106892017-03-07 Pedro Alves <palves@redhat.com>
10690
10691 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10692
6dbb839a 106932017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
10694
10695 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10696 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10697 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 10698 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 10699
d274ecf4
SM
107002017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10701
10702 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10703
df97be55
SM
107042017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10705
10706 * remote.c (remote_add_target_side_commands): Use range-based
10707 for loop.
10708
7d45f3df
YQ
107092017-03-03 Yao Qi <yao.qi@linaro.org>
10710
10711 PR gdb/21165
10712 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10713 value is lazy.
10714 * valprint.c (common_val_print): Likewise.
10715
65b48a81
PB
107162017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10717
10718 * NEWS: Mention new set/show disassembler-options commands.
10719 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10720 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10721 (prospective_options): New static variable.
10722 (gdb_disassembler::gdb_disassembler): Initialize
10723 m_di.disassembler_options.
10724 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10725 (get_disassembler_options): New function.
10726 (set_disassembler_options): Likewise.
10727 (set_disassembler_options_sfunc): Likewise.
10728 (show_disassembler_options_sfunc): Likewise.
10729 (disassembler_options_completer): Likewise.
10730 (_initialize_disasm): Likewise.
10731 * disasm.h (get_disassembler_options): New prototype.
10732 (set_disassembler_options): Likewise.
10733 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10734 (gdbarch_verify_disassembler_options): Likewise.
10735 * gdbarch.c: Regenerate.
10736 * gdbarch.h: Likewise.
10737 * arm-tdep.c (num_disassembly_options): Delete.
10738 (set_disassembly_style): Likewise.
10739 (arm_disassembler_options): New static variable.
10740 (set_disassembly_style_sfunc): Convert short style name into long
10741 option name. Call set_disassembler_options.
10742 (show_disassembly_style_sfunc): New function.
10743 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10744 set_gdbarch_verify_disassembler_options.
10745 (_initialize_arm_tdep): Delete regnames variable and update callers.
10746 (arm_disassembler_options): Initialize.
10747 (disasm_options): New variable.
10748 (num_disassembly_options): Rename from this...
10749 (num_disassembly_styles): ...to this. Compute by scanning through
10750 disasm_options.
10751 (valid_disassembly_styles): Initialize using disasm_options.
10752 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10753 set_arm_regname_option.
10754 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10755 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10756 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10757 set_gdbarch_verify_disassembler_options.
10758 * s390-tdep.c (s390_disassembler_options): New static variable.
10759 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10760 set_gdbarch_verify_disassembler_options.
10761
d538e36d
SM
107622017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10763
10764 * remote.c (remote_add_target_side_condition): Remove "struct"
10765 keyword from range-based for loop.
10766
83621223
SM
107672017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10768
10769 * remote.c (remote_add_target_side_condition): Use range-based
10770 for loop. Update comment.
10771
2123df0e
YQ
107722017-02-27 Yao Qi <yao.qi@linaro.org>
10773
10774 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10775
8e368124
AH
107762017-02-26 Alan Hayward <alan.hayward@arm.com>
10777
10778 * regcache.c (regcache_raw_update): New function.
10779 (regcache_raw_read): Move code to regcache_raw_update.
10780 * regcache.h (regcache_raw_update): New declaration.
10781 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10782
a49dd8dd
JK
107832017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10784
10785 * dwarf2read.c (create_debug_type_hash_table): Initialize
10786 header.signature and header.type_offset_in_tu.
10787
34e4bae9
PA
107882017-02-24 Pedro Alves <palves@redhat.com>
10789
10790 * symtab.c (make_file_symbol_completion_list_1): Use
10791 add_symtab_completions.
10792
b0e4b369
AH
107932017-02-24 Alan Hayward <alan.hayward@arm.com>
10794
10795 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10796
975c21ab
AH
107972017-02-24 Alan Hayward <alan.hayward@arm.com>
10798
10799 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10800 I386_MAX_REGISTER_SIZE.
10801 (i386_pseudo_register_write): Likewise.
10802 (i386_process_record): Likewise.
10803 * i387-tdep.c (i387_supply_xsave): Likewise.
10804 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10805 (store_register): Likewise.
10806
14bc53a8
PA
108072017-02-23 Pedro Alves <palves@redhat.com>
10808
10809 * ada-lang.c: Include "common/function-view.h".
10810 (ada_iterate_over_symbols): Adjust to use function_view as
10811 callback type.
10812 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10813 (ada_make_symbol_completion_list): Use a lambda.
10814 (ada_exc_search_name_matches): Delete.
10815 (name_matches_regex): New.
10816 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10817 * compile/compile-c-support.c: Include "common/function-view.h".
10818 (print_one_macro): Change prototype to accept a ui_file pointer.
10819 (write_macro_definitions): Use a lambda.
10820 * dwarf2read.c: Include "common/function-view.h".
10821 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10822 (dw2_expand_symtabs_matching): Adjust to use function_view as
10823 callback type.
10824 * language.h: Include "common/function-view.h".
10825 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10826 function_view as callback type.
10827 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10828 * linespec.c: Include "common/function-view.h".
10829 (collect_info::add_symbol): New method.
10830 (struct symbol_and_data_callback, iterate_inline_only, struct
10831 symbol_matcher_data, iterate_name_matcher): Delete.
10832 (iterate_over_all_matching_symtabs): Adjust to use function_view
10833 as callback type and lambdas.
10834 (iterate_over_file_blocks): Adjust to use function_view as
10835 callback type.
10836 (decode_compound_collector): Now a class with private fields.
10837 (decode_compound_collector::release_symbols): New method.
10838 (collect_one_symbol): Rename to...
10839 (decode_compound_collector::operator()): ... this and adjust.
10840 (lookup_prefix_sym): decode_compound_collector construction bits
10841 move to decode_compound_collector ctor. Pass the
10842 decode_compound_collector object directly as callback. Remove
10843 cleanups and use decode_compound_collector::release_symbols
10844 instead.
10845 (symtab_collector): Now a class with private fields.
10846 (symtab_collector::release_symtabs): New method.
10847 (add_symtabs_to_list): Rename to...
10848 (symtab_collector::operator()): ... this and adjust.
10849 (collect_symtabs_from_filename): symtab_collector construction
10850 bits move to symtab_collector ctor. Pass the symtab_collector
10851 object directly as callback. Remove cleanups and use
10852 symtab_collector::release_symtabs instead.
10853 (collect_symbols): Delete.
10854 (add_matching_symbols_to_info): Use lambdas.
10855 * macrocmd.c (print_macro_callback): Delete.
10856 (info_macro_command): Use a lambda.
10857 (info_macros_command): Pass print_macro_definition as callable
10858 directly.
10859 (print_one_macro): Remove 'ignore' parameter.
10860 (macro_list_command): Adjust.
10861 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10862 (macro_for_each_data::user_data): Delete field.
10863 (foreach_macro): Adjust to call the function_view.
10864 (macro_for_each): Adjust to use function_view as callback type.
10865 (foreach_macro_in_scope): Adjust to call the function_view.
10866 (macro_for_each_in_scope): Adjust to use function_view as callback
10867 type.
10868 * macrotab.h: Include "common/function-view.h".
10869 (macro_callback_fn): Declare a prototype instead of a pointer.
10870 Remove "user_data" parameter.
10871 (macro_for_each, macro_for_each_in_scope): Adjust to use
10872 function_view as callback type.
10873 * psymtab.c (partial_map_expand_apply)
10874 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10875 Adjust to use function_view as callback type and to return bool.
10876 (psym_expand_symtabs_matching): Adjust to use function_view as
10877 callback types.
10878 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10879 to use function_view as callback type and to return bool.
10880 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10881 callback types.
10882 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10883 as callback types.
10884 * symfile.h: Include "common/function-view.h".
10885 (expand_symtabs_file_matcher_ftype)
10886 (expand_symtabs_symbol_matcher_ftype)
10887 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10888 return bool.
10889 (quick_symbol_functions::map_symtabs_matching_filename)
10890 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10891 function_view as callback type and return bool.
10892 (expand_symtabs_matching): Adjust to use function_view as callback
10893 type.
10894 (maintenance_expand_name_matcher)
10895 (maintenance_expand_file_matcher): Delete.
10896 (maintenance_expand_symtabs): Use lambdas.
10897 * symtab.c (iterate_over_some_symtabs): Adjust to use
10898 function_view as callback types and return bool.
10899 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10900 of a cleanup.
10901 (lookup_symtab_callback): Delete.
10902 (lookup_symtab): Use a lambda.
10903 (iterate_over_symbols): Adjust to use function_view as callback
10904 type.
10905 (struct search_symbols_data, search_symbols_file_matches)
10906 (search_symbols_name_matches): Delete.
10907 (search_symbols): Use a pair of lambdas.
10908 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10909 (symtab_expansion_callback): Delete.
10910 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10911 * symtab.h: Include "common/function-view.h".
10912 (iterate_over_some_symtabs): Adjust to use function_view as
10913 callback type and return bool.
10914 (iterate_over_symtabs): Adjust to use function_view as callback
10915 type.
10916 (symbol_found_callback_ftype): Remove 'data' parameter and return
10917 bool.
10918 (iterate_over_symbols): Adjust to use function_view as callback
10919 type.
10920
07e253aa
PA
109212017-02-23 Pedro Alves <palves@redhat.com>
10922
10923 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10924 (%.o) <unittests/%.c>: New pattern.
10925 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10926 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10927 * common/function-view.h: New file.
10928 * unittests/function-view-selftests.c: New file.
10929 * configure: Regenerate.
10930
8eaf5320
SM
109312017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10932
10933 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10934 inferior_ptid.
10935 * go32-nat.c (go32_thread_alive): Likewise.
10936
38768751
YQ
109372017-02-23 Yao Qi <yao.qi@linaro.org>
10938
10939 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10940 delete.
10941
0a8beaba
YQ
109422017-02-23 Yao Qi <yao.qi@linaro.org>
10943
10944 * varobj.c (varobj_clear_saved_item): Use delete instead of
10945 xfree.
10946 (update_dynamic_varobj_children): Likewise.
10947
58fdfd2c
JK
109482017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10949
10950 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10951
1b90b139
SM
109522017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10953
10954 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10955 m_enum_value to 0 in default constructor.
10956
2039d74e
EBM
109572017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10958
10959 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10960 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10961 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10962 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10963 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10964 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10965 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10966 IS_STORE_CONDITIONAL_INSN.
10967
7814882a
JK
109682017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10971
0ae60b63
JK
109722017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10973
10974 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10975
0224619f
JK
109762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10977
10978 * dwarf2read.c (skip_one_die, read_attribute_value)
10979 (dwarf2_const_value_attr, dump_die_shallow)
10980 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10981 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10982
0af92d60
JK
109832017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10984
10985 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10986 (dwarf_parse_macro_header): Accept DWARF version 5.
10987 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10988
216f72a1
JK
109892017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10990
10991 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10992 DW_AT_GNU_*.
10993 * common/common-exceptions.h (enum errors): Likewise.
10994 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10995 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10996 (dwarf_expr_context::execute_stack_op): Likewise.
10997 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10998 Likewise.
10999 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11000 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11001 (show_entry_values_debug, call_site_to_target_addr)
11002 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11003 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11004 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11005 (value_of_dwarf_block_entry, indirect_pieced_value)
11006 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11007 (disassemble_dwarf_expression): Likewise.
11008 * dwarf2read.c (process_die, inherit_abstract_dies)
11009 (read_call_site_scope): Likewise.
11010 * gdbtypes.h (struct func_type, struct call_site_parameter)
11011 (struct call_site): Likewise.
11012 * stack.c (read_frame_arg): Likewise.
11013 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11014
43988095
JK
110152017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11016
11017 * defs.h (read_unsigned_leb128): New declaration.
11018 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11019 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11020 (dwarf2_find_location_expression): Call also
11021 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
11022 * dwarf2loc.h (dwarf2_version): New declaration.
11023 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11024 rnglists.
11025 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11026 .debug_rnglists.
11027 (struct dwop_section_names): Add loclists_dwo.
11028 (dwop_section_names): Add .debug_loclists.dwo.
11029 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11030 (struct dwarf2_per_cu_data): Add dwarf_version.
11031 (struct dwo_sections): Add loclists.
11032 (struct attr_abbrev): Add implicit_const.
11033 (read_indirect_line_string): New declaration.
11034 (read_unsigned_leb128): Delete declaration.
11035 (rcuh_kind): New definition.
11036 (read_and_check_comp_unit_head): Change parameter
11037 is_debug_types_section to section_kind.
11038 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11039 (read_comp_unit_head): Change parameter abfd to section, add parameter
11040 section_kind. Handle DWARF-5.
11041 (error_check_comp_unit_head): Accept also DWARF version 5.
11042 (read_and_check_comp_unit_head): Change parameter
11043 is_debug_types_section to section_kind.
11044 (read_and_check_type_unit_head): Delete function.
11045 (read_abbrev_offset): Handle DWARF-5.
11046 (create_debug_type_hash_table): Add parameter section_kind. Process
11047 only DW_UT_type. Use signature and type_offset_in_tu from struct
11048 comp_unit_head.
11049 (create_debug_types_hash_table): Update create_debug_type_hash_table
11050 caller.
11051 (create_all_type_units): Call create_debug_type_hash_table.
11052 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11053 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11054 caller.
11055 (skip_one_die): Handle DW_FORM_implicit_const.
11056 (dwarf2_rnglists_process): New function.
11057 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11058 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11059 (read_attribute_value): Handle DW_FORM_implicit_const,
11060 DW_FORM_line_strp.
11061 (read_attribute): Handle DW_FORM_implicit_const.
11062 (read_indirect_string_at_offset_from): New function from
11063 read_indirect_string_at_offset.
11064 (read_indirect_string_at_offset): Call
11065 read_indirect_string_at_offset_from.
11066 (read_indirect_line_string_at_offset): New function.
11067 (read_indirect_string): New function comment.
11068 (read_indirect_line_string): New function.
11069 (read_unsigned_leb128): Make it global.
11070 (dwarf2_string_attr): Handle DWARF-5.
11071 (add_include_dir_stub, read_formatted_entries): New functions.
11072 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11073 Handle DWARF-5.
11074 (per_cu_header_read_in): Update read_comp_unit_head caller.
11075 (dwarf2_version): New function.
11076 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11077 rnglists.
11078 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11079 fields.
11080
22d2f3ab
JK
110812017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11082
11083 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11084
5f46c5a5
JK
110852017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11086
11087 * dwarf2read.c (dwarf2_ranges_process): New function from
11088 dwarf2_ranges_read.
11089 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11090 dwarf2_ranges_process.
11091
78d4d2c5
JK
110922017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11093
11094 * dwarf2read.c (create_debug_type_hash_table): New function from
11095 create_debug_types_hash_table.
11096 (create_debug_types_hash_table): Call create_debug_type_hash_table.
11097 (create_all_type_units, open_and_init_dwo_file): Update
11098 create_debug_types_hash_table callers.
11099
1b076f25
SDJ
111002017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11101
11102 PR gdb/16188
11103 * fork-child.c (trace_start_error): Fix thinko. va_end should
11104 refer to 'ap', not 'args'.
11105
0db8980c
SDJ
111062017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11107 Pedro Alves <palves@redhat.com>
11108
11109 PR gdb/16188
11110 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11111 calls succeeded.
11112 * fork-child.c (trace_start_error): New function.
11113 (trace_start_error_with_name): Likewise.
11114 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11115 * inf-ptrace.c (inf_ptrace_me): Likewise.
11116 * inferior.h (trace_start_error): New prototype.
11117 (trace_start_error_with_name): Likewise.
11118
99e8a4f9
SDJ
111192017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11120
11121 PR gdb/21164
11122 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11123 NULL before using it.
11124 * symmisc.c (maintenance_print_symbols): Likewise.
11125 (maintenance_print_msymbols): Likewise.
11126
4e746bb6
TW
111272017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11128
11129 * NEWS: Add record Python bindings entry.
11130
111312017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11132
11133 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11134 py-record-full.o.
11135 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11136 * python/py-record-btrace.c, python/py-record-btrace.h,
11137 python/py-record-full.c, python/py-record-full.h: New file.
11138 * python/py-record.c: Add include for py-record-btrace.h and
11139 py-record-full.h.
11140 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11141 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11142 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11143 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11144 New definition.
11145 (gdbpy_initialize_btrace): New export.
11146 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11147
111482017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11149
11150 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11151 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11152 * python/py-record.c: New file.
11153 * python/python-internal.h (gdbpy_start_recording,
11154 gdbpy_current_recording, gdpy_stop_recording,
11155 gdbpy_initialize_record): New export.
11156 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11157 (python_GdbMethods): Add gdbpy_start_recording,
11158 gdbpy_current_recording and gdbpy_stop_recording.
11159
111602017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11161
11162 * record-btrace.c (record_btrace_record_method): New function.
11163 (init_record_btrace_ops): Initialize to_record_method.
11164 * record-full.c (record_full_record_method): New function.
11165 (init_record_full_ops, init_record_full_core_ops): Add
11166 record_full_record_method.
11167 * record.h (enum record_method): New enum.
11168 * target-debug.h (target_debug_print_enum_record_method: New define.
11169 * target-delegates.c: Regenerate.
11170 * target.c (target_record_method): New function.
11171 * target.h: Include record.h.
11172 (struct target_ops) <to_record_method>: New field.
11173 (target_record_method): New export.
11174
111752017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11176
11177 * record.h (record_start, record_stop): New export.
11178 * record.c (record_start, record_stop): New function.
11179
111802017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11181
11182 * btrace.c (btrace_fetch): Copy function call segments pointer
11183 into a vector.
11184 (btrace_clear): Clear the vector.
11185 (btrace_find_insn_by_number): Use binary search to find the correct
11186 function call segment.
11187 * btrace.h (brace_fun_p): New typedef.
11188 (struct btrace_thread_info) <functions>: New field.
11189
111902017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11191
11192 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11193 * btrace.c (btrace_decode_error): ... here. New function.
11194 * btrace.h (btrace_decode_error): New export.
11195
111962017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11197
11198 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11199 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11200 btrace_find_insn_by_number): Remove special case for gaps.
11201 * btrace.h (btrace_insn_get_error): New export.
11202 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11203 * record-btrace.c (btrace_insn_history): Print number for gaps.
11204 (record_btrace_info, record_btrace_goto): Handle gaps.
11205
3f77c769
TT
112062017-02-14 Tom Tromey <tom@tromey.com>
11207
11208 PR python/13598:
11209 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11210 event.
11211 * python/py-evts.c (gdbpy_initialize_py_events): Add
11212 before_prompt registry.
11213 * python/py-events.h (events_object) <before_prompt>: New field.
11214
4c2c7ac6
MM
112152017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11216
11217 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11218
5cf30ebf
LM
112192017-02-13 Luis Machado <lgustavo@codesourcery.com>
11220
11221 * symfile (_initialize_symfile): Add usage text to the load command's
11222 help text.
11223
26a06916
SM
112242017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11225
11226 * utils.c (defaulted_query): Don't query on secondary UIs.
11227
0b145e37
TT
112282017-02-10 Tom Tromey <tom@tromey.com>
11229
11230 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11231
2d8365c4
TT
112322017-02-10 Tom Tromey <tom@tromey.com>
11233
11234 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11235 "cleanup" local.
11236 * python/py-type.c (typy_legacy_template_argument): Remove
11237 unnecessary "cleanup" local.
11238
2bb8f231
TT
112392017-02-10 Tom Tromey <tom@tromey.com>
11240
11241 * python/python.c (do_start_initialization): New function, from
11242 _initialize_python.
11243 (_initialize_python): Call do_start_initialization.
11244 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11245 goto.
11246
1bdfaf42
TT
112472017-02-10 Tom Tromey <tom@tromey.com>
11248
11249 * python/py-prettyprint.c (pretty_print_one_value): Use
11250 gdbpy_ref.
11251
88b6faea
TT
112522017-02-10 Tom Tromey <tom@tromey.com>
11253
11254 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11255 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11256 gdbpy_ref.
11257 * python/py-type.c (field_new): Use gdbpy_ref.
11258 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11259 gdbpy_ref.
11260 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11261 (py_free_pspace): Likewise.
11262 (pspace_to_pspace_object): Likewise.
11263 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11264 (py_free_objfile): Likewise.
11265 (objfile_to_objfile_object): Likewise.
11266 * python/py-inferior.c (delete_thread_object): Use
11267 gdbpy_ref.
11268 (infpy_read_memory): Likewise.
11269 (py_free_inferior): Likewise.
11270 * python/py-evtregistry.c (create_eventregistry_object): Use
11271 gdbpy_ref.
11272 * python/py-event.c (create_event_object): Use gdbpy_ref.
11273
7780f186
TT
112742017-02-10 Tom Tromey <tom@tromey.com>
11275
11276 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11277 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11278 used.
11279 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11280 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11281 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11282 python/py-framefilter.c, python/py-function.c,
11283 python/py-inferior.c, python/py-infevents.c,
11284 python/py-linetable.c, python/py-newobjfileevent.c,
11285 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11286 python/py-signalevent.c, python/py-stopevent.c,
11287 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11288 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11289 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11290 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11291
d4b0bb18
TT
112922017-02-10 Tom Tromey <tom@tromey.com>
11293
11294 * ui-out.h (ui_out_emit_type): New class.
11295 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11296 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11297 and ui_out_emit_tuple.
11298 (enumerate_locals): Likewise.
11299 (py_mi_print_variables, py_print_locals, py_print_args): Use
11300 ui_out_emit_list.
11301 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11302 ui_out_emit_list.
11303 * common/gdb_optional.h: New file.
11304
f67f945c
MG
113052017-02-10 Martin Galvan <martingalvan@sourceware.org>
11306
11307 * MAINTAINERS (Write After Approval): Update my e-mail address.
11308
18da0c51
MG
113092017-02-10 Martin Galvan <martingalvan@sourceware.org>
11310
11311 PR gdb/21122
11312 * breakpoint.c (_initialize_breakpoint): Update the help description
11313 of the 'commands' command to indicate that it takes a list argument.
11314
62c14536
SM
113152017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11316
11317 * interps.c (current_interp_set_logging): Remove "return".
11318
ff6fa247
GB
113192017-02-09 Gary Benson <gbenson@redhat.com>
11320
11321 * symtab.c (add_symtab_completions): Prevent NULL pointer
11322 dereference.
11323
a474bd8e
PA
113242017-02-08 Pedro Alves <palves@redhat.com>
11325
11326 * interps.c (interp::interp): Remove reference to quiet_p.
11327 (interp_set): Make static. Remove dead "Switching to" output
11328 code.
11329 (interp_quiet_p, interp_set_quiet): Delete.
11330 (interpreter_exec_cmd): Don't set the interpreter quiet.
11331 * interps.h (interp_quiet_p): Make static.
11332 (class interp) <quiet_p>: Remove field
11333
3d7b173c
JG
113342017-02-08 Jerome Guitton <guitton@adacore.com>
11335
604c4576
JG
11336 * cli/cli-decode.c (find_command_name_length): Make it extern.
11337 * cli/cli-decode.h (find_command_name_length): Declare.
11338 * cli/cli-script.c (command_name_equals, line_first_arg):
11339 New functions.
11340 (process_next_line): Use cli-decode to parse command names.
11341 (build_command_line): Make args a constant pointer.
11342
113432017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 11344
3d7b173c
JG
11345 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11346 Remove case-insensitive search.
11347
1291063d
JM
113482017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11349
11350 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11351 at the end of the line. Avoids an ARI warning.
11352
20b477a7
LM
113532017-02-06 Luis Machado <lgustavo@codesourcery.com>
11354
11355 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11356 rdseed instructions.
11357 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11358
3f7b46f2
IR
113592017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11360
11361 PR tdep/20936
11362 Provide and use sparc32 and sparc64 target description XML files.
11363 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11364 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11365 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11366 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11367 * features/sparc/sparc32-solaris.xml: New file.
11368 * features/sparc/sparc64-solaris.xml: New file.
11369 * features/sparc/sparc32-solaris.c: Generated.
11370 * features/sparc/sparc64-solaris.c: Generated.
11371 * sparc-tdep.h: Account for differences in target descriptions.
11372 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11373 (sparc32_register_type): Use target provided registers.
11374 (validate_tdesc_registers): New function.
11375 (sparc32_gdbarch_init): Use tdesc_has_registers.
11376 Set pseudoregister functions.
11377 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11378 (sparc64_register_type): Use target provided registers.
11379 (sparc64_init_abi): Set pseudoregister functions.
11380
f0fd41c1
TT
113812017-02-03 Tom Tromey <tom@tromey.com>
11382
11383 PR rust/21097:
11384 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11385 with a single member.
11386
d6f9b0fb
PA
113872017-02-03 Pedro Alves <palves@redhat.com>
11388
11389 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11390 (cli_interp_base::~cli_interp_base): New.
11391 (cli_interp): New struct.
11392 (as_cli_interp): Cast the interp itself to cli_interp.
11393 (cli_interpreter_pre_command_loop): Rename to ...
11394 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
11395 parameter.
11396 (cli_interpreter_init): Rename to ...
11397 (cli_interp::init): ... this. Remove 'self' parameter. Use
11398 boolean. Make extern.
11399 (cli_interpreter_resume): Rename to ...
11400 (cli_interp::resume): ... this. Remove 'data' parameter. Make
11401 extern.
11402 (cli_interpreter_suspend): Rename to ...
11403 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
11404 extern.
11405 (cli_interpreter_exec): Rename to ...
11406 (cli_interp::exec): ... this. Remove 'data' parameter. Make
11407 extern.
11408 (cli_interpreter_supports_command_editing): Rename to ...
11409 (cli_interp_base::supports_command_editing): ... this. Remove
11410 'interp' parameter. Make extern.
11411 (cli_ui_out): Rename to ...
11412 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
11413 Make extern.
11414 (cli_set_logging): Rename to ...
11415 (cli_interp_base::set_logging): ... this. Remove 'interp'
11416 parameter. Make extern.
11417 (cli_interp_procs): Delete.
11418 (cli_interp_factory): Adjust to use "new".
11419 * cli/cli-interp.h: Include "interps.h".
11420 (struct cli_interp_base): New struct.
11421 * interps.c (struct interp): Delete. Fields moved to interps.h.
11422 (interp_new): Delete.
11423 (interp::interp, interp::~interp): New.
11424 (interp_set): Use bool, and return void. Assume the interpreter
11425 has suspend, init and resume methods, and that the all return
11426 void.
11427 (set_top_level_interpreter): interp_set returns void.
11428 (interp_ui_out): Adapt.
11429 (current_interp_set_logging): Adapt.
11430 (interp_data): Delete.
11431 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11432 (interp_exec): Adapt.
11433 (top_level_interpreter_data): Delete.
11434 * interps.h (interp_init_ftype, interp_resume_ftype)
11435 (interp_suspend_ftype, interp_exec_ftype)
11436 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11437 (class interp): New.
11438 (interp_new): Delete.
11439 (interp_set): Now returns void. Use bool.
11440 (interp_data, top_level_interpreter_data): Delete.
11441 * mi/mi-common.h: Include interps.h.
11442 (class mi_interp): Inherit from interp. Define a ctor. Declare
11443 init, resume, suspect, exec, interp_ui_out, set_logging and
11444 pre_command_loop methods.
11445 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11446 (mi_interpreter_init): Rename to ...
11447 (mi_interp::init): ... this. Remove the 'interp' parameter, use
11448 bool, return void and make extern. Adjust.
11449 (mi_interpreter_resume): ... Rename to ...
11450 (mi_interp::resume): ... this. Remove the 'data' parameter,
11451 return void and make extern. Adjust.
11452 (mi_interpreter_suspend): ... Rename to ...
11453 (mi_interp::suspend): ... this. Remove the 'data' parameter,
11454 return void and make extern. Adjust.
11455 (mi_interpreter_exec): ... Rename to ...
11456 (mi_interp::exec): ... this. Remove the 'data' parameter and make
11457 extern. Adjust.
11458 (mi_interpreter_pre_command_loop): ... Rename to ...
11459 (mi_interp::pre_command_loop): ... this. Remove the 'self'
11460 parameter and make extern.
11461 (mi_on_normal_stop_1): Adjust.
11462 (mi_ui_out): Rename to ...
11463 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
11464 parameter and make extern. Adjust.
11465 (mi_set_logging): Rename to ...
11466 (mi_interp::set_logging): ... this. Remove the 'interp'
11467 parameter and make extern. Adjust.
11468 (mi_interp_procs): Delete.
11469 (mi_interp_factory): Adjust to use 'new'.
11470 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11471 (mi_print_exception, mi_execute_command, mi_load_progress):
11472 Adjust.
11473 * tui/tui-interp.c (tui_interp): New class.
11474 (as_tui_interp): Return a tui_interp pointer.
11475 (tui_on_normal_stop, tui_on_signal_received)
11476 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11477 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11478 to use interp::interp_ui_out.
11479 (tui_init): Rename to ...
11480 (tui_interp::init): ... this. Remove the 'self' parameter, use
11481 bool, return void and make extern. Adjust.
11482 (tui_resume): Rename to ...
11483 (tui_interp::resume): ... this. Remove the 'data' parameter,
11484 return void and make extern. Adjust.
11485 (tui_suspend): Rename to ...
11486 (tui_interp::suspend): ... this. Remove the 'data' parameter,
11487 return void and make extern. Adjust.
11488 (tui_ui_out): Rename to ...
11489 (tui_interp::interp_ui_out): ... this. Remove the 'self'
11490 parameter, and make extern. Adjust.
11491 (tui_exec): Rename to ...
11492 (tui_interp::exec): ... this. Remove the 'data' parameter and
11493 make extern.
11494 (tui_interp_procs): Delete.
11495 (tui_interp_factory): Use "new".
11496
65c40c95
TT
114972017-02-02 Tom Tromey <tom@tromey.com>
11498
11499 * rust-exp.y (ends_raw_string, space_then_number)
11500 (rust_identifier_start_p): Return bool.
11501 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11502 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11503 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11504 (rust_chartype_p): Return bool.
11505 (val_print_struct, rust_print_struct_def, rust_print_type):
11506 Update.
11507 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11508 Return bool.
11509
b50f188d
TT
115102017-02-02 Tom Tromey <tom@tromey.com>
11511
11512 * rust-lang.c: Reindent.
11513
03c85b11
TT
115142017-02-02 Tom Tromey <tom@tromey.com>
11515
11516 * rust-lang.h (rust_crate_for_block): Update.
11517 * rust-lang.c (rust_crate_for_block): Return std::string.
11518 (rust_get_disr_info): Use std:;string, not
11519 gdb::unique_xmalloc_ptr.
11520 * rust-exp.y (crate_name): Update.
11521
9b6da501
PA
115222017-02-02 Pedro Alves <palves@redhat.com>
11523
11524 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11525 field out of gdb_disassembler_test and make it static.
11526
ec4cb20b
PA
115272017-02-02 Pedro Alves <palves@redhat.com>
11528
11529 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11530 mi1_interp and mi_interp fields.
11531
5be5dbf0
PA
115322017-02-02 Pedro Alves <palves@redhat.com>
11533
616268b6
PA
11534 * cli/cli-interp.c (struct saved_output_files, saved_output):
11535 Moved from cli/cli-logging.c.
11536 (cli_set_logging): New function.
11537 (cli_interp_procs): Install cli_set_logging.
11538 * cli/cli-interp.h (make_logging_output, cli_set_logging):
11539 Declare.
11540 * cli/cli-logging.c (struct saved_output_files, saved_output):
11541 Moved to cli/cli-interp.c.
11542 (pop_output_files): Don't save outputs here.
11543 (make_logging_output): New function.
11544 (handle_redirections): Don't build tee nor save previous outputs
11545 here.
11546 * interps.c (current_interp_set_logging): Change prototype.
11547 Assume there's always a set_logging_proc method installed.
11548 * interps.h (interp_set_logging_ftype): Change prototype.
11549 (current_interp_set_logging): Change prototype and adjust comment.
11550 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
11551 use make_logging_output.
11552 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
115532017-02-02 Pedro Alves <palves@redhat.com>
11554
5be5dbf0
PA
11555 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11556 from ...
11557 (set_logging_overwrite): ... here.
11558 (logging_no_redirect_file): Delete.
11559 (set_logging_redirect): Don't handle redirection on the fly.
11560 Instead warn that "logging off" / "logging on" is necessary.
11561 (pop_output_files): Delete references to logging_no_redirect_file.
11562 (show_logging_command): Always speak in terms of what will happen
11563 once logging is reenabled.
11564
c99cc448
PA
115652017-02-02 Pedro Alves <palves@redhat.com>
11566
11567 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11568
8b172ce7
PA
115692017-02-02 Pedro Alves <palves@redhat.com>
11570
11571 * disasm.c (gdb_pretty_print_insn): Rename to ...
11572 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11573 Remove gdbarch parameter. Adapt to clear the object's buffers
11574 instead of allocating new buffers, and to print using the object's
11575 gdb_disassembler instead of calling gdb_print_insn.
11576 (dump_insns): Use gdb_pretty_print_disassembler.
11577 * disasm.h (gdb_pretty_print_insn): Delete declaration.
11578 (gdb_pretty_print_disassembler): New class.
11579 * record-btrace.c (btrace_insn_history): Use
11580 gdb_pretty_print_disassembler.
11581
d7e74731
PA
115822017-02-02 Pedro Alves <palves@redhat.com>
11583
11584 * ada-lang.c (type_as_string): Use string_file.
11585 * ada-valprint.c (ada_print_floating): Use string_file.
11586 * ada-varobj.c (ada_varobj_scalar_image)
11587 (ada_varobj_get_value_image): Use string_file.
11588 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11589 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11590 * breakpoint.c (update_inserted_breakpoint_locations)
11591 (insert_breakpoint_locations, reattach_breakpoints)
11592 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11593 (print_it_watchpoint): Use string_file.
11594 (save_breakpoints): Use stdio_file.
11595 * c-exp.y (oper): Use string_file.
11596 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11597 tee_file.
11598 (pop_output_files): Use delete.
11599 (handle_redirections): Use stdio_file and tee_file.
11600 * cli/cli-setshow.c (do_show_command): Use string_file.
11601 * compile/compile-c-support.c (c_compute_program): Use
11602 string_file.
11603 * compile/compile-c-symbols.c (generate_vla_size): Take a
11604 'string_file &' instead of a 'ui_file *'.
11605 (generate_c_for_for_one_variable): Take a 'string_file &' instead
11606 of a 'ui_file *'. Use string_file.
11607 (generate_c_for_variable_locations): Take a 'string_file &'
11608 instead of a 'ui_file *'.
11609 * compile/compile-internal.h (generate_c_for_for_one_variable):
11610 Take a 'string_file &' instead of a 'ui_file *'.
11611 * compile/compile-loc2c.c (push, pushf, unary, binary)
11612 (print_label, pushf_register_address, pushf_register)
11613 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11614 'ui_file *'. Adjust.
11615 * compile/compile.c (compile_to_object): Use string_file.
11616 * compile/compile.h (compile_dwarf_expr_to_c)
11617 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11618 'ui_file *'.
11619 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11620 (replace_typedefs_qualified_name): Use string_file and
11621 obstack_copy0.
11622 * disasm.c (gdb_pretty_print_insn): Use string_file.
11623 (gdb_disassembly): Adjust reference the null_stream global.
11624 (do_ui_file_delete): Delete.
11625 (gdb_insn_length): Use null_stream.
11626 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11627 * dwarf2loc.c (dwarf2_compile_property_to_c)
11628 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11629 'string_file &' instead of a 'ui_file *'.
11630 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11631 * dwarf2read.c (do_ui_file_peek_last): Delete.
11632 (dwarf2_compute_name): Use string_file.
11633 * event-top.c (gdb_setup_readline): Use stdio_file.
11634 * gdbarch.sh (verify_gdbarch): Use string_file.
11635 * gdbtypes.c (safe_parse_type): Use null_stream.
11636 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11637 string_file.
11638 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11639 'string_file *' instead of a 'ui_file *'.
11640 (gdbscm_arch_disassemble): Use string_file.
11641 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11642 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11643 inherits from ui_file.
11644 (ioscm_file_port_delete, ioscm_file_port_rewind)
11645 (ioscm_file_port_put): Delete.
11646 (ioscm_file_port_write): Rename to ...
11647 (ioscm_file_port::write): ... this. Remove file_port_magic
11648 checks.
11649 (ioscm_file_port_new): Delete.
11650 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11651 ui_file_up.
11652 * guile/scm-type.c (tyscm_type_name): Use string_file.
11653 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11654 Use string_file.
11655 * infcmd.c (print_return_value_1): Use string_file.
11656 * infrun.c (print_target_wait_results): Use string_file.
11657 * language.c (add_language): Use string_file.
11658 * location.c (explicit_to_string_internal): Use string_file.
11659 * main.c (captured_main_1): Use null_file.
11660 * maint.c (maintenance_print_architecture): Use stdio_file.
11661 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11662 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11663 event_channel>: Change type to mi_console_file pointer.
11664 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11665 (mi_console_file_delete): Delete.
11666 (struct mi_console_file): Delete.
11667 (mi_console_file_magic): Delete.
11668 (mi_console_file_new): Delete.
11669 (mi_console_file::mi_console_file): New.
11670 (mi_console_file_delete): Delete.
11671 (mi_console_file_fputs): Delete.
11672 (mi_console_file::write): New.
11673 (mi_console_raw_packet): Delete.
11674 (mi_console_file::flush): New.
11675 (mi_console_file_flush): Delete.
11676 (mi_console_set_raw): Rename to ...
11677 (mi_console_file::set_raw): ... this.
11678 * mi/mi-console.h (class mi_console_file): New class.
11679 (mi_console_file_new, mi_console_set_raw): Delete.
11680 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11681 (mi_set_logging): Use delete and tee_file. Adjust.
11682 * mi/mi-main.c (output_register): Use string_file.
11683 (mi_cmd_data_evaluate_expression): Use string_file.
11684 (mi_cmd_data_read_memory): Use string_file.
11685 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11686 * mi/mi-out.c (mi_ui_out::main_stream): New.
11687 (mi_ui_out::rewind): Use main_stream and
11688 string_file.
11689 (mi_ui_out::put): Use main_stream and string_file.
11690 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11691 Allocate a 'string_file' instead.
11692 (mi_out_new): Don't allocate a mem_fileopen stream here.
11693 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11694 (mi_ui_out::main_stream): Declare method.
11695 * printcmd.c (eval_command): Use string_file.
11696 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11697 * python/py-arch.c (archpy_disassemble): Use string_file.
11698 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11699 * python/py-frame.c (frapy_str): Use string_file.
11700 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11701 Use string_file.
11702 * python/py-type.c (typy_str): Use string_file.
11703 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11704 * python/py-value.c (valpy_str): Use string_file.
11705 * record-btrace.c (btrace_insn_history): Use string_file.
11706 * regcache.c (regcache_print): Use stdio_file.
11707 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11708 * remote.c (escape_buffer): Use string_file.
11709 * rust-lang.c (rust_get_disr_info): Use string_file.
11710 * serial.c (serial_open_ops_1): Use stdio_file.
11711 (do_serial_close): Use delete.
11712 * stack.c (print_frame_arg): Use string_file.
11713 (print_frame_args): Remove local mem_fileopen stream, not used.
11714 (print_frame): Use string_file.
11715 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11716 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11717 Take a 'string_file *' instead of a 'ui_file *'.
11718 * top.c (new_ui): Use stdio_file and stderr_file.
11719 (free_ui): Use delete.
11720 (execute_command_to_string): Use string_file.
11721 (quit_confirm): Use string_file.
11722 * tracepoint.c (collection_list::append_exp): Use string_file.
11723 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11724 * tui/tui-file.c: Don't include "ui-file.h".
11725 (enum streamtype, struct tui_stream): Delete.
11726 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11727 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11728 (tui_file::tui_file): New method.
11729 (tui_file_fputs): Delete.
11730 (tui_file_get_strbuf): Delete.
11731 (tui_file::puts): New method.
11732 (tui_file_adjust_strbuf): Delete.
11733 (tui_file_flush): Delete.
11734 (tui_file::flush): New method.
11735 * tui/tui-file.h: Tweak intro comment.
11736 Include ui-file.h.
11737 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11738 (tui_file_adjust_strbuf): Delete declarations.
11739 (class tui_file): New class.
11740 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11741 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11742 (tui_register_format): Use string_stream.
11743 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11744 (tui_get_function_from_frame): Use string_file.
11745 * typeprint.c (type_to_string): Use string_file.
11746 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11747 (null_stream): New global.
11748 (ui_file_delete): Delete.
11749 (ui_file::ui_file): New.
11750 (null_file_isatty): Delete.
11751 (ui_file::~ui_file): New.
11752 (null_file_rewind): Delete.
11753 (ui_file::printf): New.
11754 (null_file_put): Delete.
11755 (null_file_flush): Delete.
11756 (ui_file::putstr): New.
11757 (null_file_write): Delete.
11758 (ui_file::putstrn): New.
11759 (null_file_read): Delete.
11760 (ui_file::putc): New.
11761 (null_file_fputs): Delete.
11762 (null_file_write_async_safe): Delete.
11763 (ui_file::vprintf): New.
11764 (null_file_delete): Delete.
11765 (null_file::write): New.
11766 (null_file_fseek): Delete.
11767 (null_file::puts): New.
11768 (ui_file_data): Delete.
11769 (null_file::write_async_safe): New.
11770 (gdb_flush, ui_file_isatty): Adjust.
11771 (ui_file_put, ui_file_rewind): Delete.
11772 (ui_file_write): Adjust.
11773 (ui_file_write_for_put): Delete.
11774 (ui_file_write_async_safe, ui_file_read): Adjust.
11775 (ui_file_fseek): Delete.
11776 (fputs_unfiltered): Adjust.
11777 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11778 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11779 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11780 (set_ui_file_data): Delete.
11781 (string_file::~string_file, string_file::write)
11782 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11783 (do_ui_file_as_string, ui_file_as_string): Delete.
11784 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11785 (struct mem_file): Delete.
11786 (mem_file_new): Delete.
11787 (stdio_file::stdio_file): New.
11788 (mem_file_delete): Delete.
11789 (stdio_file::stdio_file): New.
11790 (mem_fileopen): Delete.
11791 (stdio_file::~stdio_file): New.
11792 (mem_file_rewind): Delete.
11793 (stdio_file::set_stream): New.
11794 (mem_file_put): Delete.
11795 (stdio_file::open): New.
11796 (mem_file_write): Delete.
11797 (stdio_file_magic, struct stdio_file): Delete.
11798 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11799 (stdio_file::flush): New.
11800 (stdio_file_read): Rename to ...
11801 (stdio_file::read): ... this. Adjust.
11802 (stdio_file_write): Rename to ...
11803 (stdio_file::write): ... this. Adjust.
11804 (stdio_file_write_async_safe): Rename to ...
11805 (stdio_file::write_async_safe) ... this. Adjust.
11806 (stdio_file_fputs): Rename to ...
11807 (stdio_file::puts) ... this. Adjust.
11808 (stdio_file_isatty): Delete.
11809 (stdio_file_fseek): Delete.
11810 (stdio_file::isatty): New.
11811 (stderr_file_write): Rename to ...
11812 (stderr_file::write) ... this. Adjust.
11813 (stderr_file_fputs): Rename to ...
11814 (stderr_file::puts) ... this. Adjust.
11815 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11816 (stderr_file::stderr_file): New.
11817 (tee_file_magic): Delete.
11818 (struct tee_file): Delete.
11819 (tee_file::tee_file): New.
11820 (tee_file_new): Delete.
11821 (tee_file::~tee_file): New.
11822 (tee_file_delete): Delete.
11823 (tee_file_flush): Rename to ...
11824 (tee_file::flush): ... this. Adjust.
11825 (tee_file_write): Rename to ...
11826 (tee_file::write): ... this. Adjust.
11827 (tee_file::write_async_safe): New.
11828 (tee_file_fputs): Rename to ...
11829 (tee_file::puts): ... this. Adjust.
11830 (tee_file_isatty): Rename to ...
11831 (tee_file::isatty): ... this. Adjust.
11832 * ui-file.h (struct obstack, struct ui_file): Don't
11833 forward-declare.
11834 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11835 (ui_file_write_ftype)
11836 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11837 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11838 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11839 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11840 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11841 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11842 (set_ui_file_fseek): Delete.
11843 (ui_file_data, ui_file_delete, ui_file_rewind)
11844 (struct ui_file): New.
11845 (ui_file_up): New.
11846 (class null_file): New.
11847 (null_stream): Declare.
11848 (ui_file_write_for_put, ui_file_put): Delete.
11849 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11850 Delete.
11851 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11852 (gdb_fopen, tee_file_new): Delete.
11853 (struct string_file): New.
11854 (struct stdio_file): New.
11855 (stdio_file_up): New.
11856 (struct stderr_file): New.
11857 (class tee_file): New.
11858 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11859 of a 'ui_file *'. Adjust.
11860 * ui-out.h (class ui_out) <field_stream>: Likewise.
11861 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11862 (null_stream): Delete.
11863 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11864 Adjust.
11865 * utils.h (struct ui_file): Delete forward declaration..
11866 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11867 (error_stream): Take a 'string_file &' instead of a
11868 'ui_file *'.
11869 * varobj.c (varobj_value_get_print_value): Use string_file.
11870 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11871 * gdbarch.c: Regenerate.
11872
187808b0
PA
118732017-02-02 Pedro Alves <palves@redhat.com>
11874
11875 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11876 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11877 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11878 Adjust to call gdb_print_insn instead of
11879 gdb_disassembler::print_insn.
11880 (dump_insns, do_mixed_source_and_assembly_deprecated)
11881 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11882 'gdbarch' parameter. Remove gdb_disassembler parameter.
11883 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11884 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11885 declaration.
11886 (gdb_pretty_print_insn): Re-add declaration.
11887 * record-btrace.c (btrace_insn_history): Don't allocate a
11888 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11889
7a8eb317
SM
118902017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11891
11892 * disasm.h (gdb_disassembly): Remove file_string parameter.
11893 * disasm.c (gdb_disassembly): Likewise.
11894 * cli/cli-cmds.c (print_disassembly): Adapt.
11895 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11896 * stack.c (do_gdb_disassembly): Likewise.
11897
7346ef59
AA
118982017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11899
11900 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11901 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11902 targets. And if the implicit value is longer than needed, extract
11903 the first bytes instead of the "least significant" ones.
11904
cd4007e4
MM
119052017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11906
11907 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11908 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11909 (btrace_fetch): Assert can_access_registers_ptid.
11910 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11911 validate_registers_access.
11912
cf77c34e
MM
119132017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11914
11915 * gdbthread.h (can_access_registers_ptid): New.
11916 * thread.c (can_access_registers_ptid): New.
11917
be85ce7d
PA
119182017-02-01 Pedro Alves <palves@redhat.com>
11919
11920 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11921
29b0b251
PA
119222017-01-31 Pedro Alves <palves@redhat.com>
11923
11924 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11925 Fix typos.
11926
289b5b24
PA
119272017-01-31 Pedro Alves <palves@redhat.com>
11928
11929 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11930 not used.
11931
b47413b4
PA
119322017-01-31 Pedro Alves <palves@redhat.com>
11933
11934 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11935
60adb36c
PA
119362017-01-31 Pedro Alves <palves@redhat.com>
11937
11938 * common/scoped_restore.h
11939 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11940 change the value's parameter type to T2.
11941 (make_scoped_restore): Likewise.
11942
2735833d
WT
119432017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11944 Richard Henderson <rth@redhat.com>
11945
11946 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11947 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11948 GS_BASE for older kernels.
11949 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11950 GS_BASE for older kernels.
11951 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11952 and GS_BASE to the offset table.
11953 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11954 system register group.
11955 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11956 for older kernels.
11957 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11958 amd64 ABI.
11959 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11960 AMD64_GSBASE_REGNUM.
11961 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11962 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11963 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11964 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11965 i386/64bit-segments.xml in those rules.
11966 * features/i386/64bit-segments.xml: New file.
11967 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11968 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11969 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11970 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11971 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11972 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11973 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11974 * features/i386/amd64-avx-linux.c: Regenerated.
11975 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11976 * features/i386/amd64-avx-mpx.c: Regenerated.
11977 * features/i386/amd64-avx512-linux.c: Regenerated.
11978 * features/i386/amd64-linux.c: Regenerated.
11979 * features/i386/amd64-mpx-linux.c: Regenerated.
11980 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11981 * features/i386/i386-avx-mpx.c: Regenerated.
11982 * features/i386/x32-avx-linux.c: Regenerated.
11983 * features/i386/x32-avx512-linux.c: Regenerated.
11984 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11985 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11986 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11987 * regformats/i386/amd64-linux.dat: Regenerated.
11988 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11989 * regformats/i386/x32-avx-linux.dat: Regenerated.
11990 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11991 * regformats/i386/x32-linux.dat: Regenerated.
11992
8884e97e
WT
119932017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11994
11995 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11996 Set to AMD64_NUM_REGS.
11997
7005d26a
WT
119982017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11999
12000 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12001 that checks validity of a register number.
12002
4bd2e1b2
KC
120032017-01-27 Kees Cook <keescook@google.com>
12004
12005 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12006 fetch_fpregs if target has fpa registers.
12007 (arm_linux_store_inferior_registers): Call store_fpregs if target
12008 has fpa registers.
12009
7cf1de6c
AA
120102017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
12011
12012 * cris-tdep.c (cris_gdbarch_init): Remove check for
12013 info.byte_order and force it to BFD_ENDIAN_LITTLE.
12014
874a1c8c
AT
120152017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
12016
12017 * corelow.c (get_core_register_section): Check for regset
12018 existence before checking for REGSET_VARIABLE_SIZE.
12019
d8b49cf0
YQ
120202017-01-26 Yao Qi <yao.qi@linaro.org>
12021 Pedro Alves <palves@redhat.com>
12022
12023 PR gdb/20939
12024 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12025 call memory_error, save memaddr instead.
12026 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12027 negative, cal memory_error.
12028 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12029
658ca58c
YQ
120302017-01-26 Yao Qi <yao.qi@linaro.org>
12031
12032 * disasm-selftests.c (memory_error_test): New function.
12033 (_initialize_disasm_selftests): Register memory_error_test.
12034
79843d45
YQ
120352017-01-26 Yao Qi <yao.qi@linaro.org>
12036
12037 * Makefile.in (SFILES): Add disasm-selftests.c and
12038 selftest-arch.c.
12039 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12040 * disasm-selftests.c: New file.
12041 * selftest-arch.c: New file.
12042 * selftest-arch.h: New file.
12043
8cafda32
YQ
120442017-01-26 Yao Qi <yao.qi@linaro.org>
12045
12046 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12047 to bfd_arch_mep. Don't return 0 if section is not
12048 found. Call print_insn_mep.
12049
e47ad6c0
YQ
120502017-01-26 Pedro Alves <palves@redhat.com>
12051 Yao Qi <yao.qi@linaro.org>
12052
12053 * arm-tdep.c: Include "disasm.h".
12054 (gdb_print_insn_arm): Update code to get gdbarch.
12055 * disasm.c (dis_asm_read_memory): Change it to
12056 gdb_disassembler::dis_asm_read_memory.
12057 (dis_asm_memory_error): Likewise.
12058 (dis_asm_print_address): Likewise.
12059 (gdb_pretty_print_insn): Change it to
12060 gdb_disassembler::pretty_print_insn.
12061 (dump_insns): Add one argument gdb_disassemlber. All
12062 callers updated.
12063 (do_mixed_source_and_assembly_deprecated): Likewise.
12064 (do_mixed_source_and_assembly): Likewise.
12065 (do_assembly_only): Likewise.
12066 (gdb_disassembler::gdb_disassembler): New.
12067 (gdb_disassembler::print_insn): New.
12068 * disasm.h (class gdb_disassembler): New.
12069 (gdb_pretty_print_insn): Remove declaration.
12070 (gdb_disassemble_info): Likewise.
12071 * guile/scm-disasm.c (class gdbscm_disassembler): New.
12072 (gdbscm_disasm_read_memory_worker): Update.
12073 (gdbscm_disasm_read_memory): Update.
12074 (gdbscm_disasm_memory_error): Remove.
12075 (gdbscm_disasm_print_address): Remove.
12076 (gdbscm_disassembler::gdbscm_disassembler): New.
12077 (gdbscm_print_insn_from_port): Update.
12078 * mips-tdep.c: Include disasm.h.
12079 (gdb_print_insn_mips): Update code to get gdbarch.
12080 * record-btrace.c (btrace_insn_history): Update.
12081 * spu-tdep.c: Include disasm.h.
12082 (struct spu_dis_asm_data): Remove.
12083 (struct spu_dis_asm_info): New.
12084 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12085 SPU id.
12086 (gdb_print_insn_spu): Cast disassemble_info to
12087 spu_dis_asm_info.
12088
80d75874
YQ
120892017-01-26 Yao Qi <yao.qi@linaro.org>
12090
12091 * disasm.c (do_ui_file_delete): Delete.
12092 (gdb_insn_length): Move code creating stream to ...
12093 * utils.c (null_stream): ... here. New function.
12094 * utils.h (null_stream): Declare.
12095
60685cd0
SM
120962017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
12097
12098 * python/py-inferior.c (find_thread_object): Return directly
12099 from the loop. Remove "found" variable.
12100
eb1cdb62
JB
121012017-01-21 Joel Brobecker <brobecker@adacore.com>
12102
12103 GDB 7.12.1 released.
12104
b1ce6568
SM
121052017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12106
12107 * python/py-function.c (fnpy_call): Reorder declarations to have
12108 the gdbpy_enter object declared first.
12109 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12110
6f8b0407
SM
121112017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12112
fec93fb1 12113 PR python/21068
6f8b0407
SM
12114 * python/python-internal.h (PyMem_RawMalloc): Define for
12115 Python < 3.4.
12116 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12117 PyMem_RawMalloc instead of PyMem_Malloc.
12118
78cbbba8
LM
121192017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12120 Luis Machado <lgustavo@codesourcery.com>
12121
12122 * NEWS (New commands): Mention flash-erase.
12123 (New MI commands): Mention target-flash-erase.
12124 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12125 command.
12126 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12127 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12128 * target.c (flash_erase_command): New function.
12129 (initialize_targets): Add new flash-erase command.
12130 * target.h (flash_erase_command): New declaration.
12131
2132fe85
JB
121322017-01-20 Joel Brobecker <brobecker@adacore.com>
12133
12134 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12135 HAVE_SYS_PROCFS_H is defined.
12136
d1dff226
AH
121372017-01-18 Alan Hayward <alan.hayward@arm.com>
12138
12139 * remote.c (struct cached_reg): Change data into a pointer.
12140 * (stop_reply_dtr): Free data pointers before deleting vector.
12141 (process_stop_reply): Likewise.
12142 (remote_parse_stop_reply): Allocate space for data
12143
9890e433
AH
121442017-01-18 Alan Hayward <alan.hayward@arm.com>
12145
12146 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12147 MAX_REGISTER_SIZE.
12148 (amd64_pseudo_register_read_value): Likewise.
12149 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12150 (store_register_using_P): Likewise.
12151 * regcache.c (regcache_xfer_part): Likewise.
12152
7a36499a
IR
121532017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12154
12155 Split real and pseudo registers.
12156 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12157 (sparc32_pseudo_regnum): New enum.
12158 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12159 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12160 (SPARC32_CP0_REGISTERS): New macro.
12161 (sparc32_pseudo_register_name): New function.
12162 (sparc32_register_name): Use sparc32_pseudo_register_name.
12163 (sparc32_pseudo_register_type): New function.
12164 (sparc32_register_type): Use sparc32_pseudo_register_type.
12165 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12166 pseudo register numbers.
12167 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12168 (SPARC64_CP0_REGISTERS): New macro.
12169 (sparc64_pseudo_register_name): New function.
12170 (sparc64_register_name): Use sparc64_pseudo_register_name.
12171 (sparc64_pseudo_register_type): New function.
12172 (sparc64_register_type): Use sparc64_pseudo_register_type.
12173 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12174 pseudo register numbers.
12175 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12176 sparc64_store_arguments): Handle pseudo register numbers.
12177
6f8976bf
YQ
121782017-01-13 Yao Qi <yao.qi@linaro.org>
12179
12180 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12181 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12182 output.
12183 (getpkt_or_notif_sane_1): Likewise.
12184
e4241ace
YQ
121852017-01-13 Yao Qi <yao.qi@linaro.org>
12186
12187 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12188 of CC. Pass "-x c++-header" instead of "-x c".
12189
3015c064
SM
121902017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12191
12192 * remote.c (remote_can_async_p): Update comment.
12193
fde1b17d
SM
121942017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12195
12196 * linux-nat.c (linux_nat_can_async_p): Update comment.
12197
ca1ca08b
SM
121982017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12199
12200 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12201
4ad2da73
SM
122022017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12203
12204 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12205
c8b23b3f
TT
122062017-01-10 Tom Tromey <tom@tromey.com>
12207
12208 * python/py-type.c (typy_legacy_template_argument): Update.
12209 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12210 ~demangle_parse_info): Declare new members.
12211 (cp_demangled_name_to_comp): Return unique_ptr.
12212 (cp_demangled_name_parse_free)
12213 (make_cleanup_cp_demangled_name_parse_free)
12214 (cp_new_demangle_parse_info): Remove.
12215 * cp-support.c (do_demangled_name_parse_free_cleanup)
12216 (make_cleanup_cp_demangled_name_parse_free): Remove.
12217 (inspect_type, cp_canonicalize_string_full)
12218 (cp_canonicalize_string): Update.
12219 (mangled_name_to_comp): Change return type.
12220 (cp_class_name_from_physname, method_name_from_physname)
12221 (cp_func_name, cp_remove_params): Update.
12222 * cp-name-parser.y (demangle_parse_info): New constructor, from
12223 cp_new_demangle_parse_info.
12224 (~demangle_parse_info): New destructor, from
12225 cp_demangled_name_parse_free.
12226 (cp_merge_demangle_parse_infos): Update.
12227 (cp_demangled_name_to_comp): Change return type.
12228
1ac32117
TT
122292017-01-10 Tom Tromey <tom@tromey.com>
12230
12231 * top.c (prevent_dont_repeat): Change return type.
12232 * python/python.c (execute_gdb_command): Use std::string.
12233 Update.
12234 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12235 * command.h (prevent_dont_repeat): Change return type.
12236 * breakpoint.c (bpstat_do_actions_1): Update.
12237
0cf08227
TT
122382017-01-10 Tom Tromey <tom@tromey.com>
12239
12240 * value.h (scoped_value_mark::~scoped_value_mark): Call
12241 free_to_mark.
12242 (scoped_value_mark::free_to_mark): New method.
12243 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12244 scoped_value_mark.
12245
eb115069
TT
122462017-01-10 Tom Tromey <tom@tromey.com>
12247
12248 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12249 (valpy_reference_value, valpy_const_value, valpy_get_address)
12250 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12251 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12252 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12253 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12254 scoped_value_mark.
12255 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12256 * value.h (scoped_value_mark): New class.
12257
906768f9
TT
122582017-01-10 Tom Tromey <tom@tromey.com>
12259
12260 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12261 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12262 * psymtab.c (discard_psymtabs_upto): Remove.
12263 (make_cleanup_discard_psymtabs): Remove.
12264 (struct psymtab_state): Remove.
12265
bef155c3
TT
122662017-01-10 Tom Tromey <tom@tromey.com>
12267
12268 * record-full.c (record_full_save_cleanups): Remove.
12269 (record_full_save): Use gdb::unlinker.
12270 * gcore.c (do_bfd_delete_cleanup): Remove.
12271 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12272 cleanups.
12273 * dwarf2read.c (unlink_if_set): Remove.
12274 (write_psymtabs_to_index): Use gdb::unlinker.
12275 * common/gdb_unlinker.h: New file.
12276
192b62ce
TT
122772017-01-10 Tom Tromey <tom@tromey.com>
12278
12279 * windows-tdep.c (windows_xfer_shared_library): Update.
12280 * windows-nat.c (windows_make_so): Update.
12281 * utils.h (make_cleanup_bfd_unref): Remove.
12282 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12283 * symfile.h (symfile_bfd_open)
12284 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12285 * symfile.c (read_symbols, symbol_file_add)
12286 (separate_debug_file_exists): Update.
12287 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12288 (generic_load, reread_symbols): Update.
12289 * symfile-mem.c (symbol_file_add_from_memory): Update.
12290 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12291 (spu_symbol_file_add_from_memory): Update.
12292 * solist.h (struct target_so_ops) <bfd_open>: Return
12293 gdb_bfd_ref_ptr.
12294 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12295 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12296 gdb_bfd_ref_ptr.
12297 (solib_map_sections, reload_shared_libraries_1): Update.
12298 * solib-svr4.c (enable_break): Update.
12299 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12300 * solib-frv.c (enable_break2): Update.
12301 * solib-dsbt.c (enable_break): Update.
12302 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12303 gdb_bfd_ref_ptr.
12304 (darwin_solib_get_all_image_info_addr_at_init): Update.
12305 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12306 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12307 * record-full.c (record_full_save): Update.
12308 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12309 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12310 * minidebug.c (find_separate_debug_file_in_section): Return
12311 gdb_bfd_ref_ptr.
12312 * machoread.c (macho_add_oso_symfile): Change abfd to
12313 gdb_bfd_ref_ptr.
12314 (macho_symfile_read_all_oso): Update.
12315 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12316 (macho_symfile_read): Update.
12317 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12318 (jit_bfd_try_read_symtab): Update.
12319 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12320 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12321 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12322 gdb_bfd_ref_ptr.
12323 (gdb_bfd_ref_policy): New struct.
12324 (gdb_bfd_ref_ptr): New typedef.
12325 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12326 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12327 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12328 gdb_bfd_ref_ptr.
12329 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12330 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12331 (gcore_command): Update.
12332 * exec.c (exec_file_attach): Update.
12333 * elfread.c (elf_symfile_read): Update.
12334 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12335 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12336 (open_and_init_dwo_file): Update.
12337 (open_dwp_file): Return gdb_bfd_ref_ptr.
12338 (open_and_init_dwp_file): Update.
12339 * corelow.c (core_open): Update.
12340 * compile/compile-object-load.c (compile_object_load): Update.
12341 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12342 * coffread.c (coff_symfile_read): Update.
12343 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12344 gdb_bfd_ref_ptr. Rename.
12345 (dump_bfd_file, restore_command): Update.
12346 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12347 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12348 (find_separate_debug_file_by_buildid): Update.
12349
50315b21
TT
123502017-01-10 Tom Tromey <tom@tromey.com>
12351
12352 * common/gdb_ref_ptr.h: New file.
12353 * python/py-ref.h (struct gdbpy_ref_policy): New.
12354 (gdbpy_ref): Now a typedef.
12355
fc4007c9
TT
123562017-01-10 Tom Tromey <tom@tromey.com>
12357
12358 * utils.h (make_cleanup_htab_delete): Don't declare.
12359 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12360 Remove.
12361 * linespec.c (decode_compound_collector): Add constructor,
12362 destructor.
12363 (lookup_prefix_sym): Remove cleanup.
12364 (symtab_collector): Add constructor, destructor.
12365 (collect_symtabs_from_filename): Remove cleanup.
12366 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12367 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12368 Use htab_up.
12369 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12370 * dwarf2read.c (dw2_expand_symtabs_matching)
12371 (dw2_map_symbol_filenames, dwarf_decode_macros)
12372 (write_psymtabs_to_index): Use htab_up.
12373 * dwarf2loc.c (func_verify_no_selftailcall)
12374 (call_site_find_chain_1, func_verify_no_selftailcall)
12375 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12376 std::vector, gdb::unique_xmalloc_ptr.
12377 (call_sitep): Remove typedef.
12378 (dwarf2_locexpr_baton_eval): Remove unused variable.
12379
8dbcee67
TT
123802017-01-10 Tom Tromey <tom@tromey.com>
12381
12382 * python/python-internal.h (make_cleanup_py_decref)
12383 (make_cleanup_py_xdecref): Don't declare.
12384 * python/py-utils.c (py_decref, make_cleanup_py_decref)
12385 (py_xdecref, make_cleanup_py_xdecref): Remove.
12386
13df46cc
TT
123872017-01-10 Tom Tromey <tom@tromey.com>
12388
12389 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12390 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12391
06fc9bf7
TT
123922017-01-10 Tom Tromey <tom@tromey.com>
12393
12394 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12395
830a4934
TT
123962017-01-10 Tom Tromey <tom@tromey.com>
12397
12398 * python/py-utils.c (unicode_to_encoded_string)
12399 (python_string_to_target_string)
12400 (python_string_to_target_python_string)
12401 (python_string_to_host_string, gdbpy_obj_to_string)
12402 (get_addr_from_python): Use gdbpy_ref.
12403
4586d543
TT
124042017-01-10 Tom Tromey <tom@tromey.com>
12405
12406 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12407 gdbpy_ref.
12408
59876f8f
TT
124092017-01-10 Tom Tromey <tom@tromey.com>
12410
12411 * python/python.c (eval_python_command, gdbpy_decode_line)
12412 (gdbpy_run_events, gdbpy_start_type_printers)
12413 (gdbpy_apply_type_printers): Use gdbpy_ref.
12414
97d83487
TT
124152017-01-10 Tom Tromey <tom@tromey.com>
12416
12417 * python/py-param.c (get_doc_string, compute_enum_values): Use
12418 gdbpy_ref.
12419
9205649a
TT
124202017-01-10 Tom Tromey <tom@tromey.com>
12421
12422 * python/py-inferior.c (find_thread_object, build_inferior_list):
12423 Use gdbpy_ref.
12424
74c49d45
TT
124252017-01-10 Tom Tromey <tom@tromey.com>
12426
12427 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12428
16361ffb
TT
124292017-01-10 Tom Tromey <tom@tromey.com>
12430
12431 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12432 gdbpy_ref.
12433
905f2cca
TT
124342017-01-10 Tom Tromey <tom@tromey.com>
12435
12436 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
12437 extra incref.
12438 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12439 Use gdbpy_ref.
12440
64081434
TT
124412017-01-10 Tom Tromey <tom@tromey.com>
12442
12443 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12444 gdbpy_ref.
12445
59e9e831
TT
124462017-01-10 Tom Tromey <tom@tromey.com>
12447
12448 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
12449 decref results of PyArg_ParseTupleAndKeywords.
12450
9de10f6d
TT
124512017-01-10 Tom Tromey <tom@tromey.com>
12452
12453 * python/python.c (python_run_simple_file): Use
12454 unique_xmalloc_ptr, gdbpy_ref.
12455
2bd5759d
TT
124562017-01-10 Tom Tromey <tom@tromey.com>
12457
12458 * python/py-prettyprint.c (print_stack_unless_memory_error)
12459 (print_string_repr, print_children): Use gdbpy_ref.
12460 (dummy_python_frame): New class.
12461 (dummy_python_frame::dummy_python_frame): Rename from
12462 push_dummy_python_frame.
12463 (py_restore_tstate): Remove.
12464
3b4e0e01
TT
124652017-01-10 Tom Tromey <tom@tromey.com>
12466
12467 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12468
17a22718
TT
124692017-01-10 Tom Tromey <tom@tromey.com>
12470
12471 * python/python.c (ensure_python_env, restore_python_env):
12472 Remove.
12473 * python/python-internal.h (ensure_python_env): Don't declare.
12474 * varobj.h (varobj_ensure_python_env): Don't declare.
12475 * varobj.c (varobj_ensure_python_env): Remove.
12476
68cdc557
TT
124772017-01-10 Tom Tromey <tom@tromey.com>
12478
12479 * varobj.c (varobj_value_get_print_value): Use
12480 gdbpy_enter_varobj.
12481
1eba6383
TT
124822017-01-10 Tom Tromey <tom@tromey.com>
12483
12484 * python/py-prettyprint.c (print_string_repr, print_children):
12485 Update.
12486 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12487 of "encoding".
12488 * varobj.c (varobj_value_get_print_value): Update.
12489 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12490
bde7b3e3
TT
124912017-01-10 Tom Tromey <tom@tromey.com>
12492
12493 * varobj.c (varobj_get_display_hint)
12494 (dynamic_varobj_has_child_method, install_new_value_visualizer)
12495 (varobj_set_visualizer, free_variable): Use
12496 gdbpy_enter_varobj.
12497
a7785f8c
TT
124982017-01-10 Tom Tromey <tom@tromey.com>
12499
12500 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12501 (do_finish_initialization): New function. Use gdbpy_ref.
12502 (gdbpy_finish_initialization): Use gdbpy_enter. Call
12503 do_finish_initialization.
12504
2865bfce
TT
125052017-01-10 Tom Tromey <tom@tromey.com>
12506
12507 * python/py-param.c (get_set_value, get_show_value): Use
12508 gdbpy_enter, gdbpy_ref.
12509
0e9dcc75
TT
125102017-01-10 Tom Tromey <tom@tromey.com>
12511
12512 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12513
12a5cedd
TT
125142017-01-10 Tom Tromey <tom@tromey.com>
12515
12516 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12517
788f2586
TT
125182017-01-10 Tom Tromey <tom@tromey.com>
12519
12520 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12521 Use gdbpy_enter_varobj.
12522
6cd67bea
TT
125232017-01-10 Tom Tromey <tom@tromey.com>
12524
12525 * varobj.c (gdbpy_enter_varobj): New constructor.
12526 * python/python-internal.h (gdbpy_enter_varobj): New class.
12527 * python/py-varobj.c (py_varobj_get_iterator): Use
12528 gdbpy_enter_varobj.
12529
14b122bf
TT
125302017-01-10 Tom Tromey <tom@tromey.com>
12531
12532 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12533 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12534 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12535 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12536 unique_xmalloc_ptr.
12537 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12538
bf1ca3b9
TT
125392017-01-10 Tom Tromey <tom@tromey.com>
12540
12541 * python/py-xmethods.c (invoke_match_method): Use
12542 gdbpy_ref.
12543
572a5524
TT
125442017-01-10 Tom Tromey <tom@tromey.com>
12545
12546 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12547 gdbpy_enter, gdbpy_ref.
12548
396a78b6
TT
125492017-01-10 Tom Tromey <tom@tromey.com>
12550
12551 * python/python.c (python_interactive_command): Use gdbpy_enter.
12552
a88b13c7
TT
125532017-01-10 Tom Tromey <tom@tromey.com>
12554
12555 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12556 gdbpy_ref.
12557
e9f0c363
TT
125582017-01-10 Tom Tromey <tom@tromey.com>
12559
12560 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12561 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12562
6349f452
TT
125632017-01-10 Tom Tromey <tom@tromey.com>
12564
12565 * utils.h (htab_deleter): New struct.
12566 (htab_up): New typedef.
12567 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12568 gdbpy_enter, gdbpy_ref, htab_up.
12569
c0171de6
TT
125702017-01-10 Tom Tromey <tom@tromey.com>
12571
12572 * python/py-unwind.c (pending_frame_invalidate): Remove.
12573 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12574
f18e226f
TT
125752017-01-10 Tom Tromey <tom@tromey.com>
12576
12577 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12578 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12579
c57af3f1
TT
125802017-01-10 Tom Tromey <tom@tromey.com>
12581
12582 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12583
60e600ec
TT
125842017-01-10 Tom Tromey <tom@tromey.com>
12585
12586 * python/python.c (gdbpy_eval_from_control_command)
12587 (gdbpy_source_script, gdbpy_run_events)
12588 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12589 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12590 gdbpy_enter.
12591
bf7da5b0
TT
125922017-01-10 Tom Tromey <tom@tromey.com>
12593
12594 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12595
2d38bced
TT
125962017-01-10 Tom Tromey <tom@tromey.com>
12597
12598 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12599
07bc7329
TT
126002017-01-10 Tom Tromey <tom@tromey.com>
12601
12602 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12603 (python_on_inferior_call_pre, python_on_inferior_call_post)
12604 (python_on_memory_change, python_on_register_change)
12605 (python_inferior_exit, python_new_objfile, add_thread_object)
12606 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12607
6e7c365e
TT
126082017-01-10 Tom Tromey <tom@tromey.com>
12609
12610 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12611 (bpfinishpy_handle_exit): Use gdbpy_enter.
12612
6ba0cd40
TT
126132017-01-10 Tom Tromey <tom@tromey.com>
12614
12615 * python/py-cmd.c (cmdpy_destroyer)
12616 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12617 gdbpy_enter.
12618
de2dc875
TT
126192017-01-10 Tom Tromey <tom@tromey.com>
12620
12621 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12622 gdbpy_enter.
12623 (gdbpy_breakpoint_has_cond): Likewise.
12624
4ecee2c4
TT
126252017-01-10 Tom Tromey <tom@tromey.com>
12626
12627 * python/python.c (gdbpy_enter): New constructor.
12628 (~gdbpy_enter): New destructor.
12629 (restore_python_env, ensure_python_env): Rewrite.
12630 * python/python-internal.h (gdbpy_enter): New class.
12631
37fce74f
TT
126322017-01-10 Tom Tromey <tom@tromey.com>
12633
12634 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12635
53a0cca3
TT
126362017-01-10 Tom Tromey <tom@tromey.com>
12637
12638 * python/py-value.c (value_has_field, get_field_flag)
12639 (get_field_type, valpy_getitem, convert_value_from_python): Use
12640 gdbpy_ref.
12641
ff3724f5
TT
126422017-01-10 Tom Tromey <tom@tromey.com>
12643
12644 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12645 gdbpy_ref.
12646
0700aea5
TT
126472017-01-10 Tom Tromey <tom@tromey.com>
12648
12649 * python/py-prettyprint.c (search_pp_list)
12650 (find_pretty_printer_from_objfiles)
12651 (find_pretty_printer_from_progspace)
12652 (find_pretty_printer_from_gdb, find_pretty_printer)
12653 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12654 gdbpy_ref.
12655
1bb44c9f
TT
126562017-01-10 Tom Tromey <tom@tromey.com>
12657
12658 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12659
87ce03fd
TT
126602017-01-10 Tom Tromey <tom@tromey.com>
12661
12662 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12663 (ltpy_get_all_source_lines): Use gdbpy_ref.
12664
ee0a3fb8
TT
126652017-01-10 Tom Tromey <tom@tromey.com>
12666
12667 * python/py-framefilter.c (extract_sym, extract_value)
12668 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12669 gdbpy_ref.
12670
bf2a52fa
TT
126712017-01-10 Tom Tromey <tom@tromey.com>
12672
12673 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12674
f59fe7f8
TT
126752017-01-10 Tom Tromey <tom@tromey.com>
12676
12677 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12678
80bd970a
TT
126792017-01-10 Tom Tromey <tom@tromey.com>
12680
12681 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12682 gdbpy_ref.
12683
d1b3de2e
TT
126842017-01-10 Tom Tromey <tom@tromey.com>
12685
12686 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12687
3bb43384
TT
126882017-01-10 Tom Tromey <tom@tromey.com>
12689
12690 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12691 (typy_range): Use gdbpy_ref.
12692
abf5651e
TT
126932017-01-10 Tom Tromey <tom@tromey.com>
12694
12695 * python/py-threadevent.c (create_thread_event_object): Use
12696 gdbpy_ref.
12697 * python/py-stopevent.c (create_stop_event_object): Simplify.
12698 (emit_stop_event): Use gdbpy_ref.
12699 * python/py-signalevent.c (create_signal_event_object): Use
12700 gdbpy_ref.
12701 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12702 (emit_new_objfile_event, create_clear_objfiles_event_object)
12703 (emit_clear_objfiles_event): Use gdbpy_ref.
12704 * python/py-infevents.c (create_inferior_call_event_object)
12705 (create_register_changed_event_object)
12706 (create_memory_changed_event_object, emit_inferior_call_event)
12707 (emit_memory_changed_event, emit_register_changed_event): Use
12708 gdbpy_ref.
12709 * python/py-exitedevent.c (create_exited_event_object)
12710 (emit_exited_event): Use gdbpy_ref.
12711 * python/py-event.h (evpy_emit_event): Remove
12712 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12713 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12714 * python/py-continueevent.c (emit_continue_event): Use
12715 gdbpy_ref.
12716 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12717 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12718 gdbpy_ref.
12719 * python/py-bpevent.c (create_breakpoint_event_object): Use
12720 gdbpy_ref.
12721
a68ff33e
TT
127222017-01-10 Tom Tromey <tom@tromey.com>
12723
12724 * python/py-ref.h: New file.
12725
7becfd03
SM
127262017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12727
12728 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12729 void.
12730 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12731 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12732 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12733 * ui-out.c (ui_out::redirect): Likewise.
12734 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12735 * cli/cli-logging.c (set_logging_redirect): Update call site of
12736 ui_out::redirect.
12737 (handle_redirections): Likewise.
12738 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12739 * top.c (execute_command_to_string): Likewise.
12740 * utils.c (do_ui_out_redirect_pop): Likewise.
12741
df294654
SM
127422017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12743
12744 * stack.c (_initialize_stack): Update "frame" command help message.
12745
f5e6296e
IB
127462017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12747
12748 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12749
0e2d6fa6
YQ
127502017-01-06 Yao Qi <yao.qi@linaro.org>
12751
12752 * x86-linux-nat.h: Include gdb_proc_service.h.
12753
44d6d3f9
YQ
127542017-01-06 Yao Qi <yao.qi@linaro.org>
12755
12756 * ser-base.h: Include serial.h.
12757
656731fe
YQ
127582017-01-06 Yao Qi <yao.qi@linaro.org>
12759
12760 * ppc-linux-tdep.h: Include ppc-tdep.h.
12761
1ca8f924
YQ
127622017-01-06 Yao Qi <yao.qi@linaro.org>
12763
12764 * nat/amd64-linux-siginfo.h: Include signal.h.
12765
bc3008c4
YQ
127662017-01-06 Yao Qi <yao.qi@linaro.org>
12767
12768 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12769
66c80d03
YQ
127702017-01-06 Yao Qi <yao.qi@linaro.org>
12771
12772 * mi/mi-parse.h: Include mi-cmds.h.
12773
051d2dda
YQ
127742017-01-06 Yao Qi <yao.qi@linaro.org>
12775
12776 * inf-loop.c: Don't include "target.h".
12777 * inf-loop.h: Include it here.
12778
8018d34f
YQ
127792017-01-06 Yao Qi <yao.qi@linaro.org>
12780
12781 * dfp.h: Include "dboulest.h" and "expression.h".
12782
c0b8369c
YQ
127832017-01-06 Yao Qi <yao.qi@linaro.org>
12784
12785 * ax-gdb.h: Include "ax.h".
12786
ad5cba2a
YQ
127872017-01-06 Yao Qi <yao.qi@linaro.org>
12788
12789 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12790 with nat/gdb_ptrace.h.
12791
1c33cd7f
YQ
127922017-01-05 Yao Qi <yao.qi@linaro.org>
12793
12794 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12795 new line.
12796 (mips64_fbsd_sigframe_init): Likewise.
12797
c988ac1d
JB
127982017-01-04 John Baldwin <jhb@FreeBSD.org>
12799
12800 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12801 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12802
b268007c
JB
128032017-01-04 John Baldwin <jhb@FreeBSD.org>
12804
12805 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12806 * NEWS: Mention new FreeBSD/mips native configuration.
12807 * config/mips/fbsd.mh: New file.
12808 * configure.host: Add mips*-*-freebsd*.
12809 * mips-fbsd-nat.c: New file.
12810
387360da
JB
128112017-01-04 John Baldwin <jhb@FreeBSD.org>
12812
12813 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12814 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12815 * NEWS: Mention new FreeBSD/mips target.
12816 * configure.tgt: Add mips*-*-freebsd*.
12817 * mips-fbsd-tdep.c: New file.
12818 * mips-fbsd-tdep.h: New file.
12819
2aaaf250
YQ
128202017-01-04 Yao Qi <yao.qi@linaro.org>
12821
12822 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12823 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12824
61baf725
JB
128252017-01-01 Joel Brobecker <brobecker@adacore.com>
12826
6dbb839a 12827 Update copyright year range in all GDB files.
61baf725 12828
c113e7ff 128292017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12830
c113e7ff 12831 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12832
c113e7ff 12833For older changes see ChangeLog-2016.
c906108c
SS
12834\f
12835Local Variables:
12836mode: change-log
12837left-margin: 8
12838fill-column: 74
12839version-control: never
57da7796 12840coding: utf-8
c906108c 12841End:
This page took 2.537096 seconds and 4 git commands to generate.