1 2018-05-04 Tom Tromey <tom@tromey.com>
3 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5 2018-05-04 Tom Tromey <tom@tromey.com>
7 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9 * symfile.c (section_is_mapped): Fix fall-through comment.
10 * stabsread.c (define_symbol, read_member_functions): Fix
12 * s390-linux-tdep.c (s390_process_record): Fix fall-through
14 * remote.c (remote_wait_as): Fix fall-through comment.
15 * p-exp.y (yylex): Fix fall-through comment.
16 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
18 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
19 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
20 * jv-exp.y (yylex): Fix fall-through comment.
21 * go-exp.y (lex_one_token): Fix fall-through comment.
22 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
24 * f-exp.y (yylex): Fix fall-through comment.
25 * dwarf2read.c (process_die): Fix fall-through comments.
26 * dbxread.c (process_one_symbol): Fix fall-through comment.
27 * d-exp.y (lex_one_token): Fix fall-through comment.
28 * cp-name-parser.y (yylex): Fix fall-through comment.
29 * coffread.c (coff_symtab_read): Fix fall-through comment.
30 * c-exp.y (lex_one_token): Fix fall-through comment.
31 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
33 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
36 2018-05-04 Tom Tromey <tom@tromey.com>
39 * NEWS: Mention gdb.execute change.
40 * gdbcmd.h (execute_control_command): Don't declare.
41 * python/python.c (execute_gdb_command): Use read_command_lines_1,
42 execute_control_commands, execute_control_commands_to_string.
43 * cli/cli-script.h (execute_control_commands)
44 (execute_control_commands_to_string): Declare.
45 (execute_control_command): Add from_tty parameter.
46 * cli/cli-script.c (execute_control_commands)
47 (execute_control_commands_to_string): New functions.
48 (execute_user_command): Use execute_control_commands.
49 (execute_control_command_1): Add "from_tty" parameter. Update.
50 (execute_control_command): Likewise.
52 2018-05-04 Tom Tromey <tom@tromey.com>
55 * NEWS: Mention that breakpoint commands are writable.
56 * python/py-breakpoint.c (bppy_set_commands): New function.
57 (breakpoint_object_getset) <"commands">: Use it.
59 2018-05-04 Tom Tromey <tom@tromey.com>
61 * tracepoint.c (actions_command): Update.
62 * mi/mi-cmd-break.c (mi_command_line_array)
63 (mi_command_line_array_cnt, mi_command_line_array_ptr)
64 (mi_read_next_line): Remove.
65 (mi_cmd_break_commands): Update.
66 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
68 * cli/cli-script.c (get_command_line): Update.
69 (process_next_line): Use function_view. Constify.
70 (recurse_read_control_structure, read_command_lines)
71 (read_command_lines_1): Change argument types to function_view.
72 (do_define_command, document_command): Update.
73 * breakpoint.h (check_tracepoint_command): Don't declare.
74 * breakpoint.c (check_tracepoint_command): Remove.
75 (commands_command_1, create_tracepoint_from_upload): Update.
77 2018-05-04 Tom Tromey <tom@tromey.com>
80 * cli/cli-script.h (enum command_control_type) <define_control>:
82 * cli/cli-script.c (multi_line_command_p): Handle define_control.
83 (build_command_line, execute_control_command_1)
84 (process_next_line): Likewise.
85 (do_define_command): New function, extracted from define_command.
86 (define_command): Use it.
88 2018-05-04 Tom Tromey <tom@tromey.com>
90 * tracepoint.c (actions_command): Update.
91 * cli/cli-script.h (read_command_lines): Update.
92 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
93 (MAX_TMPBUF): Remove define.
94 (define_command): Use string_printf.
95 (document_command): Likewise.
96 * breakpoint.c (commands_command_1): Update.
98 2018-05-04 Tom Tromey <tom@tromey.com>
100 * top.c (execute_command): Update.
101 * cli/cli-script.h (print_command_lines): Now varargs.
102 * cli/cli-script.c (print_command_lines): Now varargs.
103 (execute_control_command_1) <case while_control, case if_control>:
106 2018-05-04 Tom Tromey <tom@tromey.com>
108 * tracepoint.c (all_tracepoint_actions): Rename from
109 all_tracepoint_actions_and_cleanup. Change return type.
110 (actions_command, encode_actions_1, encode_actions)
111 (trace_dump_actions, tdump_command): Update.
112 * remote.c (remote_download_command_source): Update.
113 * python/python.c (gdbpy_eval_from_control_command)
114 (python_command, python_interactive_command): Update.
115 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
116 * guile/guile.c (guile_command)
117 (gdbscm_eval_from_control_command, guile_command): Update.
118 * compile/compile.c (compile_code_command)
119 (compile_print_command, compile_to_object): Update.
120 * cli/cli-script.h (struct command_lines_deleter): New.
121 (counted_command_line): New typedef.
122 (struct command_line): Add constructor, destructor.
124 <body_list_0, body_list_1>: New members.
125 (command_line_up): Remove typedef.
126 (read_command_lines, read_command_lines_1, get_command_line):
128 (copy_command_lines): Don't declare.
129 * cli/cli-script.c (build_command_line): Use "new".
130 (get_command_line): Return counted_command_line.
131 (print_command_lines, execute_user_command)
132 (execute_control_command_1, while_command, if_command): Update.
133 (realloc_body_list): Remove.
134 (process_next_line, recurse_read_control_structure): Update.
135 (read_command_lines, read_command_lines_1): Return counted_command_line.
136 (free_command_lines): Use "delete".
137 (copy_command_lines): Remove.
138 (define_command, document_command, show_user_1): Update.
139 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
140 a counted_command_line.
141 * breakpoint.h (counted_command_line): Remove typedef.
142 (breakpoint_set_commands): Update.
143 * breakpoint.c (check_no_tracepoint_commands)
144 (validate_commands_for_breakpoint): Update.
145 (breakpoint_set_commands): Change commands to be a
146 counted_command_line.
147 (commands_command_1, update_dprintf_command_list)
148 (create_tracepoint_from_upload): Update.
150 2018-05-04 Tom Tromey <tom@tromey.com>
152 * cli/cli-decode.h (cmd_list_element): New constructor.
153 (~cmd_list_element): New destructor.
154 (struct cmd_list_element): Add initializers.
155 * cli/cli-decode.c (do_add_cmd): Use "new".
156 (delete_cmd): Use "delete".
158 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
159 Pedro Alves <palves@redhat.com>
161 PR breakpoints/19806 and support for PR external/20207.
162 * NEWS: Mention Aarch64 watchpoint improvements.
163 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
164 watchpoints and PR external/20207 watchpoints.
165 * nat/aarch64-linux-hw-point.c
166 (kernel_supports_any_contiguous_range): New.
167 (aarch64_watchpoint_offset): New.
168 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
169 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
170 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
171 (aarch64_align_watchpoint): New parameters aligned_offset_p and
172 next_addr_orig_p. Support PR external/20207 watchpoints.
173 (aarch64_downgrade_regs): New.
174 (aarch64_dr_state_insert_one_point): New parameters offset and
176 (aarch64_dr_state_remove_one_point): Likewise.
177 (aarch64_handle_breakpoint): Update caller.
178 (aarch64_handle_aligned_watchpoint): Likewise.
179 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
181 (aarch64_linux_set_debug_regs): Remove const from state. Call
182 aarch64_downgrade_regs.
183 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
184 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
185 (DR_CONTROL_MASK): ... this.
186 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
187 (unsigned int aarch64_watchpoint_offset): New prototype.
188 (aarch64_linux_set_debug_regs): Remove const from state.
189 * utils.c (align_up, align_down): Move to ...
190 * common/common-utils.c (align_up, align_down): ... here.
191 * utils.h (align_up, align_down): Move to ...
192 * common/common-utils.h (align_up, align_down): ... here.
194 2018-05-04 Joel Brobecker <brobecker@adacore.com>
196 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
197 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
198 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
199 Re-implement to match the ABI as summarized in GCC's
200 gcc/config/sparc/sparc.c. All callers updated.
201 (sparc32_store_arguments): Remove assertion.
203 2018-05-04 Tom Tromey <tom@tromey.com>
205 * printcmd.c: Don't include tui.h.
206 (decode_format): Use skip_spaces.
208 2018-05-04 Tom Tromey <tom@tromey.com>
211 * printcmd.c (last_count): New global.
212 (x_command): Use saved count when repeating.
214 2018-05-04 Tom Tromey <tom@tromey.com>
216 * nto-procfs.c (do_closedir_cleanup): Remove.
217 (procfs_pidlist): Use gdb_dir_up.
218 * procfs.c (do_closedir_cleanup): Remove.
219 (proc_update_threads): Use gdb_dir_up.
220 * common/filestuff.h (struct gdb_dir_deleter): New.
221 (gdb_dir_up): New typedef.
223 2018-05-04 Tom Tromey <tom@tromey.com>
225 * ada-lang.c (print_mention_exception): Use std::string.
227 2018-05-04 Tom Tromey <tom@tromey.com>
229 * ada-lang.c (create_excep_cond_exprs): Update.
230 (ada_exception_catchpoint_cond_string): Use std::string.
232 2018-05-04 Tom Tromey <tom@tromey.com>
234 * ada-lang.c (xget_renaming_scope): Return std::string.
235 (old_renaming_is_invisible): Update.
237 2018-05-04 Tom Tromey <tom@tromey.com>
239 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
240 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
242 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
244 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
246 2018-05-04 Tom Tromey <tom@tromey.com>
248 * remote.c (remote_query_supported_append): Change type.
249 (remote_check_symbols): Update.
251 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
254 * configure.ac: Prepend libpython.
255 * python/python-config.py: Likewise.
256 * configure: Regenerate.
258 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
260 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
262 2018-05-03 Pedro Alves <palves@redhat.com>
265 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
266 override. Write 'true' instead of '1'.
267 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
270 2018-05-02 Pedro Alves <palves@redhat.com>
272 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
273 add_inf_child_target.
274 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
275 add_inf_child_target.
276 * aix-thread.c (aix_thread_target_info): New.
277 (aix_thread_target) <shortname, longname, doc>: Delete.
279 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
280 add_inf_child_target.
281 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
282 add_inf_child_target.
283 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
284 add_inf_child_target.
285 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
286 add_inf_child_target.
287 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
288 add_inf_child_target.
289 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
290 add_inf_child_target.
291 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
292 add_inf_child_target.
293 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
294 add_inf_child_target.
295 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
296 add_inf_child_target.
297 * bfd-target.c (target_bfd_target_info): New.
298 (target_bfd) <shortname, longname, doc>: Delete.
300 * bsd-kvm.c (bsd_kvm_target_info): New.
301 (bsd_kvm_target) <shortname, longname, doc>: Delete.
303 (bsd_kvm_target::open): Rename to ...
304 (bsd_kvm_target_open): ... this. Adjust.
305 * bsd-uthread.c (bsd_uthread_target_info): New.
306 (bsd_uthread_target) <shortname, longname, doc>: Delete.
308 * corefile.c (core_file_command): Adjust.
309 * corelow.c (core_target_info): New.
310 (core_target) <shortname, longname, doc>: Delete.
312 (core_target::open): Rename to ...
313 (core_target_open): ... this. Adjust.
314 * ctf.c (ctf_target_info): New.
315 (ctf_target) <shortname, longname, doc>: Delete.
317 (ctf_target::open): Rename to ...
318 (ctf_target_open): ... this.
319 (_initialize_ctf): Adjust.
320 * exec.c (exec_target_info): New.
321 (exec_target) <shortname, longname, doc>: Delete.
323 (exec_target::open): Rename to ...
324 (exec_target_open): ... this.
325 * gdbcore.h (core_target_open): Declare.
326 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
327 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
328 add_inf_child_target.
329 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
330 add_inf_child_target.
331 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
332 add_inf_child_target.
333 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
334 add_inf_child_target.
335 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
336 add_inf_child_target.
337 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
338 add_inf_child_target.
339 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
340 add_inf_child_target.
341 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
342 add_inf_child_target.
343 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
344 add_inf_child_target.
345 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
346 add_inf_child_target.
347 * inf-child.c (inf_child_target_info): New.
348 (inf_child_target::info): New.
349 (inf_child_open_target): Remove 'target' parameter. Use
350 get_native_target instead.
351 (inf_child_target::open): Delete.
352 (add_inf_child_target): New.
353 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
356 (add_inf_child_target): Declare.
357 (inf_child_open_target): Declare.
358 * linux-thread-db.c (thread_db_target_info): New.
359 (thread_db_target) <shortname, longname, doc>: Delete.
361 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
362 add_inf_child_target.
363 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
364 add_inf_child_target.
365 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
366 add_inf_child_target.
367 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
368 add_inf_child_target.
369 * make-target-delegates (print_class): Adjust.
370 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
371 add_inf_child_target.
372 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
373 add_inf_child_target.
374 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
375 add_inf_child_target.
376 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
377 add_inf_child_target.
378 * nto-procfs.c (nto_native_target_info): New.
379 (nto_procfs_target_native) <shortname, longname, doc>:
382 (nto_procfs_target_info): New.
383 (nto_procfs_target_procfs) <shortname, longname, doc>:
386 (init_procfs_targets): Adjust.
387 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
388 add_inf_child_target.
389 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
390 add_inf_child_target.
391 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
392 add_inf_child_target.
393 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
394 add_inf_child_target.
395 * ravenscar-thread.c (ravenscar_target_info): New.
396 (ravenscar_thread_target) <shortname, longname, doc>:
399 * record-btrace.c (record_btrace_target_info):
400 (record_btrace_target) <shortname, longname, doc>: Delete.
402 (record_btrace_target::open): Rename to ...
403 (record_btrace_target_open): ... this. Adjust.
404 * record-full.c (record_longname, record_doc): New.
405 (record_full_base_target) <shortname, longname, doc>: Delete.
407 (record_full_target_info): New.
408 (record_full_target): <shortname>: Delete.
410 (record_full_core_open_1, record_full_open_1): Update comments.
411 (record_full_base_target::open): Rename to ...
412 (record_full_open): ... this.
413 (cmd_record_full_restore): Update.
414 (_initialize_record_full): Update.
415 * remote-sim.c (remote_sim_target_info): New.
416 (gdbsim_target) <shortname, longname, doc>: Delete.
418 (gdbsim_target::open): Rename to ...
419 (gdbsim_target_open): ... this.
420 (_initialize_remote_sim): Adjust.
421 * remote.c (remote_doc): New.
422 (remote_target_info): New.
423 (remote_target) <shortname, longname, doc>: Delete.
425 (extended_remote_target_info): New.
426 (extended_remote_target) <shortname, longname, doc>: Delete.
428 (remote_target::open_1): Make static. Adjust.
429 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
430 * s390-linux-nat.c (_initialize_s390_nat): Use
431 add_inf_child_target.
432 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
433 add_inf_child_target.
434 * sol-thread.c (thread_db_target_info): New.
435 (sol_thread_target) <shortname, longname, doc>: Delete.
437 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
438 add_inf_child_target.
439 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
440 add_inf_child_target.
441 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
442 add_inf_child_target.
443 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
444 add_inf_child_target.
445 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
446 add_inf_child_target.
447 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
448 add_inf_child_target.
449 * spu-linux-nat.c (_initialize_spu_nat): Use
450 add_inf_child_target.
451 * spu-multiarch.c (spu_multiarch_target_info): New.
452 (spu_multiarch_target) <shortname, longname, doc>: Delete.
454 * target-delegates.c: Regenerate.
455 * target.c: Include <unordered_map>.
456 (target_ops_p): Delete.
457 (DEF_VEC_P(target_ops_p)): Delete.
458 (target_factories): New.
459 (test_target_info): New.
460 (test_target_ops::info): New.
461 (open_target): Adjust to use target_factories.
462 (add_target_with_completer): Rename to ...
463 (add_target): ... this. Change prototype. Register target_info
464 and open callback in target_factories. Register target_info in
465 command context instead of target_ops.
466 (add_target): Delete old implementation.
467 (add_deprecated_target_alias): Change prototype. Adjust.
468 (the_native_target): New.
469 (set_native_target, get_native_target): New.
470 (find_default_run_target): Use the_native_target.
471 (find_attach_target, find_run_target): Simplify.
472 (target_ops::open): Delete.
473 (dummy_target_info): New.
474 (dummy_target::shortname, dummy_target::longname)
475 (dummy_target::doc): Delete.
476 (dummy_target::info): New.
477 (debug_target::shortname, debug_target::longname)
478 (debug_target::doc): Delete.
479 (debug_target::info): New.
480 * target.h (struct target_info): New.
481 (target_ops::~target_ops): Add comment.
482 (target_ops::info): New.
483 (target_ops::shortname, target_ops::longname, target_ops::doc): No
484 longer virtual. Implement in terms of target_info.
485 (set_native_target, get_native_target): Declare.
486 (target_open_ftype): New.
487 (add_target, add_target_with_completer)
488 (add_deprecated_target_alias): Change prototype.
489 (test_target) <shortname, longname, doc>: Delete.
491 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
492 add_inf_child_target.
493 * tracefile-tfile.c (tfile_target_info): New.
494 (tfile_target) <shortname, longname, doc>: Delete.
496 (tfile_target::open): Rename to ...
497 (tfile_target_open): ... this.
498 (_initialize_tracefile_tfile): Adjust.
499 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
500 add_inf_child_target.
501 * windows-nat.c (_initialize_windows_nat): Use
502 add_inf_child_target.
503 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
504 add_inf_child_target.
506 2018-05-02 Pedro Alves <palves@redhat.com>
508 * linux-nat.h (linux_nat_target) <low_new_thread,
509 low_delete_thread, low_new_fork, low_forget_process,
510 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
512 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
513 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
514 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
515 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
516 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
518 * linux-fork.c (delete_fork): Adjust to call low method.
519 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
520 (linux_nat_new_fork, linux_nat_forget_process_hook)
521 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
522 (linux_nat_status_is_event):
523 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
524 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
526 (sigtrap_is_event): Rename to ...
527 (linux_nat_target::low_status_is_event): ... this.
528 (linux_nat_set_status_is_event): Delete.
529 (save_stop_reason, linux_nat_wait_1)
530 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
532 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
533 (linux_nat_set_new_fork, linux_nat_set_forget_process)
534 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
535 (linux_nat_set_prepare_to_resume): Delete.
536 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
538 * amd64-linux-nat.c: Likewise.
539 * arm-linux-nat.c: Likewise.
540 * i386-linux-nat.c: Likewise.
541 * ia64-linux-nat.c: Likewise.
542 * mips-linux-nat.c: Likewise.
543 * ppc-linux-nat.c: Likewise.
544 * s390-linux-nat.c: Likewise.
545 * sparc64-linux-nat.c: Likewise.
546 * x86-linux-nat.c: Likewise.
547 * x86-linux-nat.h: Include "nat/x86-linux.h".
548 (x86_linux_nat_target) <low_new_fork, low_forget_process,
549 low_prepare_to_resume, low_new_thread, low_delete_thread>:
552 2018-05-02 Pedro Alves <palves@redhat.com>
554 * target.h (target_ops)
555 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
556 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
557 stopped_by_watchpoint, have_continuable_watchpoint,
558 stopped_data_address, watchpoint_addr_within_range,
559 can_accel_watchpoint_condition, can_run, thread_alive,
560 has_all_memory, has_memory, has_stack, has_registers,
561 has_execution, can_async_p, is_async_p, supports_non_stop,
562 always_non_stop_p, can_execute_reverse, supports_multi_process,
563 supports_enable_disable_tracepoint,
564 supports_disable_randomization, supports_string_tracing,
565 supports_evaluation_of_breakpoint_conditions,
566 can_run_breakpoint_commands, filesystem_is_local,
567 can_download_tracepoint, get_trace_state_variable_value,
568 set_trace_notes, get_tib_address, use_agent, can_use_agent,
569 record_is_replaying, record_will_replay,
570 augmented_libraries_svr4_read>: Adjust to return bool.
571 * aarch64-linux-nat.c: All implementations adjusted.
572 * aix-thread.c: All implementations adjusted.
573 * arm-linux-nat.c: All implementations adjusted.
574 * breakpoint.c: All implementations adjusted.
575 * bsd-kvm.c: All implementations adjusted.
576 * bsd-uthread.c: All implementations adjusted.
577 * corelow.c: All implementations adjusted.
578 * ctf.c: All implementations adjusted.
579 * darwin-nat.c: All implementations adjusted.
580 * darwin-nat.h: All implementations adjusted.
581 * exec.c: All implementations adjusted.
582 * fbsd-nat.c: All implementations adjusted.
583 * fbsd-nat.h: All implementations adjusted.
584 * gnu-nat.c: All implementations adjusted.
585 * gnu-nat.h: All implementations adjusted.
586 * go32-nat.c: All implementations adjusted.
587 * ia64-linux-nat.c: All implementations adjusted.
588 * inf-child.c: All implementations adjusted.
589 * inf-child.h: All implementations adjusted.
590 * inf-ptrace.c: All implementations adjusted.
591 * inf-ptrace.h: All implementations adjusted.
592 * linux-nat.c: All implementations adjusted.
593 * linux-nat.h: All implementations adjusted.
594 * mips-linux-nat.c: All implementations adjusted.
595 * nto-procfs.c: All implementations adjusted.
596 * ppc-linux-nat.c: All implementations adjusted.
597 * procfs.c: All implementations adjusted.
598 * ravenscar-thread.c: All implementations adjusted.
599 * record-btrace.c: All implementations adjusted.
600 * record-full.c: All implementations adjusted.
601 * remote-sim.c: All implementations adjusted.
602 * remote.c: All implementations adjusted.
603 * s390-linux-nat.c: All implementations adjusted.
604 * sol-thread.c: All implementations adjusted.
605 * spu-multiarch.c: All implementations adjusted.
606 * target-delegates.c: All implementations adjusted.
607 * target.c: All implementations adjusted.
608 * target.h: All implementations adjusted.
609 * tracefile-tfile.c: All implementations adjusted.
610 * tracefile.c: All implementations adjusted.
611 * tracefile.h: All implementations adjusted.
612 * windows-nat.c: All implementations adjusted.
613 * x86-linux-nat.h: All implementations adjusted.
614 * x86-nat.h: All implementations adjusted.
616 2018-05-02 Pedro Alves <palves@redhat.com>
618 * make-target-delegates (scan_target_h): Don't trim lines here.
619 Replace sequences of tabs and/or whitespace with a single
621 (top level, parsing methods): Trim each line before processing it
624 2018-05-02 Pedro Alves <palves@redhat.com>
625 John Baldwin <jhb@freebsd.org>
627 * target.h (enum strata) <debug_stratum>: New.
628 (struct target_ops) <all delegation methods>: Replace by C++
629 virtual methods, and drop "to_" prefix. All references updated
631 <to_shortname, to_longname, to_doc, to_data,
632 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
633 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
634 virtual methods. All references updated throughout.
635 <can_attach, supports_terminal_ours, can_create_inferior,
636 get_thread_control_capabilities, attach_no_wait>: New
638 <insert_breakpoint, remove_breakpoint>: Now
639 TARGET_DEFAULT_NORETURN methods.
640 <info_proc>: Now returns bool.
643 (current_target): Delete. All references replaced by references
645 (target_stack): ... this. New.
646 (target_shortname, target_longname): Adjust.
647 (target_can_run): Now a function declaration.
648 (default_child_has_all_memory, default_child_has_memory)
649 (default_child_has_stack, default_child_has_registers)
650 (default_child_has_execution): Remove target_ops parameter.
651 (complete_target_initialization): Delete.
652 (memory_breakpoint_target): New template class.
653 (test_target_ops): Refactor as a C++ class with virtual methods.
654 * make-target-delegates (NAME_PART): Tighten.
655 (POINTER_PART, CP_SYMBOL): New.
656 (SIMPLE_RETURN_PART): Reimplement.
657 (VEC_RETURN_PART): Expect less.
658 (RETURN_PART, VIRTUAL_PART): New.
659 (METHOD): Adjust to C++ virtual methods.
660 (scan_target_h): Remove reference to C99.
661 (dname): Output "target_ops::" prefix.
662 (write_function_header): Adjust to output a C++ class method.
663 (write_declaration): New.
664 (write_delegator): Adjust to output a C++ class method.
665 (tdname): Output "dummy_target::" prefix.
666 (write_tdefault, write_debugmethod): Adjust to output a C++ class
668 (tdefault_names, debug_names): Delete.
669 (return_types, tdefaults, styles, argtypes_array): New.
670 (top level): All methods are delegators.
672 (top level): Print dummy_target and debug_target classes.
673 * target-delegates.c: Regenerate.
674 * target-debug.h (target_debug_print_enum_info_proc_what)
675 (target_debug_print_thread_control_capabilities)
676 (target_debug_print_thread_info_p): New.
677 * target.c (dummy_target): Delete.
678 (the_dummy_target, the_debug_target): New.
679 (target_stack): Now extern.
680 (set_targetdebug): Push/unpush debug target.
681 (default_child_has_all_memory, default_child_has_memory)
682 (default_child_has_stack, default_child_has_registers)
683 (default_child_has_execution): Remove target_ops parameter.
684 (complete_target_initialization): Delete.
685 (add_target_with_completer): No longer call
686 complete_target_initialization.
687 (target_supports_terminal_ours): Use regular delegation.
688 (update_current_target): Delete.
689 (push_target): No longer check magic number. Don't call
690 update_current_target.
691 (unpush_target): Don't call update_current_target.
692 (target_is_pushed): No longer check magic number.
693 (target_require_runnable): Skip for all stratums over
695 (target_ops::info_proc): New.
696 (target_info_proc): Use find_target_at and
697 find_default_run_target.
698 (target_supports_disable_randomization): Use regular delegation.
699 (target_get_osdata): Use find_target_at.
700 (target_ops::open, target_ops::close, target_ops::can_attach)
701 (target_ops::attach, target_ops::can_create_inferior)
702 (target_ops::create_inferior, target_ops::can_run)
703 (target_can_run): New.
704 (default_fileio_target): Use regular delegation.
705 (target_ops::fileio_open, target_ops::fileio_pwrite)
706 (target_ops::fileio_pread, target_ops::fileio_fstat)
707 (target_ops::fileio_close, target_ops::fileio_unlink)
708 (target_ops::fileio_readlink): New.
709 (target_fileio_open_1, target_fileio_unlink)
710 (target_fileio_readlink): Always call the target method. Handle
712 (return_zero, return_zero_has_execution): Delete.
713 (init_dummy_target): Delete.
714 (dummy_target::dummy_target, dummy_target::shortname)
715 (dummy_target::longname, dummy_target::doc)
716 (debug_target::debug_target, debug_target::shortname)
717 (debug_target::longname, debug_target::doc): New.
718 (target_supports_delete_record): Use regular delegation.
719 (setup_target_debug): Delete.
720 (maintenance_print_target_stack): Skip debug_stratum.
721 (initialize_targets): Instantiate the_dummy_target and
723 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
725 (target_auxv_search, fprint_target_auxv): Adjust.
726 (info_auxv_command): Adjust to use target_stack.
727 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
728 * exceptions.c (print_flush): Handle a NULL target_stack.
729 * regcache.c (target_ops_no_register): Refactor as class with
732 * exec.c (exec_target): New class.
733 (exec_ops): Now an exec_target.
734 (exec_open, exec_close_1, exec_get_section_table)
735 (exec_xfer_partial, exec_files_info, exec_has_memory)
736 (exec_make_note_section): Refactor as exec_target methods.
737 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
739 (exec_target::find_memory_regions): New.
740 (_initialize_exec): Don't call init_exec_ops.
741 * gdbcore.h (exec_file_clear): Delete.
743 * corefile.c (core_target): Delete.
744 (core_file_command): Adjust.
745 * corelow.c (core_target): New class.
746 (the_core_target): New.
747 (core_close): Remove target_ops parameter.
748 (core_close_cleanup): Adjust.
749 (core_target::close): New.
750 (core_open, core_detach, get_core_registers, core_files_info)
751 (core_xfer_partial, core_thread_alive, core_read_description)
752 (core_pid_to_str, core_thread_name, core_has_memory)
753 (core_has_stack, core_has_registers, core_info_proc): Rework as
755 (ignore, core_remove_breakpoint, init_core_ops): Delete.
756 (_initialize_corelow): Initialize the_core_target.
757 * gdbcore.h (core_target): Delete.
758 (the_core_target): New.
760 * ctf.c: (ctf_target): New class.
761 (ctf_ops): Now a ctf_target.
762 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
763 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
764 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
766 (init_ctf_ops): Delete.
767 (_initialize_ctf): Don't call it.
768 * tracefile-tfile.c (tfile_target): New class.
769 (tfile_ops): Now a tfile_target.
770 (tfile_open, tfile_close, tfile_files_info)
771 (tfile_get_tracepoint_status, tfile_trace_find)
772 (tfile_fetch_registers, tfile_xfer_partial)
773 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
774 Refactor as tfile_target methods.
775 (tfile_xfer_partial_features): Remove target_ops parameter.
776 (init_tfile_ops): Delete.
777 (_initialize_tracefile_tfile): Don't call it.
778 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
779 (tracefile_has_stack, tracefile_has_registers)
780 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
781 tracefile_target methods.
782 (init_tracefile_ops): Delete.
783 (tracefile_target::tracefile_target): New.
784 * tracefile.h: Include "target.h".
785 (tracefile_target): New class.
786 (init_tracefile_ops): Delete.
788 * spu-multiarch.c (spu_multiarch_target): New class.
789 (spu_ops): Now a spu_multiarch_target.
790 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
791 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
792 (spu_search_memory, spu_mourn_inferior): Refactor as
793 spu_multiarch_target methods.
794 (init_spu_ops): Delete.
795 (_initialize_spu_multiarch): Remove references to init_spu_ops,
796 complete_target_initialization.
798 * ravenscar-thread.c (ravenscar_thread_target): New class.
799 (ravenscar_ops): Now a ravenscar_thread_target.
800 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
801 (ravenscar_thread_alive, ravenscar_pid_to_str)
802 (ravenscar_fetch_registers, ravenscar_store_registers)
803 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
804 (ravenscar_stopped_by_hw_breakpoint)
805 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
806 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
807 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
809 (init_ravenscar_thread_ops): Delete.
810 (_initialize_ravenscar): Remove references to
811 init_ravenscar_thread_ops and complete_target_initialization.
813 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
814 (bsd_uthread_target): New class.
815 (bsd_uthread_ops): Now a bsd_uthread_target.
816 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
817 (bsd_uthread_close, bsd_uthread_mourn_inferior)
818 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
819 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
820 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
821 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
822 (bsd_uthread_target): Delete function.
823 (_initialize_bsd_uthread): Remove reference to
824 complete_target_initialization.
826 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
827 (target_bfd): ... this new class.
828 (target_bfd_xfer_partial, target_bfd_get_section_table)
829 (target_bfd_close): Refactor as target_bfd methods.
830 (target_bfd::~target_bfd): New.
831 (target_bfd_reopen): Adjust.
832 (target_bfd::close): New.
834 * record-btrace.c (record_btrace_target): New class.
835 (record_btrace_ops): Now a record_btrace_target.
836 (record_btrace_open, record_btrace_stop_recording)
837 (record_btrace_disconnect, record_btrace_close)
838 (record_btrace_async, record_btrace_info)
839 (record_btrace_insn_history, record_btrace_insn_history_range)
840 (record_btrace_insn_history_from, record_btrace_call_history)
841 (record_btrace_call_history_range)
842 (record_btrace_call_history_from, record_btrace_record_method)
843 (record_btrace_is_replaying, record_btrace_will_replay)
844 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
845 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
846 (record_btrace_store_registers, record_btrace_prepare_to_store)
847 (record_btrace_to_get_unwinder)
848 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
849 (record_btrace_commit_resume, record_btrace_wait)
850 (record_btrace_stop, record_btrace_can_execute_reverse)
851 (record_btrace_stopped_by_sw_breakpoint)
852 (record_btrace_supports_stopped_by_sw_breakpoint)
853 (record_btrace_stopped_by_hw_breakpoint)
854 (record_btrace_supports_stopped_by_hw_breakpoint)
855 (record_btrace_update_thread_list, record_btrace_thread_alive)
856 (record_btrace_goto_begin, record_btrace_goto_end)
857 (record_btrace_goto, record_btrace_stop_replaying_all)
858 (record_btrace_execution_direction)
859 (record_btrace_prepare_to_generate_core)
860 (record_btrace_done_generating_core): Refactor as
861 record_btrace_target methods.
862 (init_record_btrace_ops): Delete.
863 (_initialize_record_btrace): Remove reference to
864 init_record_btrace_ops.
865 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
866 the execution_direction global.
867 (record_full_base_target, record_full_target)
868 (record_full_core_target): New classes.
869 (record_full_ops): Now a record_full_target.
870 (record_full_core_ops): Now a record_full_core_target.
871 (record_full_target::detach, record_full_target::disconnect)
872 (record_full_core_target::disconnect)
873 (record_full_target::mourn_inferior, record_full_target::kill):
875 (record_full_open, record_full_close, record_full_async): Refactor
876 as methods of the record_full_base_target class.
877 (record_full_resume, record_full_commit_resume): Refactor
878 as methods of the record_full_target class.
879 (record_full_wait, record_full_stopped_by_watchpoint)
880 (record_full_stopped_data_address)
881 (record_full_stopped_by_sw_breakpoint)
882 (record_full_supports_stopped_by_sw_breakpoint)
883 (record_full_stopped_by_hw_breakpoint)
884 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
885 methods of the record_full_base_target class.
886 (record_full_store_registers, record_full_xfer_partial)
887 (record_full_insert_breakpoint, record_full_remove_breakpoint):
888 Refactor as methods of the record_full_target class.
889 (record_full_can_execute_reverse, record_full_get_bookmark)
890 (record_full_goto_bookmark, record_full_execution_direction)
891 (record_full_record_method, record_full_info, record_full_delete)
892 (record_full_is_replaying, record_full_will_replay)
893 (record_full_goto_begin, record_full_goto_end, record_full_goto)
894 (record_full_stop_replaying): Refactor as methods of the
895 record_full_base_target class.
896 (record_full_core_resume, record_full_core_kill)
897 (record_full_core_fetch_registers)
898 (record_full_core_prepare_to_store)
899 (record_full_core_store_registers, record_full_core_xfer_partial)
900 (record_full_core_insert_breakpoint)
901 (record_full_core_remove_breakpoint)
902 (record_full_core_has_execution): Refactor
903 as methods of the record_full_core_target class.
904 (record_full_base_target::supports_delete_record): New.
905 (init_record_full_ops): Delete.
906 (init_record_full_core_ops): Delete.
907 (record_full_save): Refactor as method of the
908 record_full_base_target class.
909 (_initialize_record_full): Remove references to
910 init_record_full_ops and init_record_full_core_ops.
912 * remote.c (remote_target, extended_remote_target): New classes.
913 (remote_ops): Now a remote_target.
914 (extended_remote_ops): Now an extended_remote_target.
915 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
916 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
917 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
918 (remote_pass_signals, remote_set_syscall_catchpoint)
919 (remote_program_signals, )
920 (remote_thread_always_alive): Remove target_ops parameter.
921 (remote_thread_alive, remote_thread_name)
922 (remote_update_thread_list, remote_threads_extra_info)
923 (remote_static_tracepoint_marker_at)
924 (remote_static_tracepoint_markers_by_strid)
925 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
926 (remote_open): Refactor as methods of remote_target.
927 (extended_remote_open, extended_remote_detach)
928 (extended_remote_attach, extended_remote_post_attach):
929 (extended_remote_supports_disable_randomization)
930 (extended_remote_create_inferior): : Refactor as method of
931 extended_remote_target.
932 (remote_set_permissions, remote_open_1, remote_detach)
933 (remote_follow_fork, remote_follow_exec, remote_disconnect)
934 (remote_resume, remote_commit_resume, remote_stop)
935 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
936 (remote_terminal_ours, remote_wait, remote_fetch_registers)
937 (remote_prepare_to_store, remote_store_registers)
938 (remote_flash_erase, remote_flash_done, remote_files_info)
939 (remote_kill, remote_mourn, remote_insert_breakpoint)
940 (remote_remove_breakpoint, remote_insert_watchpoint)
941 (remote_watchpoint_addr_within_range)
942 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
943 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
944 (remote_supports_stopped_by_sw_breakpoint)
945 (remote_stopped_by_hw_breakpoint)
946 (remote_supports_stopped_by_hw_breakpoint)
947 (remote_stopped_by_watchpoint, remote_stopped_data_address)
948 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
949 (remote_verify_memory): Refactor as methods of remote_target.
950 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
952 (remote_xfer_partial, remote_get_memory_xfer_limit)
953 (remote_search_memory, remote_rcmd, remote_memory_map)
954 (remote_pid_to_str, remote_get_thread_local_address)
955 (remote_get_tib_address, remote_read_description): Refactor as
956 methods of remote_target.
957 (remote_target::fileio_open, remote_target::fileio_pwrite)
958 (remote_target::fileio_pread, remote_target::fileio_close): New.
959 (remote_hostio_readlink, remote_hostio_fstat)
960 (remote_filesystem_is_local, remote_can_execute_reverse)
961 (remote_supports_non_stop, remote_supports_disable_randomization)
962 (remote_supports_multi_process, remote_supports_cond_breakpoints)
963 (remote_supports_enable_disable_tracepoint)
964 (remote_supports_string_tracing)
965 (remote_can_run_breakpoint_commands, remote_trace_init)
966 (remote_download_tracepoint, remote_can_download_tracepoint)
967 (remote_download_trace_state_variable, remote_enable_tracepoint)
968 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
969 (remote_trace_start, remote_get_trace_status)
970 (remote_get_tracepoint_status, remote_trace_stop)
971 (remote_trace_find, remote_get_trace_state_variable_value)
972 (remote_save_trace_data, remote_get_raw_trace_data)
973 (remote_set_disconnected_tracing, remote_core_of_thread)
974 (remote_set_circular_trace_buffer, remote_traceframe_info)
975 (remote_get_min_fast_tracepoint_insn_len)
976 (remote_set_trace_buffer_size, remote_set_trace_notes)
977 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
978 (remote_disable_btrace, remote_teardown_btrace)
979 (remote_read_btrace, remote_btrace_conf)
980 (remote_augmented_libraries_svr4_read, remote_load)
981 (remote_pid_to_exec_file, remote_can_do_single_step)
982 (remote_execution_direction, remote_thread_handle_to_thread_info):
983 Refactor as methods of remote_target.
984 (init_remote_ops, init_extended_remote_ops): Delete.
985 (remote_can_async_p, remote_is_async_p, remote_async)
986 (remote_thread_events, remote_upload_tracepoints)
987 (remote_upload_trace_state_variables): Refactor as methods of
989 (_initialize_remote): Remove references to init_remote_ops and
990 init_extended_remote_ops.
992 * remote-sim.c (gdbsim_target): New class.
993 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
994 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
995 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
996 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
997 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
998 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
999 Refactor as methods of gdbsim_target.
1000 (gdbsim_ops): Now a gdbsim_target.
1001 (init_gdbsim_ops): Delete.
1002 (gdbsim_cntrl_c): Adjust.
1003 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1005 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1006 (the_amd64_linux_nat_target): New.
1007 (amd64_linux_fetch_inferior_registers)
1008 (amd64_linux_store_inferior_registers): Refactor as methods of
1009 amd64_linux_nat_target.
1010 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1011 * i386-linux-nat.c: Don't include "linux-nat.h".
1012 (i386_linux_nat_target): New class.
1013 (the_i386_linux_nat_target): New.
1014 (i386_linux_fetch_inferior_registers)
1015 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1016 as methods of i386_linux_nat_target.
1017 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1018 * inf-child.c (inf_child_ops): Delete.
1019 (inf_child_fetch_inferior_registers)
1020 (inf_child_store_inferior_registers): Delete.
1021 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1022 methods of inf_child_target.
1023 (inf_child_target::supports_terminal_ours)
1024 (inf_child_target::terminal_init)
1025 (inf_child_target::terminal_inferior)
1026 (inf_child_target::terminal_ours_for_output)
1027 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1028 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1030 (inf_child_open, inf_child_disconnect, inf_child_close)
1031 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1032 (inf_child_post_startup_inferior, inf_child_can_run)
1033 (inf_child_pid_to_exec_file): Refactor as methods of
1035 (inf_child_follow_fork): Delete.
1036 (inf_child_target::can_create_inferior)
1037 (inf_child_target::can_attach): New.
1038 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1039 (inf_child_target::has_stack, inf_child_target::has_registers)
1040 (inf_child_target::has_execution): New.
1041 (inf_child_fileio_open, inf_child_fileio_pwrite)
1042 (inf_child_fileio_pread, inf_child_fileio_fstat)
1043 (inf_child_fileio_close, inf_child_fileio_unlink)
1044 (inf_child_fileio_readlink, inf_child_use_agent)
1045 (inf_child_can_use_agent): Refactor as methods of
1047 (return_zero, inf_child_target): Delete.
1048 (inf_child_target::inf_child_target): New.
1049 * inf-child.h: Include "target.h".
1050 (inf_child_target): Delete function prototype.
1051 (inf_child_target): New class.
1052 (inf_child_open_target, inf_child_mourn_inferior)
1053 (inf_child_maybe_unpush_target): Delete.
1054 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1055 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1056 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1057 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1058 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1059 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1060 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1061 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1062 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1063 methods of inf_ptrace_target.
1064 (inf_ptrace_target): Delete function.
1065 * inf-ptrace.h: Include "inf-child.h".
1066 (inf_ptrace_target): Delete function declaration.
1067 (inf_ptrace_target): New class.
1068 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1069 * linux-nat.c (linux_target): New.
1070 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1071 (linux_nat_target::~linux_nat_target): New.
1072 (linux_child_post_attach, linux_child_post_startup_inferior)
1073 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1074 (linux_child_remove_fork_catchpoint)
1075 (linux_child_insert_vfork_catchpoint)
1076 (linux_child_remove_vfork_catchpoint)
1077 (linux_child_insert_exec_catchpoint)
1078 (linux_child_remove_exec_catchpoint)
1079 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1080 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1081 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1082 (linux_nat_stopped_data_address)
1083 (linux_nat_stopped_by_sw_breakpoint)
1084 (linux_nat_supports_stopped_by_sw_breakpoint)
1085 (linux_nat_stopped_by_hw_breakpoint)
1086 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1087 (linux_nat_kill, linux_nat_mourn_inferior)
1088 (linux_nat_xfer_partial, linux_nat_thread_alive)
1089 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1090 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1091 (linux_child_static_tracepoint_markers_by_strid)
1092 (linux_nat_is_async_p, linux_nat_can_async_p)
1093 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1094 (linux_nat_supports_multi_process)
1095 (linux_nat_supports_disable_randomization, linux_nat_async)
1096 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1097 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1098 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1099 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1100 methods of linux_nat_target.
1101 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1102 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1104 (check_stopped_by_watchpoint): Adjust.
1105 (linux_xfer_partial): Delete.
1106 (linux_target_install_ops, linux_target, linux_nat_add_target):
1108 (linux_nat_target::linux_nat_target): New.
1109 * linux-nat.h: Include "inf-ptrace.h".
1110 (linux_nat_target): New.
1111 (linux_target, linux_target_install_ops, linux_nat_add_target):
1112 Delete function declarations.
1113 (linux_target): Declare global.
1114 * linux-thread-db.c (thread_db_target): New.
1115 (thread_db_target::thread_db_target): New.
1116 (thread_db_ops): Delete.
1117 (the_thread_db_target): New.
1118 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1119 (thread_db_update_thread_list, thread_db_pid_to_str)
1120 (thread_db_extra_thread_info)
1121 (thread_db_thread_handle_to_thread_info)
1122 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1123 (thread_db_resume): Refactor as methods of thread_db_target.
1124 (init_thread_db_ops): Delete.
1125 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1126 * x86-linux-nat.c: Don't include "linux-nat.h".
1127 (super_post_startup_inferior): Delete.
1128 (x86_linux_nat_target::~x86_linux_nat_target): New.
1129 (x86_linux_child_post_startup_inferior)
1130 (x86_linux_read_description, x86_linux_enable_btrace)
1131 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1132 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1133 methods of x86_linux_nat_target.
1134 (x86_linux_create_target): Delete. Bits folded ...
1135 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1137 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1138 (x86_linux_nat_target): New class.
1139 (x86_linux_create_target): Delete.
1140 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1141 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1142 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1143 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1144 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1145 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1147 (x86_use_watchpoints): Delete.
1148 * x86-nat.h: Include "breakpoint.h" and "target.h".
1149 (x86_use_watchpoints): Delete.
1150 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1151 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1152 (x86_insert_watchpoint, x86_remove_watchpoint)
1153 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1154 (x86_stopped_by_hw_breakpoint): New declarations.
1155 (x86_nat_target): New template class.
1157 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1158 (the_ppc_linux_nat_target): New.
1159 (ppc_linux_fetch_inferior_registers)
1160 (ppc_linux_can_use_hw_breakpoint)
1161 (ppc_linux_region_ok_for_hw_watchpoint)
1162 (ppc_linux_ranged_break_num_registers)
1163 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1164 (ppc_linux_insert_mask_watchpoint)
1165 (ppc_linux_remove_mask_watchpoint)
1166 (ppc_linux_can_accel_watchpoint_condition)
1167 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1168 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1169 (ppc_linux_watchpoint_addr_within_range)
1170 (ppc_linux_masked_watch_num_registers)
1171 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1172 (ppc_linux_read_description): Refactor as methods of
1173 ppc_linux_nat_target.
1174 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1176 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1177 (procfs_target): New class.
1178 (the_procfs_target): New.
1179 (procfs_target): Delete function.
1180 (procfs_auxv_parse, procfs_attach, procfs_detach)
1181 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1182 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1183 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1184 (procfs_create_inferior, procfs_update_thread_list)
1185 (procfs_thread_alive, procfs_pid_to_str)
1186 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1187 (procfs_stopped_data_address, procfs_insert_watchpoint)
1188 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1189 (proc_find_memory_regions, procfs_info_proc)
1190 (procfs_make_note_section): Refactor as methods of procfs_target.
1191 (_initialize_procfs): Adjust.
1192 * sol-thread.c (sol_thread_target): New class.
1193 (sol_thread_ops): Now a sol_thread_target.
1194 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1195 (sol_thread_fetch_registers, sol_thread_store_registers)
1196 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1197 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1198 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1199 (init_sol_thread_ops): Delete.
1200 (_initialize_sol_thread): Adjust. Remove references to
1201 init_sol_thread_ops and complete_target_initialization.
1203 * windows-nat.c (windows_nat_target): New class.
1204 (windows_fetch_inferior_registers)
1205 (windows_store_inferior_registers, windows_resume, windows_wait)
1206 (windows_attach, windows_detach, windows_pid_to_exec_file)
1207 (windows_files_info, windows_create_inferior)
1208 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1209 (windows_close, windows_pid_to_str, windows_xfer_partial)
1210 (windows_get_tib_address, windows_get_ada_task_ptid)
1211 (windows_thread_name, windows_thread_alive): Refactor as
1212 windows_nat_target methods.
1213 (do_initial_windows_stuff): Adjust.
1214 (windows_target): Delete function.
1215 (_initialize_windows_nat): Adjust.
1217 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1218 (darwin_mourn_inferior, darwin_kill_inferior)
1219 (darwin_create_inferior, darwin_attach, darwin_detach)
1220 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1221 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1222 (darwin_supports_multi_process): Refactor as darwin_nat_target
1224 (darwin_resume_to, darwin_files_info): Delete.
1225 (_initialize_darwin_inferior): Rename to ...
1226 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1227 * darwin-nat.h: Include "inf-child.h".
1228 (darwin_nat_target): New class.
1229 (darwin_complete_target): Delete.
1230 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1231 (darwin_target): New.
1232 (i386_darwin_fetch_inferior_registers)
1233 (i386_darwin_store_inferior_registers): Refactor as methods of
1235 (darwin_complete_target): Delete, with ...
1236 (_initialize_i386_darwin_nat): ... bits factored out here.
1238 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1239 (the_alpha_linux_nat_target): New.
1240 (alpha_linux_register_u_offset): Refactor as
1241 alpha_linux_nat_target method.
1242 (_initialize_alpha_linux_nat): Adjust.
1243 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1244 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1245 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1246 methods of linux_nat_trad_target.
1247 (linux_trad_target): Delete.
1248 * linux-nat-trad.h (linux_trad_target): Delete function.
1249 (linux_nat_trad_target): New class.
1250 * mips-linux-nat.c (mips_linux_nat_target): New class.
1251 (super_fetch_registers, super_store_registers, super_close):
1253 (the_mips_linux_nat_target): New.
1254 (mips64_linux_regsets_fetch_registers)
1255 (mips64_linux_regsets_store_registers)
1256 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1257 (mips_linux_register_u_offset, mips_linux_read_description)
1258 (mips_linux_can_use_hw_breakpoint)
1259 (mips_linux_stopped_by_watchpoint)
1260 (mips_linux_stopped_data_address)
1261 (mips_linux_region_ok_for_hw_watchpoint)
1262 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1263 (mips_linux_close): Refactor as methods of mips_linux_nat.
1264 (_initialize_mips_linux_nat): Adjust to C++ification.
1266 * aix-thread.c (aix_thread_target): New class.
1267 (aix_thread_ops): Now an aix_thread_target.
1268 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1269 (aix_thread_fetch_registers, aix_thread_store_registers)
1270 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1271 (aix_thread_thread_alive, aix_thread_pid_to_str)
1272 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1273 Refactor as methods of aix_thread_target.
1274 (init_aix_thread_ops): Delete.
1275 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1276 and complete_target_initialization.
1277 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1278 (rs6000_nat_target): New class.
1279 (the_rs6000_nat_target): New.
1280 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1281 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1282 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1283 (super_create_inferior): Delete.
1284 (_initialize_rs6000_nat): Adjust to C++ification.
1286 * arm-linux-nat.c (arm_linux_nat_target): New class.
1287 (the_arm_linux_nat_target): New.
1288 (arm_linux_fetch_inferior_registers)
1289 (arm_linux_store_inferior_registers, arm_linux_read_description)
1290 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1291 (arm_linux_remove_hw_breakpoint)
1292 (arm_linux_region_ok_for_hw_watchpoint)
1293 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1294 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1295 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1296 arm_linux_nat_target.
1297 (_initialize_arm_linux_nat): Adjust to C++ification.
1299 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1300 (the_aarch64_linux_nat_target): New.
1301 (aarch64_linux_fetch_inferior_registers)
1302 (aarch64_linux_store_inferior_registers)
1303 (aarch64_linux_child_post_startup_inferior)
1304 (aarch64_linux_read_description)
1305 (aarch64_linux_can_use_hw_breakpoint)
1306 (aarch64_linux_insert_hw_breakpoint)
1307 (aarch64_linux_remove_hw_breakpoint)
1308 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1309 (aarch64_linux_region_ok_for_hw_watchpoint)
1310 (aarch64_linux_stopped_data_address)
1311 (aarch64_linux_stopped_by_watchpoint)
1312 (aarch64_linux_watchpoint_addr_within_range)
1313 (aarch64_linux_can_do_single_step): Refactor as methods of
1314 aarch64_linux_nat_target.
1315 (super_post_startup_inferior): Delete.
1316 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1318 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1319 (the_hppa_linux_nat_target): New.
1320 (hppa_linux_fetch_inferior_registers)
1321 (hppa_linux_store_inferior_registers): Refactor as methods of
1322 hppa_linux_nat_target.
1323 (_initialize_hppa_linux_nat): Adjust to C++ification.
1325 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1326 (the_ia64_linux_nat_target): New.
1327 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1328 (ia64_linux_stopped_data_address)
1329 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1330 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1331 ia64_linux_nat_target methods.
1332 (super_xfer_partial): Delete.
1333 (_initialize_ia64_linux_nat): Adjust to C++ification.
1335 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1336 (the_m32r_linux_nat_target): New.
1337 (m32r_linux_fetch_inferior_registers)
1338 (m32r_linux_store_inferior_registers): Refactor as
1339 m32r_linux_nat_target methods.
1340 (_initialize_m32r_linux_nat): Adjust to C++ification.
1342 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1343 (the_m68k_linux_nat_target): New.
1344 (m68k_linux_fetch_inferior_registers)
1345 (m68k_linux_store_inferior_registers): Refactor as
1346 m68k_linux_nat_target methods.
1347 (_initialize_m68k_linux_nat): Adjust to C++ification.
1349 * s390-linux-nat.c (s390_linux_nat_target): New class.
1350 (the_s390_linux_nat_target): New.
1351 (s390_linux_fetch_inferior_registers)
1352 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1353 (s390_insert_watchpoint, s390_remove_watchpoint)
1354 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1355 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1356 (s390_auxv_parse, s390_read_description): Refactor as methods of
1357 s390_linux_nat_target.
1358 (_initialize_s390_nat): Adjust to C++ification.
1360 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1361 (the_sparc_linux_nat_target): New.
1362 (_initialize_sparc_linux_nat): Adjust to C++ification.
1363 * sparc-nat.c (sparc_fetch_inferior_registers)
1364 (sparc_store_inferior_registers): Remove target_ops parameter.
1365 * sparc-nat.h (sparc_fetch_inferior_registers)
1366 (sparc_store_inferior_registers): Remove target_ops parameter.
1367 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1368 (the_sparc64_linux_nat_target): New.
1369 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1371 * spu-linux-nat.c (spu_linux_nat_target): New class.
1372 (the_spu_linux_nat_target): New.
1373 (spu_child_post_startup_inferior, spu_child_post_attach)
1374 (spu_child_wait, spu_fetch_inferior_registers)
1375 (spu_store_inferior_registers, spu_xfer_partial)
1376 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1378 (_initialize_spu_nat): Adjust to C++ification.
1380 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1381 (the_tilegx_linux_nat_target): New.
1382 (fetch_inferior_registers, store_inferior_registers):
1383 Refactor as methods.
1384 (_initialize_tile_linux_nat): Adjust to C++ification.
1386 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1387 (the_xtensa_linux_nat_target): New.
1388 (xtensa_linux_fetch_inferior_registers)
1389 (xtensa_linux_store_inferior_registers): Refactor as
1390 xtensa_linux_nat_target methods.
1391 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1393 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1394 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1395 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1396 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1397 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1398 (fbsd_stopped_by_sw_breakpoint)
1399 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1400 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1401 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1402 (fbsd_post_startup_inferior, fbsd_post_attach)
1403 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1404 (fbsd_set_syscall_catchpoint)
1405 (super_xfer_partial, super_resume, super_wait)
1406 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1407 (fbsd_handle_debug_trap): Remove target_ops parameter.
1408 (fbsd_nat_add_target): Delete.
1409 * fbsd-nat.h: Include "inf-ptrace.h".
1410 (fbsd_nat_add_target): Delete.
1411 (USE_SIGTRAP_SIGINFO): Define.
1412 (fbsd_nat_target): New class.
1414 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1415 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1416 (amd64bsd_target): Delete.
1417 * amd64-bsd-nat.h: New file.
1418 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1420 (amd64_fbsd_nat_target): New class.
1421 (the_amd64_fbsd_nat_target): New.
1422 (amd64fbsd_read_description): Refactor as method of
1423 amd64_fbsd_nat_target.
1424 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1425 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1426 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1427 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1428 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1429 (i386bsd_target): Delete.
1430 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1431 (i386bsd_fetch_inferior_registers)
1432 (i386bsd_store_inferior_registers): Declare.
1433 (i386_bsd_nat_target): New class.
1434 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1435 (the_i386_fbsd_nat_target): New.
1436 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1437 i386_fbsd_nat_target methods.
1438 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1439 (_initialize_i386fbsd_nat): Adjust to C++ification.
1440 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1441 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1442 (_initialize_x86_bsd_nat): Adjust to C++ification.
1443 * x86-bsd-nat.h: Include "x86-nat.h".
1444 (x86bsd_target): Delete declaration.
1445 (x86bsd_nat_target): New class.
1447 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1448 (the_aarch64_fbsd_nat_target): New.
1449 (aarch64_fbsd_fetch_inferior_registers)
1450 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1451 aarch64_fbsd_nat_target.
1452 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1453 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1454 (the_alpha_bsd_nat_target): New.
1455 (alphabsd_fetch_inferior_registers)
1456 (alphabsd_store_inferior_registers): Refactor as
1457 alpha_bsd_nat_target methods.
1458 (_initialize_alphabsd_nat): Refactor as methods of
1459 alpha_bsd_nat_target.
1460 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1461 (the_amd64_nbsd_nat_target): New.
1462 (_initialize_amd64nbsd_nat): Adjust to C++ification.
1463 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1464 (the_amd64_obsd_nat_target): New.
1465 (_initialize_amd64obsd_nat): Adjust to C++ification.
1466 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1467 (the_arm_fbsd_nat_target): New.
1468 (arm_fbsd_fetch_inferior_registers)
1469 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1470 (_initialize_arm_fbsd_nat): Refactor as methods of
1471 arm_fbsd_nat_target.
1472 (_initialize_arm_fbsd_nat): Adjust to C++ification.
1473 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1474 (the_arm_netbsd_nat_target): New.
1475 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1476 arm_netbsd_nat_target.
1477 (_initialize_arm_netbsd_nat): Adjust to C++ification.
1478 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1479 (the_hppa_nbsd_nat_target): New.
1480 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1481 hppa_nbsd_nat_target methods.
1482 (_initialize_hppanbsd_nat): Adjust to C++ification.
1483 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1484 (the_hppa_obsd_nat_target): New.
1485 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1486 methods of hppa_obsd_nat_target.
1487 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
1489 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1490 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
1492 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1493 (_initialize_i386obsd_nat): Use add_target.
1494 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1495 (the_m68k_bsd_nat_target): New.
1496 (m68kbsd_fetch_inferior_registers)
1497 (m68kbsd_store_inferior_registers): Refactor as methods of
1498 m68k_bsd_nat_target.
1499 (_initialize_m68kbsd_nat): Adjust to C++ification.
1500 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1501 (the_mips_fbsd_nat_target): New.
1502 (mips_fbsd_fetch_inferior_registers)
1503 (mips_fbsd_store_inferior_registers): Refactor as methods of
1504 mips_fbsd_nat_target.
1505 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1507 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1508 (the_mips_nbsd_nat_target): New.
1509 (mipsnbsd_fetch_inferior_registers)
1510 (mipsnbsd_store_inferior_registers): Refactor as methods of
1511 mips_nbsd_nat_target.
1512 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1513 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1514 (the_mips64_obsd_nat_target): New.
1515 (mips64obsd_fetch_inferior_registers)
1516 (mips64obsd_store_inferior_registers): Refactor as methods of
1517 mips64_obsd_nat_target.
1518 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1520 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1522 * nbsd-nat.h: Include "inf-ptrace.h".
1523 (nbsd_nat_target): New class.
1524 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1525 (obsd_wait): Refactor as methods of obsd_nat_target.
1526 (obsd_add_target): Delete.
1527 * obsd-nat.h: Include "inf-ptrace.h".
1528 (obsd_nat_target): New class.
1529 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1530 (the_ppc_fbsd_nat_target): New.
1531 (ppcfbsd_fetch_inferior_registers)
1532 (ppcfbsd_store_inferior_registers): Refactor as methods of
1533 ppc_fbsd_nat_target.
1534 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1536 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1537 (the_ppc_nbsd_nat_target): New.
1538 (ppcnbsd_fetch_inferior_registers)
1539 (ppcnbsd_store_inferior_registers): Refactor as methods of
1540 ppc_nbsd_nat_target.
1541 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1542 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1543 (the_ppc_obsd_nat_target): New.
1544 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1545 methods of ppc_obsd_nat_target.
1546 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1548 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1549 (the_sh_nbsd_nat_target): New.
1550 (shnbsd_fetch_inferior_registers)
1551 (shnbsd_store_inferior_registers): Refactor as methods of
1553 (_initialize_shnbsd_nat): Adjust to C++ification.
1554 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1555 (inf_ptrace_xfer_partial): Delete.
1556 (sparc_xfer_partial, sparc_target): Delete.
1557 * sparc-nat.h (sparc_fetch_inferior_registers)
1558 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1559 (sparc_target): Delete function declaration.
1560 (sparc_target): New template class.
1561 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1562 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1563 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1564 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1566 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1567 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1568 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1569 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
1571 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1572 (the_vax_bsd_nat_target): New.
1573 (vaxbsd_fetch_inferior_registers)
1574 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1576 (_initialize_vaxbsd_nat): Adjust to C++ification.
1578 * bsd-kvm.c (bsd_kvm_target): New class.
1579 (bsd_kvm_ops): Now a bsd_kvm_target.
1580 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1581 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1582 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1584 (bsd_kvm_return_one): Delete.
1585 (bsd_kvm_add_target): Adjust to C++ification.
1587 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1588 (nto_procfs_target_procfs): New classes.
1589 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1590 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1591 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1592 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1593 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1594 (procfs_remove_hw_breakpoint, procfs_resume)
1595 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1596 (procfs_kill_inferior, procfs_store_registers)
1597 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1598 as methods of nto_procfs_target.
1599 (nto_procfs_ops): Now an nto_procfs_target_procfs.
1600 (nto_native_ops): Delete.
1601 (procfs_open, procfs_native_open): Delete.
1602 (nto_native_ops): Now an nto_procfs_target_native.
1603 (init_procfs_targets): Adjust to C++ification.
1604 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1605 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1606 Refactor as methods of nto_procfs_target.
1608 * go32-nat.c (go32_nat_target): New class.
1609 (the_go32_nat_target): New.
1610 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1611 (go32_store_registers, go32_xfer_partial, go32_files_info)
1612 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1613 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1614 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1615 (go32_pid_to_str): Refactor as methods of go32_nat_target.
1616 (go32_target): Delete.
1617 (_initialize_go32_nat): Adjust to C++ification.
1619 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1620 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1621 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1622 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1624 (gnu_target): Delete.
1625 * gnu-nat.h (gnu_target): Delete.
1626 (gnu_nat_target): New class.
1627 * i386-gnu-nat.c (gnu_base_target): New.
1628 (i386_gnu_nat_target): New class.
1629 (the_i386_gnu_nat_target): New.
1630 (_initialize_i386gnu_nat): Adjust to C++ification.
1632 2018-05-02 Pedro Alves <palves@redhat.com>
1634 * bfd-target.c (target_bfd_xclose): Rename to ...
1635 (target_bfd_close): ... this.
1636 (target_bfd_reopen): Adjust.
1637 * target.c (target_close): Remove references to to_xclose.
1638 * target.h (target_ops::to_xclose): Delete.
1639 (target_ops::to_close): Update comments.
1641 2018-05-02 Pedro Alves <palves@redhat.com>
1643 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1645 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1646 * inf-ptrace.c (inf_ptrace_register_u_offset)
1647 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1648 (inf_ptrace_store_register, inf_ptrace_store_registers)
1649 (inf_ptrace_trad_target): Move to ...
1650 * linux-nat-trad.c: ... this new file.
1651 * linux-nat-trad.h: New file.
1652 * linux-nat.c (linux_target_install_ops): Make extern.
1653 (linux_trad_target): Delete.
1654 * linux-nat.h (linux_trad_target): Delete declaration.
1655 (linux_target_install_ops): Declare.
1656 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1659 2018-05-02 Pedro Alves <palves@redhat.com>
1661 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1662 procfs_target/add_target here.
1663 * procfs.c (procfs_target): Make static.
1664 (_initialize_procfs): Call add_target here.
1665 * procfs.h (struct target_ops): Remove forward declaration.
1666 (procfs_target): Remove declaration.
1667 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1669 2018-05-02 Pedro Alves <palves@redhat.com>
1671 * procfs.c (procfs_stopped_by_watchpoint)
1672 (procfs_insert_watchpoint, procfs_remove_watchpoint)
1673 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1675 (procfs_use_watchpoints): Delete, move contents...
1676 (procfs_target): ... here.
1677 * procfs.h (procfs_use_watchpoints): Delete declaration.
1678 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1679 procfs_use_watchpoints.
1680 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1681 procfs_use_watchpoints.
1683 2018-05-02 Tom Tromey <tom@tromey.com>
1686 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1687 and var_zuinteger_unlimited.
1688 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1689 and PARAM_ZUINTEGER_UNLIMITED.
1690 (set_parameter_value): Handle var_zuinteger and
1691 var_zuinteger_unlimited.
1692 (add_setshow_generic): Likewise.
1693 (parmpy_init): Likewise.
1695 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
1698 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1699 pointer is not null before dereferencing it.
1701 2018-04-30 Tom Tromey <tom@tromey.com>
1703 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1706 2018-04-30 Tom Tromey <tom@tromey.com>
1708 * breakpoint.c (mention): Remove use of is_mi_like_p.
1709 (print_mention_ranged_breakpoint): Likewise.
1710 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1713 2018-04-30 Tom Tromey <tom@tromey.com>
1715 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1717 2018-04-30 Tom Tromey <tom@tromey.com>
1719 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1720 (info_spu_event_command): Remove some uses of is_mi_like_p.
1722 2018-04-30 Tom Tromey <tom@tromey.com>
1724 * python/py-framefilter.c (py_print_single_arg)
1725 (enumerate_locals, py_print_args, py_print_frame): Remove some
1726 uses of is_mi_like_p.
1728 2018-04-30 Tom Tromey <tom@tromey.com>
1731 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1732 * ui-out.h (ui_out::is_mi_like_p): Now const.
1733 (ui_out::do_is_mi_like_p): Now const.
1734 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1736 2018-04-30 Tom Tromey <tom@tromey.com>
1738 * varobj.c (varobj_set_visualizer): Use new_reference.
1739 * python/python.c (gdbpy_decode_line): Use new_reference.
1740 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1743 2018-04-30 Tom Tromey <tom@tromey.com>
1745 * varobj.c (install_new_value): Use new_reference.
1746 * value.h (value_incref): Return void. Swap intro comment with
1748 * value.c (set_value_parent): Use new_reference.
1749 (value_incref): Return void. Update intro comment.
1750 (release_value): Use new_reference.
1751 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1753 2018-04-30 Tom Tromey <tom@tromey.com>
1755 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1756 * gdb_bfd.h (new_bfd_ref): Remove.
1757 (gdb_bfd_open): Update comment.
1758 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1759 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1760 (gdb_bfd_fdopenr): Use new_reference.
1761 * exec.c (exec_file_attach): Use new_reference.
1763 2018-04-30 Tom Tromey <tom@tromey.com>
1765 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1768 2018-04-30 Tom Tromey <tom@tromey.com>
1770 * jit.c (jit_read_code_entry): Use type_align.
1771 * i386-tdep.c (i386_gdbarch_init): Don't call
1772 set_gdbarch_long_long_align_bit.
1773 * gdbarch.sh: Remove long_long_align_bit.
1774 * gdbarch.c, gdbarch.h: Rebuild.
1775 * arc-tdep.c (arc_type_align): New function.
1776 (arc_gdbarch_init): Use arc_type_align. Don't call
1777 set_gdbarch_long_long_align_bit.
1779 2018-04-30 Tom Tromey <tom@tromey.com>
1781 * rust-lang.c (rust_type_alignment): Remove.
1782 (rust_composite_type): Use type_align.
1784 2018-04-30 Tom Tromey <tom@tromey.com>
1786 * NEWS: Mention Type.align.
1787 * python/py-type.c (typy_get_alignof): New function.
1788 (type_object_getset): Add "alignof".
1790 2018-04-30 Tom Tromey <tom@tromey.com>
1794 * std-operator.def (UNOP_ALIGNOF): New operator.
1795 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1797 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1798 * c-lang.c (c_op_print_tab): Add alignof.
1799 * c-exp.y (ALIGNOF): New token.
1800 (exp): Add "ALIGNOF" production.
1801 (ident_tokens): Add _Alignof and alignof.
1803 2018-04-30 Tom Tromey <tom@tromey.com>
1805 * i386-tdep.c (i386_type_align): New function.
1806 (i386_gdbarch_init): Update.
1807 * gdbarch.sh (type_align): New method.
1808 * gdbarch.c, gdbarch.h: Rebuild.
1809 * arch-utils.h (default_type_align): Declare.
1810 * arch-utils.c (default_type_align): New function.
1811 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1812 (struct type) <align_log2>: New field.
1813 <instance_flags>: Now a bitfield.
1814 (TYPE_RAW_ALIGN): New macro.
1815 (type_align, type_raw_align, set_type_align): Declare.
1816 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1818 * dwarf2read.c (quirk_rust_enum): Set type alignment.
1819 (get_alignment, maybe_set_alignment): New functions.
1820 (read_structure_type, read_enumeration_type, read_array_type)
1821 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1822 (read_subrange_type, read_base_type): Set type alignment.
1824 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
1826 * dwarf2read.c (read_index_from_section): Use bool.
1828 2018-04-29 Fabian Groffen <grobian@gentoo.org>
1831 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1834 2018-04-29 John Reiser <jreiser@BitWagon.com>
1837 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1838 last step, and do it atomically.
1840 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
1842 * compile/compile-c-types.c (convert_int, convert_float):
1845 2018-04-27 Tom Tromey <tom@tromey.com>
1848 * rust-lang.c (rust_inclusive_range_type_p): New function.
1849 (rust_range): Handle inclusive ranges.
1850 (rust_compute_range): Likewise.
1851 * rust-exp.y (struct rust_op) <inclusive>: New field.
1852 (DOTDOTEQ): New constant.
1853 (range_expr): Add "..=" productions.
1854 (operator_tokens): Add "..=" token.
1855 (ast_range): Add "inclusive" parameter.
1856 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1858 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1860 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1861 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1863 * expprint.c (print_subexp_standard): Handle new bounds values.
1864 (dump_subexp_body_standard): Likewise.
1866 2018-04-27 Tom Tromey <tom@tromey.com>
1868 * configure: Rebuild.
1869 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1870 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1872 (class symbol_needs_eval_context): Likewise.
1873 * dwarf2read.c (mock_mapped_index::symbol_name_count)
1874 (mock_mapped_index::symbol_name_at): Use "override". Remove
1876 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1878 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1879 * aarch64-tdep.c (instruction_reader::read): Use "override".
1880 (instruction_reader_test::read): Likewise.
1881 * arm-tdep.c (instruction_reader::read): Use "override".
1882 (instruction_reader_thumb::read): Likewise.
1884 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
1887 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1888 instead of remote_send.
1889 (remote_send): Remove.
1891 2018-04-26 Pedro Alves <palves@redhat.com>
1893 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1894 find_function_start_sal instead of find_pc_line.
1896 2018-04-26 Pedro Alves <palves@redhat.com>
1898 * breakpoint.c (set_breakpoint_location_function): Handle
1900 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1901 * elfread.c (elf_symtab_read): Give data symbols with
1902 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1903 (elf_rel_plt_read): Update comment.
1904 * linespec.c (convert_linespec_to_sals): Handle
1906 (minsym_found): Handle mst_data_gnu_ifunc.
1907 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1908 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1909 * parse.c (find_minsym_type_and_address): Handle
1911 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1912 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1913 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1915 <mst_data_gnu_ifunc>: New enumerator.
1917 2018-04-26 Pedro Alves <palves@redhat.com>
1919 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1920 (lookup_minimal_symbol_by_pc_section): ... this. Replace
1921 'want_trampoline' parameter by a lookup_msym_prefer parameter.
1923 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1924 (lookup_minimal_symbol_by_pc): Adjust.
1925 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1926 (lookup_solib_trampoline_symbol_by_pc): Adjust.
1927 * minsyms.h (lookup_msym_prefer): New enum.
1928 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1929 parameter by a lookup_msym_prefer parameter.
1931 2018-04-26 Pedro Alves <palves@redhat.com>
1933 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1934 ends in "@plt" instead of looking at the symbol's section.
1936 2018-04-26 Pedro Alves <palves@redhat.com>
1938 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
1940 (find_pc_partial_function_gnu_ifunc): Rename to ...
1941 (find_pc_partial_function): ... this, and remove references to
1943 (find_pc_partial_function): Delete old implementation.
1944 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1946 2018-04-26 Pedro Alves <palves@redhat.com>
1948 * linespec.c (struct bound_minimal_symbol_search_key): New.
1949 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
1950 skip first line if we found a GNU ifunc minimal symbol by name.
1951 (compare_msymbols): Change parameters to work with a destructured
1953 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1956 2018-04-26 Pedro Alves <palves@redhat.com>
1958 * breakpoint.c (set_breakpoint_location_function): Don't resolve
1959 ifunc targets here. Instead, if we have an ifunc minsym, use its
1961 (add_location_to_breakpoint): Store the minsym and the objfile in
1962 the breakpoint location.
1963 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1964 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1965 Record the minsym in the sal.
1966 * symtab.h (symtab_and_line) <msymbol>: New field.
1968 2018-04-26 Pedro Alves <palves@redhat.com>
1970 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1971 unless we actually resolved the ifunc.
1973 2018-04-26 Pedro Alves <palves@redhat.com>
1975 * c-exp.y (variable production): Prefer ifunc minsyms over
1976 regular function symbols.
1977 * symtab.c (find_gnu_ifunc): New function.
1978 * minsyms.h (lookup_msym_prefer): New enum.
1979 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1980 parameter by a lookup_msym_prefer parameter.
1981 * symtab.h (find_gnu_ifunc): New declaration.
1983 2018-04-26 Pedro Alves <palves@redhat.com>
1985 * blockframe.c (find_gnu_ifunc_target_type): New function.
1986 (find_function_type): New.
1987 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1988 return a value with a memory address.
1989 (eval_call): For calls to GNU ifunc functions, try to find the
1990 type of the target function from the type that the resolver
1992 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
1994 * infcall.c (find_function_return_type): Delete.
1995 (find_function_addr): Add 'function_type' parameter. For calls to
1996 GNU ifunc functions, try to find the type of the target function
1997 from the type that the resolver returns, and return it via
1999 (call_function_by_hand_dummy): Adjust to use the function type
2000 returned by find_function_addr.
2001 (find_function_addr): Add 'function_type' parameter and move
2003 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2006 2018-04-26 Pedro Alves <palves@redhat.com>
2008 * c-exp.y (variable production): Skip finding an alias for ifunc
2011 2018-04-26 Pedro Alves <palves@redhat.com>
2013 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2015 2018-04-25 Pedro Alves <palves@redhat.com>
2017 * infcmd.c (kill_command): Print the pid as string, not the whole
2018 thread's ptid. Add comment. s/has been killed/killed/ in output
2020 * remote.c (remote_detach_1): Print the pid as string, not the
2021 whole thread's ptid.
2023 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2024 Sergio Durigan Junior <sergiodj@redhat.com>
2025 Pedro Alves <palves@redhat.com>
2027 * infcmd.c (kill_command): Print message when inferior has
2029 * inferior.c (print_inferior_events): Remove 'static'. Set as
2031 (add_inferior): Improve message printed when
2032 'print_inferior_events' is on.
2033 (exit_inferior): Remove message printed when
2034 'print_inferior_events' is on.
2035 (detach_inferior): Improve message printed when
2036 'print_inferior_events' is on.
2037 (initialize_inferiors): Use 'add_inferior_silent' to set
2038 'current_inferior_'.
2039 * inferior.h (print_inferior_events): Declare here as
2041 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2042 '[Detaching...]' messages when 'print_inferior_events' is on.
2043 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2044 as prefix/suffix for messages. Remove periods. Fix erroneous
2045 'Detaching after fork from child...', replace it by '... from
2047 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2048 prefix/suffix when printing 'Detaching...' messages. Print
2049 them when 'print_inferior_events' is on.
2050 * remote.c (remote_detach_1): Print message when detaching
2051 from inferior and '!is_fork_parent'.
2053 2018-04-24 Tom Tromey <tom@tromey.com>
2055 * cli-out.h: Reindent.
2057 2018-04-24 Tom Tromey <tom@tromey.com>
2059 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2060 (cli_ui_out::do_field_string): Use fputs_filtered.
2061 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2063 2018-04-23 Tom Tromey <tom@tromey.com>
2065 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2066 gdb::unique_xmalloc_ptr.
2068 2018-04-23 Tom Tromey <tom@tromey.com>
2070 * configure: Rebuild.
2072 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2075 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2076 prepare_for_testing. Set normal_bp to r_debug_state if target
2079 2018-04-21 Pedro Alves <palves@redhat.com>
2080 Rajendra SY <rajendra.sy@gmail.com>
2082 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2083 * remote.c (extended_remote_attach): In all-stop mode, mark the
2084 thread as executing.
2086 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2088 * thread.c (thread_apply_all_command): Fix comment.
2089 (thread_command): Fix comment.
2091 2018-04-10 Alan Hayward <alan.hayward@arm.com>
2093 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2095 * features/aarch64-core.c (create_feature_aarch64_core):
2097 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2099 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2101 * features/i386/32bit-avx512.c
2102 (create_feature_i386_32bit_avx512): Likewise.
2103 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2105 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2107 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2109 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2111 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2113 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2115 * features/i386/64bit-avx512.c
2116 (create_feature_i386_64bit_avx512): Likewise.
2117 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2119 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2121 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2123 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2125 * features/i386/64bit-segments.c
2126 (create_feature_i386_64bit_segments): Likewise.
2127 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2129 * features/i386/x32-core.c
2130 (create_feature_i386_x32_core): Likewise.
2131 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2132 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2133 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2134 * target-descriptions.c: In generated code, don't pass xml
2137 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2139 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2140 (print_xml_feature::visit_post): Likewise.
2141 (print_xml_feature::visit): Likewise.
2142 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2143 (print_xml_feature): Add new class.
2144 * regformats/regdat.sh: Null xmltarget on feature targets.
2145 * target-descriptions.c (struct target_desc): Add xmltarget.
2146 (maintenance_check_tdesc_xml_convert): Add unittest function.
2147 (tdesc_get_features_xml): Add function to get xml.
2148 (maintenance_check_xml_descriptions): Test xml generation.
2149 * xml-tdesc.c (string_read_description_xml): Add function.
2150 * xml-tdesc.h (string_read_description_xml): Add declaration.
2152 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2154 * features/Makefile: Add feature marker to targets with new style
2155 target descriptions.
2156 * regformats/aarch64.dat: Regenerate.
2157 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2158 * regformats/i386/amd64-avx-linux.dat: Likewise.
2159 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2160 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2161 * regformats/i386/amd64-linux.dat: Likewise.
2162 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2163 * regformats/i386/amd64.dat: Likewise.
2164 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2165 * regformats/i386/i386-avx-linux.dat: Likewise.
2166 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2167 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2168 * regformats/i386/i386-linux.dat: Likewise.
2169 * regformats/i386/i386-mmx-linux.dat: Likewise.
2170 * regformats/i386/i386-mpx-linux.dat: Likewise.
2171 * regformats/i386/i386.dat: Likewise.
2172 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2173 * regformats/i386/x32-avx-linux.dat: Likewise.
2174 * regformats/i386/x32-linux.dat: Likewise.
2175 * regformats/tic6x-c62x-linux.dat: Likewise.
2176 * regformats/tic6x-c64x-linux.dat: Likewise.
2177 * regformats/tic6x-c64xp-linux.dat: Likewise.
2178 * regformats/regdat.sh: Parse feature marker.
2180 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2182 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2183 (tdesc_osabi_name): Likewise.
2184 * target-descriptions.c (tdesc_architecture_name): Add new
2186 (tdesc_osabi_name): Likewise.
2188 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2190 * common/tdesc.c (tdesc_predefined_type): Move to here.
2191 (tdesc_named_type): Likewise.
2192 (tdesc_create_vector): Likewise.
2193 (tdesc_create_struct): Likewise.
2194 (tdesc_set_struct_size): Likewise.
2195 (tdesc_create_union): Likewise.
2196 (tdesc_create_flags): Likewise.
2197 (tdesc_create_enum): Likewise.
2198 (tdesc_add_field): Likewise.
2199 (tdesc_add_typed_bitfield): Likewise.
2200 (tdesc_add_bitfield): Likewise.
2201 (tdesc_add_flag): Likewise.
2202 (tdesc_add_enum_value): Likewise.
2203 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2204 (struct tdesc_type_vector): Likewise.
2205 (struct tdesc_type_field): Likewise.
2206 (struct tdesc_type_with_fields): Likewise.
2207 (tdesc_create_enum): Add declaration.
2208 (tdesc_add_typed_bitfield): Likewise.
2209 (tdesc_add_enum_value): Likewise.
2210 * target-descriptions.c (tdesc_type_field): Move from here.
2211 (tdesc_type_builtin): Likewise.
2212 (tdesc_type_vector): Likewise.
2213 (tdesc_type_with_fields): Likewise.
2214 (tdesc_predefined_types): Likewise.
2215 (tdesc_named_type): Likewise.
2216 (tdesc_create_vector): Likewise.
2217 (tdesc_create_struct): Likewise.
2218 (tdesc_set_struct_size): Likewise.
2219 (tdesc_create_union): Likewise.
2220 (tdesc_create_flags): Likewise.
2221 (tdesc_create_enum): Likewise.
2222 (tdesc_add_field): Likewise.
2223 (tdesc_add_typed_bitfield): Likewise.
2224 (tdesc_add_bitfield): Likewise.
2225 (tdesc_add_flag): Likewise.
2226 (tdesc_add_enum_value): Likewise.
2227 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2228 (tdesc_add_typed_bitfield): Likewise.
2229 (tdesc_add_enum_value): Likewise.
2231 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2233 * common/tdesc.c (tdesc_feature::accept): Move to here.
2234 (tdesc_feature::operator==): Likewise.
2235 (tdesc_create_reg): Likewise.
2236 * common/tdesc.h (tdesc_type_kind): Likewise.
2237 (struct tdesc_type): Likewise.
2238 (struct tdesc_feature): Likewise.
2239 * regformats/regdat.sh: Create a feature.
2240 * target-descriptions.c (tdesc_type_kind): Move from here.
2241 (tdesc_type): Likewise.
2242 (tdesc_type_up): Likewise.
2243 (tdesc_feature): Likewise.
2244 (tdesc_create_reg): Likewise.
2246 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2248 * Makefile.in: Add arch/tdesc.c
2249 * common/tdesc.c: New file.
2250 * common/tdesc.h (tdesc_element_visitor): Move to here.
2251 (tdesc_element): Likewise.
2252 (tdesc_reg): Likewise.
2253 (tdesc_reg_up): Likewise.
2254 * regformats/regdef.h (reg): Add offset to constructors.
2255 * target-descriptions.c (tdesc_element_visitor): Move from here.
2256 (tdesc_element): Likewise.
2257 (tdesc_reg): Likewise.
2258 (tdesc_reg_up): Likewise.
2260 2018-04-17 Tom Tromey <tom@tromey.com>
2262 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2265 2018-04-17 Tom Tromey <tom@tromey.com>
2267 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2269 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2271 * symtab.c (print_symbol_info): Skip printing filename and line
2272 number when `last' is NULL.
2273 (symtab_symbol_info): Use empty string instead of NULL for first
2274 invocation of print_symbol_info.
2275 (rbreak_command): Pass NULL to `last' parameter of
2278 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2280 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2283 2018-04-16 Pedro Alves <palves@redhat.com>
2285 * MAINTAINERS (sh): Remove.
2286 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2287 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2288 (ALLDEPFILES): Remove sh64-tdep.c.
2289 * NEWS: Mentions that support for SH-5/SH64 is removed.
2290 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2291 (sh*-*-openbsd*): Ditto.
2292 (sh64-*-elf*): Remove.
2294 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2295 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2296 * sh-tdep.c: No longer include "sh64-tdep.h".
2297 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2298 * sh64-tdep.c, sh64-tdep.h: Remove files.
2300 2018-04-16 Pedro Alves <palves@redhat.com>
2302 * MAINTAINERS: Remove m88k.
2303 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2304 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2305 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2306 * NEWS: Mention that support for m88k was removed.
2307 * configure.host (m88*-*-*): Remove support.
2308 * configure.nat (m88k-*-*): Remove support.
2309 * configure.tgt (m88*-*-openbsd*): Remove.
2310 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2312 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2314 * configure.tgt (x86_tobjs): New variable.
2315 (amd64_tobjs, i386_tobjs): Use it.
2317 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2319 * symtab.c (print_symbol_info): Precede the symbol definition by
2320 the line number when available.
2321 * NEWS: Advertise this enhancement.
2323 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2325 * NEWS (New options): announce set/show record btrace cpu.
2326 * btrace.c: Include record-btrace.h.
2327 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2328 the vendor is unknown.
2329 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2330 Maybe overwrite the btrace configuration's cpu.
2331 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2332 (btrace_fetch): Add cpu parameter. Update callers.
2333 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2334 Maybe overwrite the btrace configuration's cpu. Skip enabling
2335 errata workarounds if the vendor is unknown.
2336 * python/py-record-btrace.c: Include record-btrace.h.
2337 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2338 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2339 * record-btrace.c (record_btrace_cpu_state_kind): New.
2340 (record_btrace_cpu): New.
2341 (set_record_btrace_cpu_cmdlist): New.
2342 (record_btrace_get_cpu): New.
2343 (require_btrace_thread, record_btrace_info)
2344 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2345 (cmd_set_record_btrace_cpu_none): New.
2346 (cmd_set_record_btrace_cpu_auto): New.
2347 (cmd_set_record_btrace_cpu): New.
2348 (cmd_show_record_btrace_cpu): New.
2349 (_initialize_record_btrace): Initialize set/show record btrace cpu
2351 * record-btrace.h (record_btrace_get_cpu): New.
2353 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2355 * record.c (set_record_command): Fix typo in message.
2357 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2359 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2361 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2363 * infrun.c (process_event_stop_test): Call
2364 gdbarch_in_indirect_branch_thunk.
2365 * gdbarch.sh (in_indirect_branch_thunk): New.
2366 * gdbarch.c: Regenerated.
2367 * gdbarch.h: Regenerated.
2370 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2371 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2372 (ALLDEPFILES): Add x86-tdep.c.
2373 * arch-utils.h (default_in_indirect_branch_thunk): New.
2374 * arch-utils.c (default_in_indirect_branch_thunk): New.
2375 * i386-tdep: Include x86-tdep.h.
2376 (i386_in_indirect_branch_thunk): New.
2377 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2379 * amd64-tdep: Include x86-tdep.h.
2380 (amd64_in_indirect_branch_thunk): New.
2381 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2383 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2386 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2387 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2388 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2391 2018-04-12 Tom Tromey <tom@tromey.com>
2393 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2394 (rust_evaluate_subexp): Likewise.
2396 2018-04-12 Pedro Alves <palves@redhat.com>
2398 * procfs.c (procfs_detach): Make forward declaration's prototype
2399 match definition's protototype.
2400 (proc_get_LDT_entry): Remove stale do_cleanups call.
2402 2018-04-12 Pedro Alves <palves@redhat.com>
2404 * target.h (target_ops::to_has_exited): Delete.
2405 (target_has_exited): Delete.
2406 * target-delegates.c: Regenerate.
2408 2018-04-11 Pedro Alves <palves@redhat.com>
2410 * target.c (fileio_fh_t::t): Add comment.
2411 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2412 (target_fileio_close): Handle a NULL target.
2413 (invalidate_fileio_fh): New.
2414 (target_close): Call it.
2415 * remote.c (remote_hostio_send_command): No longer check whether
2416 remote_desc is open.
2418 2018-04-11 Pedro Alves <palves@redhat.com>
2420 * target.c (fileio_fh_t): Make it a named struct instead of a
2422 (fileio_fh_t::is_closed): New method.
2423 (DEF_VEC_O (fileio_fh_t)): Remove.
2424 (fileio_fhandles): Now a std::vector.
2425 (is_closed_fileio_fh): Delete.
2426 (acquire_fileio_fd): Adjust. Rename parameters.
2427 (release_fileio_fd): Adjust.
2428 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2429 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2430 (target_fileio_close): Adjust.
2432 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2434 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2437 2018-04-10 Pedro Alves <palves@redhat.com>
2439 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2440 (scoped_finish_thread_state): New class.
2441 * infcmd.c (run_command_1): Use it instead of finish_thread_state
2443 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2444 (fetch_inferior_event, normal_stop): Likewise.
2445 * thread.c (finish_thread_state_cleanup): Delete.
2447 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2448 Pedro Alves <palves@redhat.com>
2450 * value.c: Include "selftest.h" and "common/array-view.h".
2451 (struct range) <operator ==>: New.
2452 (test_ranges_contain): New.
2453 (check_ranges_vector): New.
2454 (test_insert_into_bit_range_vector): New.
2455 (_initialize_values): Register selftests.
2456 * common/array-view.h (operator==, operator!=): New.
2458 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2460 * common/gdb_vecs.h (unordered_remove): Add overload that takes
2462 * inline-frame.c: Include <algorithm>.
2463 (struct inline_state): Add constructor.
2464 (inline_state_s): Remove.
2465 (DEF_VEC_O(inline_state_s)): Remove.
2466 (inline_states): Change type to std::vector.
2467 (find_inline_frame_state): Adjust to std::vector.
2468 (allocate_inline_frame_state): Remove.
2469 (clear_inline_frame_state): Adjust to std::vector.
2470 (skip_inline_frames): Adjust to std::vector.
2472 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2474 * tracepoint.h (struct trace_state_variable): Add constructor.
2475 <name>: Change type to std::string.
2476 * tracepoint.c (tsv_s): Remove.
2477 (DEF_VEC_O(tsv_s)): Remove.
2478 (tvariables): Change to std::vector.
2479 (create_trace_state_variable): Adjust to std::vector.
2480 (find_trace_state_variable): Likewise.
2481 (find_trace_state_variable_by_number): Likewise.
2482 (delete_trace_state_variable): Likewise.
2483 (trace_variable_command): Adjust to std::string.
2484 (delete_trace_variable_command): Likewise.
2485 (tvariables_info_1): Adjust to std::vector.
2486 (save_trace_state_variables): Likewise.
2487 (start_tracing): Likewise.
2488 (merge_uploaded_trace_state_variables): Adjust to std::vector
2490 * target.h (struct target_ops)
2491 <to_download_trace_state_variable>: Pass reference to
2492 trace_state_variable.
2493 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2494 * target-delegates.c: Re-generate.
2495 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2496 (mi_tsv_deleted): Likewise.
2497 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2498 * remote.c (remote_download_trace_state_variable): Change
2499 pointer to reference and adjust.
2500 * make-target-delegates (parse_argtypes): Handle references.
2501 (write_function_header): Likewise.
2502 (munge_type): Likewise.
2504 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2506 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2507 string_view-selftests.c.
2508 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2510 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2511 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2512 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2513 * unittests/basic_string_view/element_access/char/1.cc:
2515 * unittests/basic_string_view/element_access/char/empty.cc:
2517 * unittests/basic_string_view/element_access/char/front_back.cc:
2519 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2520 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2522 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2524 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2526 * unittests/basic_string_view/operations/compare/char/1.cc:
2528 * unittests/basic_string_view/operations/compare/char/13650.cc:
2530 * unittests/basic_string_view/operations/copy/char/1.cc:
2532 * unittests/basic_string_view/operations/data/char/1.cc:
2534 * unittests/basic_string_view/operations/find/char/1.cc:
2536 * unittests/basic_string_view/operations/find/char/2.cc:
2538 * unittests/basic_string_view/operations/find/char/3.cc:
2540 * unittests/basic_string_view/operations/find/char/4.cc:
2542 * unittests/basic_string_view/operations/rfind/char/1.cc:
2544 * unittests/basic_string_view/operations/rfind/char/2.cc:
2546 * unittests/basic_string_view/operations/rfind/char/3.cc:
2548 * unittests/basic_string_view/operations/substr/char/1.cc:
2550 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2551 * unittests/string_view-selftests.c: New file.
2553 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2555 * unittests/basic_string_view/capacity/1.cc: New file.
2556 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2557 * unittests/basic_string_view/cons/char/1.cc: New file.
2558 * unittests/basic_string_view/cons/char/2.cc: New file.
2559 * unittests/basic_string_view/cons/char/3.cc: New file.
2560 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2561 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2562 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2563 * unittests/basic_string_view/element_access/char/1.cc: New file.
2564 * unittests/basic_string_view/element_access/char/2.cc: New file.
2565 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2566 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2567 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2568 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2569 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2570 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2571 * unittests/basic_string_view/include.cc: New file.
2572 * unittests/basic_string_view/inserters/char/1.cc: New file.
2573 * unittests/basic_string_view/inserters/char/2.cc: New file.
2574 * unittests/basic_string_view/inserters/char/3.cc: New file.
2575 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2576 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2577 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2578 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2579 * unittests/basic_string_view/literals/types.cc: New file.
2580 * unittests/basic_string_view/literals/values.cc: New file.
2581 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2582 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2583 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2584 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2585 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2586 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2587 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2588 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2589 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2590 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2591 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2592 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2593 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2594 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2595 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2596 * unittests/basic_string_view/operations/data/char/1.cc: New file.
2597 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2598 * unittests/basic_string_view/operations/find/char/1.cc: New file.
2599 * unittests/basic_string_view/operations/find/char/2.cc: New file.
2600 * unittests/basic_string_view/operations/find/char/3.cc: New file.
2601 * unittests/basic_string_view/operations/find/char/4.cc: New file.
2602 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2603 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2604 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2605 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2606 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2607 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2608 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2609 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2610 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2611 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2612 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2613 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2614 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2615 * unittests/basic_string_view/operators/char/2.cc: New file.
2616 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2617 * unittests/basic_string_view/range_access/char/1.cc: New file.
2618 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2619 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2620 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2621 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2622 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2623 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2624 * unittests/basic_string_view/requirements/typedefs.cc: New file.
2625 * unittests/basic_string_view/typedefs.cc: New file.
2626 * unittests/basic_string_view/types/1.cc: New file.
2628 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2630 * common/gdb_string_view.h: Remove libstdc++ implementation
2631 details, adjust to gdb reality.
2632 * common/gdb_string_view.tcc: Likewise.
2633 * cli/cli-script.c (struct string_view): Remove.
2634 (user_args) <m_args>: Change element type to gdb::string_view.
2635 (user_args::insert_args): Adjust.
2637 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2639 * common/gdb_string_view.h: New file.
2640 * common/gdb_string_view.tcc: New file.
2642 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2644 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2645 * configure: Re-generate.
2647 2018-04-09 Pedro Alves <palves@redhat.com>
2649 * gdbarch.sh: Include "observable.h" instead of "observer.h".
2650 (set_target_gdbarch): Call
2651 gdb::observers::architecture_changed.notify instead of
2652 observer_notify_architecture_changed.
2654 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2656 * tracepoint.c (struct current_traceframe_cleanup): Remove.
2657 (do_restore_current_traceframe_cleanup): Remove.
2658 (restore_current_traceframe_cleanup_dtor): Remove.
2659 (make_cleanup_restore_current_traceframe): Remove.
2660 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2662 * tracepoint.h (struct scoped_restore_current_traceframe): New.
2663 * infrun.c (fetch_inferior_event): Use
2664 scoped_restore_current_traceframe.
2666 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2668 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2670 <n_allocated_type_units>: Remove.
2671 <all_type_units>: Change to std::vector.
2672 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2673 to std::vector change.
2674 (dwarf2_per_objfile::get_cutu): Likewise.
2675 (dwarf2_per_objfile::get_tu): Likewise.
2676 (create_signatured_type_table_from_index): Likewise.
2677 (create_signatured_type_table_from_debug_names): Likewise.
2678 (dw2_symtab_iter_next): Likewise.
2679 (dw2_print_stats): Likewise.
2680 (dw2_expand_all_symtabs): Likewise.
2681 (dw2_expand_marked_cus): Likewise.
2682 (dw2_debug_names_iterator::next): Likewise.
2683 (dwarf2_initialize_objfile): Likewise.
2684 (add_signatured_type_cu_to_table): Likewise.
2685 (create_all_type_units): Likewise.
2686 (add_type_unit): Likewise.
2687 (struct tu_abbrev_offset): Add constructor.
2688 (build_type_psymtabs_1): Adjust to std::vector change.
2689 (print_tu_stats): Likewise.
2690 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2691 (write_debug_names): Likewise.
2693 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2695 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2696 Make an std::vector.
2697 <n_comp_units>: Remove.
2698 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2699 to std::vector change.
2700 (dwarf2_per_objfile::get_cutu): Likewise.
2701 (dwarf2_per_objfile::get_cu): Likewise.
2702 (create_cus_from_index): Likewise.
2703 (create_addrmap_from_index): Likewise.
2704 (create_addrmap_from_aranges): Likewise.
2705 (dwarf2_read_index): Likewise.
2706 (dw2_find_last_source_symtab): Likewise.
2707 (dw2_map_symtabs_matching_filename): Likewise.
2708 (dw2_symtab_iter_next): Likewise.
2709 (dw2_print_stats): Likewise.
2710 (dw2_expand_all_symtabs): Likewise.
2711 (dw2_expand_symtabs_with_fullname): Likewise.
2712 (dw2_expand_marked_cus): Likewise.
2713 (dw2_map_symbol_filenames): Likewise.
2714 (create_cus_from_debug_names): Likewise.
2715 (dwarf2_read_debug_names): Likewise.
2716 (dw2_debug_names_iterator::next): Likewise.
2717 (dwarf2_initialize_objfile): Likewise.
2718 (set_partial_user): Likewise.
2719 (dwarf2_build_psymtabs_hard): Likewise.
2720 (read_comp_units_from_section): Remove arguments, adjust to
2722 (create_all_comp_units): Adjust to std::vector and
2723 read_comp_units_from_section changes.
2724 (dwarf2_find_containing_comp_unit): Adjust to std::vector
2726 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2727 (psyms_seen_size): Likewise.
2728 (write_gdbindex): Likewise.
2729 (write_debug_names): Likewise.
2731 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2733 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2734 with dwarf2_per_objfile.
2735 (create_cus_from_index): Likewise.
2736 (create_signatured_type_table_from_index): Likewise.
2737 (dwarf2_read_index): Likewise.
2738 (dwarf2_initialize_objfile): Likewise.
2739 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
2740 per_cu rather than get_dwarf2_per_objfile.
2742 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2744 * dwarf2read.h (struct signatured_type): Forward declare.
2745 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2747 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2748 (dw2_get_cutu): ...this.
2749 (dwarf2_per_objfile::get_cu): Rename from...
2750 (dw2_get_cu): ...this.
2751 (dwarf2_per_objfile::get_tu): New.
2752 (create_addrmap_from_index): Adjust.
2753 (create_addrmap_from_aranges): Adjust.
2754 (dw2_find_last_source_symtab): Adjust.
2755 (dw2_map_symtabs_matching_filename): Adjust.
2756 (dw2_symtab_iter_next): Adjust.
2757 (dw2_print_stats): Adjust.
2758 (dw2_expand_all_symtabs): Adjust.
2759 (dw2_expand_symtabs_with_fullname): Adjust.
2760 (dw2_expand_marked_cus): Adjust.
2761 (dw_expand_symtabs_matching_file_matcher): Adjust.
2762 (dw2_map_symbol_filenames): Adjust.
2763 (dw2_debug_names_iterator::next): Adjust.
2764 (dwarf2_initialize_objfile): Adjust.
2765 (set_partial_user): Adjust.
2766 (dwarf2_build_psymtabs_hard): Adjust.
2768 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2770 * dwarf2read.c (create_signatured_type_table_from_debug_names):
2771 Remove unused variables.
2772 (dw2_map_symtabs_matching_filename): Likewise.
2773 (dwarf2_record_block_ranges): Likewise.
2774 (dwarf2_read_addr_index): Likewise.
2775 (follow_die_offset): Likewise.
2777 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2779 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2780 to symbol_file_add_main.
2782 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2785 * mi/mi-console.c (do_fputc_async_safe): New.
2786 (mi_console_file::write_async_safe): New.
2787 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2788 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2790 * ui-file.c (ui_file::putstrn): Adjust call to
2791 fputstrn_unfiltered.
2792 * utils.c (printchar): Replace do_fputs and do_fprintf
2793 parameters by do_fputc.
2794 (fputstr_filtered): Adjust call to printchar.
2795 (fputstr_unfiltered): Likewise.
2796 (fputstrn_filtered): Likewise.
2797 (fputstrn_unfiltered): Add do_fputc parameter, pass to
2799 * utils.h (do_fputc_ftype): New typedef.
2800 (fputstrn_unfiltered): Add do_fputc parameter.
2802 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2804 * regformats/i386/i386-avx.dat: Remove.
2806 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2809 * amd64-tdep.c (amd64_none_init_abi): New function.
2810 (amd64_x32_none_init_abi): New function.
2811 (_initialize_amd64_tdep): Register handlers for x86-64 and
2812 x64_32 with GDB_OSABI_NONE.
2813 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2814 GDB_OSABI_NONE osabi.
2816 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2819 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2821 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2822 * osabi.c (gdb_osabi_names): Add "unknown" entry.
2824 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2826 * common/byte-vector.h (char_vector): New type.
2827 * target.h (target_read_alloc): Return
2828 gdb::optional<byte_vector>.
2829 (target_read_stralloc): Return gdb::optional<char_vector>.
2830 (target_get_osdata): Return gdb::optional<char_vector>.
2831 * target.c (target_read_alloc_1): Templatize. Replacement
2832 manual memory management with vector.
2833 (target_read_alloc): Change return type, adjust.
2834 (target_read_stralloc): Change return type, adjust.
2835 (target_get_osdata): Change return type, adjust.
2836 * auxv.c (struct auxv_info) <length>: Remove.
2837 <data>: Change type to gdb::optional<byte_vector>.
2838 (auxv_inferior_data_cleanup): Free auxv_info with delete.
2839 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2840 (target_auxv_search): Adjust.
2841 (fprint_target_auxv): Adjust.
2842 * avr-tdep.c (avr_io_reg_read_command): Adjust.
2843 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2844 (linux_make_corefile_notes): Adjust.
2845 * osdata.c (get_osdata): Adjust.
2846 * remote.c (remote_get_threads_with_qxfer): Adjust.
2847 (remote_memory_map): Adjust.
2848 (remote_traceframe_info): Adjust.
2849 (btrace_read_config): Adjust.
2850 (remote_read_btrace): Adjust.
2851 (remote_pid_to_exec_file): Adjust.
2852 * solib-aix.c (solib_aix_get_library_list): Adjust.
2853 * solib-dsbt.c (decode_loadmap): Don't free buf.
2854 (dsbt_get_initial_loadmaps): Adjust.
2855 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2856 * solib-target.c (solib_target_current_sos): Adjust.
2857 * tracepoint.c (sdata_make_value): Adjust.
2858 * xml-support.c (xinclude_start_include): Adjust.
2859 (xml_fetch_content_from_file): Adjust.
2860 * xml-support.h (xml_fetch_another): Change return type.
2861 (xml_fetch_content_from_file): Change return type.
2862 * xml-syscall.c (xml_init_syscalls_info): Adjust.
2863 * xml-tdesc.c (file_read_description_xml): Adjust.
2864 (fetch_available_features_from_target): Change return type.
2865 (target_fetch_description_xml): Adjust.
2866 (target_read_description_xml): Adjust.
2868 2018-04-06 Tom Tromey <tom@tromey.com>
2870 * value.c (~value): Update.
2871 (struct value) <contents>: Now unique_xmalloc_ptr.
2872 (value_contents_bits_eq, allocate_value_contents)
2873 (value_contents_raw, value_contents_all_raw)
2874 (value_contents_for_printing, value_contents_for_printing_const)
2875 (set_value_enclosing_type): Update.
2877 2018-04-06 Tom Tromey <tom@tromey.com>
2879 * value.c (range_s): Remove typedef, VEC.
2880 (struct range): Add operator<.
2881 (range_lessthan): Remove.
2882 (ranges_contain): Change type.
2884 (struct value) <unavailable, optimized_out>: Now std::vector.
2885 (value_entirely_available)
2886 (value_entirely_covered_by_range_vector)
2887 (value_entirely_unavailable, value_entirely_optimized_out):
2889 (insert_into_bit_range_vector): Change argument type.
2890 (find_first_range_overlap): Likewise.
2891 (struct ranges_and_idx, value_contents_bits_eq)
2892 (require_not_optimized_out, require_available): Update.
2893 (ranges_copy_adjusted): Change argument types.
2894 (value_optimized_out, value_copy, value_fetch_lazy): Update.
2896 2018-04-06 Tom Tromey <tom@tromey.com>
2898 * value.c (~value): Update.
2899 (struct value) <parent>: Now a value_ref_ptr.
2900 (value_parent, set_value_parent, value_address, value_copy):
2903 2018-04-06 Tom Tromey <tom@tromey.com>
2905 * value.c (struct value): Add constructor, destructor, and member
2907 (allocate_value_lazy, value_decref): Update.
2909 2018-04-06 Tom Tromey <tom@tromey.com>
2911 * value.c (struct value) <released, next>: Remove.
2912 (all_values): Now a std::vector.
2913 (allocate_value_lazy): Update.
2914 (value_next): Remove.
2915 (value_mark, value_free_to_mark, release_value)
2916 (value_release_to_mark): Update.
2918 2018-04-06 Tom Tromey <tom@tromey.com>
2920 * value.h (fetch_subexp_value, value_release_to_mark): Update.
2921 (free_value_chain): Remove.
2922 * value.c (free_value_chain): Remove.
2923 (value_release_to_mark): Return a std::vector.
2924 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2926 (check_condition): Update.
2927 * eval.c (fetch_subexp_value): Change "val_chain" to a
2929 * breakpoint.c (update_watchpoint): Update.
2930 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2932 2018-04-06 Tom Tromey <tom@tromey.com>
2934 * value.h (free_all_values): Remove.
2935 * value.c (free_all_values): Remove.
2937 2018-04-06 Tom Tromey <tom@tromey.com>
2939 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2940 (value_history_chain, value_history_count): Remove.
2941 (value_history): New global.
2942 (record_latest_value, access_value_history, show_values)
2943 (preserve_values): Update.
2945 2018-04-06 Tom Tromey <tom@tromey.com>
2947 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2948 * varobj.c (varobj_set_display_format, varobj_set_value)
2949 (install_default_visualizer, construct_visualizer)
2950 (install_new_value, ~varobj, varobj_get_value_type)
2951 (my_value_of_variable, varobj_editable_p): Update.
2952 * c-varobj.c (c_describe_child, c_value_of_variable)
2953 (cplus_number_of_children, cplus_describe_child): Update.
2954 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2955 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2956 (ada_value_of_variable, ada_value_is_changeable_p): Update.
2958 2018-04-06 Tom Tromey <tom@tromey.com>
2960 * printcmd.c (last_examine_address): Change type to
2962 (do_examine, x_command): Update.
2964 2018-04-06 Tom Tromey <tom@tromey.com>
2966 * value.c (release_value): Update.
2967 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2968 (struct bpstats) <val>: Now a value_ref_ptr.
2969 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2970 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2971 (~watchpoint, print_it_watchpoint, watch_command_1)
2972 (invalidate_bp_value_on_memory_change): Update.
2974 2018-04-06 Tom Tromey <tom@tromey.com>
2976 * varobj.c (varobj_clear_saved_item)
2977 (update_dynamic_varobj_children, install_new_value, ~varobj):
2979 * value.h (value_incref): Move declaration earlier.
2980 (value_decref): Rename from value_free.
2981 (struct value_ref_policy): New.
2982 (value_ref_ptr): New typedef.
2983 (struct value_deleter): Remove.
2984 (gdb_value_up): Remove typedef.
2985 (release_value): Change return type.
2986 (release_value_or_incref): Remove.
2987 * value.c (set_value_parent): Update.
2988 (value_incref): Change return type.
2989 (value_decref): Rename from value_free.
2990 (value_free_to_mark, free_all_values, free_value_chain): Update.
2991 (release_value): Return value_ref_ptr.
2992 (release_value_or_incref): Remove.
2993 (record_latest_value, set_internalvar, clear_internalvar):
2995 * stack.c (info_frame_command): Don't call value_free.
2996 * python/py-value.c (valpy_dealloc, valpy_new)
2997 (value_to_value_object): Update.
2998 * printcmd.c (do_examine): Update.
2999 * opencl-lang.c (lval_func_free_closure): Update.
3000 * mi/mi-main.c (register_changed_p): Don't call value_free.
3001 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3002 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3003 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3005 * guile/scm-value.c (vlscm_free_value_smob)
3006 (vlscm_scm_from_value): Update.
3007 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3008 (frame_unwind_register_unsigned, get_frame_register_bytes)
3009 (put_frame_register_bytes): Don't call value_free.
3010 * findvar.c (address_from_register): Don't call value_free.
3011 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3012 * dwarf2loc.c (entry_data_value_free_closure)
3013 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3014 (dwarf2_evaluate_loc_desc_full): Update.
3015 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3016 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3017 (~watchpoint, watch_command_1)
3018 (invalidate_bp_value_on_memory_change): Update.
3019 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3021 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3024 * warning.m4: Add -Wno-error=deprecated-register.
3025 * configure: Re-generate.
3027 2018-04-05 Tom Tromey <tom@tromey.com>
3029 * linespec.h: Remove include of "vec.h".
3031 2018-04-05 Tom Tromey <tom@tromey.com>
3033 * linespec.c (typep): Remove typedef.
3034 (find_methods, find_superclass_methods): Take a std::vector.
3035 (find_method): Use std::vector.
3037 2018-04-05 Tom Tromey <tom@tromey.com>
3039 * utils.c (compare_strings): Remove.
3040 * utils.h (compare_strings): Remove.
3041 * objc-lang.h (find_imps): Update.
3042 * objc-lang.c (find_methods): Take a std::vector.
3043 (uniquify_strings, find_imps): Likewise.
3044 * linespec.c (find_methods): Take a std::vector.
3045 (decode_objc): Use std::vector.
3046 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3048 (find_method, find_function_symbols): Use std::vector.
3050 2018-04-05 Tom Tromey <tom@tromey.com>
3052 * completer.c (completion_tracker::completion_tracker): Remove
3054 (completion_tracker::discard_completions): Likewise.
3055 * breakpoint.c (ambiguous_names_p): Remove cast.
3056 * ada-lang.c (_initialize_ada_language): Remove cast.
3057 * utils.h (streq): Update.
3058 (streq_hash): Add new declaration.
3059 * utils.c (streq): Return bool.
3060 (streq_hash): New function.
3062 2018-04-05 Tom Tromey <tom@tromey.com>
3064 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3065 Remove a string copy.
3067 2018-04-05 Tom Tromey <tom@tromey.com>
3069 * linespec.c (filter_results): Use std::vector.
3070 (decode_line_2, decode_line_full): Update.
3072 2018-04-05 Tom Tromey <tom@tromey.com>
3074 * linespec.c (canonical_to_fullform): Return std::string.
3075 (filter_results): Update.
3076 (struct decode_line_2_item): Add constructor.
3077 <fullform, displayform>: Now std::string.
3078 (decode_line_2_compare_items): Now a std::sort comparator.
3079 (decode_line_2): Update.
3081 2018-04-05 Tom Tromey <tom@tromey.com>
3083 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3084 (unexpected_linespec_error): Update.
3085 (linespec_parse_basic, parse_linespec): Update.
3087 2018-04-05 Tom Tromey <tom@tromey.com>
3089 * linespec.c (linespec_parse_basic): Reindent.
3091 2018-04-05 Tom Tromey <tom@tromey.com>
3093 * minsyms.h (iterate_over_minimal_symbols): Update.
3094 * minsyms.c (iterate_over_minimal_symbols): Take a
3096 * linespec.c (struct collect_minsyms): Remove.
3097 (compare_msyms): Now a std::sort comparator.
3098 (add_minsym): Add parameters.
3099 (search_minsyms_for_name): Update. Use std::vector.
3101 2018-04-03 Tom Tromey <tom@tromey.com>
3103 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3106 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3108 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3110 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3113 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3114 printing static type.
3116 2018-04-01 Tom Tromey <tom@tromey.com>
3118 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3119 (rs6000_xfer_shared_libraries): Update.
3121 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3123 * common/gdb_vecs.h (char_ptr): Remove.
3124 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3126 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3128 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3130 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3132 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3134 * tracepoint.h (struct uploaded_tp): Initialize fields.
3135 <actions, step_actions, cmd_strings>: Change type to
3136 std::vector<char *>.
3137 * tracepoint.c (get_uploaded_tp): Allocate with new.
3138 (free_uploaded_tps): Free with delete.
3139 (parse_tracepoint_definition): Adjust to std::vector change.
3140 * breakpoint.c (read_uploaded_action): Likewise.
3141 (create_tracepoint_from_upload): Likewise.
3142 * ctf.c (ctf_write_uploaded_tp): Likewise.
3143 (SET_ARRAY_FIELD): Likewise.
3144 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3146 2018-03-30 Tom Tromey <tom@tromey.com>
3148 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3150 (svr4_keep_data_in_core): Update.
3151 (svr4_read_so_list): Update.
3153 2018-03-30 Tom Tromey <tom@tromey.com>
3155 * windows-nat.c (handle_output_debug_string, handle_exception):
3157 * target.h (target_read_string): Update.
3158 * target.c (target_read_string): Change "string" to
3160 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3162 * solib-frv.c (frv_current_sos): Update.
3163 * solib-dsbt.c (dsbt_current_sos): Update.
3164 * solib-darwin.c (darwin_current_sos): Update.
3165 * linux-thread-db.c (inferior_has_bug): Update.
3166 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3167 Update. Remove alloca.
3168 * ada-lang.c (ada_main_name): Update.
3170 2018-03-30 Tom Tromey <tom@tromey.com>
3172 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3173 (struct dwo_file_deleter): New.
3174 (dwo_file_up): New typedef.
3175 (open_and_init_dwo_file): Use dwo_file_up.
3176 (free_dwo_file_cleanup): Remove.
3178 2018-03-30 Tom Tromey <tom@tromey.com>
3180 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3181 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3183 2018-03-30 Tom Tromey <tom@tromey.com>
3185 * dwarf2read.c (class free_cached_comp_units): New class.
3186 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3187 (free_cached_comp_units): Remove function.
3189 2018-03-30 Tom Tromey <tom@tromey.com>
3191 * utils.h (make_cleanup_unpush_target): Remove.
3192 * inf-ptrace.c (struct target_unpusher): New.
3193 (target_unpush_up) New typedef.
3194 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3196 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3198 2018-03-27 Tom Tromey <tom@tromey.com>
3200 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3202 2018-03-27 Pedro Alves <palves@redhat.com>
3203 Tom Tromey <tom@tromey.com>
3205 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3206 destructor. Now a class.
3207 (gdb_readline_wrapper_cleanup): Remove function.
3208 (gdb_readline_wrapper): Remove cleanups.
3210 2018-03-27 Tom Tromey <tom@tromey.com>
3212 * typeprint.h (struct type_print_options) <local_typedefs,
3213 global_typedefs>: Remove "struct" keyword.
3214 (class typedef_hash_table): New class.
3215 (recursively_update_typedef_hash, add_template_parameters)
3216 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3217 (find_typedef_in_hash): Don't declare.
3218 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3219 (typedef_hash_table::recursively_update): Rename from
3220 recursively_update_typedef_hash. Now a member.
3221 (typedef_hash_table::add_template_parameters): Rename from
3222 add_template_parameters. Now a member.
3223 (typedef_hash_table::typedef_hash_table): Now a constructor;
3224 rename from create_typedef_hash.
3225 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3226 rename from free_typedef_hash.
3227 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3228 (do_free_global_table): Remove.
3229 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3230 from copy_type_recursive.
3231 (create_global_typedef_table): Remove.
3232 (typedef_hash_table::find_global_typedef): Now a member of
3234 (typedef_hash_table::find_typedef): Rename from
3235 find_typedef_in_hash; now a member.
3236 (whatis_exp): Update.
3237 * extension.h (struct ext_lang_type_printers): Add constructor and
3239 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3241 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3242 Now a constructor; rename from start_ext_lang_type_printers.
3243 (ext_lang_type_printers): Now a destructor; rename from
3244 free_ext_lang_type_printers.
3245 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3247 (c_type_print_base_struct_union): Update. Remove cleanups.
3249 2018-03-27 Tom Tromey <tom@tromey.com>
3251 * dwarf-index-write.c: Include <cmath>.
3253 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3255 * NEWS: Add entry describing new "set|show varsize-limit" command.
3256 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3258 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3261 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3263 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3265 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3266 * dwarf-index-common.c: New file.
3267 * dwarf-index-common.h: New file.
3268 * dwarf-index-write.c: New file.
3269 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3270 (struct dwarf2_section_info): Move from here.
3271 (dwarf2_section_info_def): Likewise.
3272 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3273 (offset_type): Likewise.
3274 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3275 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3276 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3277 (byte_swap): Likewise.
3278 (MAYBE_SWAP): Likewise.
3279 (dwarf2_per_cu_ptr): Likewise.
3280 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3281 (struct tu_stats): Likewise.
3282 (struct dwarf2_per_objfile): Likewise.
3283 (struct dwarf2_per_cu_data): Likewise.
3284 (struct signatured_type): Likewise.
3285 (sig_type_ptr): Likewise.
3286 (DEF_VEC_P (sig_type_ptr)): Likewise.
3287 (INDEX4_SUFFIX): Likewise.
3288 (INDEX5_SUFFIX): Likewise.
3289 (DEBUG_STR_SUFFIX): Likewise.
3290 (dwarf2_read_section): Make non-static.
3291 (mapped_index_string_hash): Move from here.
3292 (dwarf5_djb_hash): Likewise.
3293 (file_write): Likewise.
3294 (class data_buf): Likewise.
3295 (struct symtab_index_entry): Likewise.
3296 (struct mapped_symtab): Likewise.
3297 (find_slot): Likewise.
3298 (hash_expand): Likewise.
3299 (add_index_entry): Likewise.
3300 (uniquify_cu_indices): Likewise.
3301 (class c_str_view): Likewise.
3302 (class c_str_view_hasher): Likewise.
3303 (class vector_hasher): Likewise.
3304 (write_hash_table): Likewise.
3305 (psym_index_map): Likewise.
3306 (struct addrmap_index_data): Likewise.
3307 (add_address_entry): Likewise.
3308 (add_address_entry_worker): Likewise.
3309 (write_address_map): Likewise.
3310 (symbol_kind): Likewise.
3311 (write_psymbols): Likewise.
3312 (struct signatured_type_index_data): Likewise.
3313 (write_one_signatured_type): Likewise.
3314 (recursively_count_psymbols): Likewise.
3315 (recursively_write_psymbols): Likewise.
3316 (class debug_names): Likewise.
3317 (check_dwarf64_offsets): Likewise.
3318 (psyms_seen_size): Likewise.
3319 (write_gdbindex): Likewise.
3320 (write_debug_names): Likewise.
3321 (assert_file_size): Likewise.
3322 (write_psymtabs_to_index): Likewise.
3323 (save_gdb_index_command): Likewise.
3324 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3326 * dwarf2read.h: New file.
3328 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3331 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3332 symbol name if the CU's language stores symbol names in linkage
3334 * language.h (struct language_defn)
3335 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3336 all instances of this struct.
3338 2018-03-26 Tom Tromey <tom@tromey.com>
3340 * stack.c (backtrace_command_1): Remove verbose code.
3342 2018-03-26 Tom Tromey <tom@tromey.com>
3344 * python/py-framefilter.c (py_print_type): Don't catch
3345 exceptions. Return void.
3346 (py_print_value): Likewise.
3347 (py_print_single_arg): Likewise.
3348 (enumerate_args): Don't catch exceptions.
3349 (py_print_args): Likewise.
3350 (py_print_frame): Likewise.
3351 (gdbpy_apply_frame_filter): Catch exceptions here.
3353 2018-03-26 Tom Tromey <tom@tromey.com>
3355 * stack.c (_initialize_stack): Remove trailing newlines from help
3356 text. Add "Usage" line to "backtrace" help.
3358 2018-03-26 Tom Tromey <tom@tromey.com>
3361 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3363 2018-03-26 Tom Tromey <tom@tromey.com>
3365 * python/py-framefilter.c (py_print_single_arg): Return
3366 EXT_LANG_BT_ERROR from catch.
3368 2018-03-26 Tom Tromey <tom@tromey.com>
3371 * stack.c (backtrace_command_1): Move some code into no-filters
3374 2018-03-26 Tom Tromey <tom@tromey.com>
3376 * python/py-framefilter.c (throw_quit_or_print_exception): New
3378 (gdbpy_apply_frame_filter): Use it.
3380 2018-03-26 Tom Tromey <tom@tromey.com>
3383 * python/py-framefilter.c (py_print_type, py_print_value)
3384 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3387 2018-03-26 Tom Tromey <tom@tromey.com>
3389 * python/py-framefilter.c (enumerate_args): Use
3390 gdb::unique_xmalloc_ptr.
3392 2018-03-26 Tom Tromey <tom@tromey.com>
3394 * python/py-framefilter.c (py_print_frame): Return
3396 (gdbpy_apply_frame_filter): Update comment.
3397 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3399 <EXT_LANG_BT_NO_FILTERS>: Change value.
3401 2018-03-26 Tom Tromey <tom@tromey.com>
3404 * stack.c (backtrace_command): Parse "hide" argument.
3405 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3406 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3409 2018-03-26 Tom Tromey <tom@tromey.com>
3411 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3413 (backtrace_command): Remove "fulltrace", add "flags".
3415 2018-03-26 Tom Tromey <tom@tromey.com>
3417 * stack.c (backtrace_command): Rewrite command line parsing.
3419 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3421 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3423 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3425 * filename-seen-cache.h: Add include guard.
3427 2018-03-26 Keith Seitz <keiths@redhat.com>
3429 * symfile.c (place_section): Remove "struct" from section_addr_info
3431 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3432 "struct" keyword from section_addr_info.
3434 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3436 * regformats/regdef.h (reg): Add constructors.
3438 2018-03-25 Pedro Alves <palves@redhat.com>
3440 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3441 if then/else bodies in var_func_name extraction.
3443 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
3445 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3446 lookup_minimal_symbol() to find symbol entry.
3447 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3449 2018-03-23 Keith Seitz <keiths@redhat.com>
3452 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3453 nested type definitions for C++, too.
3455 2018-03-23 Tom Tromey <tom@tromey.com>
3457 * machoread.c (struct oso_el): Add a constructor. Don't define as
3459 (macho_register_oso): Remove.
3460 (macho_symtab_read): Take a std::vector.
3461 (oso_el_compare_name): Now a std::sort comparator.
3462 (macho_symfile_read_all_oso): Take a std::vector.
3463 (macho_symfile_read): Use std::vector. Remove cleanups.
3465 2018-03-22 Tom Tromey <tom@tromey.com>
3467 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3468 (record_full_goto_bookmark): Use std::string.
3470 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3473 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3476 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3478 * rs6000-tdep.c (store_insn_p): New function.
3479 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3480 and cr_reg to their unshifted values. Use store_insn_p to
3481 match LR saves using either R1 or fdata->alloca_reg. Use
3482 store_insn_p to match CR saves. Set alloca_reg_offset
3483 when alloca_reg and framep are set. Remove lr_reg shift
3484 when assigning to fdata->lr_register.
3486 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3488 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3489 command line args instead of emitting a warning.
3491 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3493 * tracepoint.h (struct static_tracepoint_marker): Initialize
3494 fields, define default constructor, move constructor and move
3495 assignment, disable the rest.
3496 <str_id, extra>: Make std::string.
3497 (release_static_tracepoint_marker): Remove.
3498 (free_current_marker): Remove.
3499 * tracepoint.c (free_current_marker): Remove.
3500 (parse_static_tracepoint_marker_definition): Adjust to
3501 std::string, use new hex2str overload.
3502 (release_static_tracepoint_marker): Remove.
3503 (print_one_static_tracepoint_marker): Get marker by reference
3504 and adjust to std::string.
3505 (info_static_tracepoint_markers_command): Adjust to std::vector
3507 * target.h (static_tracepoint_marker_p): Remove typedef.
3508 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3509 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3511 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3513 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3514 (target_debug_print_std_vector_static_tracepoint_marker): New.
3515 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3517 (target_debug_print_static_tracepoint_marker_p): ... this.
3518 * target-delegates.c: Re-generate.
3519 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3521 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3522 (decode_static_tracepoint_spec): Adjust to std::vector.
3523 (tracepoint_print_one_detail): Adjust to std::string.
3524 (strace_marker_decode_location): Adjust to std::string.
3525 (update_static_tracepoint): Adjust to std::string, remove call
3526 to release_static_tracepoint_marker.
3527 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3528 Adjust to std::vector.
3529 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3530 (remote_static_tracepoint_markers_by_strid): Adjust to
3532 * common/rsp-low.h (hex2str): New overload with explicit count
3534 * common/rsp-low.c (hex2str): New overload with explicit count
3536 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3537 (_initialize_rsp_low_selftests): Add test_hex2str test.
3538 * unittests/tracepoint-selftests.c
3539 (test_parse_static_tracepoint_marker_definition): Adjust to
3542 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3544 * tracepoint.c (parse_static_tracepoint_marker_definition):
3545 Consider case where the definition is followed by more
3547 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3548 tracepoint-selftests.c.
3549 * unittests/tracepoint-selftests.c: New.
3551 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3553 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3556 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3558 * symtab.c (find_pc_sect_line): fixed indentation.
3560 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3562 * symtab.c (find_pc_sect_line): now uses binary search.
3564 2018-03-19 Tom Tromey <tom@tromey.com>
3566 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3569 2018-03-19 Pedro Alves <palves@redhat.com>
3570 Tom Tromey <tom@tromey.com>
3572 * unittests/observable-selftests.c: New file.
3573 * common/observable.h: New file.
3574 * observable.h: New file.
3575 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3576 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3577 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3578 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3579 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3580 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3581 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3582 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3583 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3584 python/py-breakpoint.c, python/py-finishbreakpoint.c,
3585 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3586 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3587 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3588 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3589 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3590 tui/tui-interp.c, valops.c: Update all users.
3591 * tui/tui-hooks.c (tui_bp_created_observer)
3592 (tui_bp_deleted_observer, tui_bp_modified_observer)
3593 (tui_inferior_exit_observer, tui_before_prompt_observer)
3594 (tui_normal_stop_observer, tui_register_changed_observer):
3596 (tui_observers_token): New global.
3597 (attach_or_detach, tui_attach_detach_observers): New functions.
3598 (tui_install_hooks, tui_remove_hooks): Use
3599 tui_attach_detach_observers.
3600 * record-btrace.c (record_btrace_thread_observer): Remove.
3601 (record_btrace_thread_observer_token): New global.
3602 * observer.sh: Remove.
3603 * observer.c: Rename to observable.c.
3604 * observable.c (namespace gdb_observers): Define new objects.
3605 (observer_debug): Move into gdb_observers namespace.
3606 (struct observer, struct observer_list, xalloc_observer_list_node)
3607 (xfree_observer_list_node, generic_observer_attach)
3608 (generic_observer_detach, generic_observer_notify): Remove.
3609 (_initialize_observer): Update.
3610 Don't include observer.inc.
3611 * Makefile.in (generated_files): Remove observer.h, observer.inc.
3612 (clean mostlyclean): Likewise.
3613 (observer.h, observer.inc): Remove targets.
3614 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3615 (COMMON_SFILES): Use observable.c, not observer.c.
3616 * .gitignore: Remove observer.h.
3618 2018-03-18 Tom Tromey <tom@tromey.com>
3620 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3622 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3624 2018-03-17 Tom Tromey <tom@tromey.com>
3626 * auto-load.c (auto_load_objfile_script_1): Use std::string.
3628 2018-03-17 Tom Tromey <tom@tromey.com>
3630 * target.c (class scoped_target_fd): New.
3631 (target_fileio_close_cleanup): Remove.
3632 (target_fileio_read_alloc_1): Use scoped_target_fd.
3634 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3636 * silent-rules.mk: New.
3637 * Makefile.in: Include silent-rules.mk
3638 (srcdir, VPATH, top_srcdir): Move up.
3639 (COMPILE): Add ECHO_CXX.
3640 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3641 (init.c): Add ECHO_INIT_C.
3642 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3643 (version.c): Add ECHO_GEN.
3644 (printcmd.o): Add ECHO_CXX.
3645 (target-float.o): Add ECHO_CXX.
3646 (ada-exp.o): Add ECHO_CXX.
3647 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3648 (insight$(EXEEXT)): Add ECHO_CXXLD.
3649 * gnulib/configure.ac: Add AM_SILENT_RULES.
3650 * gnulib/aclocal.m4: Re-generate.
3651 * gnulib/configure: Re-generate.
3652 * gnulib/import/Makefile.in: Re-generate.
3654 2018-03-16 Tom Tromey <tom@tromey.com>
3656 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3657 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3658 * utils.c (do_free_section_addr_info)
3659 (make_cleanup_free_section_addr_info): Remove.
3660 * symfile.h (struct other_sections): Add constructor.
3661 (struct section_addr_info): Remove.
3662 (section_addr_info): New typedef.
3663 (struct sym_fns) <sym_offsets>: Change type of parameter.
3664 (build_section_addr_info_from_objfile)
3665 (relative_addr_info_to_section_offsets, addr_info_make_relative)
3666 (default_symfile_offsets, symbol_file_add)
3667 (symbol_file_add_from_bfd)
3668 (build_section_addr_info_from_section_table): Update.
3669 (alloc_section_addr_info, free_section_addr_info): Don't declare.
3670 * symfile.c (alloc_section_addr_info): Remove.
3671 (build_section_addr_info_from_section_table): Change return type.
3673 (build_section_addr_info_from_bfd)
3674 (build_section_addr_info_from_objfile): Likewise.
3675 (free_section_addr_info): Remove.
3676 (relative_addr_info_to_section_offsets): Change type of "addrs".
3677 (addrs_section_compar): Now a std::sort comparator.
3678 (addrs_section_sort): Change return type.
3679 (addr_info_make_relative): Change type of "addrs". Update.
3680 (default_symfile_offsets, syms_from_objfile_1)
3681 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3682 (symbol_file_add_separate): Update.
3683 (symbol_file_add): Change type of "addrs". Update.
3684 (add_symbol_file_command): Update. Remove cleanups.
3685 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
3687 * symfile-debug.c (debug_sym_offsets): Change type of "info".
3688 * solib.c (solib_read_symbols): Update.
3689 * objfiles.c (objfile_relocate): Update. Remove cleanups.
3690 * machoread.c (macho_symfile_offsets): Update.
3691 * jit.c (jit_bfd_try_read_symtab): Update.
3693 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
3695 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3696 unittests/utils-selftests.c.
3697 * unittests/utils-selftests.c: New file.
3699 2018-03-14 Tom Tromey <tom@tromey.com>
3702 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3705 2018-03-14 Tom Tromey <tom@tromey.com>
3708 * printcmd.c (printf_pointer): Allow "-" in format.
3710 2018-03-14 Tom Tromey <tom@tromey.com>
3712 * printcmd.c (_initialize_printcmd): Add usage to printf.
3714 2018-03-14 Yao Qi <qiyao@sourceware.org>
3716 * MAINTAINERS: Update my email address.
3718 2018-03-13 Tom Tromey <tom@tromey.com>
3720 * machoread.c (macho_check_dsym): Change filenamep to a
3722 (macho_symfile_read): Update.
3723 * symfile.c (load_command): Use std::string.
3725 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
3727 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3728 to error message string.
3729 (riscv_register_name): Use xsnprintf instead of sprintf.
3730 (riscv_insn::fetch_instruction): Use gdb_assert instead of
3732 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3734 (riscv_push_dummy_call): Likewise.
3736 2018-03-12 Tom Tromey <tom@tromey.com>
3738 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3739 Use gdb::byte_vector.
3740 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3742 2018-03-12 Yao Qi <yao.qi@linaro.org>
3744 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3745 parameter type to readable_regcache.
3746 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3749 2018-03-11 Tom Tromey <tom@tromey.com>
3751 * dwarf2read.c (struct nextfield): Add initializers.
3752 (struct nextfnfield): Remove.
3753 (struct fnfieldlist): Add initializers. Remove "length" and
3754 "head", use std::vector.
3755 (struct decl_field_list): Remove.
3756 (struct field_info): Add initializers.
3757 <fields, baseclasses>: Now std::vector.
3758 <nbaseclasses, nfnfields, typedef_field_list_count,
3759 nested_types_list_count>: Remove.
3760 (dwarf2_add_field, dwarf2_add_type_defn)
3761 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3762 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3763 (process_structure_scope): Update.
3765 2018-03-11 Tom Tromey <tom@tromey.com>
3767 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3768 for use by std::sort.
3769 (build_type_psymtabs_1): Use std::vector.
3771 2018-03-09 Eli Zaretskii <eliz@gnu.org>
3773 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3774 and LIBMPFR in the printed configuration.
3776 2018-03-08 Tom Tromey <tom@tromey.com>
3778 * source.c (get_filename_and_charpos): Use scoped_fd.
3779 * nto-procfs.c (procfs_open_1): Use scoped_fd.
3780 (procfs_pidlist): Likewise.
3781 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3782 (iterate_over_mappings): Likewise.
3784 2018-03-08 Tom Tromey <tom@tromey.com>
3786 * infcall.c (struct call_return_meta_info)
3787 <stack_temporaries_enabled>: Remove.
3788 (get_call_return_value, call_function_by_hand_dummy): Update.
3789 * thread.c (disable_thread_stack_temporaries): Remove.
3790 (enable_thread_stack_temporaries): Remove.
3791 (thread_stack_temporaries_enabled_p): Return bool.
3792 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3793 (get_last_thread_stack_temporary): Update.
3794 * eval.c (evaluate_subexp): Update.
3795 * gdbthread.h (class enable_thread_stack_temporaries): Now a
3796 class, not a function.
3797 (value_ptr, value_vec): Remove typedefs.
3798 (class thread_info) <stack_temporaries_enabled>: Now bool.
3799 <stack_temporaries>: Now a std::vector.
3800 (thread_stack_temporaries_enabled_p)
3801 (value_in_thread_stack_temporaries): Return bool.
3803 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
3805 * remote.c (putpkt_binary): Fix omitted bytes reporting.
3806 (getpkt_or_notif_sane_1): Likewise.
3808 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3810 * build-id.c (build_id_to_debug_bfd): Use std::string.
3812 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3814 * build-id.c (find_separate_debug_file_by_buildid): Return
3816 * build-id.h (find_separate_debug_file_by_buildid): Return
3818 * coffread.c (coff_symfile_read): Adjust to std::string.
3819 * elfread.c (elf_symfile_read): Adjust to std::string.
3820 * symfile.c (separate_debug_file_exists): Change parameter to
3822 (find_separate_debug_file): Return std::string.
3823 (find_separate_debug_file_by_debuglink): Return std::string.
3824 * symfile.h (find_separate_debug_file_by_debuglink): Return
3827 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3829 * common/xml-utils.c (xml_escape_text): Move code to...
3830 (xml_escape_text_append): ... this new function.
3831 * common/xml-utils.h (xml_escape_text_append): New declaration.
3832 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3834 (_initialize_xml_utils): register test_xml_escape_text_append as
3837 2018-03-07 Alan Hayward <alan.hayward@arm.com>
3839 * defs.h: Remove MAX_REGISTER_SIZE.
3840 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3842 * python/py-unwind.c (pyuw_sniffer): Likewise.
3844 2018-03-07 Tom Tromey <tom@tromey.com>
3846 * linux-tdep.c (linux_info_proc): Update.
3847 * target.h (struct target_ops) <to_fileio_readlink>: Return
3849 (target_fileio_readlink): Return optional<string>.
3850 * remote.c (remote_hostio_readlink): Return optional<string>.
3851 * inf-child.c (inf_child_fileio_readlink): Return
3853 * target.c (target_fileio_readlink): Return optional<string>.
3855 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
3857 * regcache.c (cooked_read_test): Add riscv to the list of
3858 architectures that have a save_reggroup.
3860 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
3862 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3863 value is not a dynamic class object.
3865 2018-03-06 Tom Tromey <tom@tromey.com>
3867 * rust-exp.y: Formatting fixes.
3869 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3871 * riscv-tdep.c (riscv_register_name): Remove target description
3873 (riscv_gdbarch_init): Remove target description check.
3875 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3877 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3879 * riscv-tdep.h: Likewise.
3881 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3883 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3884 (riscv_pseudo_register_write): Delete.
3885 (riscv_gdbarch_init): Remove all use of pseudo registers.
3887 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3889 * record-btrace.c (btrace_print_lines): Replace cleanup
3890 parameter with RAII equivalents.
3891 (btrace_insn_history): Replace cleanup with RAII equivalents.
3892 * ui-out.h (make_cleanup_ui_out_list_begin_end,
3893 make_cleanup_ui_out_tuple_begin_end): Remove.
3894 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3895 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3896 make_cleanup_ui_out_list_begin_end): Remove.
3898 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3900 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3901 parameter types to std::vector. Use bool.
3902 (record_btrace_wait): Replace VEC(tp_t) with
3903 std::vector<thread_info *>.
3904 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3906 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3908 * record-btrace.c (record_btrace_disable_callback): Remove.
3909 (struct scoped_btrace_disable): New.
3910 (record_btrace_open): Use scoped_btrace_disable.
3912 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3914 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3915 reading values from registers.
3917 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3919 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3922 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3924 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3925 change parameter type. Use GDB's print functions, and use
3926 core_addr_to_string where appropriate.
3927 (riscv_push_dummy_call): Use core_addr_to_string where
3928 appropriate, update call to riscv_print_arg_location, and reindent
3930 (riscv_return_value): Update call to riscv_print_arg_location.
3932 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3933 Tim Newsome <tim@sifive.com>
3934 Albert Ou <a0u@eecs.berkeley.edu>
3935 Darius Rad <darius@bluespec.com>
3937 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3938 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3939 (ALLDEPFILES): Add riscv-tdep.c
3940 * configure.tgt: Add riscv support.
3941 * riscv-tdep.c: New file.
3942 * riscv-tdep.h: New file.
3943 * NEWS: Mention new target.
3944 * MAINTAINERS: Add entry for riscv.
3946 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3948 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3949 fields within aggregates.
3951 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
3953 * record-btrace.c (btrace_print_lines): Change type of flags to
3954 gdb_disassembly_flags.
3956 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3958 * fbsd-nat.c: Include "inf-ptrace.h".
3959 (USE_SIGTRAP_SIGINFO): Conditionally define.
3960 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3961 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3962 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3964 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3966 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3968 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3969 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3970 "supports_stopped_by_hw_breakpoint" target methods.
3972 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3974 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3975 * fbsd-nat.c (debug_fbsd_nat): New variable.
3976 (show_fbsd_nat_debug): New function.
3977 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3978 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3980 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3982 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3983 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3985 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3986 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3989 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3991 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
3992 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
3994 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3996 * charset.c (struct charset_vector): New.
3997 (charsets): Change type to charset_vector.
3998 (find_charset_names): Adjust.
4000 (_initialize_charset): Adjust.
4002 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4004 * progspace.h (struct program_space) <deleted_solibs>: Change
4005 type to std::vector<std::string>.
4006 * progspace.c (clear_program_space_solib_cache): Adjust.
4007 * breakpoint.c (print_solib_event): Adjust.
4008 (check_status_catch_solib): Adjust.
4009 * solib.c (update_solib_list): Adjust.
4010 * ui-out.h (class ui_out) <field_string>: New overload.
4011 * ui-out.c (ui_out::field_string): New overload.
4013 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4015 * progspace.h (struct program_space): Add constructor and
4016 destructor, initialize fields.
4017 (add_program_space): Remove.
4018 * progspace.c (add_program_space): Rename to...
4019 (program_space::program_space): ... this.
4020 (release_program_space): Rename to...
4021 (program_space::~program_space): ... this.
4022 (delete_program_space): Use delete to delete program_space.
4023 (initialize_progspace): Use new to allocate program_space.
4024 * inferior.c (add_inferior_with_spaces): Likewise.
4025 (clone_inferior_command): Likewise.
4026 * infrun.c (follow_fork_inferior): Likewise.
4027 (handle_vfork_child_exec_or_exit): Likewise.
4029 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4031 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4032 (delim_string_to_char_ptr_vec): Return std::vector of
4033 gdb::unique_xmalloc_ptr.
4034 (dirnames_to_char_ptr_vec_append): Take std::vector of
4035 gdb::unique_xmalloc_ptr.
4036 (dirnames_to_char_ptr_vec): Return std::vector of
4037 gdb::unique_xmalloc_ptr.
4038 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4039 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4040 (delim_string_to_char_ptr_vec): Return an std::vector of
4041 gdb::unique_xmalloc_ptr, adjust the code.
4042 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4043 gdb::unique_xmalloc_ptr, adjust the code.
4044 (dirnames_to_char_ptr_vec): Return an std::vector of
4045 gdb::unique_xmalloc_ptr, adjust the code.
4046 * auto-load.c (auto_load_safe_path_vec): Change type to
4047 std::vector of gdb::unique_xmalloc_ptr.
4048 (auto_load_expand_dir_vars): Return an std::vector of
4049 gdb::unique_xmalloc_ptr, adjust the code.
4050 (auto_load_safe_path_vec_update): Adjust.
4051 (filename_is_in_auto_load_safe_path_vec): Adjust.
4052 (auto_load_objfile_script_1): Adjust.
4053 * build-id.c (build_id_to_debug_bfd): Adjust.
4054 * linux-thread-db.c (thread_db_load_search): Adjust.
4055 * source.c (add_path): Adjust.
4057 * symfile.c (find_separate_debug_file): Adjust.
4058 * utils.c (do_free_char_ptr_vec): Remove.
4059 (make_cleanup_free_char_ptr_vec): Remove.
4061 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4064 * common/pathstuff.c: Conditionally include "<windows.h>".
4066 2018-03-01 Georg Sauthoff <mail@georg.so>
4069 * gcore.in: Quote variables and switch interpreter to bash.
4071 2018-03-01 Tom Tromey <tom@tromey.com>
4073 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4074 assertion. Add assertion for discriminant_index.
4075 (quirk_rust_enum): Use correct base type name in univariant case.
4077 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4079 * record.c (get_call_history_modifiers): Return a
4081 (cmd_record_call_history): Adjust.
4082 * record-btrace.c (record_btrace_call_history): Adjust.
4083 (record_btrace_call_history_range): Adjust.
4084 (record_btrace_call_history_from): Adjust.
4085 * target-debug.h (target_debug_print_record_print_flags): New.
4086 * target-delegates.c: Re-generate.
4087 * target.c (target_call_history): Change flags type.
4088 (target_call_history_from): Likewise.
4089 (target_call_history_range): Likewise.
4090 * target.h (struct target_ops) <target_call_history>: Likewise.
4091 (target_call_history_from): Likewise.
4092 (target_call_history_range): Likewise.
4094 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4095 Simon Marchi <simon.marchi@polymtl.ca>
4097 * common/common-utils.c: Include "sys/stat.h".
4098 (is_regular_file): Move here from "source.c"; change return
4100 * common/common-utils.h (is_regular_file): New prototype.
4101 * common/pathstuff.c (contains_dir_separator): New function.
4102 * common/pathstuff.h (contains_dir_separator): New prototype.
4103 * source.c: Don't include "sys/stat.h".
4104 (is_regular_file): Move to "common/common-utils.c".
4106 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4108 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4109 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4110 * auto-load.c: Include "common/pathstuff.h".
4111 * common/common-def.h (current_directory): Move here.
4112 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4114 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4116 * common/pathstuff.c: New file.
4117 * common/pathstuff.h: New file.
4118 * compile/compile.c: Include "common/pathstuff.h".
4119 * defs.h (current_directory): Move to "common/common-defs.h".
4120 * dwarf2read.c: Include "common/pathstuff.h".
4122 * guile/scm-safe-call.c: Likewise.
4123 * linux-thread-db.c: Likewise.
4125 * nto-tdep.c: Likewise.
4126 * objfiles.c: Likewise.
4127 * source.c: Likewise.
4128 * symtab.c: Likewise.
4129 * utils.c: Include "common/pathstuff.h".
4130 (gdb_realpath): Move to "common/pathstuff.c".
4131 (gdb_realpath_keepfile): Likewise.
4132 (gdb_abspath): Likewise.
4133 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4134 (gdb_realpath_keepfile): Likewise.
4135 (gdb_abspath): Likewise.
4137 2018-02-28 John Baldwin <jhb@FreeBSD.org>
4139 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4140 wildcard process pid for super_resume for kernels with a
4143 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4145 * compile/compile.c (get_args): Add additional comments
4146 explaining function.
4148 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4149 Tom Tromey <tom@tromey.com>
4151 * target.h (memory_write_request_s): Remove typedef. Don't define
4153 (target_write_memory_blocks): Change argument to std::vector.
4154 (struct memory_write_request): Add constructor.
4155 * target-memory.c (compare_block_starting_address): Return bool.
4156 Change argument types.
4157 (claim_memory): Change arguments to use std::vector.
4158 (split_regular_and_flash_blocks, blocks_to_erase)
4159 (compute_garbled_blocks): Likewise.
4160 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4161 (target_write_memory_blocks): Change argument to std::vector.
4162 * symfile.c (struct load_section_data): Add constructor and
4163 destructor. Use std::vector for "requests".
4164 (struct load_progress_data): Add initializers.
4165 (load_section_callback): Update. Use "new".
4166 (clear_memory_write_data): Remove.
4167 (generic_load): Update.
4169 2018-02-27 Alan Hayward <alan.hayward@arm.com>
4171 * arch/aarch64.h: Use common/tdesc.h.
4173 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4175 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4176 architecture with a 64-bit ABI.
4178 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4180 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4181 ahead of target description loading.
4183 2018-02-26 Tom Tromey <tom@tromey.com>
4185 * stack.c (backtrace_command_1): Update.
4186 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4188 * python/py-framefilter.c (py_print_frame)
4189 (gdbpy_apply_frame_filter): Change type of "flags".
4190 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4192 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4193 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4194 * extension.h (enum frame_filter_flag): Rename from
4196 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4197 (apply_ext_lang_frame_filter): Change type of "flags".
4198 * extension.c (apply_ext_lang_frame_filter): Change type of
4200 * extension-priv.h (struct extension_language_ops)
4201 <apply_frame_filter>: Change type of "flags".
4203 2018-02-26 Tom Tromey <tom@tromey.com>
4206 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4207 off-by-one in py_end computation.
4208 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4210 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4213 2018-02-26 Tom Tromey <tom@tromey.com>
4215 * dwarf2read.c (struct variant_field): New.
4216 (struct nextfield) <variant>: New field.
4217 (dwarf2_add_field): Handle DW_TAG_variant_part.
4218 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4219 discriminated union.
4220 (read_structure_type): Handle DW_TAG_variant_part.
4221 (handle_struct_member_die): New function, extracted from
4222 process_structure_scope. Handle DW_TAG_variant.
4223 (process_structure_scope): Handle discriminated unions. Call
4224 handle_struct_member_die.
4226 2018-02-26 Tom Tromey <tom@tromey.com>
4228 * rust-lang.h (rust_last_path_segment): Declare.
4229 * rust-lang.c (rust_last_path_segment): Now public. Change
4231 (struct disr_info): Remove.
4232 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4233 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4234 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4235 (rust_enum_p, rust_enum_variant): New function.
4236 (rust_underscore_fields): Remove "offset" parameter.
4237 (rust_print_enum): New function.
4238 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4239 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4240 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4242 (rust_internal_print_type): New function, from rust_print_type.
4244 (rust_print_type): Call rust_internal_print_type.
4245 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4246 Update enum handling.
4247 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4248 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4249 (rust_union_quirks): New functions.
4250 (process_full_comp_unit, process_full_type_unit): Call
4252 (process_structure_scope): Update rust_unions if necessary.
4254 2018-02-26 Tom Tromey <tom@tromey.com>
4256 * value.h (value_union_variant): Declare.
4257 * valops.c (value_union_variant): New function.
4258 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4259 (struct discriminant_info): New.
4260 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4262 (struct main_type) <flag_discriminated_union>: New field.
4264 2018-02-26 Tom Tromey <tom@tromey.com>
4266 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4267 unittests/unpack-selftests.c.
4268 * unittests/unpack-selftests.c: New file.
4269 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4271 2018-02-26 Yao Qi <yao.qi@linaro.org>
4273 * dwarf2read.c (struct partial_die_info) <read>: New method.
4274 (read_partial_die): Remove the declaration.
4275 (load_partial_dies): Update.
4276 (partial_die_info::partial_die_info):
4277 (read_partial_die): Change it to partial_die_info::read.
4279 2018-02-26 Yao Qi <yao.qi@linaro.org>
4281 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4282 (fixup_partial_die): Remove declaration.
4283 (scan_partial_symbols): Update.
4284 (partial_die_parent_scope): Likewise.
4285 (partial_die_full_name): Likewise.
4286 (fixup_partial_die): Change it to partial_die_info::fixup.
4288 2018-02-26 Yao Qi <yao.qi@linaro.org>
4290 * dwarf2read.c (read_partial_die): Update the declaration.
4291 (load_partial_dies): Caller update.
4292 (read_partial_die): Remove one argument abbrev_len.
4294 2018-02-26 Yao Qi <yao.qi@linaro.org>
4296 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4297 assignment operator.
4298 (load_partial_dies): Use ctor and copy ctor.
4299 (read_partial_die): Update.
4300 (dwarf2_cu::find_partial_die): Use ctor.
4302 2018-02-26 Yao Qi <yao.qi@linaro.org>
4304 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4305 (find_partial_die_in_comp_unit): Change it to
4306 dwarf2_cu::find_partial_die.
4307 (find_partial_die): Update.
4309 2018-02-26 Yao Qi <yao.qi@linaro.org>
4311 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4314 2018-02-26 Yao Qi <yao.qi@linaro.org>
4316 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4318 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4320 * arch/amd64.h: Use common/tdesc.h.
4321 * arch/i386.c: Likewise.
4322 * arch/i386.h: Likewise.
4323 * arch/tic6x.c: Likewise.
4324 * arch/tdesc.h: Move file from here...
4325 * common/tdesc.h: ...to here.
4326 * features/aarch64-core.c: Regenerate.
4327 * features/aarch64-fpu.c: Regenerate.
4328 * features/i386/32bit-avx.c: Regenerate.
4329 * features/i386/32bit-avx512.c: Regenerate.
4330 * features/i386/32bit-core.c: Regenerate.
4331 * features/i386/32bit-linux.c: Regenerate.
4332 * features/i386/32bit-mpx.c: Regenerate.
4333 * features/i386/32bit-pkeys.c: Regenerate.
4334 * features/i386/32bit-sse.c: Regenerate.
4335 * features/i386/64bit-avx.c: Regenerate.
4336 * features/i386/64bit-avx512.c: Regenerate.
4337 * features/i386/64bit-core.c: Regenerate.
4338 * features/i386/64bit-linux.c: Regenerate.
4339 * features/i386/64bit-mpx.c: Regenerate.
4340 * features/i386/64bit-pkeys.c: Regenerate.
4341 * features/i386/64bit-segments.c: Regenerate.
4342 * features/i386/64bit-sse.c: Regenerate.
4343 * features/i386/x32-core.c: Regenerate.
4344 * features/tic6x-c6xp.c: Regenerate.
4345 * features/tic6x-core.c: Regenerate.
4346 * features/tic6x-gp.c: Regenerate.
4347 * target-descriptions.c: Use common/tdesc.h.
4348 * target-descriptions.h: Likewise.
4350 2018-02-24 Tom Tromey <tom@tromey.com>
4352 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4353 (try_thread_db_load_from_dir, thread_db_load_search): Use
4355 (info_auto_load_libthread_db_compare): Return bool. Change
4357 (info_auto_load_libthread_db): Use std::vector, std::string.
4360 2018-02-24 Tom Tromey <tom@tromey.com>
4362 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4364 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4366 * gdbarch.c: Rebuild.
4367 * gdbarch.h: Rebuild.
4368 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4369 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4370 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4373 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4375 * gdbtypes.h (sect_offset): Change type to uint64_t.
4376 (sect_offset_str): New function.
4377 * dwarf2read.c (create_addrmap_from_aranges): Use
4379 (error_check_comp_unit_head): Likewise.
4380 (create_debug_type_hash_table): Likewise.
4381 (read_cutu_die_from_dwo): Likewise.
4382 (init_cutu_and_read_dies): Likewise.
4383 (init_cutu_and_read_dies_no_follow): Likewise.
4384 (process_psymtab_comp_unit_reader): Likewise.
4385 (partial_die_parent_scope): Likewise.
4386 (peek_die_abbrev): Likewise.
4387 (process_queue): Likewise.
4388 (dwarf2_physname): Likewise.
4389 (read_namespace_alias): Likewise.
4390 (read_import_statement): Likewise.
4391 (create_dwo_cu_reader): Likewise.
4392 (create_cus_hash_table): Likewise.
4393 (lookup_dwo_cutu): Likewise.
4394 (inherit_abstract_dies): Likewise.
4395 (read_func_scope): Likewise.
4396 (read_call_site_scope): Likewise.
4397 (dwarf2_add_member_fn): Likewise.
4398 (read_common_block): Likewise.
4399 (read_module_type): Likewise.
4400 (read_typedef): Likewise.
4401 (read_subrange_type): Likewise.
4402 (load_partial_dies): Likewise.
4403 (read_partial_die): Likewise.
4404 (find_partial_die): Likewise.
4405 (read_str_index): Likewise.
4406 (dwarf2_string_attr): Likewise.
4407 (build_error_marker_type): Likewise.
4408 (lookup_die_type): Likewise.
4409 (dump_die_shallow): Likewise.
4410 (follow_die_ref): Likewise.
4411 (dwarf2_fetch_die_loc_sect_off): Likewise.
4412 (dwarf2_fetch_constant_bytes): Likewise.
4413 (follow_die_sig): Likewise.
4414 (get_signatured_type): Likewise.
4415 (get_DW_AT_signature_type): Likewise.
4416 (dwarf2_find_containing_comp_unit): Likewise.
4417 (set_die_type): Likewise.
4419 2018-02-21 John Baldwin <jhb@FreeBSD.org>
4421 * arch/aarch64.c: Include "common-defs.h".
4422 * arch/amd64.c: Likewise.
4423 * arch/i386.c: Likewise.
4425 2018-02-21 Tom Tromey <tom@tromey.com>
4427 * value.h: (extract_field_op): Update.
4428 * eval.c (extract_field_op): Return a const char *.
4429 * expression.h (parse_expression_for_completion): Update.
4430 * completer.c (complete_expression): Update.
4431 (add_struct_fields): Make fieldname const.
4432 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4433 (mark_completion_tag, parse_exp_in_context_1): Update.
4434 (parse_expression_for_completion): Change "name" to
4435 unique_xmalloc_ptr*.
4437 2018-02-21 Tom Tromey <tom@tromey.com>
4439 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4441 2018-02-21 Yao Qi <yao.qi@linaro.org>
4443 * avr-tdep.c (avr_read_pc): Change parameter type to
4445 * gdbarch.sh (read_pc): Likewise.
4446 * gdbarch.c: Re-generated.
4447 * gdbarch.h: Re-generated.
4448 * hppa-tdep.c (hppa_read_pc): Change parameter type to
4450 * ia64-tdep.c (ia64_read_pc): Likewise.
4451 * mips-tdep.c (mips_read_pc): Likewise.
4452 * spu-tdep.c (spu_read_pc): Likewise.
4454 2018-02-21 Yao Qi <yao.qi@linaro.org>
4456 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4457 * regcache-dump.c: New file.
4458 * regcache.c: Move register_dump to regcache-dump.c.
4459 (maintenance_print_registers): Likewise.
4460 (maintenance_print_raw_registers): Likewise.
4461 (maintenance_print_cooked_registers): Likewise.
4462 (maintenance_print_register_groups): Likewise.
4463 (maintenance_print_remote_registers): Likewise.
4464 (_initialize_regcache): Likewise.
4465 * regcache.h (register_dump): Moved from regcache.c.
4467 2018-02-21 Yao Qi <yao.qi@linaro.org>
4469 * regcache.c (regcache::regcache): Update.
4470 (regcache::invalidate): Move it to detached_regcache::invalidate.
4471 (get_thread_arch_aspace_regcache): Update.
4472 (regcache::raw_update): Update.
4473 (regcache::cooked_read): Remove some code.
4474 (regcache::cooked_read_value): Likewise.
4475 (regcache::raw_write): Remove assert on m_readonly_p.
4476 (regcache::raw_supply_integer): Move it to
4477 detached_regcache::raw_supply_integer.
4478 (regcache::raw_supply_zeroed): Likewise.
4479 * regcache.h (detached_regcache) <raw_supply_integer>: New
4481 <raw_supply_zeroed, invalidate>: Likewise.
4482 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4483 <invalidate>: Likewise.
4484 <m_readonly_p>: Removed.
4486 2018-02-21 Yao Qi <yao.qi@linaro.org>
4488 * infcmd.c (get_return_value): Let stop_regs point to
4489 get_current_regcache.
4490 * regcache.c (regcache::regcache): Remove.
4491 (register_dump_reg_buffer): New class.
4492 (regcache_print): Adjust.
4493 * regcache.h (regcache): Remove constructors.
4495 2018-02-21 Yao Qi <yao.qi@linaro.org>
4497 * regcache.c (class register_dump): New class.
4498 (register_dump_regcache, register_dump_none): New class.
4499 (register_dump_remote, register_dump_groups): New class.
4500 (regcache_print): Update.
4501 * regcache.h (regcache_dump_what): Move it to regcache.c.
4502 (regcache) <dump>: Remove.
4504 2018-02-21 Yao Qi <yao.qi@linaro.org>
4506 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4508 (jit_unwind_reg_set_impl): Call raw_supply.
4509 (jit_frame_sniffer): Use reg_buffer_rw.
4510 * record-full.c (record_full_core_regbuf): Change its type.
4511 (record_full_core_open_1): Use reg_buffer_rw.
4512 (record_full_close): Likewise.
4513 (record_full_core_fetch_registers): Use regcache->raw_supply.
4514 (record_full_core_store_registers): Likewise.
4515 * regcache.c (regcache::get_register_status): Move it to
4517 (regcache_raw_set_cached_value): Remove.
4518 (regcache::raw_set_cached_value): Remove.
4519 (regcache::raw_write): Call raw_supply.
4520 (regcache::raw_supply): Move it to reg_buffer_rw.
4521 * regcache.h (regcache_raw_set_cached_value): Remove.
4522 (reg_buffer_rw): New class.
4524 2018-02-21 Yao Qi <yao.qi@linaro.org>
4526 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4527 readonly_detached_regcache.
4528 (dummy_frame_prev_register): Use regcache->cooked_read.
4529 * frame.c (frame_save_as_regcache): Change return type.
4530 (frame_pop): Update.
4531 * frame.h (frame_save_as_regcache): Update declaration.
4532 * inferior.h (get_infcall_suspend_state_regcache): Update
4534 * infrun.c (infcall_suspend_state) <registers>: use
4535 readonly_detached_regcache.
4536 (save_infcall_suspend_state): Don't use regcache_dup.
4537 (get_infcall_suspend_state_regcache): Change return type.
4538 * linux-fork.c (struct fork_info) <savedregs>: Change to
4539 readonly_detached_regcache.
4541 (fork_save_infrun_state): Don't use regcache_dup.
4542 (info_checkpoints_command): Adjust.
4543 * mi/mi-main.c (register_changed_p): Update declaration.
4544 (mi_cmd_data_list_changed_registers): Use
4545 readonly_detached_regcache.
4546 (register_changed_p): Change parameter type to
4547 readonly_detached_regcache.
4548 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4549 readonly_detached_regcache.
4550 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4551 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4553 (regcache::save): Move it to reg_buffer.
4554 (regcache::restore): Change parameter type.
4555 (regcache_dup): Remove.
4556 * regcache.h (reg_buffer) <save>: New method.
4557 (readonly_detached_regcache): New class.
4558 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4559 readonly_detached_regcache.
4560 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4562 2018-02-21 Yao Qi <yao.qi@linaro.org>
4564 * frame.c (frame_save_as_regcache): Use regcache method save.
4565 (frame_pop): Use regcache method restore.
4566 * infrun.c (restore_infcall_suspend_state): Likewise.
4567 * linux-fork.c (fork_load_infrun_state): Likewise.
4568 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4570 * regcache.c (regcache_save): Remove.
4571 (regcache::restore): More asserts.
4572 (regcache_cpy): Remove.
4573 * regcache.h (regcache_save): Remove the declaration.
4574 (regcache::restore): Move from private to public.
4575 Remove the friend declaration of regcache_cpy.
4576 (regcache_cpy): Remove declaration.
4578 2018-02-21 Yao Qi <yao.qi@linaro.org>
4580 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4581 parameter type to 'readable_regcache *'.
4582 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4583 * arm-tdep.c (arm_neon_quad_read): Likewise.
4584 (arm_pseudo_read): Likewise.
4585 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4586 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4587 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4588 * gdbarch.c: Re-generated.
4589 * gdbarch.h: Re-generated.
4590 * gdbarch.sh (pseudo_register_read): Change parameter type to
4591 'readable_regcache *'.
4592 (pseudo_register_read_value): Likewise.
4593 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4594 (h8300_pseudo_register_read): Likewise.
4595 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4596 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4597 (i386_pseudo_register_read_into_value): Likewise.
4598 (i386_pseudo_register_read_value): Likewise.
4599 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4601 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4602 * m32c-tdep.c (m32c_raw_read): Likewise.
4603 (m32c_read_flg): Likewise.
4604 (m32c_banked_register): Likewise.
4605 (m32c_banked_read): Likewise.
4606 (m32c_sb_read): Likewise.
4607 (m32c_part_read): Likewise.
4608 (m32c_cat_read): Likewise.
4609 (m32c_r3r2r1r0_read): Likewise.
4610 (m32c_pseudo_register_read): Likewise.
4611 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4612 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4613 (mep_pseudo_cr64_read): Likewise.
4614 (mep_pseudo_register_read): Likewise.
4615 * mips-tdep.c (mips_pseudo_register_read): Likewise.
4616 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4617 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4618 * regcache.c (regcache::raw_read): Move it to readable_regcache.
4619 (regcache::cooked_read): Likewise.
4620 (regcache::cooked_read_value): Likewise.
4621 (regcache_cooked_read_signed):
4622 (regcache::cooked_read): Likewise.
4623 * regcache.h (readable_regcache): New class.
4624 (regcache): Inherit readable_regcache. Move some methods to
4626 * rl78-tdep.c (rl78_pseudo_register_read): Change
4627 parameter type to 'readable_regcache *'.
4628 * rs6000-tdep.c (do_regcache_raw_read): Remove.
4629 (e500_pseudo_register_read): Change parameter type to
4630 'readable_regcache *'.
4631 (dfp_pseudo_register_read): Likewise.
4632 (vsx_pseudo_register_read): Likewise.
4633 (efpr_pseudo_register_read): Likewise.
4634 * s390-tdep.c (s390_pseudo_register_read): Likewise.
4635 * sh-tdep.c (sh_pseudo_register_read): Likewise.
4636 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4637 (sh64_pseudo_register_read): Likewise.
4638 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4639 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4640 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4641 (spu_pseudo_register_read): Likewise.
4642 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4643 (xtensa_pseudo_register_read): Likewise.
4645 2018-02-21 Yao Qi <yao.qi@linaro.org>
4647 * regcache.c (regcache::regcache): Call reg_buffer ctor.
4648 (regcache::arch): Move it to reg_buffer::arch.
4649 (regcache::register_buffer): Likewise.
4650 (regcache::assert_regnum): Likewise.
4651 (regcache::num_raw_registers): Likewise.
4652 * regcache.h (reg_buffer): New class.
4653 (regcache): Inherit reg_buffer.
4655 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
4657 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4658 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4660 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
4662 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4664 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4666 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4667 (SFILES): Remove common/*.c files.
4668 (COMMON_OBS): Remove some *.o files built from common/*.c files.
4669 * common/common.host: Add common reference.
4670 * configure.ac: Likewise.
4671 * configure: Regenerate.
4673 2018-02-16 Yao Qi <yao.qi@linaro.org>
4675 * block.c (block_namespace_info): Inherit allocate_on_obstack.
4676 (block_initialize_namespace): Use new.
4677 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4678 (dwarf2_free_objfile): Use delete.
4679 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4680 (copy_type_recursive): Use new.
4681 * gdb_obstack.h (allocate_on_obstack): New.
4683 2018-02-15 Yao Qi <yao.qi@linaro.org>
4686 * inferior.c (exit_inferior_1): Reset inf->control.
4688 2018-02-15 Joel Brobecker <brobecker@adacore.com>
4690 * ada-lang.c (ada_to_fixed_value_create): Delete advance
4693 2018-02-14 Pedro Alves <palves@redhat.com>
4695 * frame-unwind.c (frame_unwind_try_unwinder): Always call
4696 frame_cleanup_after_sniffer on exception.
4698 2018-02-14 Tom Tromey <tom@tromey.com>
4700 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4702 (solib_bfd_open): Make pathname const.
4703 * solib.c (solib_bfd_open): Make pathname const.
4704 * solib-spu.c (spu_bfd_fopen): Make name const.
4705 (spu_bfd_open): Make pathname const.
4706 * solib-darwin.c (darwin_bfd_open): Make pathname const.
4707 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4709 2018-02-14 Tom Tromey <tom@tromey.com>
4711 * symfile.c (symfile_bfd_open): Update.
4712 * source.h (openp, source_full_path_of, find_and_open_source):
4713 Change argument type to unique_xmalloc_ptr.
4714 * source.c (openp): Take a unique_xmalloc_ptr.
4715 (source_full_path_of, find_and_open_source): Likewise.
4716 (open_source_file, symtab_to_fullname): Update.
4717 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4719 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4720 (exec_file_find): Update.
4721 * psymtab.c (psymtab_to_fullname): Update.
4722 * nto-tdep.h (nto_find_and_open_solib): Update.
4723 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4725 * exec.c (exec_file_attach): Update.
4726 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4727 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4729 2018-02-14 Tom Tromey <tom@tromey.com>
4731 * solib.c: Include source.h.
4732 * nto-tdep.c: Include source.h.
4733 * mi/mi-cmd-env.c: Include source.h.
4734 * infcmd.c: Include source.h.
4735 * exec.c: Include source.h.
4736 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4737 (add_path, directory_switch, source_path, init_source_path): Move
4739 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4740 (add_path, directory_switch, source_path, init_source_path):
4743 2018-02-14 Tom Tromey <tom@tromey.com>
4745 * solist.h (exec_file_find, solib_find): Return
4747 (solib_bfd_fopen): Take a const char *.
4748 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4749 (exec_file_find, solib_find): Likewise.
4750 (solib_bfd_fopen): Do not take ownership of "pathname".
4751 (solib_bfd_open): Use unique_xmalloc_ptr.
4752 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4753 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4754 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4755 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4757 2018-02-14 Joel Brobecker <brobecker@adacore.com>
4759 * ada-lang.c (name_match_type_from_name): Remove reference to
4760 ada_name_for_lookup in function's documentation.
4761 * ada-lang.h (ada_name_for_lookup): Delete declaration.
4763 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4765 * defs.h (enum openp_flags): New enum.
4766 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4767 Move to enum openp_flags.
4768 (openp_flags): New enum flags.
4769 (openp): Change parameter type to openp_flags.
4770 * source.c (openp): Change parameter type to openp_flags.
4771 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4772 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4774 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4776 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4779 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
4781 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4783 (class dwarf2_queue_guard): ...the destructor of this new class.
4784 (dw2_do_instantiate_symtab): Create instance of the new class
4785 dwarf2_queue_guard, remove cleanup.
4787 2018-02-09 Tom Tromey <tom@tromey.com>
4789 * source.c (find_source_lines): Don't reference past the end of
4792 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4794 * remote.c (remote_btrace_maybe_reopen): Change error message.
4795 * btrace.c (btrace_enable): Likewise.
4796 (parse_xml_btrace): Likewise.
4797 (parse_xml_btrace_conf): Likewise.
4799 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4801 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4802 (linux_enable_pt, linux_enable_bts): Call
4803 diagnose_perf_event_open_fail.
4805 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4807 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4808 Remove parameter and change return type. Update callers. Move it.
4809 (linux_enable_bts, linux_enable_pt): Improve error message.
4810 (linux_enable_pt): Remove zero buffer size check.
4811 (linux_enable_btrace): Improve error messages. Remove NULL return
4814 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4816 * btrace.c (btrace_enable): Remove target_supports_btrace call.
4817 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4818 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4819 (linux_supports_pt, linux_supports_btrace): Remove.
4820 (linux_enable_bts): Call cpu_supports_bts.
4821 * nat/linux-btrace.h (linux_supports_btrace): Remove.
4822 * remote.c (remote_supports_btrace): Remove.
4823 (init_remote_ops): Remove remote_supports_btrace.
4824 * target-delegates.c: Regenerated.
4825 * target.c (target_supports_btrace): Remove.
4826 * target.h (target_ops) <to_supports_btrace>: Remove
4827 (target_supports_btrace): Remove.
4828 * x86-linux-nat.c (x86_linux_create_target): Remove
4829 linux_supports_btrace.
4831 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4833 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4835 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4836 exception and use message in own exception.
4838 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4840 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4841 (perf_event_pt_event_type): Use gdb_file_up.
4842 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4843 scoped_fd, and scoped_mmap.
4845 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4847 * common/scoped_mmap.h: New.
4848 * unittests/scoped_mmap-selftest.c: New.
4849 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4850 unittests/scoped_mmap-selftest.c.
4852 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4854 * common/scoped_fd.h: New.
4855 * unittests/scoped_fd-selftest.c: New.
4856 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4857 unittests/scoped_fd-selftest.c.
4859 2018-02-09 Tom Tromey <tom@tromey.com>
4861 * auto-load.c (auto_load_section_scripts): Use
4862 gdb::unique_xmalloc_ptr.
4864 2018-02-09 Tom Tromey <tom@tromey.com>
4866 * auto-load.c (execute_script_contents): Use std::string.
4868 2018-02-09 Joel Brobecker <brobecker@adacore.com>
4870 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4871 Python function, rather than a new command.
4873 2018-02-08 Tom Tromey <tom@tromey.com>
4875 * solib.c (solib_find_1): Use std::string.
4876 (solib_bfd_fopen): Use unique_xmalloc_ptr.
4878 2018-02-08 Tom Tromey <tom@tromey.com>
4880 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4882 2018-02-08 Tom Tromey <tom@tromey.com>
4884 * source.c (find_source_lines): Use gdb::def_vector.
4886 2018-02-08 Tom Tromey <tom@tromey.com>
4888 * macrocmd.c (struct temporary_macro_definition): New.
4889 (macro_define_command): Use temporary_macro_definition. Remove
4891 (free_macro_definition_ptr): Remove.
4893 2018-02-08 Tom Tromey <tom@tromey.com>
4895 * macroexp.c (maybe_expand): Use std::string.
4897 2018-02-08 Tom Tromey <tom@tromey.com>
4899 * macroexp.c (struct macro_buffer): Add initializers for some
4901 (init_buffer, init_shared_buffer, free_buffer)
4902 (free_buffer_return_text): Remove.
4903 (macro_buffer): New constructors.
4904 (~macro_buffer): New destructor.
4905 (macro_buffer::set_shared): New method.
4906 (macro_buffer::resize_buffer, macro_buffer::appendc)
4907 (macro_buffer::appendmem): Now methods, not free functions.
4908 (set_token, append_tokens_without_splicing, stringify)
4909 (macro_stringify): Update.
4910 (gather_arguments): Change return type. Remove argc_p argument,
4911 add args_ptr argument. Use std::vector.
4912 (substitute_args): Remove argc argument. Accept std::vector.
4913 (expand): Update. Use std::vector.
4914 (scan, macro_expand, macro_expand_next): Update.
4916 2018-02-08 Tom Tromey <tom@tromey.com>
4918 * symtab.c (default_collect_symbol_completion_matches_break_on):
4919 Use unique_xmalloc_ptr.
4920 * macroscope.h: (sal_macro_scope, user_macro_scope)
4921 (default_macro_scope): Return unique_xmalloc_ptr.
4922 * macroscope.c (sal_macro_scope, user_macro_scope)
4923 (default_macro_scope): Return unique_xmalloc_ptr.
4924 * macroexp.h (macro_expand, macro_expand_once): Return
4926 * macroexp.c (macro_expand, macro_expand_once): Return
4928 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4929 (info_macro_command, info_macros_command): Use
4931 * compile/compile-c-support.c (write_macro_definitions): Use
4933 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4935 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
4937 * value.c (value_static_field): Assign field type instead of
4938 containing type when returning an optimized out value.
4940 2018-02-06 Yao Qi <yao.qi@linaro.org>
4942 * ft32-tdep.c (ft32_read_pc): Remove.
4943 (ft32_write_pc): Remove.
4944 (ft32_gdbarch_init): Update.
4945 * m32r-tdep.c (m32r_read_pc): Remove.
4946 (m32r_gdbarch_init): Update.
4947 * mep-tdep.c (mep_read_pc): Remove.
4948 (mep_gdbarch_init): Update.
4949 * microblaze-tdep.c (microblaze_write_pc): Remove.
4950 (microblaze_gdbarch_init): Update.
4951 * mn10300-tdep.c (mn10300_read_pc): Remove.
4952 (mn10300_write_pc): Remove.
4953 (mn10300_gdbarch_init): Update.
4954 * moxie-tdep.c (moxie_read_pc): Remove.
4955 (moxie_write_pc): Remove.
4956 (moxie_gdbarch_init): Update.
4958 2018-02-06 Yao Qi <yao.qi@linaro.org>
4960 * expprint.c (print_subexp_standard): Handle
4961 OP_F77_UNDETERMINED_ARGLIST.
4962 (dump_subexp_body_standard): Likewise.
4964 2018-02-05 Alan Hayward <alan.hayward@arm.com>
4966 * target-descriptions.c (tdesc_element_visitor) Add empty
4968 (tdesc_type): Move make_gdb_type from here.
4969 (tdesc_type_builtin): Likewise.
4970 (tdesc_type_vector): Likewise.
4971 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4972 (make_gdb_type_struct): Move from tdesc_type_with_fields.
4973 (make_gdb_type_union): Likewise.
4974 (make_gdb_type_flags): Likewise.
4975 (make_gdb_type_enum): Likewise.
4976 (make_gdb_type): New function.
4977 (tdesc_register_type): Use static make_gdb_type.
4979 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
4981 * infcmd.c (default_print_one_register_info): Align natural-format
4982 column values consistently one under another.
4983 (pad_to_column): New function.
4985 2018-02-05 Joel Brobecker <brobecker@adacore.com>
4987 * dwarf2read.c (dwarf2_physname): Move commment.
4989 2018-02-01 Leszek Swirski <leszeks@google.com>
4991 * varobj.c (varobj_formatted_print_options): Allow recursive
4992 pretty printing if pretty printing is enabled.
4994 2018-02-01 Leszek Swirski <leszeks@google.com>
4996 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
4997 names after a structop as a filename.
4999 2018-02-01 Yao Qi <yao.qi@linaro.org>
5001 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5002 (arm_record_coproc_data_proc): Likewise.
5004 2018-02-01 Yao Qi <yao.qi@linaro.org>
5006 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5008 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5010 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5011 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5013 2018-01-31 Pedro Alves <palves@redhat.com>
5015 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5016 * inflow.c (child_terminal_save_inferior): Wrap reference to
5017 tcgetpgrp in HAVE_TERMIOS_H.
5018 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5020 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5021 always iterate over all inferiors.
5022 (gdbsim_cntrl_c): Adjust.
5023 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5025 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5027 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5028 index type is objfile-owned if the element type is as well.
5030 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5034 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5036 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5037 "features/s390x-linux64.c".
5038 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5039 s390_linux32 and s390x_linux64.
5040 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5042 * s390-tdep.c: Include "features/s390-linux32.c" and
5043 "features/s390x-linux64.c".
5044 (s390_tdesc_valid): Add check for tdesc_has_registers.
5045 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5046 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5047 tdesc_s390x_linux64.
5048 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5049 tdesc_s390x_linux64 to...
5050 * s390-tdep.h: ...here.
5052 2018-01-30 Pedro Alves <palves@redhat.com>
5055 * config.in, configure: Regenerate.
5056 * configure.ac: Check for getpgid.
5057 * go32-nat.c (go32_pass_ctrlc): New.
5058 (go32_target): Install it.
5059 * inf-child.c (inf_child_target): Install
5060 child_terminal_save_inferior, child_pass_ctrlc and
5062 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5063 (inf_ptrace_target): No longer install it.
5064 * infcmd.c (interrupt_target_1): Adjust.
5065 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5066 (child_interrupt): Declare.
5067 (inferior::terminal_state): New.
5068 * inflow.c (struct terminal_info): Update comments.
5069 (inferior_process_group): Delete.
5070 (terminal_is_ours): Delete.
5071 (gdb_tty_state): New.
5072 (child_terminal_init): Adjust.
5073 (is_gdb_terminal, sharing_input_terminal_1)
5074 (sharing_input_terminal): New functions.
5075 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5076 Set the process's actual process group in the foreground if
5077 possible. Handle is_ours_for_output/is_ours distinction. Don't
5078 mark terminal as the inferior's if not sharing GDB's terminal.
5079 Don't check attach_flag.
5080 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5081 pass down a target_terminal_state.
5082 (child_terminal_save_inferior): New, factored out from ...
5083 (child_terminal_ours_1): ... this. Handle
5084 target_terminal_state::is_ours_for_output.
5085 (child_interrupt, child_pass_ctrlc): New.
5086 (inflow_inferior_exit): Clear the inferior's terminal_state.
5087 (copy_terminal_info): Copy the inferior's terminal state.
5088 (_initialize_inflow): Remove reference to terminal_is_ours.
5089 * inflow.h (inferior_process_group): Delete.
5090 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5091 * procfs.c (procfs_target): Don't install procfs_interrupt.
5092 (procfs_interrupt): Delete.
5093 * remote.c (remote_serial_quit_handler): Adjust.
5094 (remote_interrupt): Remove ptid parameter. Adjust.
5095 * target-delegates.c: Regenerate.
5096 * target.c: Include "terminal.h".
5097 (target_terminal::terminal_state): Rename to ...
5098 (target_terminal::m_terminal_state): ... this.
5099 (target_terminal::init): Adjust.
5100 (target_terminal::inferior): Adjust to per-inferior
5102 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5103 (target_terminal::ours, target_terminal::ours_for_output): Use
5104 target_terminal_is_ours_kind.
5105 (target_interrupt): Remove ptid parameter. Adjust.
5106 (default_target_pass_ctrlc): Adjust.
5107 * target.h (target_ops::to_terminal_save_inferior): New field.
5108 (target_ops::to_interrupt): Remove ptid_t parameter.
5109 (target_interrupt): Remove ptid_t parameter. Update comment.
5110 (target_pass_ctrlc): Update comment.
5111 * target/target.h (target_terminal_state): New scoped enum,
5113 (target_terminal::terminal_state): ... here.
5114 (target_terminal::inferior): Update comments.
5115 (target_terminal::restore_inferior): New.
5116 (target_terminal::is_inferior, target_terminal::is_ours)
5117 (target_terminal::is_ours_for_output): Adjust.
5118 (target_terminal::scoped_restore_terminal_state): Adjust to
5119 rename, and call restore_inferior() instead of inferior().
5120 (target_terminal::scoped_restore_terminal_state::m_state): Change
5122 (target_terminal::terminal_state): Rename to ...
5123 (target_terminal::m_terminal_state): ... this and change type.
5125 2018-01-30 Pedro Alves <palves@redhat.com>
5127 * linux-nat.c (wait_for_signal): New function.
5128 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5130 (async_terminal_is_ours)
5131 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5132 (linux_nat_add_target): Don't override
5133 to_terminal_inferior/to_terminal_ours.
5135 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5137 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5139 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5141 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5142 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5143 dwarf2_per_objfile_free here.
5144 (dwarf2_per_objfile_free): Remove.
5145 (_initialize_dwarf2_read): Don't register
5146 dwarf2_per_objfile_free as a registry cleanup.
5148 2018-01-27 Eli Zaretskii <eliz@gnu.org>
5150 Avoid compilation errors in MinGW native builds
5152 The error is triggered by including python-internal.h, and the
5155 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5156 from build-gnulib/import/math.h:27,
5157 from d:/usr/Python26/include/pyport.h:235,
5158 from d:/usr/Python26/include/Python.h:58,
5159 from python/python-internal.h:94,
5160 from python/py-arch.c:24:
5161 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5165 This happens because Python headers define 'hypot' to expand t
5166 '_hypot' in the Windows builds.
5167 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5168 'hypoth'. This avoids a compilation error.
5170 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5172 * MAINTAINERS (Write After Approval): Fix ordering.
5174 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5176 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5178 2018-01-26 Alan Modra <amodra@gmail.com>
5180 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5181 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5182 Remove nop. Make const. Comment.
5183 (powerpc32_plt_stub_so_2): New.
5184 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5185 Correct count. Update uses.
5186 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5187 Move common code reading PLT entry word. Correct
5188 powerpc32_plt_stub PLT address calculation.
5189 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5190 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5191 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5192 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5193 (ppc64_standard_linkage8): Likewise.
5194 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5195 Correct insns description.
5196 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5198 2018-01-24 Pedro Alves <palves@redhat.com>
5200 GCC PR libstdc++/83906
5201 * gdbtypes.c (operator==(const dynamic_prop &,
5202 const dynamic_prop &)): New.
5203 (operator==(const range_bounds &, const range_bounds &)): New.
5204 (check_types_equal): Use them instead of memcmp.
5205 * gdbtypes.h (operator==(const dynamic_prop &,
5206 const dynamic_prop &)): Declare.
5207 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5208 (operator==(const range_bounds &, const range_bounds &)): Declare.
5209 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5211 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5213 * s390-linux-tdep.c (s390_record_address_mask)
5214 (s390_record_calc_disp_common, s390_record_calc_disp)
5215 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5216 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5217 (s390_process_record): Move to s390-tdep.c.
5218 (s390_linux_init_abi_any): Adjust.
5219 * s390-tdep.c (s390_record_address_mask)
5220 (s390_record_calc_disp_common, s390_record_calc_disp)
5221 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5222 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5223 (s390_process_record): Moved from s390-linux-tdep.c
5224 (s390_gdbarch_init): Adjust.
5226 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5228 * s390-linux-nat.c (s390-tdep.h): New include.
5229 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5230 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5231 (ALLDEPFILES): Add s390-tdep.c.
5232 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5233 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5234 * s390-tdep.h: ...this. New file.
5235 * s390-linux-tdep.c (s390-tdep.h): New include.
5236 (_initialize_s390_tdep): Rename to...
5237 (_initialize_s390_linux_tdep): ...this and adjust.
5238 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5239 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5241 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5242 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5243 (s390_is_partial_instruction, s390_software_single_step)
5244 (is_non_branch_ril, s390_displaced_step_copy_insn)
5245 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5246 (s390_prologue_data, s390_addr, s390_store, s390_load)
5247 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5248 (s390_register_call_saved, s390_guess_tracepoint_registers)
5249 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5250 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5251 (s390_pseudo_register_name, s390_pseudo_register_type)
5252 (s390_pseudo_register_read, s390_pseudo_register_write)
5253 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5254 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5255 (s390_addr_bits_remove, s390_address_class_type_flags)
5256 (s390_address_class_type_flags_to_name)
5257 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5258 (s390_function_arg_float, s390_function_arg_vector)
5259 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5260 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5261 (s390_frame_align, s390_register_return_value, s390_return_value)
5262 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5263 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5264 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5265 (s390_trad_frame_prev_register, s390_unwind_cache)
5266 (s390_prologue_frame_unwind_cache)
5267 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5268 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5269 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5270 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5271 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5272 (s390_frame_base_address, s390_local_base_address)
5273 (s390_frame_base, s390_gcc_target_options)
5274 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5275 (s390_validate_reg_range, s390_tdesc_valid)
5276 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5277 * s390-tdep.c: ...this. New file.
5279 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5281 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5282 (s390_process_record, s390_gdbarch_tdep_alloc)
5283 (s390_linux_init_abi_any): Use/set new hook.
5285 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5287 * s390-linux-tdep.c (osabi.h): New include.
5288 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5289 (s390_linux_init_abi_any): New functions.
5290 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5292 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5294 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5295 tdesc_has_registers check
5297 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5299 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5300 (s390_validate_reg_range): New macro.
5301 (s390_gdbarch_init): Adjust.
5303 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5305 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5306 (s390_gdbarch_tdep_alloc): Adjust.
5307 (s390_gdbarch_init): Adjust.
5309 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5311 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5312 <have_tdb>: Change type to bool.
5313 (s390_gdbarch_tdep_alloc): Adjust.
5314 (s390_gdbarch_init): Adjust.
5316 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5318 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5319 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5320 (s390_gdbarch_tdep_alloc): New function.
5321 (s390_gdbarch_init): Allocate tdep at start and use its fields
5322 instead of separate variables.
5324 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5326 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5327 when looking for cached gdbarch and add comment for remaining.
5329 2018-01-22 Pedro Alves <palves@redhat.com>
5330 Sergio Durigan Junior <sergiodj@redhat.com>
5332 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5335 2018-01-22 Maciej W. Rozycki <macro@mips.com>
5337 * MAINTAINERS: Update my company e-mail address.
5339 2018-01-22 Yao Qi <yao.qi@linaro.org>
5341 * regcache.c (cooked_write_test): New function.
5342 (_initialize_regcache): Register the test.
5344 2018-01-22 Yao Qi <yao.qi@linaro.org>
5346 * ia64-tdep.c (ia64_pseudo_register_read): Call
5347 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5348 * m32c-tdep.c (m32c_cat_read): Likewise.
5349 (m32c_r3r2r1r0_read): Likewise.
5350 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5351 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5353 2018-01-22 Yao Qi <yao.qi@linaro.org>
5355 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5356 method raw_read instead of regcache_raw_read.
5357 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5358 * arm-tdep.c (arm_neon_quad_read): Likewise.
5359 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5360 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5361 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5362 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5363 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5364 (i386_pseudo_register_read_into_value): Likewise.
5365 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5366 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5367 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5368 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5369 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5370 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5371 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5372 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5373 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5375 2018-01-22 Yao Qi <yao.qi@linaro.org>
5377 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5378 * configure.tgt: Remove target mt.
5379 * mt-tdep.c: Remove.
5380 * regcache.c (cooked_read_test): Remove the check for mt.
5382 2018-01-22 Yao Qi <yao.qi@linaro.org>
5384 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5385 instead of gdbarch_pseudo_register_read_value.
5387 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5389 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5392 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5394 * linespec.c (create_sals_line_offset): Remove code that preserved
5395 the symtab_and_line's line number.
5397 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5399 * varobj.c (varobj_create): Don't set valid_block when creating a
5402 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5404 * varobj.c (varobj_create): Remove out of date comment.
5406 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5409 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5410 updating innermost block.
5411 * parse.c (innermost_block_tracker::update): Take extra type
5412 parameter, and check types match before updating innermost block.
5413 (write_dollar_variable): Update innermost block for registers.
5414 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5415 (innermost_block_tracker::innermost_block_tracker): Initialise
5417 (innermost_block_tracker::reset): Take type parameter.
5418 (innermost_block_tracker::update): Take type parameter, and pass
5419 type through as needed.
5420 (innermost_block_tracker::m_types): New member.
5421 * varobj.c (varobj_create): Pass type when reseting innermost
5424 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5426 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5427 * ada-lang.c (resolve_subexp): Likewise.
5428 * breakpoint.c (set_breakpoint_condition) Likewise.
5429 (watch_command_1) Likewise.
5430 * c-exp.y (variable): Likewise.
5431 * d-exp.y (PrimaryExpression): Likewise.
5432 * f-exp.y (variable): Likewise.
5433 * go-exp.y (variable): Likewise.
5434 * m2-exp.y (variable): Likewise.
5435 * objfiles.c (objfile::~objfile): Likewise.
5436 * p-exp.y (variable): Likewise.
5437 * parse.c (innermost_block): Change type.
5438 * parser-defs.h (class innermost_block_tracker): New.
5439 (innermost_block): Change to innermost_block_tracker.
5440 * printcmd.c (display_command): Switch to innermost_block API.
5441 (do_one_display): Likewise.
5442 * rust-exp.y (do_one_display): Likewise.
5443 * symfile.c (clear_symtab_users): Likewise.
5444 * varobj.c (varobj_create): Switch to innermost_block API, replace
5445 use of innermost_block with block stored on varobj object.
5447 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5449 * expression.h (innermost_block): Remove declaration.
5450 * varobj.c: Add 'parser-defs.h' include.
5452 2018-01-19 Tom Tromey <tom@tromey.com>
5454 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5455 symbols in the static and global blocks.
5457 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5459 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5460 gdb_ptrace.h, and move including gdb_wait.h ...
5461 * nat/linux-ptrace.h: ... to here.
5463 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5465 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5466 inf_ptrace_detach_success.
5467 (inf_ptrace_detach_success): Add inferior parameter, use it
5468 instead of inferior_ptid, pass it to detach_inferior.
5469 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5471 * inferior.c (detach_inferior): Add overload that takes an
5473 * inferior.h (detach_inferior): Likewise.
5474 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5475 use inferior_ptid, adjust call to inf_ptrace_detach_success.
5476 * linux-thread-db.c (thread_db_detach): Use inf parameter.
5478 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5480 * target.h (struct target_ops) <to_detach>: Add inferior
5482 (target_detach): Likewise.
5483 * target.c (dispose_inferior): Pass inferior down.
5484 (target_detach): Pass inferior down. Assert that it is equal to
5485 the current inferior.
5486 * aix-thread.c (aix_thread_detach): Pass inferior down.
5487 * corefile.c (core_file_command): Pass current_inferior() down.
5488 * corelow.c (core_detach): Add inferior parameter.
5489 * darwin-nat.c (darwin_detach): Likewise.
5490 * gnu-nat.c (gnu_detach): Likewise.
5491 * inf-ptrace.c (inf_ptrace_detach): Likewise.
5492 * infcmd.c (detach_command): Pass current_inferior() down to
5494 * infrun.c (follow_fork_inferior): Pass parent_inf to
5496 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5498 * linux-nat.c (linux_nat_detach): Add inferior parameter.
5499 * linux-thread-db.c (thread_db_detach): Likewise.
5500 * nto-procfs.c (procfs_detach): Likewise.
5501 * procfs.c (procfs_detach): Likewise.
5502 * record.c (record_detach): Likewise.
5503 * record.h (struct inferior): Forward-declare.
5504 (record_detach): Add inferior parameter.
5505 * remote-sim.c (gdbsim_detach): Likewise.
5506 * remote.c (remote_detach_1): Likewise.
5507 (remote_detach): Likewise.
5508 (extended_remote_detach): Likewise.
5509 * sol-thread.c (sol_thread_detach): Likewise.
5510 * target-debug.h (target_debug_print_inferior_p): New macro.
5511 * target-delegates.c: Re-generate.
5512 * top.c (kill_or_detach): Pass inferior down to target_detach.
5513 * windows-nat.c (windows_detach): Add inferior parameter.
5515 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5517 * target.h (struct target_ops) <to_detach>: Remove args
5519 (target_detach): Likewise.
5520 * target.c (dispose_inferior): Adjust.
5521 (target_detach): Remove args parameter, adjust.
5522 * aix-thread.c (aix_thread_detach): Adjust.
5523 * corefile.c (core_file_command): Adjust.
5524 * corelow.c (core_detach): Adjust.
5525 * darwin-nat.c (darwin_detach): Adjust.
5526 * gnu-nat.c (gnu_detach): Adjust.
5527 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5528 * infcmd.c (detach_command): Adjust
5529 * infrun.c (follow_fork_inferior): Adjust.
5530 (handle_vfork_child_exec_or_exit): Adjust.
5531 * linux-fork.c (linux_fork_detach): Remove args parameter.
5532 * linux-fork.h (linux_fork_detach): Likewise.
5533 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5534 * linux-thread-db.c (thread_db_detach): Likewise.
5535 * nto-procfs.c (procfs_detach): Likewise.
5536 * procfs.c (procfs_detach): Likewise.
5537 (do_detach): Remove signo parameter.
5538 * record.c (record_detach): Remove args parameter.
5539 * record.h (record_detach): Likewise.
5540 * remote-sim.c (gdbsim_detach): Likewise.
5541 * remote.c (remote_detach_1): Likewise.
5542 (remote_detach): Likewise.
5543 (extended_remote_detach): Likewise.
5544 * sol-thread.c (sol_thread_detach): Likewise.
5545 * target-delegates.c: Re-generate.
5546 * top.c (struct qt_args) <args>: Remove field.
5547 (kill_or_detach): Don't pass args.
5548 (quit_force): Don't set args.
5549 * windows-nat.c (windows_detach): Remove args parameter.
5551 2018-01-19 Yao Qi <yao.qi@linaro.org>
5553 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5554 (arm_linux_init_abi): Install it.
5556 2018-01-19 Yao Qi <yao.qi@linaro.org>
5558 * osabi.c (gdb_osabi_names): Extend the regexp for
5559 arm-linux-gnueabihf.
5561 2018-01-18 Yao Qi <yao.qi@linaro.org>
5563 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5565 (abbrev_table::add_abbrev): Update.
5566 (abbrev_table::lookup_abbrev): Update.
5568 2018-01-18 Yao Qi <yao.qi@linaro.org>
5570 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5572 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
5574 * compile/compile.c (compile_to_object): Convert "triplet_rx"
5577 2018-01-17 Tom Tromey <tom@tromey.com>
5579 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
5581 2018-01-17 Tom Tromey <tom@tromey.com>
5583 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5584 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5585 (create_array_type_with_stride): Update.
5586 * dwarf2read.c (set_die_type): Update.
5588 2018-01-17 Tom Tromey <tom@tromey.com>
5590 * dwarf2read.c (delayed_method_info): Remove typedef.
5591 (dwarf2_cu::method_info): Now a std::vector.
5592 (add_to_method_list): Update.
5593 (free_delayed_list): Remove.
5594 (compute_delayed_physnames): Update.
5595 (process_full_comp_unit, process_full_type_unit): Clear the method
5596 list. Remove cleanups.
5597 (psymtab_include_file_name): Add name_holder parameter. Use
5599 (dwarf_decode_lines): Update.
5601 2018-01-17 Tom Tromey <tom@tromey.com>
5602 Simon Marchi <simon.marchi@ericsson.com>
5604 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5605 (dwarf2_per_objfile::free_cached_comp_units)
5606 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5607 (init_cutu_and_read_dies_no_follow): Update.
5608 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5609 (dwarf2_cu::~dwarf2_cu): New.
5610 (free_heap_comp_unit, free_stack_comp_unit): Remove.
5611 (age_cached_comp_units, free_one_cached_comp_unit): Update.
5613 2018-01-17 Tom Tromey <tom@tromey.com>
5614 Simon Marchi <simon.marchi@ericsson.com>
5616 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5617 (struct die_reader_specs) <abbrev_table>: New member.
5618 (struct abbrev_table): Add constructor.
5619 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5620 <abbrev_obstack>: Now an auto_obstack.
5621 (abbrev_table_up): New typedef.
5622 (init_cu_die_reader): Add abbrev_table parameter.
5623 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5624 Add result_dwo_abbrev_table.
5625 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5626 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5628 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5630 (skip_children): Update.
5631 (abbrev_table::alloc_abbrev): Rename from
5632 abbrev_table_alloc_abbrev.
5633 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5634 (abbrev_table::lookup_abbrev): Rename from
5635 abbrev_table_lookup_abbrev.
5636 (abbrev_table_read_table): Return abbrev_table_up.
5637 (abbrev_table_free, abbrev_table_free_cleanup)
5638 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5639 (load_partial_dies): Update.
5641 2018-01-17 Tom Tromey <tom@tromey.com>
5643 * dwarf2read.c (dwarf2_compute_name): Update comment.
5644 (read_func_scope, read_variable): Update.
5645 (new_symbol): Remove.
5646 (new_symbol_full): Rename to new_symbol.
5648 2018-01-17 Mike Gulick <mgulick@mathworks.com>
5651 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5652 a warning instead of throwing an error, set section size to 0 and return
5654 * gdb_bfd.h (gdb_bfd_map_section): Update description.
5656 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5658 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5660 (linux_ptrace_attach_fail_reason_string): Likewise.
5661 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5663 (linux_ptrace_attach_fail_reason_string): Likewise.
5664 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5666 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5668 * linux-nat.c (linux_nat_attach): Remove xstrdup.
5670 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5673 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5674 checking for fs_base/gs_base fields in struct user_regs_struct.
5675 * configure: Regenerate.
5677 2018-01-17 Yao Qi <yao.qi@linaro.org>
5679 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5681 (aarch64_linux_init_abi): Install it to gdbarch hook
5684 2018-01-15 Pedro Alves <palves@redhat.com>
5686 * common/signals-state-save-restore.c
5687 (save_original_signals_state): Fix typos.
5689 2017-01-12 Tom Tromey <tom@tromey.com>
5690 Sergio Durigan Junior <sergiodj@redhat.com>
5692 * Makefile.in (install-only): Install gdb-add-index.
5694 2018-01-12 John Baldwin <jhb@FreeBSD.org>
5696 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5698 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5700 * infrun.c (keep_going_pass_signal): Clear step-over info when
5701 insert_breakpoints fails.
5703 2018-01-11 Pedro Alves <palves@redhat.com>
5706 * infrun.c (resume): Rename to ...
5707 (resume_1): ... this.
5708 (resume): Reimplement as wrapper around resume_1.
5710 2018-01-11 Pedro Alves <palves@redhat.com>
5713 * remote.c (remote_parse_stop_reply): Default to the last-set
5714 general thread instead of to 'magic_null_ptid'.
5716 2018-01-10 Pedro Alves <palves@redhat.com>
5718 * language.h (language_get_symbol_name_matcher): Rename ...
5719 (get_symbol_name_matcher): ... this.
5720 * language.c (language_get_symbol_name_matcher): Ditto.
5721 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5724 2018-01-10 Pedro Alves <palves@redhat.com>
5728 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5729 Adjust to use language_get_symbol_name_matcher instead of
5730 language_defn::la_get_symbol_name_matcher.
5731 * language.c (language_get_symbol_name_matcher): If in Ada mode
5732 and the lookup name is a verbatim match, return Ada's matcher.
5733 * language.h (language_get_symbol_name_matcher): Adjust comment.
5734 (ada_lookup_name_info::verbatim_p):: New method.
5736 2018-01-10 Pedro Alves <palves@redhat.com>
5739 * ada-lang.c (ada_collect_symbol_completion_matches): If the
5740 minsym's language is language_auto or language_cplus, pass down
5741 language_ada instead.
5742 * symtab.c (compare_symbol_name): Don't frob symbol language here.
5744 2018-01-10 Pedro Alves <palves@redhat.com>
5747 * minsyms.c (linkage_name_str): New function.
5748 (iterate_over_minimal_symbols): Use it.
5750 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5752 * NEWS: Document that 'info proc' now works on FreeBSD.
5754 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5756 * configure.ac: Check for kinfo_getfile in libutil.
5757 * configure: Regenerate.
5758 * config.in: Regenerate.
5759 * fbsd-nat.c: Include "fbsd-tdep.h".
5760 (fbsd_fetch_cmdline): New.
5761 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5762 rather than calling error.
5763 (fbsd_info_proc): New.
5764 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5765 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5766 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5768 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5770 * fbsd-nat.c (struct free_deleter): Remove.
5771 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5773 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5775 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5776 NULL for an empty pathname.
5778 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5780 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5781 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5782 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5783 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5784 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5785 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5786 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5787 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5788 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5789 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5790 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5791 (fbsd_core_fetch_timeval, fbsd_print_sigset)
5792 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5793 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
5794 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5796 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
5798 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5799 (gnu_xfer_auxv): New function.
5800 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5803 2018-01-08 Yao Qi <yao.qi@linaro.org>
5804 Simon Marchi <simon.marchi@ericsson.com>
5806 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5808 (COMMON_OBS): Remove selftest.o.
5809 * configure.ac: Append selftest-arch.c and common/selftest.c to
5810 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
5811 * configure: Re-generated.
5812 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5814 (maintenance_info_selftests): Likewise.
5816 2018-01-08 Xavier Roirand <roirand@adacore.com>
5818 * ada-valprint.c (val_print_packed_array_elements): Use
5819 proper number of elements when printing an array indexed
5820 by an enumeration type.
5822 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5824 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5825 (dw2_get_file_names_reader): Adjust.
5826 (lookup_dwo_signatured_type): Adjust.
5827 (lookup_dwp_signatured_type): Adjust.
5828 (lookup_signatured_type): Adjust.
5829 (create_type_unit_group): Adjust.
5830 (get_type_unit_group): Adjust.
5831 (process_psymtab_comp_unit_reader): Adjust.
5832 (build_type_psymtabs_reader): Adjust.
5833 (scan_partial_symbols): Adjust.
5834 (add_partial_symbol): Adjust.
5835 (add_partial_subprogram): Adjust.
5836 (peek_die_abbrev): Adjust.
5837 (fixup_go_packaging): Adjust.
5838 (process_imported_unit_die): Adjust.
5839 (dwarf2_compute_name): Adjust.
5840 (dwarf2_physname): Adjust.
5841 (read_import_statement): Adjust.
5842 (handle_DW_AT_stmt_list): Adjust.
5843 (read_file_scope): Adjust.
5844 (read_func_scope): Adjust.
5845 (read_lexical_block_scope): Adjust.
5846 (read_call_site_scope): Adjust.
5847 (read_variable): Adjust.
5848 (dwarf2_rnglists_process): Adjust.
5849 (dwarf2_ranges_process): Adjust.
5850 (dwarf2_ranges_read): Adjust.
5851 (dwarf2_get_pc_bounds): Adjust.
5852 (dwarf2_record_block_ranges): Adjust.
5853 (dwarf2_add_field): Adjust.
5854 (dwarf2_add_member_fn): Adjust.
5855 (read_structure_type): Adjust.
5856 (process_structure_scope): Adjust.
5857 (read_enumeration_type): Adjust.
5858 (read_array_type): Adjust.
5859 (mark_common_block_symbol_computed): Adjust.
5860 (read_common_block): Adjust.
5861 (read_namespace_type): Adjust.
5862 (read_namespace): Adjust.
5863 (read_module_type): Adjust.
5864 (read_tag_pointer_type): Adjust.
5865 (read_tag_ptr_to_member_type): Adjust.
5866 (read_tag_string_type): Adjust.
5867 (read_subroutine_type): Adjust.
5868 (read_typedef): Adjust.
5869 (read_base_type): Adjust.
5870 (attr_to_dynamic_prop): Adjust.
5871 (read_subrange_type): Adjust.
5872 (read_unspecified_type): Adjust.
5873 (dwarf2_read_abbrevs): Adjust.
5874 (load_partial_dies): Adjust.
5875 (read_partial_die): Adjust.
5876 (find_partial_die): Adjust.
5877 (guess_partial_die_structure_name): Adjust.
5878 (fixup_partial_die): Adjust.
5879 (read_attribute_value): Adjust.
5880 (read_addr_index): Adjust.
5881 (read_addr_index_from_leb128): Adjust.
5882 (read_str_index): Adjust.
5883 (dwarf2_string_attr): Adjust.
5884 (get_debug_line_section): Adjust.
5885 (dwarf_decode_line_header): Adjust.
5886 (lnp_state_machine::check_line_address): Adjust.
5887 (dwarf_decode_lines_1): Adjust.
5888 (dwarf_decode_lines): Adjust.
5889 (dwarf2_start_symtab): Adjust.
5890 (var_decode_location): Adjust.
5891 (new_symbol_full): Adjust.
5892 (dwarf2_const_value_data): Adjust.
5893 (dwarf2_const_value_attr): Adjust.
5894 (dwarf2_const_value): Adjust.
5896 (die_containing_type): Adjust.
5897 (build_error_marker_type): Adjust.
5898 (lookup_die_type): Adjust.
5899 (guess_full_die_structure_name): Adjust.
5900 (anonymous_struct_prefix): Adjust.
5901 (determine_prefix): Adjust.
5902 (dwarf2_name): Adjust.
5903 (follow_die_ref_or_sig): Adjust.
5904 (follow_die_offset): Adjust.
5905 (follow_die_ref): Adjust.
5906 (follow_die_sig_1): Adjust.
5907 (follow_die_sig): Adjust.
5908 (get_signatured_type): Adjust.
5909 (get_DW_AT_signature_type): Adjust.
5910 (decode_locdesc): Adjust.
5911 (dwarf_decode_macros): Adjust.
5912 (cu_debug_loc_section): Adjust.
5913 (fill_in_loclist_baton): Adjust.
5914 (dwarf2_symbol_mark_computed): Adjust.
5915 (init_one_comp_unit): Don't assign
5916 dwarf2_cu::dwarf2_per_objfile.
5917 (set_die_type): Adjust.
5919 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5921 * dwarf2read.c (struct mapped_debug_names): Add constructor.
5922 <dwarf2_per_objfile>: New field.
5923 (dwarf2_per_objfile): Remove global.
5924 (get_dwarf2_per_objfile): New function.
5925 (set_dwarf2_per_objfile): New function.
5926 (dwarf2_build_psymtabs_hard): Change objfile parameter to
5928 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5929 (read_abbrev_offset): Likewise.
5930 (read_indirect_string): Likewise.
5931 (read_indirect_line_string): Likewise.
5932 (read_indirect_string_at_offset): Likewise.
5933 (read_indirect_string_from_dwz): Likewise.
5934 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5936 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5937 (create_all_comp_units): Change objfile parameter to
5939 (create_all_type_units): Likewise.
5940 (process_queue): Add dwarf2_per_objfile parameter.
5941 (read_and_check_comp_unit_head): Likewise.
5942 (lookup_dwo_unit_in_dwp): Likewise.
5943 (get_dwp_file): Likewise.
5944 (process_cu_includes): Likewise.
5945 (struct free_dwo_file_cleanup_data): New struct.
5946 (dwarf2_has_info): Use get_dwarf2_per_objfile and
5947 set_dwarf2_per_objfile.
5948 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5949 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5950 context, adjust calls.
5951 (dw2_instantiate_symtab): Likewise.
5952 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5953 (dw2_get_cu): Likewise.
5954 (create_cu_from_index_list): Change objfile parameter to
5956 (create_cus_from_index_list): Get dwarf2_per_objfile from
5957 context, adjust calls.
5958 (create_cus_from_index): Likewise.
5959 (create_signatured_type_table_from_index): Change objfile
5960 parameter to dwarf2_per_objfile.
5961 (create_signatured_type_table_from_debug_names): Change objfile
5962 parameter to dwarf2_per_objfile.
5963 (create_addrmap_from_index): Likewise.
5964 (create_addrmap_from_aranges): Likewise.
5965 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5966 (dw2_setup): Remove.
5967 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5969 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5970 get_dwarf2_per_objfile.
5971 (dw2_forget_cached_source_info): Likewise.
5972 (dw2_map_symtabs_matching_filename): Likewise.
5973 (struct dw2_symtab_iterator) <index>: Remove.
5974 <dwarf2_per_objfile>: New field.
5975 (dw2_symtab_iter_init): Replace index parameter with
5977 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5978 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5979 (dw2_print_stats): Likewise.
5980 (dw2_dump): Likewise.
5981 (dw2_expand_symtabs_for_function): Likewise.
5982 (dw2_expand_all_symtabs): Likewise.
5983 (dw2_expand_symtabs_with_fullname): Likewise.
5984 (dw2_expand_marked_cus): Replace index and objfile parameters
5985 with dwarf2_per_objfile.
5986 (dw_expand_symtabs_matching_file_matcher): Add
5987 dwarf2_per_objfile parameter and adjust calls.
5988 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
5990 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
5991 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
5993 (create_cus_from_debug_names_list): Replace objfile parameter
5994 with dwarf2_per_objfile and adjust calls.
5995 (create_cus_from_debug_names): Likewise.
5996 (dwarf2_read_debug_names): Likewise.
5997 (mapped_debug_names::namei_to_name): Adjust call.
5998 (dw2_debug_names_iterator::next): Likewise.
5999 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6000 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6001 (dw2_debug_names_dump): Likewise.
6002 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6003 (dw2_debug_names_expand_symtabs_matching): Likewise.
6004 (dwarf2_initialize_objfile): Likewise.
6005 (dwarf2_build_psymtabs): Likewise.
6006 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6008 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6009 (read_and_check_comp_unit_head): Likewise.
6010 (read_abbrev_offset): Likewise.
6011 (create_debug_type_hash_table): Likewise.
6012 (create_debug_types_hash_table): Likewise.
6013 (create_all_type_units): Replace objfile parameter with
6015 (add_type_unit): Add dwarf2_per_objfile parameter.
6016 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6017 with dwarf2_per_objfile.
6018 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6019 (lookup_dwp_signatured_type): Likewise.
6020 (lookup_signatured_type): Likewise.
6021 (read_cutu_die_from_dwo): Likewise.
6022 (init_tu_and_read_dwo_dies): Likewise.
6023 (init_cutu_and_read_dies): Likewise.
6024 (init_cutu_and_read_dies_no_follow): Likewise.
6025 (allocate_type_unit_groups_table): Add objfile parameter.
6026 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6027 (get_type_unit_group): Likewise.
6028 (process_psymtab_comp_unit): Update call.
6029 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6030 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6031 (print_tu_stats): Likewise.
6032 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6034 (build_type_psymtabs): Change objfile parameter to
6036 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6037 passed in void* parameter.
6038 (process_skeletonless_type_units): Change objfile parameter to
6040 (set_partial_user): Likewise.
6041 (dwarf2_build_psymtabs_hard): Likewise.
6042 (read_comp_units_from_section): Likewise.
6043 (create_all_comp_units): Likewise.
6044 (scan_partial_symbols): Update calls.
6045 (add_partial_symbol): Likewise.
6046 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6047 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6048 (process_queue): Add dwarf2_per_objfile parameter.
6049 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6050 (compute_compunit_symtab_includes): Likewise.
6051 (process_cu_includes): Add dwarf2_per_objfile parameter.
6052 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6053 (process_full_type_unit): Likewise.
6054 (process_imported_unit_die): Update call.
6055 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6056 (read_file_scope): Likewise.
6057 (allocate_dwo_file_hash_table): Add objfile parameter.
6058 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6059 (create_cus_hash_table): Likewise.
6060 (create_dwp_hash_table): Likewise.
6061 (create_dwo_unit_in_dwp_v1): Likewise.
6062 (create_dwp_v2_section): Likewise.
6063 (create_dwo_unit_in_dwp_v2): Likewise.
6064 (lookup_dwo_unit_in_dwp): Likewise.
6065 (try_open_dwop_file): Likewise.
6066 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6067 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6068 cleanup to include a reference to dwarf2_per_objfile.
6069 (open_dwp_file): Add dwarf2_per_objfile parameter.
6070 (open_and_init_dwp_file): Likewise.
6071 (get_dwp_file): Likewise.
6072 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6073 (queue_and_load_all_dwo_tus): Update call.
6074 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6076 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6077 (dwarf2_ranges_process): Likewise.
6078 (dwarf2_get_pc_bounds): Likewise.
6079 (mark_common_block_symbol_computed): Likewise.
6080 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6081 (dwarf2_read_abbrevs): Update call.
6082 (read_partial_die): Use dwarf2_per_objfile from cu.
6083 (find_partial_die): Likewise.
6084 (fixup_partial_die): Likewise.
6085 (read_attribute_value): Likewise.
6086 (read_indirect_string_at_offset_from): Add objfile parameter.
6087 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6089 (read_indirect_string_from_dwz): Add objfile parameter.
6090 (read_indirect_string): Add objfile parameter.
6091 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6092 (read_addr_index): Use dwarf2_per_objfile from cu.
6093 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6095 (read_str_index): Use dwarf2_per_objfile from cu.
6096 (get_debug_line_section): Likewise.
6097 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6098 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6099 (new_symbol_full): Use dwarf2_per_objfile from cu.
6100 (build_error_marker_type): Likewise.
6101 (lookup_die_type): Likewise.
6102 (determine_prefix): Likewise.
6103 (follow_die_offset): Likewise.
6104 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6105 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6106 (dwarf2_fetch_die_type_sect_off): Likewise.
6107 (dwarf2_get_die_type): Likewise.
6108 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6109 (get_signatured_type): Likewise.
6110 (get_DW_AT_signature_type): Likewise.
6111 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6112 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6113 (cu_debug_loc_section): Likewise.
6114 (fill_in_loclist_baton): Likewise.
6115 (dwarf2_symbol_mark_computed): Likewise.
6116 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6118 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6120 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6121 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6122 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6123 (set_die_type): Use dwarf2_free_objfile from cu.
6124 (get_die_type_at_offset): Likewise.
6125 (dwarf2_per_objfile_free): Don't assign global variable.
6126 (debug_names) <constructor>: Add dwarf2_per_objfile
6127 parameter, update m_debugstrlookup construction.
6128 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6130 <m_dwarf2_per_objfile>: New field.
6131 <lookup>: Use m_dwarf2_per_objfile.
6132 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6133 (psyms_seen_size): Likewise.
6134 (write_gdbindex): Replace objfile parameter with
6136 (write_debug_names): Likewise.
6137 (write_psymtabs_to_index): Likewise.
6138 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6141 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6143 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6144 <dwarf2_per_objfile>: New field.
6145 (struct dwarf2_per_cu_data) <objfile>: Remove.
6146 <dwarf2_per_objfile>: New field.
6147 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6149 (create_signatured_type_table_from_index): Likewise.
6150 (create_debug_type_hash_table): Likewise.
6151 (fill_in_sig_entry_from_dwo_entry): Likewise.
6152 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6153 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6155 (create_partial_symtab): Access objfile through
6157 (process_psymtab_comp_unit_reader): Likewise.
6158 (read_comp_units_from_section): Likewise.
6159 (scan_partial_symbols): Likewise.
6160 (add_partial_symbol): Likewise.
6161 (add_partial_subprogram): Likewise.
6162 (peek_die_abbrev): Likewise.
6163 (fixup_go_packaging): Likewise.
6164 (process_full_comp_unit): Likewise.
6165 (process_full_type_unit): Likewise.
6166 (process_imported_unit_die): Likewise.
6167 (dwarf2_compute_name): Likewise.
6168 (dwarf2_physname): Likewise.
6169 (read_import_statement): Likewise.
6170 (create_cus_hash_table): Assign dwarf2_physname instead of
6172 (read_func_scope): Access objfile through dwarf2_per_objfile.
6173 (read_lexical_block_scope): Likewise.
6174 (read_call_site_scope): Likewise.
6175 (read_variable): Likewise.
6176 (dwarf2_rnglists_process): Likewise.
6177 (dwarf2_ranges_process): Likewise.
6178 (dwarf2_ranges_read): Likewise.
6179 (dwarf2_record_block_ranges): Likewise.
6180 (dwarf2_add_field): Likewise.
6181 (dwarf2_add_member_fn): Likewise.
6182 (read_structure_type): Likewise.
6183 (process_structure_scope): Likewise.
6184 (read_enumeration_type): Likewise.
6185 (read_array_type): Likewise.
6186 (read_common_block): Likewise.
6187 (read_namespace_type): Likewise.
6188 (read_namespace): Likewise.
6189 (read_module_type): Likewise.
6190 (read_tag_pointer_type): Likewise.
6191 (read_tag_ptr_to_member_type): Likewise.
6192 (read_tag_string_type): Likewise.
6193 (read_subroutine_type): Likewise.
6194 (read_typedef): Likewise.
6195 (read_base_type): Likewise.
6196 (attr_to_dynamic_prop): Likewise.
6197 (read_subrange_type): Likewise.
6198 (read_unspecified_type): Likewise.
6199 (load_partial_dies): Likewise.
6200 (read_partial_die): Likewise.
6201 (find_partial_die): Likewise.
6202 (guess_partial_die_structure_name): Likewise.
6203 (fixup_partial_die): Likewise.
6204 (read_attribute_value): Likewise.
6205 (read_addr_index_from_leb128): Likewise.
6206 (dwarf2_read_addr_index): Likewise.
6207 (dwarf2_string_attr): Likewise.
6208 (lnp_state_machine::check_line_address): Likewise.
6209 (dwarf_decode_lines_1): Likewise.
6210 (dwarf_decode_lines): Likewise.
6211 (dwarf2_start_symtab): Likewise.
6212 (var_decode_location): Likewise.
6213 (new_symbol_full): Likewise.
6214 (dwarf2_const_value_data): Likewise.
6215 (dwarf2_const_value_attr): Likewise.
6216 (dwarf2_const_value): Likewise.
6217 (die_type): Likewise.
6218 (die_containing_type): Likewise.
6219 (lookup_die_type): Likewise.
6220 (guess_full_die_structure_name): Likewise.
6221 (anonymous_struct_prefix): Likewise.
6222 (dwarf2_name): Likewise.
6223 (follow_die_ref_or_sig): Likewise.
6224 (follow_die_offset): Likewise.
6225 (follow_die_ref): Likewise.
6226 (dwarf2_fetch_die_loc_sect_off): Likewise.
6227 (dwarf2_fetch_constant_bytes): Likewise.
6228 (dwarf2_fetch_die_type_sect_off): Likewise.
6229 (dwarf2_get_die_type): Likewise.
6230 (follow_die_sig): Likewise.
6231 (decode_locdesc): Likewise.
6232 (dwarf2_per_cu_objfile): Likewise.
6233 (dwarf2_per_cu_text_offset): Likewise.
6234 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6236 (set_die_type): Access objfile through
6239 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6241 * valprint.c (converted_character_d): Remove typedef.
6242 (DEF_VEC_O (converted_character_d)): Remove.
6243 (count_next_character): Use std::vector.
6244 (print_converted_chars_to_obstack): Likewise.
6245 (generic_printstr): Likewise.
6247 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6249 * xml-support.h (struct gdb_xml_value): Add constructor.
6250 <value>: Change type to unique_xmalloc_ptr.
6251 (gdb_xml_value_s): Remove typedef.
6252 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6253 (gdb_xml_element_start_handler): Change parameter type to
6255 (xml_find_attribute): Likewise.
6256 * xml-support.c (xml_find_attribute): Change parameter type to
6257 std::vector and adjust.
6258 (gdb_xml_values_cleanup): Remove.
6259 (gdb_xml_parser::start_element): Adjust to std::vector.
6260 (xinclude_start_include): Change paraeter type to std::vector
6262 * btrace.c (check_xml_btrace_version): Likewise.
6263 (parse_xml_btrace_block): Likewise.
6264 (parse_xml_btrace_pt_config_cpu): Likewise.
6265 (parse_xml_btrace_pt): Likewise.
6266 (parse_xml_btrace_conf_bts): Likewise.
6267 (parse_xml_btrace_conf_pt): Likewise.
6268 * memory-map.c (memory_map_start_memory): Likewise.
6269 (memory_map_start_property): Likewise.
6270 * osdata.c (osdata_start_osdata): Likewise.
6271 (osdata_start_item): Likewise.
6272 (osdata_start_column): Likewise.
6273 * remote.c (start_thread): Likewise.
6274 * solib-aix.c (library_list_start_library): Likewise.
6275 (library_list_start_list): Likewise.
6276 * solib-svr4.c (library_list_start_library): Likewise.
6277 (svr4_library_list_start_list): Likewise.
6278 * solib-target.c (library_list_start_segment): Likewise.
6279 (library_list_start_section): Likewise.
6280 (library_list_start_library): Likewise.
6281 (library_list_start_list): Likewise.
6282 * tracepoint.c (traceframe_info_start_memory): Likewise.
6283 (traceframe_info_start_tvar): Likewise.
6284 * xml-syscall.c (syscall_start_syscall): Likewise.
6285 * xml-tdesc.c (tdesc_start_target): Likewise.
6286 (tdesc_start_feature): Likewise.
6287 (tdesc_start_reg): Likewise.
6288 (tdesc_start_union): Likewise.
6289 (tdesc_start_struct): Likewise.
6290 (tdesc_start_flags): Likewise.
6291 (tdesc_start_enum): Likewise.
6292 (tdesc_start_field): Likewise.
6293 (tdesc_start_enum_value): Likewise.
6294 (tdesc_start_vector): Likewise.
6296 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6298 * extension.h (struct xmethod_worker) <clone>: Remove.
6299 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6301 (python_xmethod_worker::clone): Remove.
6302 * valops.c (find_overload_match): Use std::move instead of
6305 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6307 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6308 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6309 <free_xmethod_worker_data>: Remove.
6310 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6311 <get_xmethod_arg_types>: Remove.
6312 <get_xmethod_result_type>: Remove.
6313 <invoke_xmethod>: Remove.
6314 * extension.c (new_xmethod_worker): Remove.
6315 (clone_xmethod_worker): Remove.
6316 (get_matching_xmethod_workers): Return void, pass std::vector by
6318 (get_xmethod_arg_types): Rename to...
6319 (xmethod_worker::get_arg_types): ... this, and adjust.
6320 (get_xmethod_result_type): Rename to...
6321 (xmethod_worker::get_result_type): ... this, and adjust.
6322 (invoke_xmethod): Remove.
6323 (free_xmethod_worker): Remove.
6324 (free_xmethod_worker_vec): Remove.
6325 * extension.h (enum ext_lang_rc): Move here from
6327 (struct xmethod_worker): Add constructor and destructor.
6330 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6331 virtual pure methods.
6332 <get_arg_types, get_result_type>: New methods.
6333 (xmethod_worker_ptr): Remove typedef.
6334 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6335 (xmethod_worker_vec): Remove typedef.
6336 (xmethod_worker_up): New typedef.
6337 (invoke_xmethod): Remove.
6338 (clone_xmethod_worker): Remove.
6339 (free_xmethod_worker): Remove.
6340 (free_xmethod_worker_vec): Remove.
6341 (get_xmethod_arg_types): Remove.
6342 (get_xmethod_result_type): Remove.
6343 * valops.c (find_method_list): Use std::vector, don't use
6344 intermediate vector.
6345 (value_find_oload_method_list): Use std::vector.
6346 (find_overload_match): Use std::vector.
6347 (find_oload_champ): Use std::vector.
6348 * value.c (value_free): Use operator delete.
6349 (value_of_xmethod): Rename to...
6350 (value_from_xmethod): ... this. Don't assign
6351 xmethod_worker::value, take rvalue-reference.
6352 (result_type_of_xmethod): Adjust.
6353 (call_xmethod): Adjust.
6354 * value.h: Include extension.h.
6355 (struct xmethod_worker): Don't forward-declare.
6356 (value_of_xmethod): Rename to...
6357 (value_from_xmethod): ... this, take rvalue-reference.
6358 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6359 (struct python_xmethod_worker): ... this, add constructor and
6361 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6362 (gdbpy_free_xmethod_worker_data): Rename to...
6363 (python_xmethod_worker::~python_xmethod_worker): ... this and
6365 (gdbpy_clone_xmethod_worker_data): Rename to...
6366 (python_xmethod_worker::clone): ... this and adjust.
6367 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6369 (gdbpy_get_xmethod_arg_types): Rename to...
6370 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6371 (gdbpy_get_xmethod_result_type): Rename to...
6372 (python_xmethod_worker::do_get_result_type): ... this and
6374 (gdbpy_invoke_xmethod): Rename to...
6375 (python_xmethod_worker::invoke): ... this and adjust.
6376 (new_python_xmethod_worker): Rename to...
6377 (python_xmethod_worker::python_xmethod_worker): ... this and
6379 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6381 (gdbpy_free_xmethod_worker_data): Remove.
6382 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6383 (gdbpy_get_xmethod_arg_types): Remove.
6384 (gdbpy_get_xmethod_result_type): Remove.
6385 (gdbpy_invoke_xmethod): Remove.
6386 * python/python.c (python_extension_ops): Remove obsolete
6389 2018-01-05 Pedro Alves <palves@redhat.com>
6392 * common/signals-state-save-restore.c
6393 (save_original_signals_state): New parameter 'quiet'. Warn if we
6394 find a custom handler preinstalled, instead of internal erroring.
6395 But only warn if !quiet.
6396 * common/signals-state-save-restore.h
6397 (save_original_signals_state): New parameter 'quiet'.
6398 * main.c (captured_main_1): Move save_original_signals_state call
6399 after option handling, and pass QUIET.
6401 2018-01-05 Pedro Alves <palves@redhat.com>
6403 * spu-tdep.c (spu_catch_start): Pass
6404 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6406 2018-01-05 Pedro Alves <palves@redhat.com>
6409 * ada-lang.c (literal_symbol_name_matcher): New function.
6410 (ada_get_symbol_name_matcher): Use it for
6411 symbol_name_match_type::SEARCH_NAME.
6412 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6413 it down instead of assuming symbol_name_match_type::FULL.
6414 * block.h (block_lookup_symbol): New parameter 'match_type'.
6415 * c-valprint.c (print_unpacked_pointer): Use
6416 lookup_symbol_search_name instead of lookup_symbol.
6417 * compile/compile-object-load.c (get_out_value_type): Pass down
6418 symbol_name_match_type::SEARCH_NAME.
6419 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6420 symbol_name_match_type::FULL.
6421 * cp-support.c (cp_get_symbol_name_matcher): Handle
6422 symbol_name_match_type::SEARCH_NAME.
6423 * infrun.c (insert_exception_resume_breakpoint): Use
6424 lookup_symbol_search_name.
6425 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6426 * psymtab.c (maintenance_check_psymtabs): Use
6427 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6428 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6430 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6431 if symbol_name_match_type::SEARCH_NAME.
6432 (lookup_symbol_in_language): Pass down
6433 symbol_name_match_type::FULL.
6434 (lookup_symbol_search_name): New.
6435 (lookup_language_this): Pass down
6436 symbol_name_match_type::SEARCH_NAME.
6437 (lookup_symbol_aux, lookup_local_symbol): New parameter
6438 'match_type'. Pass it down.
6439 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6440 (lookup_symbol_search_name): New declaration.
6441 (lookup_symbol_in_block): New 'match_type' parameter.
6443 2018-01-05 Pedro Alves <palves@redhat.com>
6446 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6448 (ada_lookup_symbol): Reimplement in terms of
6449 ada_lookup_symbol_list, bits factored out from
6450 ada_lookup_encoded_symbol.
6452 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6454 * ada-exp.y (write_object_renaming): When subscripting an array
6455 using a symbol as the index, pass the block in call to
6456 ada_lookup_encoded_symbol when looking that symbol up.
6458 2018-01-05 Jerome Guitton <guitton@adacore.com>
6460 * ada-lang.c (ada_array_length): Use ada_index_type instead of
6463 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6465 * ada-lang.c (ada_to_fixed_value_create): Add handling of
6466 the case where VALUE_LVAL (val0) is not lval_memory.
6468 2018-01-05 Xavier Roirand <roirand@adacore.com>
6470 * ada-valprint.c (print_optional_low_bound): Handle
6471 character-indexed array printing like boolean-indexed array
6474 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6476 * NEWS: Create a new section for the next release branch.
6477 Rename the section of the current branch, now that it has
6480 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6482 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6483 * version.in: Bump version to 8.1.50.DATE-git.
6485 2018-01-03 Xavier Roirand <roirand@adacore.com>
6487 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6489 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6491 (default_exception_support_info) <catch_handlers_sym>: Add field.
6492 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6493 (ada_exception_name_addr_1): Add "catch handlers" handling.
6494 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6496 (create_excep_cond_exprs) <ex>: Add parameter.
6497 (re_set_exception): Update create_excep_cond_exprs call.
6498 (print_it_exception, print_one_exception, print_mention_exception)
6499 (print_recreate_exception): Add "catch handler" handling.
6500 (allocate_location_catch_handlers, re_set_catch_handlers)
6501 (check_status_catch_handlers, print_it_catch_handlers)
6502 (print_one_catch_handlers, print_mention_catch_handlers)
6503 (print_recreate_catch_handlers): New function.
6504 (catch_handlers_breakpoint_ops): New variable.
6505 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6506 Add parameter. Add "catch handler" handling.
6507 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6508 Add "catch handler" handling.
6509 (ada_exception_catchpoint_cond_string): Add "catch handler"
6511 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6513 (catch_ada_handlers_command): New function.
6514 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6515 operations structure.
6516 (_initialize_ada_language): Add "catch handlers" command entry.
6517 * NEWS: Document "catch handlers" feature.
6519 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6521 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6522 account when creating the array type of the slice.
6523 (ada_value_slice): Likewise.
6525 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6527 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6529 (create_array_type_with_stride): Add byte_stride_prop parameter.
6530 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6531 New parameter. Update all callers in this file.
6532 (array_type_has_dynamic_stride): New function.
6533 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6534 of arrays with dynamic byte strides.
6535 * dwarf2read.c (read_array_type): Add support for dynamic
6536 DW_AT_byte_stride attributes.
6538 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6540 * dwarf2read.c (read_unspecified_type): Treat
6541 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6543 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6545 Update copyright year range in all GDB files.
6547 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6549 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6550 and gdb/testsuite/gdb.base/step-line.c.
6552 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6554 * copyright.py (main): Dump the contents of
6555 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6556 even if BY_HAND is empty.
6558 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6560 * top.c (print_gdb_version): Update Copyright year in version
6563 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6565 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
6567 For older changes see ChangeLog-2017.
6573 version-control: never