1 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3 * mips-tdep.c (mask_address_var): Make variable static.
5 2018-05-14 Tom Tromey <tom@tromey.com>
7 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
11 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
12 FXSAVE_ADDR for the mxcsr register.
14 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
16 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
18 2018-05-11 Pedro Alves <palves@redhat.com>
20 * corelow.c (core_target) <core_target>: No longer inline.
21 Initialize m_core_gdbarch, m_core_vec and build the section table
24 <core_gdbarch, get_core_register_section>: New methods.
25 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
27 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
29 (sniff_core_bfd): Add gdbarch parameter.
30 (core_close): Delete, merged into ...
31 (core_target::close): ... here. Delete self.
32 (core_close_cleanup): Delete.
33 (core_target_open): Allocate a core_target on the heap. Use a
34 unique_ptr instead of a cleanup. Bits moved into the core_target
35 ctor. Adjust to use core_target methods instead of globals.
36 (get_core_register_section): Rename to ...
37 (core_target::get_core_register_section): ... this and adjust.
38 (struct get_core_registers_cb_data): New.
39 (get_core_registers_cb): Use it. Use bool.
40 (core_target::fetch_registers, core_target::files_info)
41 (core_target::xfer_partial, core_target::read_description)
42 (core_target::pid_to, core_target::thread_name): Adjust to
43 reference class fields instead of globals.
44 * target.h (struct target_ops_deleter, target_ops_up): New.
46 2018-05-11 Pedro Alves <palves@redhat.com>
48 * corefile.c (core_file_command): Move to corelow.c.
49 * corelow.c (the_core_target): Delete.
50 (core_file_command): Moved from corefile.c. Check exec_bfd
51 instead of the_core_target. Use target_detach instead of calling
52 into the_core_target directly.
53 (maybe_say_no_core_file_now): New.
54 (core_target::detach): Use it.
55 (_initialize_corelow): Remove references to the_core_target.
56 * gdbcore.h (the_core_target): Delete.
58 2018-05-11 Tom Tromey <tromey@redhat.com>
59 Pedro Alves <palves@redhat.com>
61 * corefile.c (core_bfd): Remove.
62 * gdbcore.h (core_bfd): Now a macro.
63 * progspace.h (struct program_space) <cbfd>: New field.
65 2018-05-11 Tom Tromey <tom@tromey.com>
67 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
70 2018-05-10 Tom Tromey <tom@tromey.com>
73 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
75 2018-05-10 Joel Brobecker <brobecker@adacore.com>
78 * regformats/regdat.sh: Adjust script, following the addition
79 of the new expedite_regs parameter to init_target_desc.
81 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
84 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
85 set_gdbarch_significant_addr_bit.
86 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
87 set_gdbarch_significant_addr_bit.
88 * utils.c (address_significant): Update to sign extend addr.
90 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
92 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
93 (xtensa_linux_init_abi): Limit tdep->num_regs by
94 tdep->num_nopriv_regs.
95 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
96 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
99 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
101 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
103 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
105 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
106 (I387_MXCSR_INIT_VAL): New constant.
107 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
108 buffer if it was supplied by the inferior.
109 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
110 (i387_xsave_get_clear_bv): New function.
111 (i387_supply_xsave): Only read x87 control registers from the
112 xsave buffer if the feature is enabled, and the state will have
113 been written, otherwise, provide a suitable default.
114 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
115 including x87 control registers. Update control registers if they
116 have changed from the default value, and mark features as enabled
118 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
120 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
122 * spu-tdep.c (info_spu_event_command): Fix output formatting.
124 2018-05-07 Tom Tromey <tom@tromey.com>
126 * configure: Rebuild.
127 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
129 2018-05-07 Tom Tromey <tom@tromey.com>
132 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
133 bit. Use correct value for VDIV.
135 2018-05-04 Tom Tromey <tom@tromey.com>
137 * configure: Rebuild.
138 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
140 2018-05-04 Tom Tromey <tom@tromey.com>
142 * linux-record.c (record_linux_system_call) <case
143 RECORD_SYS_RECVFROM>: Add "break".
145 2018-05-04 Tom Tromey <tom@tromey.com>
147 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
149 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
152 2018-05-04 Tom Tromey <tom@tromey.com>
154 * rs6000-tdep.c (ppc_process_record_op4)
155 (ppc_process_record_op63): Add fall-through comment.
157 2018-05-04 Tom Tromey <tom@tromey.com>
159 * i386-tdep.c (i386_process_record): Add fall-through comment.
161 2018-05-04 Tom Tromey <tom@tromey.com>
163 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
166 2018-05-04 Tom Tromey <tom@tromey.com>
168 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
169 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
170 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
172 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
174 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
177 2018-05-04 Tom Tromey <tom@tromey.com>
179 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
181 2018-05-04 Tom Tromey <tom@tromey.com>
183 * s390-tdep.c (s390_process_record): Fix fall-through comments.
184 * xcoffread.c (scan_xcoff_symtab): Move comment later.
185 * symfile.c (section_is_mapped): Fix fall-through comment.
186 * stabsread.c (define_symbol, read_member_functions): Fix
187 fall-through comment.
188 * s390-linux-tdep.c (s390_process_record): Fix fall-through
190 * remote.c (remote_wait_as): Fix fall-through comment.
191 * p-exp.y (yylex): Fix fall-through comment.
192 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
194 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
195 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
196 * jv-exp.y (yylex): Fix fall-through comment.
197 * go-exp.y (lex_one_token): Fix fall-through comment.
198 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
199 fall-through comment.
200 * f-exp.y (yylex): Fix fall-through comment.
201 * dwarf2read.c (process_die): Fix fall-through comments.
202 * dbxread.c (process_one_symbol): Fix fall-through comment.
203 * d-exp.y (lex_one_token): Fix fall-through comment.
204 * cp-name-parser.y (yylex): Fix fall-through comment.
205 * coffread.c (coff_symtab_read): Fix fall-through comment.
206 * c-exp.y (lex_one_token): Fix fall-through comment.
207 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
209 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
212 2018-05-04 Tom Tromey <tom@tromey.com>
215 * NEWS: Mention gdb.execute change.
216 * gdbcmd.h (execute_control_command): Don't declare.
217 * python/python.c (execute_gdb_command): Use read_command_lines_1,
218 execute_control_commands, execute_control_commands_to_string.
219 * cli/cli-script.h (execute_control_commands)
220 (execute_control_commands_to_string): Declare.
221 (execute_control_command): Add from_tty parameter.
222 * cli/cli-script.c (execute_control_commands)
223 (execute_control_commands_to_string): New functions.
224 (execute_user_command): Use execute_control_commands.
225 (execute_control_command_1): Add "from_tty" parameter. Update.
226 (execute_control_command): Likewise.
228 2018-05-04 Tom Tromey <tom@tromey.com>
231 * NEWS: Mention that breakpoint commands are writable.
232 * python/py-breakpoint.c (bppy_set_commands): New function.
233 (breakpoint_object_getset) <"commands">: Use it.
235 2018-05-04 Tom Tromey <tom@tromey.com>
237 * tracepoint.c (actions_command): Update.
238 * mi/mi-cmd-break.c (mi_command_line_array)
239 (mi_command_line_array_cnt, mi_command_line_array_ptr)
240 (mi_read_next_line): Remove.
241 (mi_cmd_break_commands): Update.
242 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
244 * cli/cli-script.c (get_command_line): Update.
245 (process_next_line): Use function_view. Constify.
246 (recurse_read_control_structure, read_command_lines)
247 (read_command_lines_1): Change argument types to function_view.
248 (do_define_command, document_command): Update.
249 * breakpoint.h (check_tracepoint_command): Don't declare.
250 * breakpoint.c (check_tracepoint_command): Remove.
251 (commands_command_1, create_tracepoint_from_upload): Update.
253 2018-05-04 Tom Tromey <tom@tromey.com>
256 * cli/cli-script.h (enum command_control_type) <define_control>:
258 * cli/cli-script.c (multi_line_command_p): Handle define_control.
259 (build_command_line, execute_control_command_1)
260 (process_next_line): Likewise.
261 (do_define_command): New function, extracted from define_command.
262 (define_command): Use it.
264 2018-05-04 Tom Tromey <tom@tromey.com>
266 * tracepoint.c (actions_command): Update.
267 * cli/cli-script.h (read_command_lines): Update.
268 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
269 (MAX_TMPBUF): Remove define.
270 (define_command): Use string_printf.
271 (document_command): Likewise.
272 * breakpoint.c (commands_command_1): Update.
274 2018-05-04 Tom Tromey <tom@tromey.com>
276 * top.c (execute_command): Update.
277 * cli/cli-script.h (print_command_lines): Now varargs.
278 * cli/cli-script.c (print_command_lines): Now varargs.
279 (execute_control_command_1) <case while_control, case if_control>:
282 2018-05-04 Tom Tromey <tom@tromey.com>
284 * tracepoint.c (all_tracepoint_actions): Rename from
285 all_tracepoint_actions_and_cleanup. Change return type.
286 (actions_command, encode_actions_1, encode_actions)
287 (trace_dump_actions, tdump_command): Update.
288 * remote.c (remote_download_command_source): Update.
289 * python/python.c (gdbpy_eval_from_control_command)
290 (python_command, python_interactive_command): Update.
291 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
292 * guile/guile.c (guile_command)
293 (gdbscm_eval_from_control_command, guile_command): Update.
294 * compile/compile.c (compile_code_command)
295 (compile_print_command, compile_to_object): Update.
296 * cli/cli-script.h (struct command_lines_deleter): New.
297 (counted_command_line): New typedef.
298 (struct command_line): Add constructor, destructor.
300 <body_list_0, body_list_1>: New members.
301 (command_line_up): Remove typedef.
302 (read_command_lines, read_command_lines_1, get_command_line):
304 (copy_command_lines): Don't declare.
305 * cli/cli-script.c (build_command_line): Use "new".
306 (get_command_line): Return counted_command_line.
307 (print_command_lines, execute_user_command)
308 (execute_control_command_1, while_command, if_command): Update.
309 (realloc_body_list): Remove.
310 (process_next_line, recurse_read_control_structure): Update.
311 (read_command_lines, read_command_lines_1): Return counted_command_line.
312 (free_command_lines): Use "delete".
313 (copy_command_lines): Remove.
314 (define_command, document_command, show_user_1): Update.
315 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
316 a counted_command_line.
317 * breakpoint.h (counted_command_line): Remove typedef.
318 (breakpoint_set_commands): Update.
319 * breakpoint.c (check_no_tracepoint_commands)
320 (validate_commands_for_breakpoint): Update.
321 (breakpoint_set_commands): Change commands to be a
322 counted_command_line.
323 (commands_command_1, update_dprintf_command_list)
324 (create_tracepoint_from_upload): Update.
326 2018-05-04 Tom Tromey <tom@tromey.com>
328 * cli/cli-decode.h (cmd_list_element): New constructor.
329 (~cmd_list_element): New destructor.
330 (struct cmd_list_element): Add initializers.
331 * cli/cli-decode.c (do_add_cmd): Use "new".
332 (delete_cmd): Use "delete".
334 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
335 Pedro Alves <palves@redhat.com>
337 PR breakpoints/19806 and support for PR external/20207.
338 * NEWS: Mention Aarch64 watchpoint improvements.
339 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
340 watchpoints and PR external/20207 watchpoints.
341 * nat/aarch64-linux-hw-point.c
342 (kernel_supports_any_contiguous_range): New.
343 (aarch64_watchpoint_offset): New.
344 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
345 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
346 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
347 (aarch64_align_watchpoint): New parameters aligned_offset_p and
348 next_addr_orig_p. Support PR external/20207 watchpoints.
349 (aarch64_downgrade_regs): New.
350 (aarch64_dr_state_insert_one_point): New parameters offset and
352 (aarch64_dr_state_remove_one_point): Likewise.
353 (aarch64_handle_breakpoint): Update caller.
354 (aarch64_handle_aligned_watchpoint): Likewise.
355 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
357 (aarch64_linux_set_debug_regs): Remove const from state. Call
358 aarch64_downgrade_regs.
359 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
360 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
361 (DR_CONTROL_MASK): ... this.
362 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
363 (unsigned int aarch64_watchpoint_offset): New prototype.
364 (aarch64_linux_set_debug_regs): Remove const from state.
365 * utils.c (align_up, align_down): Move to ...
366 * common/common-utils.c (align_up, align_down): ... here.
367 * utils.h (align_up, align_down): Move to ...
368 * common/common-utils.h (align_up, align_down): ... here.
370 2018-05-04 Joel Brobecker <brobecker@adacore.com>
372 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
373 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
374 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
375 Re-implement to match the ABI as summarized in GCC's
376 gcc/config/sparc/sparc.c. All callers updated.
377 (sparc32_store_arguments): Remove assertion.
379 2018-05-04 Tom Tromey <tom@tromey.com>
381 * printcmd.c: Don't include tui.h.
382 (decode_format): Use skip_spaces.
384 2018-05-04 Tom Tromey <tom@tromey.com>
387 * printcmd.c (last_count): New global.
388 (x_command): Use saved count when repeating.
390 2018-05-04 Tom Tromey <tom@tromey.com>
392 * nto-procfs.c (do_closedir_cleanup): Remove.
393 (procfs_pidlist): Use gdb_dir_up.
394 * procfs.c (do_closedir_cleanup): Remove.
395 (proc_update_threads): Use gdb_dir_up.
396 * common/filestuff.h (struct gdb_dir_deleter): New.
397 (gdb_dir_up): New typedef.
399 2018-05-04 Tom Tromey <tom@tromey.com>
401 * ada-lang.c (print_mention_exception): Use std::string.
403 2018-05-04 Tom Tromey <tom@tromey.com>
405 * ada-lang.c (create_excep_cond_exprs): Update.
406 (ada_exception_catchpoint_cond_string): Use std::string.
408 2018-05-04 Tom Tromey <tom@tromey.com>
410 * ada-lang.c (xget_renaming_scope): Return std::string.
411 (old_renaming_is_invisible): Update.
413 2018-05-04 Tom Tromey <tom@tromey.com>
415 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
416 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
418 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
420 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
422 2018-05-04 Tom Tromey <tom@tromey.com>
424 * remote.c (remote_query_supported_append): Change type.
425 (remote_check_symbols): Update.
427 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
430 * configure.ac: Prepend libpython.
431 * python/python-config.py: Likewise.
432 * configure: Regenerate.
434 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
436 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
438 2018-05-03 Pedro Alves <palves@redhat.com>
441 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
442 override. Write 'true' instead of '1'.
443 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
446 2018-05-02 Pedro Alves <palves@redhat.com>
448 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
449 add_inf_child_target.
450 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
451 add_inf_child_target.
452 * aix-thread.c (aix_thread_target_info): New.
453 (aix_thread_target) <shortname, longname, doc>: Delete.
455 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
456 add_inf_child_target.
457 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
458 add_inf_child_target.
459 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
460 add_inf_child_target.
461 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
462 add_inf_child_target.
463 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
464 add_inf_child_target.
465 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
466 add_inf_child_target.
467 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
468 add_inf_child_target.
469 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
470 add_inf_child_target.
471 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
472 add_inf_child_target.
473 * bfd-target.c (target_bfd_target_info): New.
474 (target_bfd) <shortname, longname, doc>: Delete.
476 * bsd-kvm.c (bsd_kvm_target_info): New.
477 (bsd_kvm_target) <shortname, longname, doc>: Delete.
479 (bsd_kvm_target::open): Rename to ...
480 (bsd_kvm_target_open): ... this. Adjust.
481 * bsd-uthread.c (bsd_uthread_target_info): New.
482 (bsd_uthread_target) <shortname, longname, doc>: Delete.
484 * corefile.c (core_file_command): Adjust.
485 * corelow.c (core_target_info): New.
486 (core_target) <shortname, longname, doc>: Delete.
488 (core_target::open): Rename to ...
489 (core_target_open): ... this. Adjust.
490 * ctf.c (ctf_target_info): New.
491 (ctf_target) <shortname, longname, doc>: Delete.
493 (ctf_target::open): Rename to ...
494 (ctf_target_open): ... this.
495 (_initialize_ctf): Adjust.
496 * exec.c (exec_target_info): New.
497 (exec_target) <shortname, longname, doc>: Delete.
499 (exec_target::open): Rename to ...
500 (exec_target_open): ... this.
501 * gdbcore.h (core_target_open): Declare.
502 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
503 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
504 add_inf_child_target.
505 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
506 add_inf_child_target.
507 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
508 add_inf_child_target.
509 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
510 add_inf_child_target.
511 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
512 add_inf_child_target.
513 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
514 add_inf_child_target.
515 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
516 add_inf_child_target.
517 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
518 add_inf_child_target.
519 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
520 add_inf_child_target.
521 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
522 add_inf_child_target.
523 * inf-child.c (inf_child_target_info): New.
524 (inf_child_target::info): New.
525 (inf_child_open_target): Remove 'target' parameter. Use
526 get_native_target instead.
527 (inf_child_target::open): Delete.
528 (add_inf_child_target): New.
529 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
532 (add_inf_child_target): Declare.
533 (inf_child_open_target): Declare.
534 * linux-thread-db.c (thread_db_target_info): New.
535 (thread_db_target) <shortname, longname, doc>: Delete.
537 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
538 add_inf_child_target.
539 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
540 add_inf_child_target.
541 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
542 add_inf_child_target.
543 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
544 add_inf_child_target.
545 * make-target-delegates (print_class): Adjust.
546 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
547 add_inf_child_target.
548 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
549 add_inf_child_target.
550 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
551 add_inf_child_target.
552 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
553 add_inf_child_target.
554 * nto-procfs.c (nto_native_target_info): New.
555 (nto_procfs_target_native) <shortname, longname, doc>:
558 (nto_procfs_target_info): New.
559 (nto_procfs_target_procfs) <shortname, longname, doc>:
562 (init_procfs_targets): Adjust.
563 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
564 add_inf_child_target.
565 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
566 add_inf_child_target.
567 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
568 add_inf_child_target.
569 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
570 add_inf_child_target.
571 * ravenscar-thread.c (ravenscar_target_info): New.
572 (ravenscar_thread_target) <shortname, longname, doc>:
575 * record-btrace.c (record_btrace_target_info):
576 (record_btrace_target) <shortname, longname, doc>: Delete.
578 (record_btrace_target::open): Rename to ...
579 (record_btrace_target_open): ... this. Adjust.
580 * record-full.c (record_longname, record_doc): New.
581 (record_full_base_target) <shortname, longname, doc>: Delete.
583 (record_full_target_info): New.
584 (record_full_target): <shortname>: Delete.
586 (record_full_core_open_1, record_full_open_1): Update comments.
587 (record_full_base_target::open): Rename to ...
588 (record_full_open): ... this.
589 (cmd_record_full_restore): Update.
590 (_initialize_record_full): Update.
591 * remote-sim.c (remote_sim_target_info): New.
592 (gdbsim_target) <shortname, longname, doc>: Delete.
594 (gdbsim_target::open): Rename to ...
595 (gdbsim_target_open): ... this.
596 (_initialize_remote_sim): Adjust.
597 * remote.c (remote_doc): New.
598 (remote_target_info): New.
599 (remote_target) <shortname, longname, doc>: Delete.
601 (extended_remote_target_info): New.
602 (extended_remote_target) <shortname, longname, doc>: Delete.
604 (remote_target::open_1): Make static. Adjust.
605 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
606 * s390-linux-nat.c (_initialize_s390_nat): Use
607 add_inf_child_target.
608 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
609 add_inf_child_target.
610 * sol-thread.c (thread_db_target_info): New.
611 (sol_thread_target) <shortname, longname, doc>: Delete.
613 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
614 add_inf_child_target.
615 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
616 add_inf_child_target.
617 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
618 add_inf_child_target.
619 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
620 add_inf_child_target.
621 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
622 add_inf_child_target.
623 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
624 add_inf_child_target.
625 * spu-linux-nat.c (_initialize_spu_nat): Use
626 add_inf_child_target.
627 * spu-multiarch.c (spu_multiarch_target_info): New.
628 (spu_multiarch_target) <shortname, longname, doc>: Delete.
630 * target-delegates.c: Regenerate.
631 * target.c: Include <unordered_map>.
632 (target_ops_p): Delete.
633 (DEF_VEC_P(target_ops_p)): Delete.
634 (target_factories): New.
635 (test_target_info): New.
636 (test_target_ops::info): New.
637 (open_target): Adjust to use target_factories.
638 (add_target_with_completer): Rename to ...
639 (add_target): ... this. Change prototype. Register target_info
640 and open callback in target_factories. Register target_info in
641 command context instead of target_ops.
642 (add_target): Delete old implementation.
643 (add_deprecated_target_alias): Change prototype. Adjust.
644 (the_native_target): New.
645 (set_native_target, get_native_target): New.
646 (find_default_run_target): Use the_native_target.
647 (find_attach_target, find_run_target): Simplify.
648 (target_ops::open): Delete.
649 (dummy_target_info): New.
650 (dummy_target::shortname, dummy_target::longname)
651 (dummy_target::doc): Delete.
652 (dummy_target::info): New.
653 (debug_target::shortname, debug_target::longname)
654 (debug_target::doc): Delete.
655 (debug_target::info): New.
656 * target.h (struct target_info): New.
657 (target_ops::~target_ops): Add comment.
658 (target_ops::info): New.
659 (target_ops::shortname, target_ops::longname, target_ops::doc): No
660 longer virtual. Implement in terms of target_info.
661 (set_native_target, get_native_target): Declare.
662 (target_open_ftype): New.
663 (add_target, add_target_with_completer)
664 (add_deprecated_target_alias): Change prototype.
665 (test_target) <shortname, longname, doc>: Delete.
667 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
668 add_inf_child_target.
669 * tracefile-tfile.c (tfile_target_info): New.
670 (tfile_target) <shortname, longname, doc>: Delete.
672 (tfile_target::open): Rename to ...
673 (tfile_target_open): ... this.
674 (_initialize_tracefile_tfile): Adjust.
675 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
676 add_inf_child_target.
677 * windows-nat.c (_initialize_windows_nat): Use
678 add_inf_child_target.
679 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
680 add_inf_child_target.
682 2018-05-02 Pedro Alves <palves@redhat.com>
684 * linux-nat.h (linux_nat_target) <low_new_thread,
685 low_delete_thread, low_new_fork, low_forget_process,
686 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
688 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
689 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
690 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
691 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
692 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
694 * linux-fork.c (delete_fork): Adjust to call low method.
695 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
696 (linux_nat_new_fork, linux_nat_forget_process_hook)
697 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
698 (linux_nat_status_is_event):
699 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
700 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
702 (sigtrap_is_event): Rename to ...
703 (linux_nat_target::low_status_is_event): ... this.
704 (linux_nat_set_status_is_event): Delete.
705 (save_stop_reason, linux_nat_wait_1)
706 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
708 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
709 (linux_nat_set_new_fork, linux_nat_set_forget_process)
710 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
711 (linux_nat_set_prepare_to_resume): Delete.
712 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
714 * amd64-linux-nat.c: Likewise.
715 * arm-linux-nat.c: Likewise.
716 * i386-linux-nat.c: Likewise.
717 * ia64-linux-nat.c: Likewise.
718 * mips-linux-nat.c: Likewise.
719 * ppc-linux-nat.c: Likewise.
720 * s390-linux-nat.c: Likewise.
721 * sparc64-linux-nat.c: Likewise.
722 * x86-linux-nat.c: Likewise.
723 * x86-linux-nat.h: Include "nat/x86-linux.h".
724 (x86_linux_nat_target) <low_new_fork, low_forget_process,
725 low_prepare_to_resume, low_new_thread, low_delete_thread>:
728 2018-05-02 Pedro Alves <palves@redhat.com>
730 * target.h (target_ops)
731 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
732 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
733 stopped_by_watchpoint, have_continuable_watchpoint,
734 stopped_data_address, watchpoint_addr_within_range,
735 can_accel_watchpoint_condition, can_run, thread_alive,
736 has_all_memory, has_memory, has_stack, has_registers,
737 has_execution, can_async_p, is_async_p, supports_non_stop,
738 always_non_stop_p, can_execute_reverse, supports_multi_process,
739 supports_enable_disable_tracepoint,
740 supports_disable_randomization, supports_string_tracing,
741 supports_evaluation_of_breakpoint_conditions,
742 can_run_breakpoint_commands, filesystem_is_local,
743 can_download_tracepoint, get_trace_state_variable_value,
744 set_trace_notes, get_tib_address, use_agent, can_use_agent,
745 record_is_replaying, record_will_replay,
746 augmented_libraries_svr4_read>: Adjust to return bool.
747 * aarch64-linux-nat.c: All implementations adjusted.
748 * aix-thread.c: All implementations adjusted.
749 * arm-linux-nat.c: All implementations adjusted.
750 * breakpoint.c: All implementations adjusted.
751 * bsd-kvm.c: All implementations adjusted.
752 * bsd-uthread.c: All implementations adjusted.
753 * corelow.c: All implementations adjusted.
754 * ctf.c: All implementations adjusted.
755 * darwin-nat.c: All implementations adjusted.
756 * darwin-nat.h: All implementations adjusted.
757 * exec.c: All implementations adjusted.
758 * fbsd-nat.c: All implementations adjusted.
759 * fbsd-nat.h: All implementations adjusted.
760 * gnu-nat.c: All implementations adjusted.
761 * gnu-nat.h: All implementations adjusted.
762 * go32-nat.c: All implementations adjusted.
763 * ia64-linux-nat.c: All implementations adjusted.
764 * inf-child.c: All implementations adjusted.
765 * inf-child.h: All implementations adjusted.
766 * inf-ptrace.c: All implementations adjusted.
767 * inf-ptrace.h: All implementations adjusted.
768 * linux-nat.c: All implementations adjusted.
769 * linux-nat.h: All implementations adjusted.
770 * mips-linux-nat.c: All implementations adjusted.
771 * nto-procfs.c: All implementations adjusted.
772 * ppc-linux-nat.c: All implementations adjusted.
773 * procfs.c: All implementations adjusted.
774 * ravenscar-thread.c: All implementations adjusted.
775 * record-btrace.c: All implementations adjusted.
776 * record-full.c: All implementations adjusted.
777 * remote-sim.c: All implementations adjusted.
778 * remote.c: All implementations adjusted.
779 * s390-linux-nat.c: All implementations adjusted.
780 * sol-thread.c: All implementations adjusted.
781 * spu-multiarch.c: All implementations adjusted.
782 * target-delegates.c: All implementations adjusted.
783 * target.c: All implementations adjusted.
784 * target.h: All implementations adjusted.
785 * tracefile-tfile.c: All implementations adjusted.
786 * tracefile.c: All implementations adjusted.
787 * tracefile.h: All implementations adjusted.
788 * windows-nat.c: All implementations adjusted.
789 * x86-linux-nat.h: All implementations adjusted.
790 * x86-nat.h: All implementations adjusted.
792 2018-05-02 Pedro Alves <palves@redhat.com>
794 * make-target-delegates (scan_target_h): Don't trim lines here.
795 Replace sequences of tabs and/or whitespace with a single
797 (top level, parsing methods): Trim each line before processing it
800 2018-05-02 Pedro Alves <palves@redhat.com>
801 John Baldwin <jhb@freebsd.org>
803 * target.h (enum strata) <debug_stratum>: New.
804 (struct target_ops) <all delegation methods>: Replace by C++
805 virtual methods, and drop "to_" prefix. All references updated
807 <to_shortname, to_longname, to_doc, to_data,
808 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
809 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
810 virtual methods. All references updated throughout.
811 <can_attach, supports_terminal_ours, can_create_inferior,
812 get_thread_control_capabilities, attach_no_wait>: New
814 <insert_breakpoint, remove_breakpoint>: Now
815 TARGET_DEFAULT_NORETURN methods.
816 <info_proc>: Now returns bool.
819 (current_target): Delete. All references replaced by references
821 (target_stack): ... this. New.
822 (target_shortname, target_longname): Adjust.
823 (target_can_run): Now a function declaration.
824 (default_child_has_all_memory, default_child_has_memory)
825 (default_child_has_stack, default_child_has_registers)
826 (default_child_has_execution): Remove target_ops parameter.
827 (complete_target_initialization): Delete.
828 (memory_breakpoint_target): New template class.
829 (test_target_ops): Refactor as a C++ class with virtual methods.
830 * make-target-delegates (NAME_PART): Tighten.
831 (POINTER_PART, CP_SYMBOL): New.
832 (SIMPLE_RETURN_PART): Reimplement.
833 (VEC_RETURN_PART): Expect less.
834 (RETURN_PART, VIRTUAL_PART): New.
835 (METHOD): Adjust to C++ virtual methods.
836 (scan_target_h): Remove reference to C99.
837 (dname): Output "target_ops::" prefix.
838 (write_function_header): Adjust to output a C++ class method.
839 (write_declaration): New.
840 (write_delegator): Adjust to output a C++ class method.
841 (tdname): Output "dummy_target::" prefix.
842 (write_tdefault, write_debugmethod): Adjust to output a C++ class
844 (tdefault_names, debug_names): Delete.
845 (return_types, tdefaults, styles, argtypes_array): New.
846 (top level): All methods are delegators.
848 (top level): Print dummy_target and debug_target classes.
849 * target-delegates.c: Regenerate.
850 * target-debug.h (target_debug_print_enum_info_proc_what)
851 (target_debug_print_thread_control_capabilities)
852 (target_debug_print_thread_info_p): New.
853 * target.c (dummy_target): Delete.
854 (the_dummy_target, the_debug_target): New.
855 (target_stack): Now extern.
856 (set_targetdebug): Push/unpush debug target.
857 (default_child_has_all_memory, default_child_has_memory)
858 (default_child_has_stack, default_child_has_registers)
859 (default_child_has_execution): Remove target_ops parameter.
860 (complete_target_initialization): Delete.
861 (add_target_with_completer): No longer call
862 complete_target_initialization.
863 (target_supports_terminal_ours): Use regular delegation.
864 (update_current_target): Delete.
865 (push_target): No longer check magic number. Don't call
866 update_current_target.
867 (unpush_target): Don't call update_current_target.
868 (target_is_pushed): No longer check magic number.
869 (target_require_runnable): Skip for all stratums over
871 (target_ops::info_proc): New.
872 (target_info_proc): Use find_target_at and
873 find_default_run_target.
874 (target_supports_disable_randomization): Use regular delegation.
875 (target_get_osdata): Use find_target_at.
876 (target_ops::open, target_ops::close, target_ops::can_attach)
877 (target_ops::attach, target_ops::can_create_inferior)
878 (target_ops::create_inferior, target_ops::can_run)
879 (target_can_run): New.
880 (default_fileio_target): Use regular delegation.
881 (target_ops::fileio_open, target_ops::fileio_pwrite)
882 (target_ops::fileio_pread, target_ops::fileio_fstat)
883 (target_ops::fileio_close, target_ops::fileio_unlink)
884 (target_ops::fileio_readlink): New.
885 (target_fileio_open_1, target_fileio_unlink)
886 (target_fileio_readlink): Always call the target method. Handle
888 (return_zero, return_zero_has_execution): Delete.
889 (init_dummy_target): Delete.
890 (dummy_target::dummy_target, dummy_target::shortname)
891 (dummy_target::longname, dummy_target::doc)
892 (debug_target::debug_target, debug_target::shortname)
893 (debug_target::longname, debug_target::doc): New.
894 (target_supports_delete_record): Use regular delegation.
895 (setup_target_debug): Delete.
896 (maintenance_print_target_stack): Skip debug_stratum.
897 (initialize_targets): Instantiate the_dummy_target and
899 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
901 (target_auxv_search, fprint_target_auxv): Adjust.
902 (info_auxv_command): Adjust to use target_stack.
903 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
904 * exceptions.c (print_flush): Handle a NULL target_stack.
905 * regcache.c (target_ops_no_register): Refactor as class with
908 * exec.c (exec_target): New class.
909 (exec_ops): Now an exec_target.
910 (exec_open, exec_close_1, exec_get_section_table)
911 (exec_xfer_partial, exec_files_info, exec_has_memory)
912 (exec_make_note_section): Refactor as exec_target methods.
913 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
915 (exec_target::find_memory_regions): New.
916 (_initialize_exec): Don't call init_exec_ops.
917 * gdbcore.h (exec_file_clear): Delete.
919 * corefile.c (core_target): Delete.
920 (core_file_command): Adjust.
921 * corelow.c (core_target): New class.
922 (the_core_target): New.
923 (core_close): Remove target_ops parameter.
924 (core_close_cleanup): Adjust.
925 (core_target::close): New.
926 (core_open, core_detach, get_core_registers, core_files_info)
927 (core_xfer_partial, core_thread_alive, core_read_description)
928 (core_pid_to_str, core_thread_name, core_has_memory)
929 (core_has_stack, core_has_registers, core_info_proc): Rework as
931 (ignore, core_remove_breakpoint, init_core_ops): Delete.
932 (_initialize_corelow): Initialize the_core_target.
933 * gdbcore.h (core_target): Delete.
934 (the_core_target): New.
936 * ctf.c: (ctf_target): New class.
937 (ctf_ops): Now a ctf_target.
938 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
939 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
940 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
942 (init_ctf_ops): Delete.
943 (_initialize_ctf): Don't call it.
944 * tracefile-tfile.c (tfile_target): New class.
945 (tfile_ops): Now a tfile_target.
946 (tfile_open, tfile_close, tfile_files_info)
947 (tfile_get_tracepoint_status, tfile_trace_find)
948 (tfile_fetch_registers, tfile_xfer_partial)
949 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
950 Refactor as tfile_target methods.
951 (tfile_xfer_partial_features): Remove target_ops parameter.
952 (init_tfile_ops): Delete.
953 (_initialize_tracefile_tfile): Don't call it.
954 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
955 (tracefile_has_stack, tracefile_has_registers)
956 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
957 tracefile_target methods.
958 (init_tracefile_ops): Delete.
959 (tracefile_target::tracefile_target): New.
960 * tracefile.h: Include "target.h".
961 (tracefile_target): New class.
962 (init_tracefile_ops): Delete.
964 * spu-multiarch.c (spu_multiarch_target): New class.
965 (spu_ops): Now a spu_multiarch_target.
966 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
967 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
968 (spu_search_memory, spu_mourn_inferior): Refactor as
969 spu_multiarch_target methods.
970 (init_spu_ops): Delete.
971 (_initialize_spu_multiarch): Remove references to init_spu_ops,
972 complete_target_initialization.
974 * ravenscar-thread.c (ravenscar_thread_target): New class.
975 (ravenscar_ops): Now a ravenscar_thread_target.
976 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
977 (ravenscar_thread_alive, ravenscar_pid_to_str)
978 (ravenscar_fetch_registers, ravenscar_store_registers)
979 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
980 (ravenscar_stopped_by_hw_breakpoint)
981 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
982 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
983 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
985 (init_ravenscar_thread_ops): Delete.
986 (_initialize_ravenscar): Remove references to
987 init_ravenscar_thread_ops and complete_target_initialization.
989 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
990 (bsd_uthread_target): New class.
991 (bsd_uthread_ops): Now a bsd_uthread_target.
992 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
993 (bsd_uthread_close, bsd_uthread_mourn_inferior)
994 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
995 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
996 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
997 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
998 (bsd_uthread_target): Delete function.
999 (_initialize_bsd_uthread): Remove reference to
1000 complete_target_initialization.
1002 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
1003 (target_bfd): ... this new class.
1004 (target_bfd_xfer_partial, target_bfd_get_section_table)
1005 (target_bfd_close): Refactor as target_bfd methods.
1006 (target_bfd::~target_bfd): New.
1007 (target_bfd_reopen): Adjust.
1008 (target_bfd::close): New.
1010 * record-btrace.c (record_btrace_target): New class.
1011 (record_btrace_ops): Now a record_btrace_target.
1012 (record_btrace_open, record_btrace_stop_recording)
1013 (record_btrace_disconnect, record_btrace_close)
1014 (record_btrace_async, record_btrace_info)
1015 (record_btrace_insn_history, record_btrace_insn_history_range)
1016 (record_btrace_insn_history_from, record_btrace_call_history)
1017 (record_btrace_call_history_range)
1018 (record_btrace_call_history_from, record_btrace_record_method)
1019 (record_btrace_is_replaying, record_btrace_will_replay)
1020 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
1021 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
1022 (record_btrace_store_registers, record_btrace_prepare_to_store)
1023 (record_btrace_to_get_unwinder)
1024 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
1025 (record_btrace_commit_resume, record_btrace_wait)
1026 (record_btrace_stop, record_btrace_can_execute_reverse)
1027 (record_btrace_stopped_by_sw_breakpoint)
1028 (record_btrace_supports_stopped_by_sw_breakpoint)
1029 (record_btrace_stopped_by_hw_breakpoint)
1030 (record_btrace_supports_stopped_by_hw_breakpoint)
1031 (record_btrace_update_thread_list, record_btrace_thread_alive)
1032 (record_btrace_goto_begin, record_btrace_goto_end)
1033 (record_btrace_goto, record_btrace_stop_replaying_all)
1034 (record_btrace_execution_direction)
1035 (record_btrace_prepare_to_generate_core)
1036 (record_btrace_done_generating_core): Refactor as
1037 record_btrace_target methods.
1038 (init_record_btrace_ops): Delete.
1039 (_initialize_record_btrace): Remove reference to
1040 init_record_btrace_ops.
1041 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
1042 the execution_direction global.
1043 (record_full_base_target, record_full_target)
1044 (record_full_core_target): New classes.
1045 (record_full_ops): Now a record_full_target.
1046 (record_full_core_ops): Now a record_full_core_target.
1047 (record_full_target::detach, record_full_target::disconnect)
1048 (record_full_core_target::disconnect)
1049 (record_full_target::mourn_inferior, record_full_target::kill):
1051 (record_full_open, record_full_close, record_full_async): Refactor
1052 as methods of the record_full_base_target class.
1053 (record_full_resume, record_full_commit_resume): Refactor
1054 as methods of the record_full_target class.
1055 (record_full_wait, record_full_stopped_by_watchpoint)
1056 (record_full_stopped_data_address)
1057 (record_full_stopped_by_sw_breakpoint)
1058 (record_full_supports_stopped_by_sw_breakpoint)
1059 (record_full_stopped_by_hw_breakpoint)
1060 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
1061 methods of the record_full_base_target class.
1062 (record_full_store_registers, record_full_xfer_partial)
1063 (record_full_insert_breakpoint, record_full_remove_breakpoint):
1064 Refactor as methods of the record_full_target class.
1065 (record_full_can_execute_reverse, record_full_get_bookmark)
1066 (record_full_goto_bookmark, record_full_execution_direction)
1067 (record_full_record_method, record_full_info, record_full_delete)
1068 (record_full_is_replaying, record_full_will_replay)
1069 (record_full_goto_begin, record_full_goto_end, record_full_goto)
1070 (record_full_stop_replaying): Refactor as methods of the
1071 record_full_base_target class.
1072 (record_full_core_resume, record_full_core_kill)
1073 (record_full_core_fetch_registers)
1074 (record_full_core_prepare_to_store)
1075 (record_full_core_store_registers, record_full_core_xfer_partial)
1076 (record_full_core_insert_breakpoint)
1077 (record_full_core_remove_breakpoint)
1078 (record_full_core_has_execution): Refactor
1079 as methods of the record_full_core_target class.
1080 (record_full_base_target::supports_delete_record): New.
1081 (init_record_full_ops): Delete.
1082 (init_record_full_core_ops): Delete.
1083 (record_full_save): Refactor as method of the
1084 record_full_base_target class.
1085 (_initialize_record_full): Remove references to
1086 init_record_full_ops and init_record_full_core_ops.
1088 * remote.c (remote_target, extended_remote_target): New classes.
1089 (remote_ops): Now a remote_target.
1090 (extended_remote_ops): Now an extended_remote_target.
1091 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
1092 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
1093 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
1094 (remote_pass_signals, remote_set_syscall_catchpoint)
1095 (remote_program_signals, )
1096 (remote_thread_always_alive): Remove target_ops parameter.
1097 (remote_thread_alive, remote_thread_name)
1098 (remote_update_thread_list, remote_threads_extra_info)
1099 (remote_static_tracepoint_marker_at)
1100 (remote_static_tracepoint_markers_by_strid)
1101 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1102 (remote_open): Refactor as methods of remote_target.
1103 (extended_remote_open, extended_remote_detach)
1104 (extended_remote_attach, extended_remote_post_attach):
1105 (extended_remote_supports_disable_randomization)
1106 (extended_remote_create_inferior): : Refactor as method of
1107 extended_remote_target.
1108 (remote_set_permissions, remote_open_1, remote_detach)
1109 (remote_follow_fork, remote_follow_exec, remote_disconnect)
1110 (remote_resume, remote_commit_resume, remote_stop)
1111 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1112 (remote_terminal_ours, remote_wait, remote_fetch_registers)
1113 (remote_prepare_to_store, remote_store_registers)
1114 (remote_flash_erase, remote_flash_done, remote_files_info)
1115 (remote_kill, remote_mourn, remote_insert_breakpoint)
1116 (remote_remove_breakpoint, remote_insert_watchpoint)
1117 (remote_watchpoint_addr_within_range)
1118 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1119 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1120 (remote_supports_stopped_by_sw_breakpoint)
1121 (remote_stopped_by_hw_breakpoint)
1122 (remote_supports_stopped_by_hw_breakpoint)
1123 (remote_stopped_by_watchpoint, remote_stopped_data_address)
1124 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1125 (remote_verify_memory): Refactor as methods of remote_target.
1126 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1128 (remote_xfer_partial, remote_get_memory_xfer_limit)
1129 (remote_search_memory, remote_rcmd, remote_memory_map)
1130 (remote_pid_to_str, remote_get_thread_local_address)
1131 (remote_get_tib_address, remote_read_description): Refactor as
1132 methods of remote_target.
1133 (remote_target::fileio_open, remote_target::fileio_pwrite)
1134 (remote_target::fileio_pread, remote_target::fileio_close): New.
1135 (remote_hostio_readlink, remote_hostio_fstat)
1136 (remote_filesystem_is_local, remote_can_execute_reverse)
1137 (remote_supports_non_stop, remote_supports_disable_randomization)
1138 (remote_supports_multi_process, remote_supports_cond_breakpoints)
1139 (remote_supports_enable_disable_tracepoint)
1140 (remote_supports_string_tracing)
1141 (remote_can_run_breakpoint_commands, remote_trace_init)
1142 (remote_download_tracepoint, remote_can_download_tracepoint)
1143 (remote_download_trace_state_variable, remote_enable_tracepoint)
1144 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1145 (remote_trace_start, remote_get_trace_status)
1146 (remote_get_tracepoint_status, remote_trace_stop)
1147 (remote_trace_find, remote_get_trace_state_variable_value)
1148 (remote_save_trace_data, remote_get_raw_trace_data)
1149 (remote_set_disconnected_tracing, remote_core_of_thread)
1150 (remote_set_circular_trace_buffer, remote_traceframe_info)
1151 (remote_get_min_fast_tracepoint_insn_len)
1152 (remote_set_trace_buffer_size, remote_set_trace_notes)
1153 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1154 (remote_disable_btrace, remote_teardown_btrace)
1155 (remote_read_btrace, remote_btrace_conf)
1156 (remote_augmented_libraries_svr4_read, remote_load)
1157 (remote_pid_to_exec_file, remote_can_do_single_step)
1158 (remote_execution_direction, remote_thread_handle_to_thread_info):
1159 Refactor as methods of remote_target.
1160 (init_remote_ops, init_extended_remote_ops): Delete.
1161 (remote_can_async_p, remote_is_async_p, remote_async)
1162 (remote_thread_events, remote_upload_tracepoints)
1163 (remote_upload_trace_state_variables): Refactor as methods of
1165 (_initialize_remote): Remove references to init_remote_ops and
1166 init_extended_remote_ops.
1168 * remote-sim.c (gdbsim_target): New class.
1169 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1170 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1171 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1172 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1173 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1174 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1175 Refactor as methods of gdbsim_target.
1176 (gdbsim_ops): Now a gdbsim_target.
1177 (init_gdbsim_ops): Delete.
1178 (gdbsim_cntrl_c): Adjust.
1179 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1181 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1182 (the_amd64_linux_nat_target): New.
1183 (amd64_linux_fetch_inferior_registers)
1184 (amd64_linux_store_inferior_registers): Refactor as methods of
1185 amd64_linux_nat_target.
1186 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1187 * i386-linux-nat.c: Don't include "linux-nat.h".
1188 (i386_linux_nat_target): New class.
1189 (the_i386_linux_nat_target): New.
1190 (i386_linux_fetch_inferior_registers)
1191 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1192 as methods of i386_linux_nat_target.
1193 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1194 * inf-child.c (inf_child_ops): Delete.
1195 (inf_child_fetch_inferior_registers)
1196 (inf_child_store_inferior_registers): Delete.
1197 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1198 methods of inf_child_target.
1199 (inf_child_target::supports_terminal_ours)
1200 (inf_child_target::terminal_init)
1201 (inf_child_target::terminal_inferior)
1202 (inf_child_target::terminal_ours_for_output)
1203 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1204 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1206 (inf_child_open, inf_child_disconnect, inf_child_close)
1207 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1208 (inf_child_post_startup_inferior, inf_child_can_run)
1209 (inf_child_pid_to_exec_file): Refactor as methods of
1211 (inf_child_follow_fork): Delete.
1212 (inf_child_target::can_create_inferior)
1213 (inf_child_target::can_attach): New.
1214 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1215 (inf_child_target::has_stack, inf_child_target::has_registers)
1216 (inf_child_target::has_execution): New.
1217 (inf_child_fileio_open, inf_child_fileio_pwrite)
1218 (inf_child_fileio_pread, inf_child_fileio_fstat)
1219 (inf_child_fileio_close, inf_child_fileio_unlink)
1220 (inf_child_fileio_readlink, inf_child_use_agent)
1221 (inf_child_can_use_agent): Refactor as methods of
1223 (return_zero, inf_child_target): Delete.
1224 (inf_child_target::inf_child_target): New.
1225 * inf-child.h: Include "target.h".
1226 (inf_child_target): Delete function prototype.
1227 (inf_child_target): New class.
1228 (inf_child_open_target, inf_child_mourn_inferior)
1229 (inf_child_maybe_unpush_target): Delete.
1230 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1231 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1232 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1233 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1234 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1235 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1236 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1237 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1238 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1239 methods of inf_ptrace_target.
1240 (inf_ptrace_target): Delete function.
1241 * inf-ptrace.h: Include "inf-child.h".
1242 (inf_ptrace_target): Delete function declaration.
1243 (inf_ptrace_target): New class.
1244 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1245 * linux-nat.c (linux_target): New.
1246 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1247 (linux_nat_target::~linux_nat_target): New.
1248 (linux_child_post_attach, linux_child_post_startup_inferior)
1249 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1250 (linux_child_remove_fork_catchpoint)
1251 (linux_child_insert_vfork_catchpoint)
1252 (linux_child_remove_vfork_catchpoint)
1253 (linux_child_insert_exec_catchpoint)
1254 (linux_child_remove_exec_catchpoint)
1255 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1256 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1257 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1258 (linux_nat_stopped_data_address)
1259 (linux_nat_stopped_by_sw_breakpoint)
1260 (linux_nat_supports_stopped_by_sw_breakpoint)
1261 (linux_nat_stopped_by_hw_breakpoint)
1262 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1263 (linux_nat_kill, linux_nat_mourn_inferior)
1264 (linux_nat_xfer_partial, linux_nat_thread_alive)
1265 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1266 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1267 (linux_child_static_tracepoint_markers_by_strid)
1268 (linux_nat_is_async_p, linux_nat_can_async_p)
1269 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1270 (linux_nat_supports_multi_process)
1271 (linux_nat_supports_disable_randomization, linux_nat_async)
1272 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1273 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1274 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1275 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1276 methods of linux_nat_target.
1277 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1278 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1280 (check_stopped_by_watchpoint): Adjust.
1281 (linux_xfer_partial): Delete.
1282 (linux_target_install_ops, linux_target, linux_nat_add_target):
1284 (linux_nat_target::linux_nat_target): New.
1285 * linux-nat.h: Include "inf-ptrace.h".
1286 (linux_nat_target): New.
1287 (linux_target, linux_target_install_ops, linux_nat_add_target):
1288 Delete function declarations.
1289 (linux_target): Declare global.
1290 * linux-thread-db.c (thread_db_target): New.
1291 (thread_db_target::thread_db_target): New.
1292 (thread_db_ops): Delete.
1293 (the_thread_db_target): New.
1294 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1295 (thread_db_update_thread_list, thread_db_pid_to_str)
1296 (thread_db_extra_thread_info)
1297 (thread_db_thread_handle_to_thread_info)
1298 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1299 (thread_db_resume): Refactor as methods of thread_db_target.
1300 (init_thread_db_ops): Delete.
1301 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1302 * x86-linux-nat.c: Don't include "linux-nat.h".
1303 (super_post_startup_inferior): Delete.
1304 (x86_linux_nat_target::~x86_linux_nat_target): New.
1305 (x86_linux_child_post_startup_inferior)
1306 (x86_linux_read_description, x86_linux_enable_btrace)
1307 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1308 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1309 methods of x86_linux_nat_target.
1310 (x86_linux_create_target): Delete. Bits folded ...
1311 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1313 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1314 (x86_linux_nat_target): New class.
1315 (x86_linux_create_target): Delete.
1316 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1317 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1318 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1319 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1320 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1321 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1323 (x86_use_watchpoints): Delete.
1324 * x86-nat.h: Include "breakpoint.h" and "target.h".
1325 (x86_use_watchpoints): Delete.
1326 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1327 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1328 (x86_insert_watchpoint, x86_remove_watchpoint)
1329 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1330 (x86_stopped_by_hw_breakpoint): New declarations.
1331 (x86_nat_target): New template class.
1333 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1334 (the_ppc_linux_nat_target): New.
1335 (ppc_linux_fetch_inferior_registers)
1336 (ppc_linux_can_use_hw_breakpoint)
1337 (ppc_linux_region_ok_for_hw_watchpoint)
1338 (ppc_linux_ranged_break_num_registers)
1339 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1340 (ppc_linux_insert_mask_watchpoint)
1341 (ppc_linux_remove_mask_watchpoint)
1342 (ppc_linux_can_accel_watchpoint_condition)
1343 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1344 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1345 (ppc_linux_watchpoint_addr_within_range)
1346 (ppc_linux_masked_watch_num_registers)
1347 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1348 (ppc_linux_read_description): Refactor as methods of
1349 ppc_linux_nat_target.
1350 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1352 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1353 (procfs_target): New class.
1354 (the_procfs_target): New.
1355 (procfs_target): Delete function.
1356 (procfs_auxv_parse, procfs_attach, procfs_detach)
1357 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1358 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1359 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1360 (procfs_create_inferior, procfs_update_thread_list)
1361 (procfs_thread_alive, procfs_pid_to_str)
1362 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1363 (procfs_stopped_data_address, procfs_insert_watchpoint)
1364 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1365 (proc_find_memory_regions, procfs_info_proc)
1366 (procfs_make_note_section): Refactor as methods of procfs_target.
1367 (_initialize_procfs): Adjust.
1368 * sol-thread.c (sol_thread_target): New class.
1369 (sol_thread_ops): Now a sol_thread_target.
1370 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1371 (sol_thread_fetch_registers, sol_thread_store_registers)
1372 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1373 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1374 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1375 (init_sol_thread_ops): Delete.
1376 (_initialize_sol_thread): Adjust. Remove references to
1377 init_sol_thread_ops and complete_target_initialization.
1379 * windows-nat.c (windows_nat_target): New class.
1380 (windows_fetch_inferior_registers)
1381 (windows_store_inferior_registers, windows_resume, windows_wait)
1382 (windows_attach, windows_detach, windows_pid_to_exec_file)
1383 (windows_files_info, windows_create_inferior)
1384 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1385 (windows_close, windows_pid_to_str, windows_xfer_partial)
1386 (windows_get_tib_address, windows_get_ada_task_ptid)
1387 (windows_thread_name, windows_thread_alive): Refactor as
1388 windows_nat_target methods.
1389 (do_initial_windows_stuff): Adjust.
1390 (windows_target): Delete function.
1391 (_initialize_windows_nat): Adjust.
1393 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1394 (darwin_mourn_inferior, darwin_kill_inferior)
1395 (darwin_create_inferior, darwin_attach, darwin_detach)
1396 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1397 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1398 (darwin_supports_multi_process): Refactor as darwin_nat_target
1400 (darwin_resume_to, darwin_files_info): Delete.
1401 (_initialize_darwin_inferior): Rename to ...
1402 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1403 * darwin-nat.h: Include "inf-child.h".
1404 (darwin_nat_target): New class.
1405 (darwin_complete_target): Delete.
1406 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1407 (darwin_target): New.
1408 (i386_darwin_fetch_inferior_registers)
1409 (i386_darwin_store_inferior_registers): Refactor as methods of
1411 (darwin_complete_target): Delete, with ...
1412 (_initialize_i386_darwin_nat): ... bits factored out here.
1414 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1415 (the_alpha_linux_nat_target): New.
1416 (alpha_linux_register_u_offset): Refactor as
1417 alpha_linux_nat_target method.
1418 (_initialize_alpha_linux_nat): Adjust.
1419 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1420 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1421 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1422 methods of linux_nat_trad_target.
1423 (linux_trad_target): Delete.
1424 * linux-nat-trad.h (linux_trad_target): Delete function.
1425 (linux_nat_trad_target): New class.
1426 * mips-linux-nat.c (mips_linux_nat_target): New class.
1427 (super_fetch_registers, super_store_registers, super_close):
1429 (the_mips_linux_nat_target): New.
1430 (mips64_linux_regsets_fetch_registers)
1431 (mips64_linux_regsets_store_registers)
1432 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1433 (mips_linux_register_u_offset, mips_linux_read_description)
1434 (mips_linux_can_use_hw_breakpoint)
1435 (mips_linux_stopped_by_watchpoint)
1436 (mips_linux_stopped_data_address)
1437 (mips_linux_region_ok_for_hw_watchpoint)
1438 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1439 (mips_linux_close): Refactor as methods of mips_linux_nat.
1440 (_initialize_mips_linux_nat): Adjust to C++ification.
1442 * aix-thread.c (aix_thread_target): New class.
1443 (aix_thread_ops): Now an aix_thread_target.
1444 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1445 (aix_thread_fetch_registers, aix_thread_store_registers)
1446 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1447 (aix_thread_thread_alive, aix_thread_pid_to_str)
1448 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1449 Refactor as methods of aix_thread_target.
1450 (init_aix_thread_ops): Delete.
1451 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1452 and complete_target_initialization.
1453 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1454 (rs6000_nat_target): New class.
1455 (the_rs6000_nat_target): New.
1456 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1457 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1458 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1459 (super_create_inferior): Delete.
1460 (_initialize_rs6000_nat): Adjust to C++ification.
1462 * arm-linux-nat.c (arm_linux_nat_target): New class.
1463 (the_arm_linux_nat_target): New.
1464 (arm_linux_fetch_inferior_registers)
1465 (arm_linux_store_inferior_registers, arm_linux_read_description)
1466 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1467 (arm_linux_remove_hw_breakpoint)
1468 (arm_linux_region_ok_for_hw_watchpoint)
1469 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1470 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1471 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1472 arm_linux_nat_target.
1473 (_initialize_arm_linux_nat): Adjust to C++ification.
1475 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1476 (the_aarch64_linux_nat_target): New.
1477 (aarch64_linux_fetch_inferior_registers)
1478 (aarch64_linux_store_inferior_registers)
1479 (aarch64_linux_child_post_startup_inferior)
1480 (aarch64_linux_read_description)
1481 (aarch64_linux_can_use_hw_breakpoint)
1482 (aarch64_linux_insert_hw_breakpoint)
1483 (aarch64_linux_remove_hw_breakpoint)
1484 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1485 (aarch64_linux_region_ok_for_hw_watchpoint)
1486 (aarch64_linux_stopped_data_address)
1487 (aarch64_linux_stopped_by_watchpoint)
1488 (aarch64_linux_watchpoint_addr_within_range)
1489 (aarch64_linux_can_do_single_step): Refactor as methods of
1490 aarch64_linux_nat_target.
1491 (super_post_startup_inferior): Delete.
1492 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1494 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1495 (the_hppa_linux_nat_target): New.
1496 (hppa_linux_fetch_inferior_registers)
1497 (hppa_linux_store_inferior_registers): Refactor as methods of
1498 hppa_linux_nat_target.
1499 (_initialize_hppa_linux_nat): Adjust to C++ification.
1501 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1502 (the_ia64_linux_nat_target): New.
1503 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1504 (ia64_linux_stopped_data_address)
1505 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1506 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1507 ia64_linux_nat_target methods.
1508 (super_xfer_partial): Delete.
1509 (_initialize_ia64_linux_nat): Adjust to C++ification.
1511 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1512 (the_m32r_linux_nat_target): New.
1513 (m32r_linux_fetch_inferior_registers)
1514 (m32r_linux_store_inferior_registers): Refactor as
1515 m32r_linux_nat_target methods.
1516 (_initialize_m32r_linux_nat): Adjust to C++ification.
1518 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1519 (the_m68k_linux_nat_target): New.
1520 (m68k_linux_fetch_inferior_registers)
1521 (m68k_linux_store_inferior_registers): Refactor as
1522 m68k_linux_nat_target methods.
1523 (_initialize_m68k_linux_nat): Adjust to C++ification.
1525 * s390-linux-nat.c (s390_linux_nat_target): New class.
1526 (the_s390_linux_nat_target): New.
1527 (s390_linux_fetch_inferior_registers)
1528 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1529 (s390_insert_watchpoint, s390_remove_watchpoint)
1530 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1531 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1532 (s390_auxv_parse, s390_read_description): Refactor as methods of
1533 s390_linux_nat_target.
1534 (_initialize_s390_nat): Adjust to C++ification.
1536 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1537 (the_sparc_linux_nat_target): New.
1538 (_initialize_sparc_linux_nat): Adjust to C++ification.
1539 * sparc-nat.c (sparc_fetch_inferior_registers)
1540 (sparc_store_inferior_registers): Remove target_ops parameter.
1541 * sparc-nat.h (sparc_fetch_inferior_registers)
1542 (sparc_store_inferior_registers): Remove target_ops parameter.
1543 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1544 (the_sparc64_linux_nat_target): New.
1545 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1547 * spu-linux-nat.c (spu_linux_nat_target): New class.
1548 (the_spu_linux_nat_target): New.
1549 (spu_child_post_startup_inferior, spu_child_post_attach)
1550 (spu_child_wait, spu_fetch_inferior_registers)
1551 (spu_store_inferior_registers, spu_xfer_partial)
1552 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1554 (_initialize_spu_nat): Adjust to C++ification.
1556 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1557 (the_tilegx_linux_nat_target): New.
1558 (fetch_inferior_registers, store_inferior_registers):
1559 Refactor as methods.
1560 (_initialize_tile_linux_nat): Adjust to C++ification.
1562 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1563 (the_xtensa_linux_nat_target): New.
1564 (xtensa_linux_fetch_inferior_registers)
1565 (xtensa_linux_store_inferior_registers): Refactor as
1566 xtensa_linux_nat_target methods.
1567 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1569 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1570 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1571 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1572 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1573 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1574 (fbsd_stopped_by_sw_breakpoint)
1575 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1576 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1577 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1578 (fbsd_post_startup_inferior, fbsd_post_attach)
1579 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1580 (fbsd_set_syscall_catchpoint)
1581 (super_xfer_partial, super_resume, super_wait)
1582 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1583 (fbsd_handle_debug_trap): Remove target_ops parameter.
1584 (fbsd_nat_add_target): Delete.
1585 * fbsd-nat.h: Include "inf-ptrace.h".
1586 (fbsd_nat_add_target): Delete.
1587 (USE_SIGTRAP_SIGINFO): Define.
1588 (fbsd_nat_target): New class.
1590 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1591 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1592 (amd64bsd_target): Delete.
1593 * amd64-bsd-nat.h: New file.
1594 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1596 (amd64_fbsd_nat_target): New class.
1597 (the_amd64_fbsd_nat_target): New.
1598 (amd64fbsd_read_description): Refactor as method of
1599 amd64_fbsd_nat_target.
1600 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1601 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1602 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1603 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1604 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1605 (i386bsd_target): Delete.
1606 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1607 (i386bsd_fetch_inferior_registers)
1608 (i386bsd_store_inferior_registers): Declare.
1609 (i386_bsd_nat_target): New class.
1610 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1611 (the_i386_fbsd_nat_target): New.
1612 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1613 i386_fbsd_nat_target methods.
1614 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1615 (_initialize_i386fbsd_nat): Adjust to C++ification.
1616 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1617 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1618 (_initialize_x86_bsd_nat): Adjust to C++ification.
1619 * x86-bsd-nat.h: Include "x86-nat.h".
1620 (x86bsd_target): Delete declaration.
1621 (x86bsd_nat_target): New class.
1623 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1624 (the_aarch64_fbsd_nat_target): New.
1625 (aarch64_fbsd_fetch_inferior_registers)
1626 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1627 aarch64_fbsd_nat_target.
1628 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1629 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1630 (the_alpha_bsd_nat_target): New.
1631 (alphabsd_fetch_inferior_registers)
1632 (alphabsd_store_inferior_registers): Refactor as
1633 alpha_bsd_nat_target methods.
1634 (_initialize_alphabsd_nat): Refactor as methods of
1635 alpha_bsd_nat_target.
1636 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1637 (the_amd64_nbsd_nat_target): New.
1638 (_initialize_amd64nbsd_nat): Adjust to C++ification.
1639 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1640 (the_amd64_obsd_nat_target): New.
1641 (_initialize_amd64obsd_nat): Adjust to C++ification.
1642 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1643 (the_arm_fbsd_nat_target): New.
1644 (arm_fbsd_fetch_inferior_registers)
1645 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1646 (_initialize_arm_fbsd_nat): Refactor as methods of
1647 arm_fbsd_nat_target.
1648 (_initialize_arm_fbsd_nat): Adjust to C++ification.
1649 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1650 (the_arm_netbsd_nat_target): New.
1651 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1652 arm_netbsd_nat_target.
1653 (_initialize_arm_netbsd_nat): Adjust to C++ification.
1654 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1655 (the_hppa_nbsd_nat_target): New.
1656 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1657 hppa_nbsd_nat_target methods.
1658 (_initialize_hppanbsd_nat): Adjust to C++ification.
1659 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1660 (the_hppa_obsd_nat_target): New.
1661 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1662 methods of hppa_obsd_nat_target.
1663 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
1665 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1666 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
1668 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1669 (_initialize_i386obsd_nat): Use add_target.
1670 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1671 (the_m68k_bsd_nat_target): New.
1672 (m68kbsd_fetch_inferior_registers)
1673 (m68kbsd_store_inferior_registers): Refactor as methods of
1674 m68k_bsd_nat_target.
1675 (_initialize_m68kbsd_nat): Adjust to C++ification.
1676 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1677 (the_mips_fbsd_nat_target): New.
1678 (mips_fbsd_fetch_inferior_registers)
1679 (mips_fbsd_store_inferior_registers): Refactor as methods of
1680 mips_fbsd_nat_target.
1681 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1683 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1684 (the_mips_nbsd_nat_target): New.
1685 (mipsnbsd_fetch_inferior_registers)
1686 (mipsnbsd_store_inferior_registers): Refactor as methods of
1687 mips_nbsd_nat_target.
1688 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1689 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1690 (the_mips64_obsd_nat_target): New.
1691 (mips64obsd_fetch_inferior_registers)
1692 (mips64obsd_store_inferior_registers): Refactor as methods of
1693 mips64_obsd_nat_target.
1694 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1696 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1698 * nbsd-nat.h: Include "inf-ptrace.h".
1699 (nbsd_nat_target): New class.
1700 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1701 (obsd_wait): Refactor as methods of obsd_nat_target.
1702 (obsd_add_target): Delete.
1703 * obsd-nat.h: Include "inf-ptrace.h".
1704 (obsd_nat_target): New class.
1705 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1706 (the_ppc_fbsd_nat_target): New.
1707 (ppcfbsd_fetch_inferior_registers)
1708 (ppcfbsd_store_inferior_registers): Refactor as methods of
1709 ppc_fbsd_nat_target.
1710 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1712 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1713 (the_ppc_nbsd_nat_target): New.
1714 (ppcnbsd_fetch_inferior_registers)
1715 (ppcnbsd_store_inferior_registers): Refactor as methods of
1716 ppc_nbsd_nat_target.
1717 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1718 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1719 (the_ppc_obsd_nat_target): New.
1720 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1721 methods of ppc_obsd_nat_target.
1722 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1724 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1725 (the_sh_nbsd_nat_target): New.
1726 (shnbsd_fetch_inferior_registers)
1727 (shnbsd_store_inferior_registers): Refactor as methods of
1729 (_initialize_shnbsd_nat): Adjust to C++ification.
1730 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1731 (inf_ptrace_xfer_partial): Delete.
1732 (sparc_xfer_partial, sparc_target): Delete.
1733 * sparc-nat.h (sparc_fetch_inferior_registers)
1734 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1735 (sparc_target): Delete function declaration.
1736 (sparc_target): New template class.
1737 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1738 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1739 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1740 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1742 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1743 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1744 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1745 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
1747 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1748 (the_vax_bsd_nat_target): New.
1749 (vaxbsd_fetch_inferior_registers)
1750 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1752 (_initialize_vaxbsd_nat): Adjust to C++ification.
1754 * bsd-kvm.c (bsd_kvm_target): New class.
1755 (bsd_kvm_ops): Now a bsd_kvm_target.
1756 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1757 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1758 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1760 (bsd_kvm_return_one): Delete.
1761 (bsd_kvm_add_target): Adjust to C++ification.
1763 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1764 (nto_procfs_target_procfs): New classes.
1765 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1766 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1767 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1768 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1769 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1770 (procfs_remove_hw_breakpoint, procfs_resume)
1771 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1772 (procfs_kill_inferior, procfs_store_registers)
1773 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1774 as methods of nto_procfs_target.
1775 (nto_procfs_ops): Now an nto_procfs_target_procfs.
1776 (nto_native_ops): Delete.
1777 (procfs_open, procfs_native_open): Delete.
1778 (nto_native_ops): Now an nto_procfs_target_native.
1779 (init_procfs_targets): Adjust to C++ification.
1780 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1781 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1782 Refactor as methods of nto_procfs_target.
1784 * go32-nat.c (go32_nat_target): New class.
1785 (the_go32_nat_target): New.
1786 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1787 (go32_store_registers, go32_xfer_partial, go32_files_info)
1788 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1789 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1790 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1791 (go32_pid_to_str): Refactor as methods of go32_nat_target.
1792 (go32_target): Delete.
1793 (_initialize_go32_nat): Adjust to C++ification.
1795 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1796 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1797 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1798 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1800 (gnu_target): Delete.
1801 * gnu-nat.h (gnu_target): Delete.
1802 (gnu_nat_target): New class.
1803 * i386-gnu-nat.c (gnu_base_target): New.
1804 (i386_gnu_nat_target): New class.
1805 (the_i386_gnu_nat_target): New.
1806 (_initialize_i386gnu_nat): Adjust to C++ification.
1808 2018-05-02 Pedro Alves <palves@redhat.com>
1810 * bfd-target.c (target_bfd_xclose): Rename to ...
1811 (target_bfd_close): ... this.
1812 (target_bfd_reopen): Adjust.
1813 * target.c (target_close): Remove references to to_xclose.
1814 * target.h (target_ops::to_xclose): Delete.
1815 (target_ops::to_close): Update comments.
1817 2018-05-02 Pedro Alves <palves@redhat.com>
1819 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1821 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1822 * inf-ptrace.c (inf_ptrace_register_u_offset)
1823 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1824 (inf_ptrace_store_register, inf_ptrace_store_registers)
1825 (inf_ptrace_trad_target): Move to ...
1826 * linux-nat-trad.c: ... this new file.
1827 * linux-nat-trad.h: New file.
1828 * linux-nat.c (linux_target_install_ops): Make extern.
1829 (linux_trad_target): Delete.
1830 * linux-nat.h (linux_trad_target): Delete declaration.
1831 (linux_target_install_ops): Declare.
1832 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1835 2018-05-02 Pedro Alves <palves@redhat.com>
1837 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1838 procfs_target/add_target here.
1839 * procfs.c (procfs_target): Make static.
1840 (_initialize_procfs): Call add_target here.
1841 * procfs.h (struct target_ops): Remove forward declaration.
1842 (procfs_target): Remove declaration.
1843 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1845 2018-05-02 Pedro Alves <palves@redhat.com>
1847 * procfs.c (procfs_stopped_by_watchpoint)
1848 (procfs_insert_watchpoint, procfs_remove_watchpoint)
1849 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1851 (procfs_use_watchpoints): Delete, move contents...
1852 (procfs_target): ... here.
1853 * procfs.h (procfs_use_watchpoints): Delete declaration.
1854 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1855 procfs_use_watchpoints.
1856 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1857 procfs_use_watchpoints.
1859 2018-05-02 Tom Tromey <tom@tromey.com>
1862 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1863 and var_zuinteger_unlimited.
1864 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1865 and PARAM_ZUINTEGER_UNLIMITED.
1866 (set_parameter_value): Handle var_zuinteger and
1867 var_zuinteger_unlimited.
1868 (add_setshow_generic): Likewise.
1869 (parmpy_init): Likewise.
1871 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
1874 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1875 pointer is not null before dereferencing it.
1877 2018-04-30 Tom Tromey <tom@tromey.com>
1879 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1882 2018-04-30 Tom Tromey <tom@tromey.com>
1884 * breakpoint.c (mention): Remove use of is_mi_like_p.
1885 (print_mention_ranged_breakpoint): Likewise.
1886 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1889 2018-04-30 Tom Tromey <tom@tromey.com>
1891 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1893 2018-04-30 Tom Tromey <tom@tromey.com>
1895 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1896 (info_spu_event_command): Remove some uses of is_mi_like_p.
1898 2018-04-30 Tom Tromey <tom@tromey.com>
1900 * python/py-framefilter.c (py_print_single_arg)
1901 (enumerate_locals, py_print_args, py_print_frame): Remove some
1902 uses of is_mi_like_p.
1904 2018-04-30 Tom Tromey <tom@tromey.com>
1907 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1908 * ui-out.h (ui_out::is_mi_like_p): Now const.
1909 (ui_out::do_is_mi_like_p): Now const.
1910 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1912 2018-04-30 Tom Tromey <tom@tromey.com>
1914 * varobj.c (varobj_set_visualizer): Use new_reference.
1915 * python/python.c (gdbpy_decode_line): Use new_reference.
1916 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1919 2018-04-30 Tom Tromey <tom@tromey.com>
1921 * varobj.c (install_new_value): Use new_reference.
1922 * value.h (value_incref): Return void. Swap intro comment with
1924 * value.c (set_value_parent): Use new_reference.
1925 (value_incref): Return void. Update intro comment.
1926 (release_value): Use new_reference.
1927 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1929 2018-04-30 Tom Tromey <tom@tromey.com>
1931 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1932 * gdb_bfd.h (new_bfd_ref): Remove.
1933 (gdb_bfd_open): Update comment.
1934 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1935 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1936 (gdb_bfd_fdopenr): Use new_reference.
1937 * exec.c (exec_file_attach): Use new_reference.
1939 2018-04-30 Tom Tromey <tom@tromey.com>
1941 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1944 2018-04-30 Tom Tromey <tom@tromey.com>
1946 * jit.c (jit_read_code_entry): Use type_align.
1947 * i386-tdep.c (i386_gdbarch_init): Don't call
1948 set_gdbarch_long_long_align_bit.
1949 * gdbarch.sh: Remove long_long_align_bit.
1950 * gdbarch.c, gdbarch.h: Rebuild.
1951 * arc-tdep.c (arc_type_align): New function.
1952 (arc_gdbarch_init): Use arc_type_align. Don't call
1953 set_gdbarch_long_long_align_bit.
1955 2018-04-30 Tom Tromey <tom@tromey.com>
1957 * rust-lang.c (rust_type_alignment): Remove.
1958 (rust_composite_type): Use type_align.
1960 2018-04-30 Tom Tromey <tom@tromey.com>
1962 * NEWS: Mention Type.align.
1963 * python/py-type.c (typy_get_alignof): New function.
1964 (type_object_getset): Add "alignof".
1966 2018-04-30 Tom Tromey <tom@tromey.com>
1970 * std-operator.def (UNOP_ALIGNOF): New operator.
1971 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1973 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1974 * c-lang.c (c_op_print_tab): Add alignof.
1975 * c-exp.y (ALIGNOF): New token.
1976 (exp): Add "ALIGNOF" production.
1977 (ident_tokens): Add _Alignof and alignof.
1979 2018-04-30 Tom Tromey <tom@tromey.com>
1981 * i386-tdep.c (i386_type_align): New function.
1982 (i386_gdbarch_init): Update.
1983 * gdbarch.sh (type_align): New method.
1984 * gdbarch.c, gdbarch.h: Rebuild.
1985 * arch-utils.h (default_type_align): Declare.
1986 * arch-utils.c (default_type_align): New function.
1987 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1988 (struct type) <align_log2>: New field.
1989 <instance_flags>: Now a bitfield.
1990 (TYPE_RAW_ALIGN): New macro.
1991 (type_align, type_raw_align, set_type_align): Declare.
1992 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1994 * dwarf2read.c (quirk_rust_enum): Set type alignment.
1995 (get_alignment, maybe_set_alignment): New functions.
1996 (read_structure_type, read_enumeration_type, read_array_type)
1997 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1998 (read_subrange_type, read_base_type): Set type alignment.
2000 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
2002 * dwarf2read.c (read_index_from_section): Use bool.
2004 2018-04-29 Fabian Groffen <grobian@gentoo.org>
2007 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
2010 2018-04-29 John Reiser <jreiser@BitWagon.com>
2013 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
2014 last step, and do it atomically.
2016 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
2018 * compile/compile-c-types.c (convert_int, convert_float):
2021 2018-04-27 Tom Tromey <tom@tromey.com>
2024 * rust-lang.c (rust_inclusive_range_type_p): New function.
2025 (rust_range): Handle inclusive ranges.
2026 (rust_compute_range): Likewise.
2027 * rust-exp.y (struct rust_op) <inclusive>: New field.
2028 (DOTDOTEQ): New constant.
2029 (range_expr): Add "..=" productions.
2030 (operator_tokens): Add "..=" token.
2031 (ast_range): Add "inclusive" parameter.
2032 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
2034 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
2036 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
2037 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
2039 * expprint.c (print_subexp_standard): Handle new bounds values.
2040 (dump_subexp_body_standard): Likewise.
2042 2018-04-27 Tom Tromey <tom@tromey.com>
2044 * configure: Rebuild.
2045 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
2046 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
2048 (class symbol_needs_eval_context): Likewise.
2049 * dwarf2read.c (mock_mapped_index::symbol_name_count)
2050 (mock_mapped_index::symbol_name_at): Use "override". Remove
2052 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
2054 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
2055 * aarch64-tdep.c (instruction_reader::read): Use "override".
2056 (instruction_reader_test::read): Likewise.
2057 * arm-tdep.c (instruction_reader::read): Use "override".
2058 (instruction_reader_thumb::read): Likewise.
2060 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2063 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
2064 instead of remote_send.
2065 (remote_send): Remove.
2067 2018-04-26 Pedro Alves <palves@redhat.com>
2069 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
2070 find_function_start_sal instead of find_pc_line.
2072 2018-04-26 Pedro Alves <palves@redhat.com>
2074 * breakpoint.c (set_breakpoint_location_function): Handle
2076 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
2077 * elfread.c (elf_symtab_read): Give data symbols with
2078 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
2079 (elf_rel_plt_read): Update comment.
2080 * linespec.c (convert_linespec_to_sals): Handle
2082 (minsym_found): Handle mst_data_gnu_ifunc.
2083 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
2084 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
2085 * parse.c (find_minsym_type_and_address): Handle
2087 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
2088 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
2089 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
2091 <mst_data_gnu_ifunc>: New enumerator.
2093 2018-04-26 Pedro Alves <palves@redhat.com>
2095 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
2096 (lookup_minimal_symbol_by_pc_section): ... this. Replace
2097 'want_trampoline' parameter by a lookup_msym_prefer parameter.
2099 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
2100 (lookup_minimal_symbol_by_pc): Adjust.
2101 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2102 (lookup_solib_trampoline_symbol_by_pc): Adjust.
2103 * minsyms.h (lookup_msym_prefer): New enum.
2104 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2105 parameter by a lookup_msym_prefer parameter.
2107 2018-04-26 Pedro Alves <palves@redhat.com>
2109 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2110 ends in "@plt" instead of looking at the symbol's section.
2112 2018-04-26 Pedro Alves <palves@redhat.com>
2114 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
2116 (find_pc_partial_function_gnu_ifunc): Rename to ...
2117 (find_pc_partial_function): ... this, and remove references to
2119 (find_pc_partial_function): Delete old implementation.
2120 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2122 2018-04-26 Pedro Alves <palves@redhat.com>
2124 * linespec.c (struct bound_minimal_symbol_search_key): New.
2125 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
2126 skip first line if we found a GNU ifunc minimal symbol by name.
2127 (compare_msymbols): Change parameters to work with a destructured
2129 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2132 2018-04-26 Pedro Alves <palves@redhat.com>
2134 * breakpoint.c (set_breakpoint_location_function): Don't resolve
2135 ifunc targets here. Instead, if we have an ifunc minsym, use its
2137 (add_location_to_breakpoint): Store the minsym and the objfile in
2138 the breakpoint location.
2139 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2140 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2141 Record the minsym in the sal.
2142 * symtab.h (symtab_and_line) <msymbol>: New field.
2144 2018-04-26 Pedro Alves <palves@redhat.com>
2146 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2147 unless we actually resolved the ifunc.
2149 2018-04-26 Pedro Alves <palves@redhat.com>
2151 * c-exp.y (variable production): Prefer ifunc minsyms over
2152 regular function symbols.
2153 * symtab.c (find_gnu_ifunc): New function.
2154 * minsyms.h (lookup_msym_prefer): New enum.
2155 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2156 parameter by a lookup_msym_prefer parameter.
2157 * symtab.h (find_gnu_ifunc): New declaration.
2159 2018-04-26 Pedro Alves <palves@redhat.com>
2161 * blockframe.c (find_gnu_ifunc_target_type): New function.
2162 (find_function_type): New.
2163 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2164 return a value with a memory address.
2165 (eval_call): For calls to GNU ifunc functions, try to find the
2166 type of the target function from the type that the resolver
2168 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2170 * infcall.c (find_function_return_type): Delete.
2171 (find_function_addr): Add 'function_type' parameter. For calls to
2172 GNU ifunc functions, try to find the type of the target function
2173 from the type that the resolver returns, and return it via
2175 (call_function_by_hand_dummy): Adjust to use the function type
2176 returned by find_function_addr.
2177 (find_function_addr): Add 'function_type' parameter and move
2179 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2182 2018-04-26 Pedro Alves <palves@redhat.com>
2184 * c-exp.y (variable production): Skip finding an alias for ifunc
2187 2018-04-26 Pedro Alves <palves@redhat.com>
2189 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2191 2018-04-25 Pedro Alves <palves@redhat.com>
2193 * infcmd.c (kill_command): Print the pid as string, not the whole
2194 thread's ptid. Add comment. s/has been killed/killed/ in output
2196 * remote.c (remote_detach_1): Print the pid as string, not the
2197 whole thread's ptid.
2199 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2200 Sergio Durigan Junior <sergiodj@redhat.com>
2201 Pedro Alves <palves@redhat.com>
2203 * infcmd.c (kill_command): Print message when inferior has
2205 * inferior.c (print_inferior_events): Remove 'static'. Set as
2207 (add_inferior): Improve message printed when
2208 'print_inferior_events' is on.
2209 (exit_inferior): Remove message printed when
2210 'print_inferior_events' is on.
2211 (detach_inferior): Improve message printed when
2212 'print_inferior_events' is on.
2213 (initialize_inferiors): Use 'add_inferior_silent' to set
2214 'current_inferior_'.
2215 * inferior.h (print_inferior_events): Declare here as
2217 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2218 '[Detaching...]' messages when 'print_inferior_events' is on.
2219 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2220 as prefix/suffix for messages. Remove periods. Fix erroneous
2221 'Detaching after fork from child...', replace it by '... from
2223 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2224 prefix/suffix when printing 'Detaching...' messages. Print
2225 them when 'print_inferior_events' is on.
2226 * remote.c (remote_detach_1): Print message when detaching
2227 from inferior and '!is_fork_parent'.
2229 2018-04-24 Tom Tromey <tom@tromey.com>
2231 * cli-out.h: Reindent.
2233 2018-04-24 Tom Tromey <tom@tromey.com>
2235 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2236 (cli_ui_out::do_field_string): Use fputs_filtered.
2237 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2239 2018-04-23 Tom Tromey <tom@tromey.com>
2241 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2242 gdb::unique_xmalloc_ptr.
2244 2018-04-23 Tom Tromey <tom@tromey.com>
2246 * configure: Rebuild.
2248 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2251 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2252 prepare_for_testing. Set normal_bp to r_debug_state if target
2255 2018-04-21 Pedro Alves <palves@redhat.com>
2256 Rajendra SY <rajendra.sy@gmail.com>
2258 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2259 * remote.c (extended_remote_attach): In all-stop mode, mark the
2260 thread as executing.
2262 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2264 * thread.c (thread_apply_all_command): Fix comment.
2265 (thread_command): Fix comment.
2267 2018-04-10 Alan Hayward <alan.hayward@arm.com>
2269 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2271 * features/aarch64-core.c (create_feature_aarch64_core):
2273 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2275 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2277 * features/i386/32bit-avx512.c
2278 (create_feature_i386_32bit_avx512): Likewise.
2279 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2281 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2283 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2285 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2287 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2289 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2291 * features/i386/64bit-avx512.c
2292 (create_feature_i386_64bit_avx512): Likewise.
2293 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2295 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2297 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2299 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2301 * features/i386/64bit-segments.c
2302 (create_feature_i386_64bit_segments): Likewise.
2303 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2305 * features/i386/x32-core.c
2306 (create_feature_i386_x32_core): Likewise.
2307 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2308 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2309 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2310 * target-descriptions.c: In generated code, don't pass xml
2313 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2315 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2316 (print_xml_feature::visit_post): Likewise.
2317 (print_xml_feature::visit): Likewise.
2318 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2319 (print_xml_feature): Add new class.
2320 * regformats/regdat.sh: Null xmltarget on feature targets.
2321 * target-descriptions.c (struct target_desc): Add xmltarget.
2322 (maintenance_check_tdesc_xml_convert): Add unittest function.
2323 (tdesc_get_features_xml): Add function to get xml.
2324 (maintenance_check_xml_descriptions): Test xml generation.
2325 * xml-tdesc.c (string_read_description_xml): Add function.
2326 * xml-tdesc.h (string_read_description_xml): Add declaration.
2328 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2330 * features/Makefile: Add feature marker to targets with new style
2331 target descriptions.
2332 * regformats/aarch64.dat: Regenerate.
2333 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2334 * regformats/i386/amd64-avx-linux.dat: Likewise.
2335 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2336 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2337 * regformats/i386/amd64-linux.dat: Likewise.
2338 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2339 * regformats/i386/amd64.dat: Likewise.
2340 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2341 * regformats/i386/i386-avx-linux.dat: Likewise.
2342 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2343 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2344 * regformats/i386/i386-linux.dat: Likewise.
2345 * regformats/i386/i386-mmx-linux.dat: Likewise.
2346 * regformats/i386/i386-mpx-linux.dat: Likewise.
2347 * regformats/i386/i386.dat: Likewise.
2348 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2349 * regformats/i386/x32-avx-linux.dat: Likewise.
2350 * regformats/i386/x32-linux.dat: Likewise.
2351 * regformats/tic6x-c62x-linux.dat: Likewise.
2352 * regformats/tic6x-c64x-linux.dat: Likewise.
2353 * regformats/tic6x-c64xp-linux.dat: Likewise.
2354 * regformats/regdat.sh: Parse feature marker.
2356 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2358 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2359 (tdesc_osabi_name): Likewise.
2360 * target-descriptions.c (tdesc_architecture_name): Add new
2362 (tdesc_osabi_name): Likewise.
2364 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2366 * common/tdesc.c (tdesc_predefined_type): Move to here.
2367 (tdesc_named_type): Likewise.
2368 (tdesc_create_vector): Likewise.
2369 (tdesc_create_struct): Likewise.
2370 (tdesc_set_struct_size): Likewise.
2371 (tdesc_create_union): Likewise.
2372 (tdesc_create_flags): Likewise.
2373 (tdesc_create_enum): Likewise.
2374 (tdesc_add_field): Likewise.
2375 (tdesc_add_typed_bitfield): Likewise.
2376 (tdesc_add_bitfield): Likewise.
2377 (tdesc_add_flag): Likewise.
2378 (tdesc_add_enum_value): Likewise.
2379 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2380 (struct tdesc_type_vector): Likewise.
2381 (struct tdesc_type_field): Likewise.
2382 (struct tdesc_type_with_fields): Likewise.
2383 (tdesc_create_enum): Add declaration.
2384 (tdesc_add_typed_bitfield): Likewise.
2385 (tdesc_add_enum_value): Likewise.
2386 * target-descriptions.c (tdesc_type_field): Move from here.
2387 (tdesc_type_builtin): Likewise.
2388 (tdesc_type_vector): Likewise.
2389 (tdesc_type_with_fields): Likewise.
2390 (tdesc_predefined_types): Likewise.
2391 (tdesc_named_type): Likewise.
2392 (tdesc_create_vector): Likewise.
2393 (tdesc_create_struct): Likewise.
2394 (tdesc_set_struct_size): Likewise.
2395 (tdesc_create_union): Likewise.
2396 (tdesc_create_flags): Likewise.
2397 (tdesc_create_enum): Likewise.
2398 (tdesc_add_field): Likewise.
2399 (tdesc_add_typed_bitfield): Likewise.
2400 (tdesc_add_bitfield): Likewise.
2401 (tdesc_add_flag): Likewise.
2402 (tdesc_add_enum_value): Likewise.
2403 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2404 (tdesc_add_typed_bitfield): Likewise.
2405 (tdesc_add_enum_value): Likewise.
2407 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2409 * common/tdesc.c (tdesc_feature::accept): Move to here.
2410 (tdesc_feature::operator==): Likewise.
2411 (tdesc_create_reg): Likewise.
2412 * common/tdesc.h (tdesc_type_kind): Likewise.
2413 (struct tdesc_type): Likewise.
2414 (struct tdesc_feature): Likewise.
2415 * regformats/regdat.sh: Create a feature.
2416 * target-descriptions.c (tdesc_type_kind): Move from here.
2417 (tdesc_type): Likewise.
2418 (tdesc_type_up): Likewise.
2419 (tdesc_feature): Likewise.
2420 (tdesc_create_reg): Likewise.
2422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2424 * Makefile.in: Add arch/tdesc.c
2425 * common/tdesc.c: New file.
2426 * common/tdesc.h (tdesc_element_visitor): Move to here.
2427 (tdesc_element): Likewise.
2428 (tdesc_reg): Likewise.
2429 (tdesc_reg_up): Likewise.
2430 * regformats/regdef.h (reg): Add offset to constructors.
2431 * target-descriptions.c (tdesc_element_visitor): Move from here.
2432 (tdesc_element): Likewise.
2433 (tdesc_reg): Likewise.
2434 (tdesc_reg_up): Likewise.
2436 2018-04-17 Tom Tromey <tom@tromey.com>
2438 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2441 2018-04-17 Tom Tromey <tom@tromey.com>
2443 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2445 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2447 * symtab.c (print_symbol_info): Skip printing filename and line
2448 number when `last' is NULL.
2449 (symtab_symbol_info): Use empty string instead of NULL for first
2450 invocation of print_symbol_info.
2451 (rbreak_command): Pass NULL to `last' parameter of
2454 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2456 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2459 2018-04-16 Pedro Alves <palves@redhat.com>
2461 * MAINTAINERS (sh): Remove.
2462 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2463 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2464 (ALLDEPFILES): Remove sh64-tdep.c.
2465 * NEWS: Mentions that support for SH-5/SH64 is removed.
2466 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2467 (sh*-*-openbsd*): Ditto.
2468 (sh64-*-elf*): Remove.
2470 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2471 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2472 * sh-tdep.c: No longer include "sh64-tdep.h".
2473 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2474 * sh64-tdep.c, sh64-tdep.h: Remove files.
2476 2018-04-16 Pedro Alves <palves@redhat.com>
2478 * MAINTAINERS: Remove m88k.
2479 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2480 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2481 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2482 * NEWS: Mention that support for m88k was removed.
2483 * configure.host (m88*-*-*): Remove support.
2484 * configure.nat (m88k-*-*): Remove support.
2485 * configure.tgt (m88*-*-openbsd*): Remove.
2486 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2488 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2490 * configure.tgt (x86_tobjs): New variable.
2491 (amd64_tobjs, i386_tobjs): Use it.
2493 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2495 * symtab.c (print_symbol_info): Precede the symbol definition by
2496 the line number when available.
2497 * NEWS: Advertise this enhancement.
2499 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2501 * NEWS (New options): announce set/show record btrace cpu.
2502 * btrace.c: Include record-btrace.h.
2503 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2504 the vendor is unknown.
2505 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2506 Maybe overwrite the btrace configuration's cpu.
2507 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2508 (btrace_fetch): Add cpu parameter. Update callers.
2509 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2510 Maybe overwrite the btrace configuration's cpu. Skip enabling
2511 errata workarounds if the vendor is unknown.
2512 * python/py-record-btrace.c: Include record-btrace.h.
2513 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2514 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2515 * record-btrace.c (record_btrace_cpu_state_kind): New.
2516 (record_btrace_cpu): New.
2517 (set_record_btrace_cpu_cmdlist): New.
2518 (record_btrace_get_cpu): New.
2519 (require_btrace_thread, record_btrace_info)
2520 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2521 (cmd_set_record_btrace_cpu_none): New.
2522 (cmd_set_record_btrace_cpu_auto): New.
2523 (cmd_set_record_btrace_cpu): New.
2524 (cmd_show_record_btrace_cpu): New.
2525 (_initialize_record_btrace): Initialize set/show record btrace cpu
2527 * record-btrace.h (record_btrace_get_cpu): New.
2529 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2531 * record.c (set_record_command): Fix typo in message.
2533 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2535 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2537 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2539 * infrun.c (process_event_stop_test): Call
2540 gdbarch_in_indirect_branch_thunk.
2541 * gdbarch.sh (in_indirect_branch_thunk): New.
2542 * gdbarch.c: Regenerated.
2543 * gdbarch.h: Regenerated.
2546 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2547 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2548 (ALLDEPFILES): Add x86-tdep.c.
2549 * arch-utils.h (default_in_indirect_branch_thunk): New.
2550 * arch-utils.c (default_in_indirect_branch_thunk): New.
2551 * i386-tdep: Include x86-tdep.h.
2552 (i386_in_indirect_branch_thunk): New.
2553 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2555 * amd64-tdep: Include x86-tdep.h.
2556 (amd64_in_indirect_branch_thunk): New.
2557 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2559 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2562 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2563 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2564 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2567 2018-04-12 Tom Tromey <tom@tromey.com>
2569 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2570 (rust_evaluate_subexp): Likewise.
2572 2018-04-12 Pedro Alves <palves@redhat.com>
2574 * procfs.c (procfs_detach): Make forward declaration's prototype
2575 match definition's protototype.
2576 (proc_get_LDT_entry): Remove stale do_cleanups call.
2578 2018-04-12 Pedro Alves <palves@redhat.com>
2580 * target.h (target_ops::to_has_exited): Delete.
2581 (target_has_exited): Delete.
2582 * target-delegates.c: Regenerate.
2584 2018-04-11 Pedro Alves <palves@redhat.com>
2586 * target.c (fileio_fh_t::t): Add comment.
2587 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2588 (target_fileio_close): Handle a NULL target.
2589 (invalidate_fileio_fh): New.
2590 (target_close): Call it.
2591 * remote.c (remote_hostio_send_command): No longer check whether
2592 remote_desc is open.
2594 2018-04-11 Pedro Alves <palves@redhat.com>
2596 * target.c (fileio_fh_t): Make it a named struct instead of a
2598 (fileio_fh_t::is_closed): New method.
2599 (DEF_VEC_O (fileio_fh_t)): Remove.
2600 (fileio_fhandles): Now a std::vector.
2601 (is_closed_fileio_fh): Delete.
2602 (acquire_fileio_fd): Adjust. Rename parameters.
2603 (release_fileio_fd): Adjust.
2604 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2605 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2606 (target_fileio_close): Adjust.
2608 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2610 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2613 2018-04-10 Pedro Alves <palves@redhat.com>
2615 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2616 (scoped_finish_thread_state): New class.
2617 * infcmd.c (run_command_1): Use it instead of finish_thread_state
2619 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2620 (fetch_inferior_event, normal_stop): Likewise.
2621 * thread.c (finish_thread_state_cleanup): Delete.
2623 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2624 Pedro Alves <palves@redhat.com>
2626 * value.c: Include "selftest.h" and "common/array-view.h".
2627 (struct range) <operator ==>: New.
2628 (test_ranges_contain): New.
2629 (check_ranges_vector): New.
2630 (test_insert_into_bit_range_vector): New.
2631 (_initialize_values): Register selftests.
2632 * common/array-view.h (operator==, operator!=): New.
2634 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2636 * common/gdb_vecs.h (unordered_remove): Add overload that takes
2638 * inline-frame.c: Include <algorithm>.
2639 (struct inline_state): Add constructor.
2640 (inline_state_s): Remove.
2641 (DEF_VEC_O(inline_state_s)): Remove.
2642 (inline_states): Change type to std::vector.
2643 (find_inline_frame_state): Adjust to std::vector.
2644 (allocate_inline_frame_state): Remove.
2645 (clear_inline_frame_state): Adjust to std::vector.
2646 (skip_inline_frames): Adjust to std::vector.
2648 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2650 * tracepoint.h (struct trace_state_variable): Add constructor.
2651 <name>: Change type to std::string.
2652 * tracepoint.c (tsv_s): Remove.
2653 (DEF_VEC_O(tsv_s)): Remove.
2654 (tvariables): Change to std::vector.
2655 (create_trace_state_variable): Adjust to std::vector.
2656 (find_trace_state_variable): Likewise.
2657 (find_trace_state_variable_by_number): Likewise.
2658 (delete_trace_state_variable): Likewise.
2659 (trace_variable_command): Adjust to std::string.
2660 (delete_trace_variable_command): Likewise.
2661 (tvariables_info_1): Adjust to std::vector.
2662 (save_trace_state_variables): Likewise.
2663 (start_tracing): Likewise.
2664 (merge_uploaded_trace_state_variables): Adjust to std::vector
2666 * target.h (struct target_ops)
2667 <to_download_trace_state_variable>: Pass reference to
2668 trace_state_variable.
2669 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2670 * target-delegates.c: Re-generate.
2671 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2672 (mi_tsv_deleted): Likewise.
2673 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2674 * remote.c (remote_download_trace_state_variable): Change
2675 pointer to reference and adjust.
2676 * make-target-delegates (parse_argtypes): Handle references.
2677 (write_function_header): Likewise.
2678 (munge_type): Likewise.
2680 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2682 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2683 string_view-selftests.c.
2684 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2686 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2687 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2688 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2689 * unittests/basic_string_view/element_access/char/1.cc:
2691 * unittests/basic_string_view/element_access/char/empty.cc:
2693 * unittests/basic_string_view/element_access/char/front_back.cc:
2695 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2696 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2698 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2700 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2702 * unittests/basic_string_view/operations/compare/char/1.cc:
2704 * unittests/basic_string_view/operations/compare/char/13650.cc:
2706 * unittests/basic_string_view/operations/copy/char/1.cc:
2708 * unittests/basic_string_view/operations/data/char/1.cc:
2710 * unittests/basic_string_view/operations/find/char/1.cc:
2712 * unittests/basic_string_view/operations/find/char/2.cc:
2714 * unittests/basic_string_view/operations/find/char/3.cc:
2716 * unittests/basic_string_view/operations/find/char/4.cc:
2718 * unittests/basic_string_view/operations/rfind/char/1.cc:
2720 * unittests/basic_string_view/operations/rfind/char/2.cc:
2722 * unittests/basic_string_view/operations/rfind/char/3.cc:
2724 * unittests/basic_string_view/operations/substr/char/1.cc:
2726 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2727 * unittests/string_view-selftests.c: New file.
2729 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2731 * unittests/basic_string_view/capacity/1.cc: New file.
2732 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2733 * unittests/basic_string_view/cons/char/1.cc: New file.
2734 * unittests/basic_string_view/cons/char/2.cc: New file.
2735 * unittests/basic_string_view/cons/char/3.cc: New file.
2736 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2737 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2738 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2739 * unittests/basic_string_view/element_access/char/1.cc: New file.
2740 * unittests/basic_string_view/element_access/char/2.cc: New file.
2741 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2742 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2743 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2744 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2745 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2746 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2747 * unittests/basic_string_view/include.cc: New file.
2748 * unittests/basic_string_view/inserters/char/1.cc: New file.
2749 * unittests/basic_string_view/inserters/char/2.cc: New file.
2750 * unittests/basic_string_view/inserters/char/3.cc: New file.
2751 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2752 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2753 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2754 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2755 * unittests/basic_string_view/literals/types.cc: New file.
2756 * unittests/basic_string_view/literals/values.cc: New file.
2757 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2758 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2759 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2760 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2761 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2762 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2763 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2764 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2765 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2766 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2767 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2768 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2769 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2770 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2771 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2772 * unittests/basic_string_view/operations/data/char/1.cc: New file.
2773 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2774 * unittests/basic_string_view/operations/find/char/1.cc: New file.
2775 * unittests/basic_string_view/operations/find/char/2.cc: New file.
2776 * unittests/basic_string_view/operations/find/char/3.cc: New file.
2777 * unittests/basic_string_view/operations/find/char/4.cc: New file.
2778 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2779 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2780 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2781 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2782 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2783 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2784 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2785 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2786 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2787 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2788 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2789 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2790 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2791 * unittests/basic_string_view/operators/char/2.cc: New file.
2792 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2793 * unittests/basic_string_view/range_access/char/1.cc: New file.
2794 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2795 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2796 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2797 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2798 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2799 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2800 * unittests/basic_string_view/requirements/typedefs.cc: New file.
2801 * unittests/basic_string_view/typedefs.cc: New file.
2802 * unittests/basic_string_view/types/1.cc: New file.
2804 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2806 * common/gdb_string_view.h: Remove libstdc++ implementation
2807 details, adjust to gdb reality.
2808 * common/gdb_string_view.tcc: Likewise.
2809 * cli/cli-script.c (struct string_view): Remove.
2810 (user_args) <m_args>: Change element type to gdb::string_view.
2811 (user_args::insert_args): Adjust.
2813 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2815 * common/gdb_string_view.h: New file.
2816 * common/gdb_string_view.tcc: New file.
2818 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2820 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2821 * configure: Re-generate.
2823 2018-04-09 Pedro Alves <palves@redhat.com>
2825 * gdbarch.sh: Include "observable.h" instead of "observer.h".
2826 (set_target_gdbarch): Call
2827 gdb::observers::architecture_changed.notify instead of
2828 observer_notify_architecture_changed.
2830 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2832 * tracepoint.c (struct current_traceframe_cleanup): Remove.
2833 (do_restore_current_traceframe_cleanup): Remove.
2834 (restore_current_traceframe_cleanup_dtor): Remove.
2835 (make_cleanup_restore_current_traceframe): Remove.
2836 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2838 * tracepoint.h (struct scoped_restore_current_traceframe): New.
2839 * infrun.c (fetch_inferior_event): Use
2840 scoped_restore_current_traceframe.
2842 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2844 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2846 <n_allocated_type_units>: Remove.
2847 <all_type_units>: Change to std::vector.
2848 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2849 to std::vector change.
2850 (dwarf2_per_objfile::get_cutu): Likewise.
2851 (dwarf2_per_objfile::get_tu): Likewise.
2852 (create_signatured_type_table_from_index): Likewise.
2853 (create_signatured_type_table_from_debug_names): Likewise.
2854 (dw2_symtab_iter_next): Likewise.
2855 (dw2_print_stats): Likewise.
2856 (dw2_expand_all_symtabs): Likewise.
2857 (dw2_expand_marked_cus): Likewise.
2858 (dw2_debug_names_iterator::next): Likewise.
2859 (dwarf2_initialize_objfile): Likewise.
2860 (add_signatured_type_cu_to_table): Likewise.
2861 (create_all_type_units): Likewise.
2862 (add_type_unit): Likewise.
2863 (struct tu_abbrev_offset): Add constructor.
2864 (build_type_psymtabs_1): Adjust to std::vector change.
2865 (print_tu_stats): Likewise.
2866 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2867 (write_debug_names): Likewise.
2869 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2871 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2872 Make an std::vector.
2873 <n_comp_units>: Remove.
2874 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2875 to std::vector change.
2876 (dwarf2_per_objfile::get_cutu): Likewise.
2877 (dwarf2_per_objfile::get_cu): Likewise.
2878 (create_cus_from_index): Likewise.
2879 (create_addrmap_from_index): Likewise.
2880 (create_addrmap_from_aranges): Likewise.
2881 (dwarf2_read_index): Likewise.
2882 (dw2_find_last_source_symtab): Likewise.
2883 (dw2_map_symtabs_matching_filename): Likewise.
2884 (dw2_symtab_iter_next): Likewise.
2885 (dw2_print_stats): Likewise.
2886 (dw2_expand_all_symtabs): Likewise.
2887 (dw2_expand_symtabs_with_fullname): Likewise.
2888 (dw2_expand_marked_cus): Likewise.
2889 (dw2_map_symbol_filenames): Likewise.
2890 (create_cus_from_debug_names): Likewise.
2891 (dwarf2_read_debug_names): Likewise.
2892 (dw2_debug_names_iterator::next): Likewise.
2893 (dwarf2_initialize_objfile): Likewise.
2894 (set_partial_user): Likewise.
2895 (dwarf2_build_psymtabs_hard): Likewise.
2896 (read_comp_units_from_section): Remove arguments, adjust to
2898 (create_all_comp_units): Adjust to std::vector and
2899 read_comp_units_from_section changes.
2900 (dwarf2_find_containing_comp_unit): Adjust to std::vector
2902 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2903 (psyms_seen_size): Likewise.
2904 (write_gdbindex): Likewise.
2905 (write_debug_names): Likewise.
2907 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2909 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2910 with dwarf2_per_objfile.
2911 (create_cus_from_index): Likewise.
2912 (create_signatured_type_table_from_index): Likewise.
2913 (dwarf2_read_index): Likewise.
2914 (dwarf2_initialize_objfile): Likewise.
2915 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
2916 per_cu rather than get_dwarf2_per_objfile.
2918 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2920 * dwarf2read.h (struct signatured_type): Forward declare.
2921 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2923 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2924 (dw2_get_cutu): ...this.
2925 (dwarf2_per_objfile::get_cu): Rename from...
2926 (dw2_get_cu): ...this.
2927 (dwarf2_per_objfile::get_tu): New.
2928 (create_addrmap_from_index): Adjust.
2929 (create_addrmap_from_aranges): Adjust.
2930 (dw2_find_last_source_symtab): Adjust.
2931 (dw2_map_symtabs_matching_filename): Adjust.
2932 (dw2_symtab_iter_next): Adjust.
2933 (dw2_print_stats): Adjust.
2934 (dw2_expand_all_symtabs): Adjust.
2935 (dw2_expand_symtabs_with_fullname): Adjust.
2936 (dw2_expand_marked_cus): Adjust.
2937 (dw_expand_symtabs_matching_file_matcher): Adjust.
2938 (dw2_map_symbol_filenames): Adjust.
2939 (dw2_debug_names_iterator::next): Adjust.
2940 (dwarf2_initialize_objfile): Adjust.
2941 (set_partial_user): Adjust.
2942 (dwarf2_build_psymtabs_hard): Adjust.
2944 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2946 * dwarf2read.c (create_signatured_type_table_from_debug_names):
2947 Remove unused variables.
2948 (dw2_map_symtabs_matching_filename): Likewise.
2949 (dwarf2_record_block_ranges): Likewise.
2950 (dwarf2_read_addr_index): Likewise.
2951 (follow_die_offset): Likewise.
2953 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2955 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2956 to symbol_file_add_main.
2958 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2961 * mi/mi-console.c (do_fputc_async_safe): New.
2962 (mi_console_file::write_async_safe): New.
2963 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2964 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2966 * ui-file.c (ui_file::putstrn): Adjust call to
2967 fputstrn_unfiltered.
2968 * utils.c (printchar): Replace do_fputs and do_fprintf
2969 parameters by do_fputc.
2970 (fputstr_filtered): Adjust call to printchar.
2971 (fputstr_unfiltered): Likewise.
2972 (fputstrn_filtered): Likewise.
2973 (fputstrn_unfiltered): Add do_fputc parameter, pass to
2975 * utils.h (do_fputc_ftype): New typedef.
2976 (fputstrn_unfiltered): Add do_fputc parameter.
2978 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2980 * regformats/i386/i386-avx.dat: Remove.
2982 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2985 * amd64-tdep.c (amd64_none_init_abi): New function.
2986 (amd64_x32_none_init_abi): New function.
2987 (_initialize_amd64_tdep): Register handlers for x86-64 and
2988 x64_32 with GDB_OSABI_NONE.
2989 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2990 GDB_OSABI_NONE osabi.
2992 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2995 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2997 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2998 * osabi.c (gdb_osabi_names): Add "unknown" entry.
3000 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3002 * common/byte-vector.h (char_vector): New type.
3003 * target.h (target_read_alloc): Return
3004 gdb::optional<byte_vector>.
3005 (target_read_stralloc): Return gdb::optional<char_vector>.
3006 (target_get_osdata): Return gdb::optional<char_vector>.
3007 * target.c (target_read_alloc_1): Templatize. Replacement
3008 manual memory management with vector.
3009 (target_read_alloc): Change return type, adjust.
3010 (target_read_stralloc): Change return type, adjust.
3011 (target_get_osdata): Change return type, adjust.
3012 * auxv.c (struct auxv_info) <length>: Remove.
3013 <data>: Change type to gdb::optional<byte_vector>.
3014 (auxv_inferior_data_cleanup): Free auxv_info with delete.
3015 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
3016 (target_auxv_search): Adjust.
3017 (fprint_target_auxv): Adjust.
3018 * avr-tdep.c (avr_io_reg_read_command): Adjust.
3019 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
3020 (linux_make_corefile_notes): Adjust.
3021 * osdata.c (get_osdata): Adjust.
3022 * remote.c (remote_get_threads_with_qxfer): Adjust.
3023 (remote_memory_map): Adjust.
3024 (remote_traceframe_info): Adjust.
3025 (btrace_read_config): Adjust.
3026 (remote_read_btrace): Adjust.
3027 (remote_pid_to_exec_file): Adjust.
3028 * solib-aix.c (solib_aix_get_library_list): Adjust.
3029 * solib-dsbt.c (decode_loadmap): Don't free buf.
3030 (dsbt_get_initial_loadmaps): Adjust.
3031 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
3032 * solib-target.c (solib_target_current_sos): Adjust.
3033 * tracepoint.c (sdata_make_value): Adjust.
3034 * xml-support.c (xinclude_start_include): Adjust.
3035 (xml_fetch_content_from_file): Adjust.
3036 * xml-support.h (xml_fetch_another): Change return type.
3037 (xml_fetch_content_from_file): Change return type.
3038 * xml-syscall.c (xml_init_syscalls_info): Adjust.
3039 * xml-tdesc.c (file_read_description_xml): Adjust.
3040 (fetch_available_features_from_target): Change return type.
3041 (target_fetch_description_xml): Adjust.
3042 (target_read_description_xml): Adjust.
3044 2018-04-06 Tom Tromey <tom@tromey.com>
3046 * value.c (~value): Update.
3047 (struct value) <contents>: Now unique_xmalloc_ptr.
3048 (value_contents_bits_eq, allocate_value_contents)
3049 (value_contents_raw, value_contents_all_raw)
3050 (value_contents_for_printing, value_contents_for_printing_const)
3051 (set_value_enclosing_type): Update.
3053 2018-04-06 Tom Tromey <tom@tromey.com>
3055 * value.c (range_s): Remove typedef, VEC.
3056 (struct range): Add operator<.
3057 (range_lessthan): Remove.
3058 (ranges_contain): Change type.
3060 (struct value) <unavailable, optimized_out>: Now std::vector.
3061 (value_entirely_available)
3062 (value_entirely_covered_by_range_vector)
3063 (value_entirely_unavailable, value_entirely_optimized_out):
3065 (insert_into_bit_range_vector): Change argument type.
3066 (find_first_range_overlap): Likewise.
3067 (struct ranges_and_idx, value_contents_bits_eq)
3068 (require_not_optimized_out, require_available): Update.
3069 (ranges_copy_adjusted): Change argument types.
3070 (value_optimized_out, value_copy, value_fetch_lazy): Update.
3072 2018-04-06 Tom Tromey <tom@tromey.com>
3074 * value.c (~value): Update.
3075 (struct value) <parent>: Now a value_ref_ptr.
3076 (value_parent, set_value_parent, value_address, value_copy):
3079 2018-04-06 Tom Tromey <tom@tromey.com>
3081 * value.c (struct value): Add constructor, destructor, and member
3083 (allocate_value_lazy, value_decref): Update.
3085 2018-04-06 Tom Tromey <tom@tromey.com>
3087 * value.c (struct value) <released, next>: Remove.
3088 (all_values): Now a std::vector.
3089 (allocate_value_lazy): Update.
3090 (value_next): Remove.
3091 (value_mark, value_free_to_mark, release_value)
3092 (value_release_to_mark): Update.
3094 2018-04-06 Tom Tromey <tom@tromey.com>
3096 * value.h (fetch_subexp_value, value_release_to_mark): Update.
3097 (free_value_chain): Remove.
3098 * value.c (free_value_chain): Remove.
3099 (value_release_to_mark): Return a std::vector.
3100 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
3102 (check_condition): Update.
3103 * eval.c (fetch_subexp_value): Change "val_chain" to a
3105 * breakpoint.c (update_watchpoint): Update.
3106 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3108 2018-04-06 Tom Tromey <tom@tromey.com>
3110 * value.h (free_all_values): Remove.
3111 * value.c (free_all_values): Remove.
3113 2018-04-06 Tom Tromey <tom@tromey.com>
3115 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3116 (value_history_chain, value_history_count): Remove.
3117 (value_history): New global.
3118 (record_latest_value, access_value_history, show_values)
3119 (preserve_values): Update.
3121 2018-04-06 Tom Tromey <tom@tromey.com>
3123 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3124 * varobj.c (varobj_set_display_format, varobj_set_value)
3125 (install_default_visualizer, construct_visualizer)
3126 (install_new_value, ~varobj, varobj_get_value_type)
3127 (my_value_of_variable, varobj_editable_p): Update.
3128 * c-varobj.c (c_describe_child, c_value_of_variable)
3129 (cplus_number_of_children, cplus_describe_child): Update.
3130 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3131 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3132 (ada_value_of_variable, ada_value_is_changeable_p): Update.
3134 2018-04-06 Tom Tromey <tom@tromey.com>
3136 * printcmd.c (last_examine_address): Change type to
3138 (do_examine, x_command): Update.
3140 2018-04-06 Tom Tromey <tom@tromey.com>
3142 * value.c (release_value): Update.
3143 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3144 (struct bpstats) <val>: Now a value_ref_ptr.
3145 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3146 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3147 (~watchpoint, print_it_watchpoint, watch_command_1)
3148 (invalidate_bp_value_on_memory_change): Update.
3150 2018-04-06 Tom Tromey <tom@tromey.com>
3152 * varobj.c (varobj_clear_saved_item)
3153 (update_dynamic_varobj_children, install_new_value, ~varobj):
3155 * value.h (value_incref): Move declaration earlier.
3156 (value_decref): Rename from value_free.
3157 (struct value_ref_policy): New.
3158 (value_ref_ptr): New typedef.
3159 (struct value_deleter): Remove.
3160 (gdb_value_up): Remove typedef.
3161 (release_value): Change return type.
3162 (release_value_or_incref): Remove.
3163 * value.c (set_value_parent): Update.
3164 (value_incref): Change return type.
3165 (value_decref): Rename from value_free.
3166 (value_free_to_mark, free_all_values, free_value_chain): Update.
3167 (release_value): Return value_ref_ptr.
3168 (release_value_or_incref): Remove.
3169 (record_latest_value, set_internalvar, clear_internalvar):
3171 * stack.c (info_frame_command): Don't call value_free.
3172 * python/py-value.c (valpy_dealloc, valpy_new)
3173 (value_to_value_object): Update.
3174 * printcmd.c (do_examine): Update.
3175 * opencl-lang.c (lval_func_free_closure): Update.
3176 * mi/mi-main.c (register_changed_p): Don't call value_free.
3177 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3178 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3179 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3181 * guile/scm-value.c (vlscm_free_value_smob)
3182 (vlscm_scm_from_value): Update.
3183 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3184 (frame_unwind_register_unsigned, get_frame_register_bytes)
3185 (put_frame_register_bytes): Don't call value_free.
3186 * findvar.c (address_from_register): Don't call value_free.
3187 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3188 * dwarf2loc.c (entry_data_value_free_closure)
3189 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3190 (dwarf2_evaluate_loc_desc_full): Update.
3191 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3192 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3193 (~watchpoint, watch_command_1)
3194 (invalidate_bp_value_on_memory_change): Update.
3195 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3197 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3200 * warning.m4: Add -Wno-error=deprecated-register.
3201 * configure: Re-generate.
3203 2018-04-05 Tom Tromey <tom@tromey.com>
3205 * linespec.h: Remove include of "vec.h".
3207 2018-04-05 Tom Tromey <tom@tromey.com>
3209 * linespec.c (typep): Remove typedef.
3210 (find_methods, find_superclass_methods): Take a std::vector.
3211 (find_method): Use std::vector.
3213 2018-04-05 Tom Tromey <tom@tromey.com>
3215 * utils.c (compare_strings): Remove.
3216 * utils.h (compare_strings): Remove.
3217 * objc-lang.h (find_imps): Update.
3218 * objc-lang.c (find_methods): Take a std::vector.
3219 (uniquify_strings, find_imps): Likewise.
3220 * linespec.c (find_methods): Take a std::vector.
3221 (decode_objc): Use std::vector.
3222 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3224 (find_method, find_function_symbols): Use std::vector.
3226 2018-04-05 Tom Tromey <tom@tromey.com>
3228 * completer.c (completion_tracker::completion_tracker): Remove
3230 (completion_tracker::discard_completions): Likewise.
3231 * breakpoint.c (ambiguous_names_p): Remove cast.
3232 * ada-lang.c (_initialize_ada_language): Remove cast.
3233 * utils.h (streq): Update.
3234 (streq_hash): Add new declaration.
3235 * utils.c (streq): Return bool.
3236 (streq_hash): New function.
3238 2018-04-05 Tom Tromey <tom@tromey.com>
3240 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3241 Remove a string copy.
3243 2018-04-05 Tom Tromey <tom@tromey.com>
3245 * linespec.c (filter_results): Use std::vector.
3246 (decode_line_2, decode_line_full): Update.
3248 2018-04-05 Tom Tromey <tom@tromey.com>
3250 * linespec.c (canonical_to_fullform): Return std::string.
3251 (filter_results): Update.
3252 (struct decode_line_2_item): Add constructor.
3253 <fullform, displayform>: Now std::string.
3254 (decode_line_2_compare_items): Now a std::sort comparator.
3255 (decode_line_2): Update.
3257 2018-04-05 Tom Tromey <tom@tromey.com>
3259 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3260 (unexpected_linespec_error): Update.
3261 (linespec_parse_basic, parse_linespec): Update.
3263 2018-04-05 Tom Tromey <tom@tromey.com>
3265 * linespec.c (linespec_parse_basic): Reindent.
3267 2018-04-05 Tom Tromey <tom@tromey.com>
3269 * minsyms.h (iterate_over_minimal_symbols): Update.
3270 * minsyms.c (iterate_over_minimal_symbols): Take a
3272 * linespec.c (struct collect_minsyms): Remove.
3273 (compare_msyms): Now a std::sort comparator.
3274 (add_minsym): Add parameters.
3275 (search_minsyms_for_name): Update. Use std::vector.
3277 2018-04-03 Tom Tromey <tom@tromey.com>
3279 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3282 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3284 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3286 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3289 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3290 printing static type.
3292 2018-04-01 Tom Tromey <tom@tromey.com>
3294 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3295 (rs6000_xfer_shared_libraries): Update.
3297 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3299 * common/gdb_vecs.h (char_ptr): Remove.
3300 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3302 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3304 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3306 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3308 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3310 * tracepoint.h (struct uploaded_tp): Initialize fields.
3311 <actions, step_actions, cmd_strings>: Change type to
3312 std::vector<char *>.
3313 * tracepoint.c (get_uploaded_tp): Allocate with new.
3314 (free_uploaded_tps): Free with delete.
3315 (parse_tracepoint_definition): Adjust to std::vector change.
3316 * breakpoint.c (read_uploaded_action): Likewise.
3317 (create_tracepoint_from_upload): Likewise.
3318 * ctf.c (ctf_write_uploaded_tp): Likewise.
3319 (SET_ARRAY_FIELD): Likewise.
3320 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3322 2018-03-30 Tom Tromey <tom@tromey.com>
3324 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3326 (svr4_keep_data_in_core): Update.
3327 (svr4_read_so_list): Update.
3329 2018-03-30 Tom Tromey <tom@tromey.com>
3331 * windows-nat.c (handle_output_debug_string, handle_exception):
3333 * target.h (target_read_string): Update.
3334 * target.c (target_read_string): Change "string" to
3336 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3338 * solib-frv.c (frv_current_sos): Update.
3339 * solib-dsbt.c (dsbt_current_sos): Update.
3340 * solib-darwin.c (darwin_current_sos): Update.
3341 * linux-thread-db.c (inferior_has_bug): Update.
3342 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3343 Update. Remove alloca.
3344 * ada-lang.c (ada_main_name): Update.
3346 2018-03-30 Tom Tromey <tom@tromey.com>
3348 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3349 (struct dwo_file_deleter): New.
3350 (dwo_file_up): New typedef.
3351 (open_and_init_dwo_file): Use dwo_file_up.
3352 (free_dwo_file_cleanup): Remove.
3354 2018-03-30 Tom Tromey <tom@tromey.com>
3356 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3357 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3359 2018-03-30 Tom Tromey <tom@tromey.com>
3361 * dwarf2read.c (class free_cached_comp_units): New class.
3362 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3363 (free_cached_comp_units): Remove function.
3365 2018-03-30 Tom Tromey <tom@tromey.com>
3367 * utils.h (make_cleanup_unpush_target): Remove.
3368 * inf-ptrace.c (struct target_unpusher): New.
3369 (target_unpush_up) New typedef.
3370 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3372 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3374 2018-03-27 Tom Tromey <tom@tromey.com>
3376 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3378 2018-03-27 Pedro Alves <palves@redhat.com>
3379 Tom Tromey <tom@tromey.com>
3381 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3382 destructor. Now a class.
3383 (gdb_readline_wrapper_cleanup): Remove function.
3384 (gdb_readline_wrapper): Remove cleanups.
3386 2018-03-27 Tom Tromey <tom@tromey.com>
3388 * typeprint.h (struct type_print_options) <local_typedefs,
3389 global_typedefs>: Remove "struct" keyword.
3390 (class typedef_hash_table): New class.
3391 (recursively_update_typedef_hash, add_template_parameters)
3392 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3393 (find_typedef_in_hash): Don't declare.
3394 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3395 (typedef_hash_table::recursively_update): Rename from
3396 recursively_update_typedef_hash. Now a member.
3397 (typedef_hash_table::add_template_parameters): Rename from
3398 add_template_parameters. Now a member.
3399 (typedef_hash_table::typedef_hash_table): Now a constructor;
3400 rename from create_typedef_hash.
3401 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3402 rename from free_typedef_hash.
3403 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3404 (do_free_global_table): Remove.
3405 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3406 from copy_type_recursive.
3407 (create_global_typedef_table): Remove.
3408 (typedef_hash_table::find_global_typedef): Now a member of
3410 (typedef_hash_table::find_typedef): Rename from
3411 find_typedef_in_hash; now a member.
3412 (whatis_exp): Update.
3413 * extension.h (struct ext_lang_type_printers): Add constructor and
3415 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3417 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3418 Now a constructor; rename from start_ext_lang_type_printers.
3419 (ext_lang_type_printers): Now a destructor; rename from
3420 free_ext_lang_type_printers.
3421 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3423 (c_type_print_base_struct_union): Update. Remove cleanups.
3425 2018-03-27 Tom Tromey <tom@tromey.com>
3427 * dwarf-index-write.c: Include <cmath>.
3429 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3431 * NEWS: Add entry describing new "set|show varsize-limit" command.
3432 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3434 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3437 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3439 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3441 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3442 * dwarf-index-common.c: New file.
3443 * dwarf-index-common.h: New file.
3444 * dwarf-index-write.c: New file.
3445 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3446 (struct dwarf2_section_info): Move from here.
3447 (dwarf2_section_info_def): Likewise.
3448 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3449 (offset_type): Likewise.
3450 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3451 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3452 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3453 (byte_swap): Likewise.
3454 (MAYBE_SWAP): Likewise.
3455 (dwarf2_per_cu_ptr): Likewise.
3456 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3457 (struct tu_stats): Likewise.
3458 (struct dwarf2_per_objfile): Likewise.
3459 (struct dwarf2_per_cu_data): Likewise.
3460 (struct signatured_type): Likewise.
3461 (sig_type_ptr): Likewise.
3462 (DEF_VEC_P (sig_type_ptr)): Likewise.
3463 (INDEX4_SUFFIX): Likewise.
3464 (INDEX5_SUFFIX): Likewise.
3465 (DEBUG_STR_SUFFIX): Likewise.
3466 (dwarf2_read_section): Make non-static.
3467 (mapped_index_string_hash): Move from here.
3468 (dwarf5_djb_hash): Likewise.
3469 (file_write): Likewise.
3470 (class data_buf): Likewise.
3471 (struct symtab_index_entry): Likewise.
3472 (struct mapped_symtab): Likewise.
3473 (find_slot): Likewise.
3474 (hash_expand): Likewise.
3475 (add_index_entry): Likewise.
3476 (uniquify_cu_indices): Likewise.
3477 (class c_str_view): Likewise.
3478 (class c_str_view_hasher): Likewise.
3479 (class vector_hasher): Likewise.
3480 (write_hash_table): Likewise.
3481 (psym_index_map): Likewise.
3482 (struct addrmap_index_data): Likewise.
3483 (add_address_entry): Likewise.
3484 (add_address_entry_worker): Likewise.
3485 (write_address_map): Likewise.
3486 (symbol_kind): Likewise.
3487 (write_psymbols): Likewise.
3488 (struct signatured_type_index_data): Likewise.
3489 (write_one_signatured_type): Likewise.
3490 (recursively_count_psymbols): Likewise.
3491 (recursively_write_psymbols): Likewise.
3492 (class debug_names): Likewise.
3493 (check_dwarf64_offsets): Likewise.
3494 (psyms_seen_size): Likewise.
3495 (write_gdbindex): Likewise.
3496 (write_debug_names): Likewise.
3497 (assert_file_size): Likewise.
3498 (write_psymtabs_to_index): Likewise.
3499 (save_gdb_index_command): Likewise.
3500 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3502 * dwarf2read.h: New file.
3504 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3507 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3508 symbol name if the CU's language stores symbol names in linkage
3510 * language.h (struct language_defn)
3511 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3512 all instances of this struct.
3514 2018-03-26 Tom Tromey <tom@tromey.com>
3516 * stack.c (backtrace_command_1): Remove verbose code.
3518 2018-03-26 Tom Tromey <tom@tromey.com>
3520 * python/py-framefilter.c (py_print_type): Don't catch
3521 exceptions. Return void.
3522 (py_print_value): Likewise.
3523 (py_print_single_arg): Likewise.
3524 (enumerate_args): Don't catch exceptions.
3525 (py_print_args): Likewise.
3526 (py_print_frame): Likewise.
3527 (gdbpy_apply_frame_filter): Catch exceptions here.
3529 2018-03-26 Tom Tromey <tom@tromey.com>
3531 * stack.c (_initialize_stack): Remove trailing newlines from help
3532 text. Add "Usage" line to "backtrace" help.
3534 2018-03-26 Tom Tromey <tom@tromey.com>
3537 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3539 2018-03-26 Tom Tromey <tom@tromey.com>
3541 * python/py-framefilter.c (py_print_single_arg): Return
3542 EXT_LANG_BT_ERROR from catch.
3544 2018-03-26 Tom Tromey <tom@tromey.com>
3547 * stack.c (backtrace_command_1): Move some code into no-filters
3550 2018-03-26 Tom Tromey <tom@tromey.com>
3552 * python/py-framefilter.c (throw_quit_or_print_exception): New
3554 (gdbpy_apply_frame_filter): Use it.
3556 2018-03-26 Tom Tromey <tom@tromey.com>
3559 * python/py-framefilter.c (py_print_type, py_print_value)
3560 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3563 2018-03-26 Tom Tromey <tom@tromey.com>
3565 * python/py-framefilter.c (enumerate_args): Use
3566 gdb::unique_xmalloc_ptr.
3568 2018-03-26 Tom Tromey <tom@tromey.com>
3570 * python/py-framefilter.c (py_print_frame): Return
3572 (gdbpy_apply_frame_filter): Update comment.
3573 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3575 <EXT_LANG_BT_NO_FILTERS>: Change value.
3577 2018-03-26 Tom Tromey <tom@tromey.com>
3580 * stack.c (backtrace_command): Parse "hide" argument.
3581 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3582 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3585 2018-03-26 Tom Tromey <tom@tromey.com>
3587 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3589 (backtrace_command): Remove "fulltrace", add "flags".
3591 2018-03-26 Tom Tromey <tom@tromey.com>
3593 * stack.c (backtrace_command): Rewrite command line parsing.
3595 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3597 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3599 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3601 * filename-seen-cache.h: Add include guard.
3603 2018-03-26 Keith Seitz <keiths@redhat.com>
3605 * symfile.c (place_section): Remove "struct" from section_addr_info
3607 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3608 "struct" keyword from section_addr_info.
3610 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3612 * regformats/regdef.h (reg): Add constructors.
3614 2018-03-25 Pedro Alves <palves@redhat.com>
3616 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3617 if then/else bodies in var_func_name extraction.
3619 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
3621 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3622 lookup_minimal_symbol() to find symbol entry.
3623 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3625 2018-03-23 Keith Seitz <keiths@redhat.com>
3628 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3629 nested type definitions for C++, too.
3631 2018-03-23 Tom Tromey <tom@tromey.com>
3633 * machoread.c (struct oso_el): Add a constructor. Don't define as
3635 (macho_register_oso): Remove.
3636 (macho_symtab_read): Take a std::vector.
3637 (oso_el_compare_name): Now a std::sort comparator.
3638 (macho_symfile_read_all_oso): Take a std::vector.
3639 (macho_symfile_read): Use std::vector. Remove cleanups.
3641 2018-03-22 Tom Tromey <tom@tromey.com>
3643 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3644 (record_full_goto_bookmark): Use std::string.
3646 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3649 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3652 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3654 * rs6000-tdep.c (store_insn_p): New function.
3655 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3656 and cr_reg to their unshifted values. Use store_insn_p to
3657 match LR saves using either R1 or fdata->alloca_reg. Use
3658 store_insn_p to match CR saves. Set alloca_reg_offset
3659 when alloca_reg and framep are set. Remove lr_reg shift
3660 when assigning to fdata->lr_register.
3662 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3664 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3665 command line args instead of emitting a warning.
3667 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3669 * tracepoint.h (struct static_tracepoint_marker): Initialize
3670 fields, define default constructor, move constructor and move
3671 assignment, disable the rest.
3672 <str_id, extra>: Make std::string.
3673 (release_static_tracepoint_marker): Remove.
3674 (free_current_marker): Remove.
3675 * tracepoint.c (free_current_marker): Remove.
3676 (parse_static_tracepoint_marker_definition): Adjust to
3677 std::string, use new hex2str overload.
3678 (release_static_tracepoint_marker): Remove.
3679 (print_one_static_tracepoint_marker): Get marker by reference
3680 and adjust to std::string.
3681 (info_static_tracepoint_markers_command): Adjust to std::vector
3683 * target.h (static_tracepoint_marker_p): Remove typedef.
3684 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3685 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3687 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3689 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3690 (target_debug_print_std_vector_static_tracepoint_marker): New.
3691 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3693 (target_debug_print_static_tracepoint_marker_p): ... this.
3694 * target-delegates.c: Re-generate.
3695 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3697 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3698 (decode_static_tracepoint_spec): Adjust to std::vector.
3699 (tracepoint_print_one_detail): Adjust to std::string.
3700 (strace_marker_decode_location): Adjust to std::string.
3701 (update_static_tracepoint): Adjust to std::string, remove call
3702 to release_static_tracepoint_marker.
3703 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3704 Adjust to std::vector.
3705 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3706 (remote_static_tracepoint_markers_by_strid): Adjust to
3708 * common/rsp-low.h (hex2str): New overload with explicit count
3710 * common/rsp-low.c (hex2str): New overload with explicit count
3712 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3713 (_initialize_rsp_low_selftests): Add test_hex2str test.
3714 * unittests/tracepoint-selftests.c
3715 (test_parse_static_tracepoint_marker_definition): Adjust to
3718 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3720 * tracepoint.c (parse_static_tracepoint_marker_definition):
3721 Consider case where the definition is followed by more
3723 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3724 tracepoint-selftests.c.
3725 * unittests/tracepoint-selftests.c: New.
3727 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3729 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3732 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3734 * symtab.c (find_pc_sect_line): fixed indentation.
3736 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3738 * symtab.c (find_pc_sect_line): now uses binary search.
3740 2018-03-19 Tom Tromey <tom@tromey.com>
3742 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3745 2018-03-19 Pedro Alves <palves@redhat.com>
3746 Tom Tromey <tom@tromey.com>
3748 * unittests/observable-selftests.c: New file.
3749 * common/observable.h: New file.
3750 * observable.h: New file.
3751 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3752 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3753 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3754 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3755 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3756 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3757 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3758 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3759 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3760 python/py-breakpoint.c, python/py-finishbreakpoint.c,
3761 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3762 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3763 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3764 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3765 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3766 tui/tui-interp.c, valops.c: Update all users.
3767 * tui/tui-hooks.c (tui_bp_created_observer)
3768 (tui_bp_deleted_observer, tui_bp_modified_observer)
3769 (tui_inferior_exit_observer, tui_before_prompt_observer)
3770 (tui_normal_stop_observer, tui_register_changed_observer):
3772 (tui_observers_token): New global.
3773 (attach_or_detach, tui_attach_detach_observers): New functions.
3774 (tui_install_hooks, tui_remove_hooks): Use
3775 tui_attach_detach_observers.
3776 * record-btrace.c (record_btrace_thread_observer): Remove.
3777 (record_btrace_thread_observer_token): New global.
3778 * observer.sh: Remove.
3779 * observer.c: Rename to observable.c.
3780 * observable.c (namespace gdb_observers): Define new objects.
3781 (observer_debug): Move into gdb_observers namespace.
3782 (struct observer, struct observer_list, xalloc_observer_list_node)
3783 (xfree_observer_list_node, generic_observer_attach)
3784 (generic_observer_detach, generic_observer_notify): Remove.
3785 (_initialize_observer): Update.
3786 Don't include observer.inc.
3787 * Makefile.in (generated_files): Remove observer.h, observer.inc.
3788 (clean mostlyclean): Likewise.
3789 (observer.h, observer.inc): Remove targets.
3790 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3791 (COMMON_SFILES): Use observable.c, not observer.c.
3792 * .gitignore: Remove observer.h.
3794 2018-03-18 Tom Tromey <tom@tromey.com>
3796 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3798 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3800 2018-03-17 Tom Tromey <tom@tromey.com>
3802 * auto-load.c (auto_load_objfile_script_1): Use std::string.
3804 2018-03-17 Tom Tromey <tom@tromey.com>
3806 * target.c (class scoped_target_fd): New.
3807 (target_fileio_close_cleanup): Remove.
3808 (target_fileio_read_alloc_1): Use scoped_target_fd.
3810 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3812 * silent-rules.mk: New.
3813 * Makefile.in: Include silent-rules.mk
3814 (srcdir, VPATH, top_srcdir): Move up.
3815 (COMPILE): Add ECHO_CXX.
3816 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3817 (init.c): Add ECHO_INIT_C.
3818 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3819 (version.c): Add ECHO_GEN.
3820 (printcmd.o): Add ECHO_CXX.
3821 (target-float.o): Add ECHO_CXX.
3822 (ada-exp.o): Add ECHO_CXX.
3823 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3824 (insight$(EXEEXT)): Add ECHO_CXXLD.
3825 * gnulib/configure.ac: Add AM_SILENT_RULES.
3826 * gnulib/aclocal.m4: Re-generate.
3827 * gnulib/configure: Re-generate.
3828 * gnulib/import/Makefile.in: Re-generate.
3830 2018-03-16 Tom Tromey <tom@tromey.com>
3832 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3833 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3834 * utils.c (do_free_section_addr_info)
3835 (make_cleanup_free_section_addr_info): Remove.
3836 * symfile.h (struct other_sections): Add constructor.
3837 (struct section_addr_info): Remove.
3838 (section_addr_info): New typedef.
3839 (struct sym_fns) <sym_offsets>: Change type of parameter.
3840 (build_section_addr_info_from_objfile)
3841 (relative_addr_info_to_section_offsets, addr_info_make_relative)
3842 (default_symfile_offsets, symbol_file_add)
3843 (symbol_file_add_from_bfd)
3844 (build_section_addr_info_from_section_table): Update.
3845 (alloc_section_addr_info, free_section_addr_info): Don't declare.
3846 * symfile.c (alloc_section_addr_info): Remove.
3847 (build_section_addr_info_from_section_table): Change return type.
3849 (build_section_addr_info_from_bfd)
3850 (build_section_addr_info_from_objfile): Likewise.
3851 (free_section_addr_info): Remove.
3852 (relative_addr_info_to_section_offsets): Change type of "addrs".
3853 (addrs_section_compar): Now a std::sort comparator.
3854 (addrs_section_sort): Change return type.
3855 (addr_info_make_relative): Change type of "addrs". Update.
3856 (default_symfile_offsets, syms_from_objfile_1)
3857 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3858 (symbol_file_add_separate): Update.
3859 (symbol_file_add): Change type of "addrs". Update.
3860 (add_symbol_file_command): Update. Remove cleanups.
3861 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
3863 * symfile-debug.c (debug_sym_offsets): Change type of "info".
3864 * solib.c (solib_read_symbols): Update.
3865 * objfiles.c (objfile_relocate): Update. Remove cleanups.
3866 * machoread.c (macho_symfile_offsets): Update.
3867 * jit.c (jit_bfd_try_read_symtab): Update.
3869 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
3871 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3872 unittests/utils-selftests.c.
3873 * unittests/utils-selftests.c: New file.
3875 2018-03-14 Tom Tromey <tom@tromey.com>
3878 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3881 2018-03-14 Tom Tromey <tom@tromey.com>
3884 * printcmd.c (printf_pointer): Allow "-" in format.
3886 2018-03-14 Tom Tromey <tom@tromey.com>
3888 * printcmd.c (_initialize_printcmd): Add usage to printf.
3890 2018-03-14 Yao Qi <qiyao@sourceware.org>
3892 * MAINTAINERS: Update my email address.
3894 2018-03-13 Tom Tromey <tom@tromey.com>
3896 * machoread.c (macho_check_dsym): Change filenamep to a
3898 (macho_symfile_read): Update.
3899 * symfile.c (load_command): Use std::string.
3901 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
3903 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3904 to error message string.
3905 (riscv_register_name): Use xsnprintf instead of sprintf.
3906 (riscv_insn::fetch_instruction): Use gdb_assert instead of
3908 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3910 (riscv_push_dummy_call): Likewise.
3912 2018-03-12 Tom Tromey <tom@tromey.com>
3914 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3915 Use gdb::byte_vector.
3916 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3918 2018-03-12 Yao Qi <yao.qi@linaro.org>
3920 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3921 parameter type to readable_regcache.
3922 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3925 2018-03-11 Tom Tromey <tom@tromey.com>
3927 * dwarf2read.c (struct nextfield): Add initializers.
3928 (struct nextfnfield): Remove.
3929 (struct fnfieldlist): Add initializers. Remove "length" and
3930 "head", use std::vector.
3931 (struct decl_field_list): Remove.
3932 (struct field_info): Add initializers.
3933 <fields, baseclasses>: Now std::vector.
3934 <nbaseclasses, nfnfields, typedef_field_list_count,
3935 nested_types_list_count>: Remove.
3936 (dwarf2_add_field, dwarf2_add_type_defn)
3937 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3938 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3939 (process_structure_scope): Update.
3941 2018-03-11 Tom Tromey <tom@tromey.com>
3943 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3944 for use by std::sort.
3945 (build_type_psymtabs_1): Use std::vector.
3947 2018-03-09 Eli Zaretskii <eliz@gnu.org>
3949 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3950 and LIBMPFR in the printed configuration.
3952 2018-03-08 Tom Tromey <tom@tromey.com>
3954 * source.c (get_filename_and_charpos): Use scoped_fd.
3955 * nto-procfs.c (procfs_open_1): Use scoped_fd.
3956 (procfs_pidlist): Likewise.
3957 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3958 (iterate_over_mappings): Likewise.
3960 2018-03-08 Tom Tromey <tom@tromey.com>
3962 * infcall.c (struct call_return_meta_info)
3963 <stack_temporaries_enabled>: Remove.
3964 (get_call_return_value, call_function_by_hand_dummy): Update.
3965 * thread.c (disable_thread_stack_temporaries): Remove.
3966 (enable_thread_stack_temporaries): Remove.
3967 (thread_stack_temporaries_enabled_p): Return bool.
3968 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3969 (get_last_thread_stack_temporary): Update.
3970 * eval.c (evaluate_subexp): Update.
3971 * gdbthread.h (class enable_thread_stack_temporaries): Now a
3972 class, not a function.
3973 (value_ptr, value_vec): Remove typedefs.
3974 (class thread_info) <stack_temporaries_enabled>: Now bool.
3975 <stack_temporaries>: Now a std::vector.
3976 (thread_stack_temporaries_enabled_p)
3977 (value_in_thread_stack_temporaries): Return bool.
3979 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
3981 * remote.c (putpkt_binary): Fix omitted bytes reporting.
3982 (getpkt_or_notif_sane_1): Likewise.
3984 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3986 * build-id.c (build_id_to_debug_bfd): Use std::string.
3988 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3990 * build-id.c (find_separate_debug_file_by_buildid): Return
3992 * build-id.h (find_separate_debug_file_by_buildid): Return
3994 * coffread.c (coff_symfile_read): Adjust to std::string.
3995 * elfread.c (elf_symfile_read): Adjust to std::string.
3996 * symfile.c (separate_debug_file_exists): Change parameter to
3998 (find_separate_debug_file): Return std::string.
3999 (find_separate_debug_file_by_debuglink): Return std::string.
4000 * symfile.h (find_separate_debug_file_by_debuglink): Return
4003 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4005 * common/xml-utils.c (xml_escape_text): Move code to...
4006 (xml_escape_text_append): ... this new function.
4007 * common/xml-utils.h (xml_escape_text_append): New declaration.
4008 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
4010 (_initialize_xml_utils): register test_xml_escape_text_append as
4013 2018-03-07 Alan Hayward <alan.hayward@arm.com>
4015 * defs.h: Remove MAX_REGISTER_SIZE.
4016 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
4018 * python/py-unwind.c (pyuw_sniffer): Likewise.
4020 2018-03-07 Tom Tromey <tom@tromey.com>
4022 * linux-tdep.c (linux_info_proc): Update.
4023 * target.h (struct target_ops) <to_fileio_readlink>: Return
4025 (target_fileio_readlink): Return optional<string>.
4026 * remote.c (remote_hostio_readlink): Return optional<string>.
4027 * inf-child.c (inf_child_fileio_readlink): Return
4029 * target.c (target_fileio_readlink): Return optional<string>.
4031 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
4033 * regcache.c (cooked_read_test): Add riscv to the list of
4034 architectures that have a save_reggroup.
4036 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
4038 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
4039 value is not a dynamic class object.
4041 2018-03-06 Tom Tromey <tom@tromey.com>
4043 * rust-exp.y: Formatting fixes.
4045 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4047 * riscv-tdep.c (riscv_register_name): Remove target description
4049 (riscv_gdbarch_init): Remove target description check.
4051 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4053 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
4055 * riscv-tdep.h: Likewise.
4057 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4059 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
4060 (riscv_pseudo_register_write): Delete.
4061 (riscv_gdbarch_init): Remove all use of pseudo registers.
4063 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4065 * record-btrace.c (btrace_print_lines): Replace cleanup
4066 parameter with RAII equivalents.
4067 (btrace_insn_history): Replace cleanup with RAII equivalents.
4068 * ui-out.h (make_cleanup_ui_out_list_begin_end,
4069 make_cleanup_ui_out_tuple_begin_end): Remove.
4070 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
4071 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
4072 make_cleanup_ui_out_list_begin_end): Remove.
4074 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4076 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
4077 parameter types to std::vector. Use bool.
4078 (record_btrace_wait): Replace VEC(tp_t) with
4079 std::vector<thread_info *>.
4080 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
4082 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4084 * record-btrace.c (record_btrace_disable_callback): Remove.
4085 (struct scoped_btrace_disable): New.
4086 (record_btrace_open): Use scoped_btrace_disable.
4088 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4090 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
4091 reading values from registers.
4093 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4095 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
4098 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4100 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
4101 change parameter type. Use GDB's print functions, and use
4102 core_addr_to_string where appropriate.
4103 (riscv_push_dummy_call): Use core_addr_to_string where
4104 appropriate, update call to riscv_print_arg_location, and reindent
4106 (riscv_return_value): Update call to riscv_print_arg_location.
4108 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4109 Tim Newsome <tim@sifive.com>
4110 Albert Ou <a0u@eecs.berkeley.edu>
4111 Darius Rad <darius@bluespec.com>
4113 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4114 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4115 (ALLDEPFILES): Add riscv-tdep.c
4116 * configure.tgt: Add riscv support.
4117 * riscv-tdep.c: New file.
4118 * riscv-tdep.h: New file.
4119 * NEWS: Mention new target.
4120 * MAINTAINERS: Add entry for riscv.
4122 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4124 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4125 fields within aggregates.
4127 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
4129 * record-btrace.c (btrace_print_lines): Change type of flags to
4130 gdb_disassembly_flags.
4132 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4134 * fbsd-nat.c: Include "inf-ptrace.h".
4135 (USE_SIGTRAP_SIGINFO): Conditionally define.
4136 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4137 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4138 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4140 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4142 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4144 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4145 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4146 "supports_stopped_by_hw_breakpoint" target methods.
4148 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4150 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4151 * fbsd-nat.c (debug_fbsd_nat): New variable.
4152 (show_fbsd_nat_debug): New function.
4153 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4154 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4156 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4158 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4159 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4161 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4162 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4165 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4167 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4168 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4170 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4172 * charset.c (struct charset_vector): New.
4173 (charsets): Change type to charset_vector.
4174 (find_charset_names): Adjust.
4176 (_initialize_charset): Adjust.
4178 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4180 * progspace.h (struct program_space) <deleted_solibs>: Change
4181 type to std::vector<std::string>.
4182 * progspace.c (clear_program_space_solib_cache): Adjust.
4183 * breakpoint.c (print_solib_event): Adjust.
4184 (check_status_catch_solib): Adjust.
4185 * solib.c (update_solib_list): Adjust.
4186 * ui-out.h (class ui_out) <field_string>: New overload.
4187 * ui-out.c (ui_out::field_string): New overload.
4189 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4191 * progspace.h (struct program_space): Add constructor and
4192 destructor, initialize fields.
4193 (add_program_space): Remove.
4194 * progspace.c (add_program_space): Rename to...
4195 (program_space::program_space): ... this.
4196 (release_program_space): Rename to...
4197 (program_space::~program_space): ... this.
4198 (delete_program_space): Use delete to delete program_space.
4199 (initialize_progspace): Use new to allocate program_space.
4200 * inferior.c (add_inferior_with_spaces): Likewise.
4201 (clone_inferior_command): Likewise.
4202 * infrun.c (follow_fork_inferior): Likewise.
4203 (handle_vfork_child_exec_or_exit): Likewise.
4205 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4207 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4208 (delim_string_to_char_ptr_vec): Return std::vector of
4209 gdb::unique_xmalloc_ptr.
4210 (dirnames_to_char_ptr_vec_append): Take std::vector of
4211 gdb::unique_xmalloc_ptr.
4212 (dirnames_to_char_ptr_vec): Return std::vector of
4213 gdb::unique_xmalloc_ptr.
4214 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4215 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4216 (delim_string_to_char_ptr_vec): Return an std::vector of
4217 gdb::unique_xmalloc_ptr, adjust the code.
4218 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4219 gdb::unique_xmalloc_ptr, adjust the code.
4220 (dirnames_to_char_ptr_vec): Return an std::vector of
4221 gdb::unique_xmalloc_ptr, adjust the code.
4222 * auto-load.c (auto_load_safe_path_vec): Change type to
4223 std::vector of gdb::unique_xmalloc_ptr.
4224 (auto_load_expand_dir_vars): Return an std::vector of
4225 gdb::unique_xmalloc_ptr, adjust the code.
4226 (auto_load_safe_path_vec_update): Adjust.
4227 (filename_is_in_auto_load_safe_path_vec): Adjust.
4228 (auto_load_objfile_script_1): Adjust.
4229 * build-id.c (build_id_to_debug_bfd): Adjust.
4230 * linux-thread-db.c (thread_db_load_search): Adjust.
4231 * source.c (add_path): Adjust.
4233 * symfile.c (find_separate_debug_file): Adjust.
4234 * utils.c (do_free_char_ptr_vec): Remove.
4235 (make_cleanup_free_char_ptr_vec): Remove.
4237 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4240 * common/pathstuff.c: Conditionally include "<windows.h>".
4242 2018-03-01 Georg Sauthoff <mail@georg.so>
4245 * gcore.in: Quote variables and switch interpreter to bash.
4247 2018-03-01 Tom Tromey <tom@tromey.com>
4249 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4250 assertion. Add assertion for discriminant_index.
4251 (quirk_rust_enum): Use correct base type name in univariant case.
4253 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4255 * record.c (get_call_history_modifiers): Return a
4257 (cmd_record_call_history): Adjust.
4258 * record-btrace.c (record_btrace_call_history): Adjust.
4259 (record_btrace_call_history_range): Adjust.
4260 (record_btrace_call_history_from): Adjust.
4261 * target-debug.h (target_debug_print_record_print_flags): New.
4262 * target-delegates.c: Re-generate.
4263 * target.c (target_call_history): Change flags type.
4264 (target_call_history_from): Likewise.
4265 (target_call_history_range): Likewise.
4266 * target.h (struct target_ops) <target_call_history>: Likewise.
4267 (target_call_history_from): Likewise.
4268 (target_call_history_range): Likewise.
4270 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4271 Simon Marchi <simon.marchi@polymtl.ca>
4273 * common/common-utils.c: Include "sys/stat.h".
4274 (is_regular_file): Move here from "source.c"; change return
4276 * common/common-utils.h (is_regular_file): New prototype.
4277 * common/pathstuff.c (contains_dir_separator): New function.
4278 * common/pathstuff.h (contains_dir_separator): New prototype.
4279 * source.c: Don't include "sys/stat.h".
4280 (is_regular_file): Move to "common/common-utils.c".
4282 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4284 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4285 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4286 * auto-load.c: Include "common/pathstuff.h".
4287 * common/common-def.h (current_directory): Move here.
4288 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4290 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4292 * common/pathstuff.c: New file.
4293 * common/pathstuff.h: New file.
4294 * compile/compile.c: Include "common/pathstuff.h".
4295 * defs.h (current_directory): Move to "common/common-defs.h".
4296 * dwarf2read.c: Include "common/pathstuff.h".
4298 * guile/scm-safe-call.c: Likewise.
4299 * linux-thread-db.c: Likewise.
4301 * nto-tdep.c: Likewise.
4302 * objfiles.c: Likewise.
4303 * source.c: Likewise.
4304 * symtab.c: Likewise.
4305 * utils.c: Include "common/pathstuff.h".
4306 (gdb_realpath): Move to "common/pathstuff.c".
4307 (gdb_realpath_keepfile): Likewise.
4308 (gdb_abspath): Likewise.
4309 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4310 (gdb_realpath_keepfile): Likewise.
4311 (gdb_abspath): Likewise.
4313 2018-02-28 John Baldwin <jhb@FreeBSD.org>
4315 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4316 wildcard process pid for super_resume for kernels with a
4319 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4321 * compile/compile.c (get_args): Add additional comments
4322 explaining function.
4324 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4325 Tom Tromey <tom@tromey.com>
4327 * target.h (memory_write_request_s): Remove typedef. Don't define
4329 (target_write_memory_blocks): Change argument to std::vector.
4330 (struct memory_write_request): Add constructor.
4331 * target-memory.c (compare_block_starting_address): Return bool.
4332 Change argument types.
4333 (claim_memory): Change arguments to use std::vector.
4334 (split_regular_and_flash_blocks, blocks_to_erase)
4335 (compute_garbled_blocks): Likewise.
4336 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4337 (target_write_memory_blocks): Change argument to std::vector.
4338 * symfile.c (struct load_section_data): Add constructor and
4339 destructor. Use std::vector for "requests".
4340 (struct load_progress_data): Add initializers.
4341 (load_section_callback): Update. Use "new".
4342 (clear_memory_write_data): Remove.
4343 (generic_load): Update.
4345 2018-02-27 Alan Hayward <alan.hayward@arm.com>
4347 * arch/aarch64.h: Use common/tdesc.h.
4349 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4351 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4352 architecture with a 64-bit ABI.
4354 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4356 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4357 ahead of target description loading.
4359 2018-02-26 Tom Tromey <tom@tromey.com>
4361 * stack.c (backtrace_command_1): Update.
4362 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4364 * python/py-framefilter.c (py_print_frame)
4365 (gdbpy_apply_frame_filter): Change type of "flags".
4366 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4368 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4369 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4370 * extension.h (enum frame_filter_flag): Rename from
4372 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4373 (apply_ext_lang_frame_filter): Change type of "flags".
4374 * extension.c (apply_ext_lang_frame_filter): Change type of
4376 * extension-priv.h (struct extension_language_ops)
4377 <apply_frame_filter>: Change type of "flags".
4379 2018-02-26 Tom Tromey <tom@tromey.com>
4382 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4383 off-by-one in py_end computation.
4384 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4386 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4389 2018-02-26 Tom Tromey <tom@tromey.com>
4391 * dwarf2read.c (struct variant_field): New.
4392 (struct nextfield) <variant>: New field.
4393 (dwarf2_add_field): Handle DW_TAG_variant_part.
4394 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4395 discriminated union.
4396 (read_structure_type): Handle DW_TAG_variant_part.
4397 (handle_struct_member_die): New function, extracted from
4398 process_structure_scope. Handle DW_TAG_variant.
4399 (process_structure_scope): Handle discriminated unions. Call
4400 handle_struct_member_die.
4402 2018-02-26 Tom Tromey <tom@tromey.com>
4404 * rust-lang.h (rust_last_path_segment): Declare.
4405 * rust-lang.c (rust_last_path_segment): Now public. Change
4407 (struct disr_info): Remove.
4408 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4409 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4410 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4411 (rust_enum_p, rust_enum_variant): New function.
4412 (rust_underscore_fields): Remove "offset" parameter.
4413 (rust_print_enum): New function.
4414 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4415 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4416 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4418 (rust_internal_print_type): New function, from rust_print_type.
4420 (rust_print_type): Call rust_internal_print_type.
4421 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4422 Update enum handling.
4423 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4424 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4425 (rust_union_quirks): New functions.
4426 (process_full_comp_unit, process_full_type_unit): Call
4428 (process_structure_scope): Update rust_unions if necessary.
4430 2018-02-26 Tom Tromey <tom@tromey.com>
4432 * value.h (value_union_variant): Declare.
4433 * valops.c (value_union_variant): New function.
4434 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4435 (struct discriminant_info): New.
4436 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4438 (struct main_type) <flag_discriminated_union>: New field.
4440 2018-02-26 Tom Tromey <tom@tromey.com>
4442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4443 unittests/unpack-selftests.c.
4444 * unittests/unpack-selftests.c: New file.
4445 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4447 2018-02-26 Yao Qi <yao.qi@linaro.org>
4449 * dwarf2read.c (struct partial_die_info) <read>: New method.
4450 (read_partial_die): Remove the declaration.
4451 (load_partial_dies): Update.
4452 (partial_die_info::partial_die_info):
4453 (read_partial_die): Change it to partial_die_info::read.
4455 2018-02-26 Yao Qi <yao.qi@linaro.org>
4457 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4458 (fixup_partial_die): Remove declaration.
4459 (scan_partial_symbols): Update.
4460 (partial_die_parent_scope): Likewise.
4461 (partial_die_full_name): Likewise.
4462 (fixup_partial_die): Change it to partial_die_info::fixup.
4464 2018-02-26 Yao Qi <yao.qi@linaro.org>
4466 * dwarf2read.c (read_partial_die): Update the declaration.
4467 (load_partial_dies): Caller update.
4468 (read_partial_die): Remove one argument abbrev_len.
4470 2018-02-26 Yao Qi <yao.qi@linaro.org>
4472 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4473 assignment operator.
4474 (load_partial_dies): Use ctor and copy ctor.
4475 (read_partial_die): Update.
4476 (dwarf2_cu::find_partial_die): Use ctor.
4478 2018-02-26 Yao Qi <yao.qi@linaro.org>
4480 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4481 (find_partial_die_in_comp_unit): Change it to
4482 dwarf2_cu::find_partial_die.
4483 (find_partial_die): Update.
4485 2018-02-26 Yao Qi <yao.qi@linaro.org>
4487 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4490 2018-02-26 Yao Qi <yao.qi@linaro.org>
4492 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4494 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4496 * arch/amd64.h: Use common/tdesc.h.
4497 * arch/i386.c: Likewise.
4498 * arch/i386.h: Likewise.
4499 * arch/tic6x.c: Likewise.
4500 * arch/tdesc.h: Move file from here...
4501 * common/tdesc.h: ...to here.
4502 * features/aarch64-core.c: Regenerate.
4503 * features/aarch64-fpu.c: Regenerate.
4504 * features/i386/32bit-avx.c: Regenerate.
4505 * features/i386/32bit-avx512.c: Regenerate.
4506 * features/i386/32bit-core.c: Regenerate.
4507 * features/i386/32bit-linux.c: Regenerate.
4508 * features/i386/32bit-mpx.c: Regenerate.
4509 * features/i386/32bit-pkeys.c: Regenerate.
4510 * features/i386/32bit-sse.c: Regenerate.
4511 * features/i386/64bit-avx.c: Regenerate.
4512 * features/i386/64bit-avx512.c: Regenerate.
4513 * features/i386/64bit-core.c: Regenerate.
4514 * features/i386/64bit-linux.c: Regenerate.
4515 * features/i386/64bit-mpx.c: Regenerate.
4516 * features/i386/64bit-pkeys.c: Regenerate.
4517 * features/i386/64bit-segments.c: Regenerate.
4518 * features/i386/64bit-sse.c: Regenerate.
4519 * features/i386/x32-core.c: Regenerate.
4520 * features/tic6x-c6xp.c: Regenerate.
4521 * features/tic6x-core.c: Regenerate.
4522 * features/tic6x-gp.c: Regenerate.
4523 * target-descriptions.c: Use common/tdesc.h.
4524 * target-descriptions.h: Likewise.
4526 2018-02-24 Tom Tromey <tom@tromey.com>
4528 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4529 (try_thread_db_load_from_dir, thread_db_load_search): Use
4531 (info_auto_load_libthread_db_compare): Return bool. Change
4533 (info_auto_load_libthread_db): Use std::vector, std::string.
4536 2018-02-24 Tom Tromey <tom@tromey.com>
4538 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4540 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4542 * gdbarch.c: Rebuild.
4543 * gdbarch.h: Rebuild.
4544 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4545 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4546 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4549 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4551 * gdbtypes.h (sect_offset): Change type to uint64_t.
4552 (sect_offset_str): New function.
4553 * dwarf2read.c (create_addrmap_from_aranges): Use
4555 (error_check_comp_unit_head): Likewise.
4556 (create_debug_type_hash_table): Likewise.
4557 (read_cutu_die_from_dwo): Likewise.
4558 (init_cutu_and_read_dies): Likewise.
4559 (init_cutu_and_read_dies_no_follow): Likewise.
4560 (process_psymtab_comp_unit_reader): Likewise.
4561 (partial_die_parent_scope): Likewise.
4562 (peek_die_abbrev): Likewise.
4563 (process_queue): Likewise.
4564 (dwarf2_physname): Likewise.
4565 (read_namespace_alias): Likewise.
4566 (read_import_statement): Likewise.
4567 (create_dwo_cu_reader): Likewise.
4568 (create_cus_hash_table): Likewise.
4569 (lookup_dwo_cutu): Likewise.
4570 (inherit_abstract_dies): Likewise.
4571 (read_func_scope): Likewise.
4572 (read_call_site_scope): Likewise.
4573 (dwarf2_add_member_fn): Likewise.
4574 (read_common_block): Likewise.
4575 (read_module_type): Likewise.
4576 (read_typedef): Likewise.
4577 (read_subrange_type): Likewise.
4578 (load_partial_dies): Likewise.
4579 (read_partial_die): Likewise.
4580 (find_partial_die): Likewise.
4581 (read_str_index): Likewise.
4582 (dwarf2_string_attr): Likewise.
4583 (build_error_marker_type): Likewise.
4584 (lookup_die_type): Likewise.
4585 (dump_die_shallow): Likewise.
4586 (follow_die_ref): Likewise.
4587 (dwarf2_fetch_die_loc_sect_off): Likewise.
4588 (dwarf2_fetch_constant_bytes): Likewise.
4589 (follow_die_sig): Likewise.
4590 (get_signatured_type): Likewise.
4591 (get_DW_AT_signature_type): Likewise.
4592 (dwarf2_find_containing_comp_unit): Likewise.
4593 (set_die_type): Likewise.
4595 2018-02-21 John Baldwin <jhb@FreeBSD.org>
4597 * arch/aarch64.c: Include "common-defs.h".
4598 * arch/amd64.c: Likewise.
4599 * arch/i386.c: Likewise.
4601 2018-02-21 Tom Tromey <tom@tromey.com>
4603 * value.h: (extract_field_op): Update.
4604 * eval.c (extract_field_op): Return a const char *.
4605 * expression.h (parse_expression_for_completion): Update.
4606 * completer.c (complete_expression): Update.
4607 (add_struct_fields): Make fieldname const.
4608 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4609 (mark_completion_tag, parse_exp_in_context_1): Update.
4610 (parse_expression_for_completion): Change "name" to
4611 unique_xmalloc_ptr*.
4613 2018-02-21 Tom Tromey <tom@tromey.com>
4615 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4617 2018-02-21 Yao Qi <yao.qi@linaro.org>
4619 * avr-tdep.c (avr_read_pc): Change parameter type to
4621 * gdbarch.sh (read_pc): Likewise.
4622 * gdbarch.c: Re-generated.
4623 * gdbarch.h: Re-generated.
4624 * hppa-tdep.c (hppa_read_pc): Change parameter type to
4626 * ia64-tdep.c (ia64_read_pc): Likewise.
4627 * mips-tdep.c (mips_read_pc): Likewise.
4628 * spu-tdep.c (spu_read_pc): Likewise.
4630 2018-02-21 Yao Qi <yao.qi@linaro.org>
4632 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4633 * regcache-dump.c: New file.
4634 * regcache.c: Move register_dump to regcache-dump.c.
4635 (maintenance_print_registers): Likewise.
4636 (maintenance_print_raw_registers): Likewise.
4637 (maintenance_print_cooked_registers): Likewise.
4638 (maintenance_print_register_groups): Likewise.
4639 (maintenance_print_remote_registers): Likewise.
4640 (_initialize_regcache): Likewise.
4641 * regcache.h (register_dump): Moved from regcache.c.
4643 2018-02-21 Yao Qi <yao.qi@linaro.org>
4645 * regcache.c (regcache::regcache): Update.
4646 (regcache::invalidate): Move it to detached_regcache::invalidate.
4647 (get_thread_arch_aspace_regcache): Update.
4648 (regcache::raw_update): Update.
4649 (regcache::cooked_read): Remove some code.
4650 (regcache::cooked_read_value): Likewise.
4651 (regcache::raw_write): Remove assert on m_readonly_p.
4652 (regcache::raw_supply_integer): Move it to
4653 detached_regcache::raw_supply_integer.
4654 (regcache::raw_supply_zeroed): Likewise.
4655 * regcache.h (detached_regcache) <raw_supply_integer>: New
4657 <raw_supply_zeroed, invalidate>: Likewise.
4658 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4659 <invalidate>: Likewise.
4660 <m_readonly_p>: Removed.
4662 2018-02-21 Yao Qi <yao.qi@linaro.org>
4664 * infcmd.c (get_return_value): Let stop_regs point to
4665 get_current_regcache.
4666 * regcache.c (regcache::regcache): Remove.
4667 (register_dump_reg_buffer): New class.
4668 (regcache_print): Adjust.
4669 * regcache.h (regcache): Remove constructors.
4671 2018-02-21 Yao Qi <yao.qi@linaro.org>
4673 * regcache.c (class register_dump): New class.
4674 (register_dump_regcache, register_dump_none): New class.
4675 (register_dump_remote, register_dump_groups): New class.
4676 (regcache_print): Update.
4677 * regcache.h (regcache_dump_what): Move it to regcache.c.
4678 (regcache) <dump>: Remove.
4680 2018-02-21 Yao Qi <yao.qi@linaro.org>
4682 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4684 (jit_unwind_reg_set_impl): Call raw_supply.
4685 (jit_frame_sniffer): Use reg_buffer_rw.
4686 * record-full.c (record_full_core_regbuf): Change its type.
4687 (record_full_core_open_1): Use reg_buffer_rw.
4688 (record_full_close): Likewise.
4689 (record_full_core_fetch_registers): Use regcache->raw_supply.
4690 (record_full_core_store_registers): Likewise.
4691 * regcache.c (regcache::get_register_status): Move it to
4693 (regcache_raw_set_cached_value): Remove.
4694 (regcache::raw_set_cached_value): Remove.
4695 (regcache::raw_write): Call raw_supply.
4696 (regcache::raw_supply): Move it to reg_buffer_rw.
4697 * regcache.h (regcache_raw_set_cached_value): Remove.
4698 (reg_buffer_rw): New class.
4700 2018-02-21 Yao Qi <yao.qi@linaro.org>
4702 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4703 readonly_detached_regcache.
4704 (dummy_frame_prev_register): Use regcache->cooked_read.
4705 * frame.c (frame_save_as_regcache): Change return type.
4706 (frame_pop): Update.
4707 * frame.h (frame_save_as_regcache): Update declaration.
4708 * inferior.h (get_infcall_suspend_state_regcache): Update
4710 * infrun.c (infcall_suspend_state) <registers>: use
4711 readonly_detached_regcache.
4712 (save_infcall_suspend_state): Don't use regcache_dup.
4713 (get_infcall_suspend_state_regcache): Change return type.
4714 * linux-fork.c (struct fork_info) <savedregs>: Change to
4715 readonly_detached_regcache.
4717 (fork_save_infrun_state): Don't use regcache_dup.
4718 (info_checkpoints_command): Adjust.
4719 * mi/mi-main.c (register_changed_p): Update declaration.
4720 (mi_cmd_data_list_changed_registers): Use
4721 readonly_detached_regcache.
4722 (register_changed_p): Change parameter type to
4723 readonly_detached_regcache.
4724 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4725 readonly_detached_regcache.
4726 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4727 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4729 (regcache::save): Move it to reg_buffer.
4730 (regcache::restore): Change parameter type.
4731 (regcache_dup): Remove.
4732 * regcache.h (reg_buffer) <save>: New method.
4733 (readonly_detached_regcache): New class.
4734 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4735 readonly_detached_regcache.
4736 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4738 2018-02-21 Yao Qi <yao.qi@linaro.org>
4740 * frame.c (frame_save_as_regcache): Use regcache method save.
4741 (frame_pop): Use regcache method restore.
4742 * infrun.c (restore_infcall_suspend_state): Likewise.
4743 * linux-fork.c (fork_load_infrun_state): Likewise.
4744 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4746 * regcache.c (regcache_save): Remove.
4747 (regcache::restore): More asserts.
4748 (regcache_cpy): Remove.
4749 * regcache.h (regcache_save): Remove the declaration.
4750 (regcache::restore): Move from private to public.
4751 Remove the friend declaration of regcache_cpy.
4752 (regcache_cpy): Remove declaration.
4754 2018-02-21 Yao Qi <yao.qi@linaro.org>
4756 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4757 parameter type to 'readable_regcache *'.
4758 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4759 * arm-tdep.c (arm_neon_quad_read): Likewise.
4760 (arm_pseudo_read): Likewise.
4761 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4762 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4763 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4764 * gdbarch.c: Re-generated.
4765 * gdbarch.h: Re-generated.
4766 * gdbarch.sh (pseudo_register_read): Change parameter type to
4767 'readable_regcache *'.
4768 (pseudo_register_read_value): Likewise.
4769 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4770 (h8300_pseudo_register_read): Likewise.
4771 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4772 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4773 (i386_pseudo_register_read_into_value): Likewise.
4774 (i386_pseudo_register_read_value): Likewise.
4775 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4777 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4778 * m32c-tdep.c (m32c_raw_read): Likewise.
4779 (m32c_read_flg): Likewise.
4780 (m32c_banked_register): Likewise.
4781 (m32c_banked_read): Likewise.
4782 (m32c_sb_read): Likewise.
4783 (m32c_part_read): Likewise.
4784 (m32c_cat_read): Likewise.
4785 (m32c_r3r2r1r0_read): Likewise.
4786 (m32c_pseudo_register_read): Likewise.
4787 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4788 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4789 (mep_pseudo_cr64_read): Likewise.
4790 (mep_pseudo_register_read): Likewise.
4791 * mips-tdep.c (mips_pseudo_register_read): Likewise.
4792 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4793 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4794 * regcache.c (regcache::raw_read): Move it to readable_regcache.
4795 (regcache::cooked_read): Likewise.
4796 (regcache::cooked_read_value): Likewise.
4797 (regcache_cooked_read_signed):
4798 (regcache::cooked_read): Likewise.
4799 * regcache.h (readable_regcache): New class.
4800 (regcache): Inherit readable_regcache. Move some methods to
4802 * rl78-tdep.c (rl78_pseudo_register_read): Change
4803 parameter type to 'readable_regcache *'.
4804 * rs6000-tdep.c (do_regcache_raw_read): Remove.
4805 (e500_pseudo_register_read): Change parameter type to
4806 'readable_regcache *'.
4807 (dfp_pseudo_register_read): Likewise.
4808 (vsx_pseudo_register_read): Likewise.
4809 (efpr_pseudo_register_read): Likewise.
4810 * s390-tdep.c (s390_pseudo_register_read): Likewise.
4811 * sh-tdep.c (sh_pseudo_register_read): Likewise.
4812 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4813 (sh64_pseudo_register_read): Likewise.
4814 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4815 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4816 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4817 (spu_pseudo_register_read): Likewise.
4818 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4819 (xtensa_pseudo_register_read): Likewise.
4821 2018-02-21 Yao Qi <yao.qi@linaro.org>
4823 * regcache.c (regcache::regcache): Call reg_buffer ctor.
4824 (regcache::arch): Move it to reg_buffer::arch.
4825 (regcache::register_buffer): Likewise.
4826 (regcache::assert_regnum): Likewise.
4827 (regcache::num_raw_registers): Likewise.
4828 * regcache.h (reg_buffer): New class.
4829 (regcache): Inherit reg_buffer.
4831 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
4833 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4834 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4836 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
4838 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4840 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4842 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4843 (SFILES): Remove common/*.c files.
4844 (COMMON_OBS): Remove some *.o files built from common/*.c files.
4845 * common/common.host: Add common reference.
4846 * configure.ac: Likewise.
4847 * configure: Regenerate.
4849 2018-02-16 Yao Qi <yao.qi@linaro.org>
4851 * block.c (block_namespace_info): Inherit allocate_on_obstack.
4852 (block_initialize_namespace): Use new.
4853 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4854 (dwarf2_free_objfile): Use delete.
4855 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4856 (copy_type_recursive): Use new.
4857 * gdb_obstack.h (allocate_on_obstack): New.
4859 2018-02-15 Yao Qi <yao.qi@linaro.org>
4862 * inferior.c (exit_inferior_1): Reset inf->control.
4864 2018-02-15 Joel Brobecker <brobecker@adacore.com>
4866 * ada-lang.c (ada_to_fixed_value_create): Delete advance
4869 2018-02-14 Pedro Alves <palves@redhat.com>
4871 * frame-unwind.c (frame_unwind_try_unwinder): Always call
4872 frame_cleanup_after_sniffer on exception.
4874 2018-02-14 Tom Tromey <tom@tromey.com>
4876 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4878 (solib_bfd_open): Make pathname const.
4879 * solib.c (solib_bfd_open): Make pathname const.
4880 * solib-spu.c (spu_bfd_fopen): Make name const.
4881 (spu_bfd_open): Make pathname const.
4882 * solib-darwin.c (darwin_bfd_open): Make pathname const.
4883 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4885 2018-02-14 Tom Tromey <tom@tromey.com>
4887 * symfile.c (symfile_bfd_open): Update.
4888 * source.h (openp, source_full_path_of, find_and_open_source):
4889 Change argument type to unique_xmalloc_ptr.
4890 * source.c (openp): Take a unique_xmalloc_ptr.
4891 (source_full_path_of, find_and_open_source): Likewise.
4892 (open_source_file, symtab_to_fullname): Update.
4893 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4895 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4896 (exec_file_find): Update.
4897 * psymtab.c (psymtab_to_fullname): Update.
4898 * nto-tdep.h (nto_find_and_open_solib): Update.
4899 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4901 * exec.c (exec_file_attach): Update.
4902 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4903 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4905 2018-02-14 Tom Tromey <tom@tromey.com>
4907 * solib.c: Include source.h.
4908 * nto-tdep.c: Include source.h.
4909 * mi/mi-cmd-env.c: Include source.h.
4910 * infcmd.c: Include source.h.
4911 * exec.c: Include source.h.
4912 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4913 (add_path, directory_switch, source_path, init_source_path): Move
4915 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4916 (add_path, directory_switch, source_path, init_source_path):
4919 2018-02-14 Tom Tromey <tom@tromey.com>
4921 * solist.h (exec_file_find, solib_find): Return
4923 (solib_bfd_fopen): Take a const char *.
4924 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4925 (exec_file_find, solib_find): Likewise.
4926 (solib_bfd_fopen): Do not take ownership of "pathname".
4927 (solib_bfd_open): Use unique_xmalloc_ptr.
4928 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4929 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4930 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4931 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4933 2018-02-14 Joel Brobecker <brobecker@adacore.com>
4935 * ada-lang.c (name_match_type_from_name): Remove reference to
4936 ada_name_for_lookup in function's documentation.
4937 * ada-lang.h (ada_name_for_lookup): Delete declaration.
4939 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4941 * defs.h (enum openp_flags): New enum.
4942 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4943 Move to enum openp_flags.
4944 (openp_flags): New enum flags.
4945 (openp): Change parameter type to openp_flags.
4946 * source.c (openp): Change parameter type to openp_flags.
4947 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4948 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4950 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4952 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4955 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
4957 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4959 (class dwarf2_queue_guard): ...the destructor of this new class.
4960 (dw2_do_instantiate_symtab): Create instance of the new class
4961 dwarf2_queue_guard, remove cleanup.
4963 2018-02-09 Tom Tromey <tom@tromey.com>
4965 * source.c (find_source_lines): Don't reference past the end of
4968 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4970 * remote.c (remote_btrace_maybe_reopen): Change error message.
4971 * btrace.c (btrace_enable): Likewise.
4972 (parse_xml_btrace): Likewise.
4973 (parse_xml_btrace_conf): Likewise.
4975 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4977 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4978 (linux_enable_pt, linux_enable_bts): Call
4979 diagnose_perf_event_open_fail.
4981 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4983 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4984 Remove parameter and change return type. Update callers. Move it.
4985 (linux_enable_bts, linux_enable_pt): Improve error message.
4986 (linux_enable_pt): Remove zero buffer size check.
4987 (linux_enable_btrace): Improve error messages. Remove NULL return
4990 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4992 * btrace.c (btrace_enable): Remove target_supports_btrace call.
4993 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4994 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4995 (linux_supports_pt, linux_supports_btrace): Remove.
4996 (linux_enable_bts): Call cpu_supports_bts.
4997 * nat/linux-btrace.h (linux_supports_btrace): Remove.
4998 * remote.c (remote_supports_btrace): Remove.
4999 (init_remote_ops): Remove remote_supports_btrace.
5000 * target-delegates.c: Regenerated.
5001 * target.c (target_supports_btrace): Remove.
5002 * target.h (target_ops) <to_supports_btrace>: Remove
5003 (target_supports_btrace): Remove.
5004 * x86-linux-nat.c (x86_linux_create_target): Remove
5005 linux_supports_btrace.
5007 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5009 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
5011 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
5012 exception and use message in own exception.
5014 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5016 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
5017 (perf_event_pt_event_type): Use gdb_file_up.
5018 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
5019 scoped_fd, and scoped_mmap.
5021 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5023 * common/scoped_mmap.h: New.
5024 * unittests/scoped_mmap-selftest.c: New.
5025 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5026 unittests/scoped_mmap-selftest.c.
5028 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5030 * common/scoped_fd.h: New.
5031 * unittests/scoped_fd-selftest.c: New.
5032 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5033 unittests/scoped_fd-selftest.c.
5035 2018-02-09 Tom Tromey <tom@tromey.com>
5037 * auto-load.c (auto_load_section_scripts): Use
5038 gdb::unique_xmalloc_ptr.
5040 2018-02-09 Tom Tromey <tom@tromey.com>
5042 * auto-load.c (execute_script_contents): Use std::string.
5044 2018-02-09 Joel Brobecker <brobecker@adacore.com>
5046 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
5047 Python function, rather than a new command.
5049 2018-02-08 Tom Tromey <tom@tromey.com>
5051 * solib.c (solib_find_1): Use std::string.
5052 (solib_bfd_fopen): Use unique_xmalloc_ptr.
5054 2018-02-08 Tom Tromey <tom@tromey.com>
5056 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
5058 2018-02-08 Tom Tromey <tom@tromey.com>
5060 * source.c (find_source_lines): Use gdb::def_vector.
5062 2018-02-08 Tom Tromey <tom@tromey.com>
5064 * macrocmd.c (struct temporary_macro_definition): New.
5065 (macro_define_command): Use temporary_macro_definition. Remove
5067 (free_macro_definition_ptr): Remove.
5069 2018-02-08 Tom Tromey <tom@tromey.com>
5071 * macroexp.c (maybe_expand): Use std::string.
5073 2018-02-08 Tom Tromey <tom@tromey.com>
5075 * macroexp.c (struct macro_buffer): Add initializers for some
5077 (init_buffer, init_shared_buffer, free_buffer)
5078 (free_buffer_return_text): Remove.
5079 (macro_buffer): New constructors.
5080 (~macro_buffer): New destructor.
5081 (macro_buffer::set_shared): New method.
5082 (macro_buffer::resize_buffer, macro_buffer::appendc)
5083 (macro_buffer::appendmem): Now methods, not free functions.
5084 (set_token, append_tokens_without_splicing, stringify)
5085 (macro_stringify): Update.
5086 (gather_arguments): Change return type. Remove argc_p argument,
5087 add args_ptr argument. Use std::vector.
5088 (substitute_args): Remove argc argument. Accept std::vector.
5089 (expand): Update. Use std::vector.
5090 (scan, macro_expand, macro_expand_next): Update.
5092 2018-02-08 Tom Tromey <tom@tromey.com>
5094 * symtab.c (default_collect_symbol_completion_matches_break_on):
5095 Use unique_xmalloc_ptr.
5096 * macroscope.h: (sal_macro_scope, user_macro_scope)
5097 (default_macro_scope): Return unique_xmalloc_ptr.
5098 * macroscope.c (sal_macro_scope, user_macro_scope)
5099 (default_macro_scope): Return unique_xmalloc_ptr.
5100 * macroexp.h (macro_expand, macro_expand_once): Return
5102 * macroexp.c (macro_expand, macro_expand_once): Return
5104 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5105 (info_macro_command, info_macros_command): Use
5107 * compile/compile-c-support.c (write_macro_definitions): Use
5109 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5111 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
5113 * value.c (value_static_field): Assign field type instead of
5114 containing type when returning an optimized out value.
5116 2018-02-06 Yao Qi <yao.qi@linaro.org>
5118 * ft32-tdep.c (ft32_read_pc): Remove.
5119 (ft32_write_pc): Remove.
5120 (ft32_gdbarch_init): Update.
5121 * m32r-tdep.c (m32r_read_pc): Remove.
5122 (m32r_gdbarch_init): Update.
5123 * mep-tdep.c (mep_read_pc): Remove.
5124 (mep_gdbarch_init): Update.
5125 * microblaze-tdep.c (microblaze_write_pc): Remove.
5126 (microblaze_gdbarch_init): Update.
5127 * mn10300-tdep.c (mn10300_read_pc): Remove.
5128 (mn10300_write_pc): Remove.
5129 (mn10300_gdbarch_init): Update.
5130 * moxie-tdep.c (moxie_read_pc): Remove.
5131 (moxie_write_pc): Remove.
5132 (moxie_gdbarch_init): Update.
5134 2018-02-06 Yao Qi <yao.qi@linaro.org>
5136 * expprint.c (print_subexp_standard): Handle
5137 OP_F77_UNDETERMINED_ARGLIST.
5138 (dump_subexp_body_standard): Likewise.
5140 2018-02-05 Alan Hayward <alan.hayward@arm.com>
5142 * target-descriptions.c (tdesc_element_visitor) Add empty
5144 (tdesc_type): Move make_gdb_type from here.
5145 (tdesc_type_builtin): Likewise.
5146 (tdesc_type_vector): Likewise.
5147 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5148 (make_gdb_type_struct): Move from tdesc_type_with_fields.
5149 (make_gdb_type_union): Likewise.
5150 (make_gdb_type_flags): Likewise.
5151 (make_gdb_type_enum): Likewise.
5152 (make_gdb_type): New function.
5153 (tdesc_register_type): Use static make_gdb_type.
5155 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
5157 * infcmd.c (default_print_one_register_info): Align natural-format
5158 column values consistently one under another.
5159 (pad_to_column): New function.
5161 2018-02-05 Joel Brobecker <brobecker@adacore.com>
5163 * dwarf2read.c (dwarf2_physname): Move commment.
5165 2018-02-01 Leszek Swirski <leszeks@google.com>
5167 * varobj.c (varobj_formatted_print_options): Allow recursive
5168 pretty printing if pretty printing is enabled.
5170 2018-02-01 Leszek Swirski <leszeks@google.com>
5172 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5173 names after a structop as a filename.
5175 2018-02-01 Yao Qi <yao.qi@linaro.org>
5177 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5178 (arm_record_coproc_data_proc): Likewise.
5180 2018-02-01 Yao Qi <yao.qi@linaro.org>
5182 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5184 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5186 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5187 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5189 2018-01-31 Pedro Alves <palves@redhat.com>
5191 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5192 * inflow.c (child_terminal_save_inferior): Wrap reference to
5193 tcgetpgrp in HAVE_TERMIOS_H.
5194 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5196 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5197 always iterate over all inferiors.
5198 (gdbsim_cntrl_c): Adjust.
5199 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5201 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5203 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5204 index type is objfile-owned if the element type is as well.
5206 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5210 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5212 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5213 "features/s390x-linux64.c".
5214 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5215 s390_linux32 and s390x_linux64.
5216 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5218 * s390-tdep.c: Include "features/s390-linux32.c" and
5219 "features/s390x-linux64.c".
5220 (s390_tdesc_valid): Add check for tdesc_has_registers.
5221 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5222 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5223 tdesc_s390x_linux64.
5224 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5225 tdesc_s390x_linux64 to...
5226 * s390-tdep.h: ...here.
5228 2018-01-30 Pedro Alves <palves@redhat.com>
5231 * config.in, configure: Regenerate.
5232 * configure.ac: Check for getpgid.
5233 * go32-nat.c (go32_pass_ctrlc): New.
5234 (go32_target): Install it.
5235 * inf-child.c (inf_child_target): Install
5236 child_terminal_save_inferior, child_pass_ctrlc and
5238 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5239 (inf_ptrace_target): No longer install it.
5240 * infcmd.c (interrupt_target_1): Adjust.
5241 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5242 (child_interrupt): Declare.
5243 (inferior::terminal_state): New.
5244 * inflow.c (struct terminal_info): Update comments.
5245 (inferior_process_group): Delete.
5246 (terminal_is_ours): Delete.
5247 (gdb_tty_state): New.
5248 (child_terminal_init): Adjust.
5249 (is_gdb_terminal, sharing_input_terminal_1)
5250 (sharing_input_terminal): New functions.
5251 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5252 Set the process's actual process group in the foreground if
5253 possible. Handle is_ours_for_output/is_ours distinction. Don't
5254 mark terminal as the inferior's if not sharing GDB's terminal.
5255 Don't check attach_flag.
5256 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5257 pass down a target_terminal_state.
5258 (child_terminal_save_inferior): New, factored out from ...
5259 (child_terminal_ours_1): ... this. Handle
5260 target_terminal_state::is_ours_for_output.
5261 (child_interrupt, child_pass_ctrlc): New.
5262 (inflow_inferior_exit): Clear the inferior's terminal_state.
5263 (copy_terminal_info): Copy the inferior's terminal state.
5264 (_initialize_inflow): Remove reference to terminal_is_ours.
5265 * inflow.h (inferior_process_group): Delete.
5266 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5267 * procfs.c (procfs_target): Don't install procfs_interrupt.
5268 (procfs_interrupt): Delete.
5269 * remote.c (remote_serial_quit_handler): Adjust.
5270 (remote_interrupt): Remove ptid parameter. Adjust.
5271 * target-delegates.c: Regenerate.
5272 * target.c: Include "terminal.h".
5273 (target_terminal::terminal_state): Rename to ...
5274 (target_terminal::m_terminal_state): ... this.
5275 (target_terminal::init): Adjust.
5276 (target_terminal::inferior): Adjust to per-inferior
5278 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5279 (target_terminal::ours, target_terminal::ours_for_output): Use
5280 target_terminal_is_ours_kind.
5281 (target_interrupt): Remove ptid parameter. Adjust.
5282 (default_target_pass_ctrlc): Adjust.
5283 * target.h (target_ops::to_terminal_save_inferior): New field.
5284 (target_ops::to_interrupt): Remove ptid_t parameter.
5285 (target_interrupt): Remove ptid_t parameter. Update comment.
5286 (target_pass_ctrlc): Update comment.
5287 * target/target.h (target_terminal_state): New scoped enum,
5289 (target_terminal::terminal_state): ... here.
5290 (target_terminal::inferior): Update comments.
5291 (target_terminal::restore_inferior): New.
5292 (target_terminal::is_inferior, target_terminal::is_ours)
5293 (target_terminal::is_ours_for_output): Adjust.
5294 (target_terminal::scoped_restore_terminal_state): Adjust to
5295 rename, and call restore_inferior() instead of inferior().
5296 (target_terminal::scoped_restore_terminal_state::m_state): Change
5298 (target_terminal::terminal_state): Rename to ...
5299 (target_terminal::m_terminal_state): ... this and change type.
5301 2018-01-30 Pedro Alves <palves@redhat.com>
5303 * linux-nat.c (wait_for_signal): New function.
5304 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5306 (async_terminal_is_ours)
5307 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5308 (linux_nat_add_target): Don't override
5309 to_terminal_inferior/to_terminal_ours.
5311 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5313 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5315 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5317 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5318 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5319 dwarf2_per_objfile_free here.
5320 (dwarf2_per_objfile_free): Remove.
5321 (_initialize_dwarf2_read): Don't register
5322 dwarf2_per_objfile_free as a registry cleanup.
5324 2018-01-27 Eli Zaretskii <eliz@gnu.org>
5326 Avoid compilation errors in MinGW native builds
5328 The error is triggered by including python-internal.h, and the
5331 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5332 from build-gnulib/import/math.h:27,
5333 from d:/usr/Python26/include/pyport.h:235,
5334 from d:/usr/Python26/include/Python.h:58,
5335 from python/python-internal.h:94,
5336 from python/py-arch.c:24:
5337 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5341 This happens because Python headers define 'hypot' to expand t
5342 '_hypot' in the Windows builds.
5343 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5344 'hypoth'. This avoids a compilation error.
5346 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5348 * MAINTAINERS (Write After Approval): Fix ordering.
5350 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5352 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5354 2018-01-26 Alan Modra <amodra@gmail.com>
5356 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5357 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5358 Remove nop. Make const. Comment.
5359 (powerpc32_plt_stub_so_2): New.
5360 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5361 Correct count. Update uses.
5362 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5363 Move common code reading PLT entry word. Correct
5364 powerpc32_plt_stub PLT address calculation.
5365 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5366 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5367 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5368 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5369 (ppc64_standard_linkage8): Likewise.
5370 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5371 Correct insns description.
5372 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5374 2018-01-24 Pedro Alves <palves@redhat.com>
5376 GCC PR libstdc++/83906
5377 * gdbtypes.c (operator==(const dynamic_prop &,
5378 const dynamic_prop &)): New.
5379 (operator==(const range_bounds &, const range_bounds &)): New.
5380 (check_types_equal): Use them instead of memcmp.
5381 * gdbtypes.h (operator==(const dynamic_prop &,
5382 const dynamic_prop &)): Declare.
5383 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5384 (operator==(const range_bounds &, const range_bounds &)): Declare.
5385 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5387 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5389 * s390-linux-tdep.c (s390_record_address_mask)
5390 (s390_record_calc_disp_common, s390_record_calc_disp)
5391 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5392 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5393 (s390_process_record): Move to s390-tdep.c.
5394 (s390_linux_init_abi_any): Adjust.
5395 * s390-tdep.c (s390_record_address_mask)
5396 (s390_record_calc_disp_common, s390_record_calc_disp)
5397 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5398 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5399 (s390_process_record): Moved from s390-linux-tdep.c
5400 (s390_gdbarch_init): Adjust.
5402 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5404 * s390-linux-nat.c (s390-tdep.h): New include.
5405 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5406 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5407 (ALLDEPFILES): Add s390-tdep.c.
5408 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5409 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5410 * s390-tdep.h: ...this. New file.
5411 * s390-linux-tdep.c (s390-tdep.h): New include.
5412 (_initialize_s390_tdep): Rename to...
5413 (_initialize_s390_linux_tdep): ...this and adjust.
5414 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5415 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5417 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5418 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5419 (s390_is_partial_instruction, s390_software_single_step)
5420 (is_non_branch_ril, s390_displaced_step_copy_insn)
5421 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5422 (s390_prologue_data, s390_addr, s390_store, s390_load)
5423 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5424 (s390_register_call_saved, s390_guess_tracepoint_registers)
5425 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5426 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5427 (s390_pseudo_register_name, s390_pseudo_register_type)
5428 (s390_pseudo_register_read, s390_pseudo_register_write)
5429 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5430 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5431 (s390_addr_bits_remove, s390_address_class_type_flags)
5432 (s390_address_class_type_flags_to_name)
5433 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5434 (s390_function_arg_float, s390_function_arg_vector)
5435 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5436 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5437 (s390_frame_align, s390_register_return_value, s390_return_value)
5438 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5439 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5440 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5441 (s390_trad_frame_prev_register, s390_unwind_cache)
5442 (s390_prologue_frame_unwind_cache)
5443 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5444 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5445 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5446 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5447 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5448 (s390_frame_base_address, s390_local_base_address)
5449 (s390_frame_base, s390_gcc_target_options)
5450 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5451 (s390_validate_reg_range, s390_tdesc_valid)
5452 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5453 * s390-tdep.c: ...this. New file.
5455 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5457 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5458 (s390_process_record, s390_gdbarch_tdep_alloc)
5459 (s390_linux_init_abi_any): Use/set new hook.
5461 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5463 * s390-linux-tdep.c (osabi.h): New include.
5464 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5465 (s390_linux_init_abi_any): New functions.
5466 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5468 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5470 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5471 tdesc_has_registers check
5473 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5475 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5476 (s390_validate_reg_range): New macro.
5477 (s390_gdbarch_init): Adjust.
5479 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5481 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5482 (s390_gdbarch_tdep_alloc): Adjust.
5483 (s390_gdbarch_init): Adjust.
5485 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5487 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5488 <have_tdb>: Change type to bool.
5489 (s390_gdbarch_tdep_alloc): Adjust.
5490 (s390_gdbarch_init): Adjust.
5492 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5494 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5495 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5496 (s390_gdbarch_tdep_alloc): New function.
5497 (s390_gdbarch_init): Allocate tdep at start and use its fields
5498 instead of separate variables.
5500 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5502 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5503 when looking for cached gdbarch and add comment for remaining.
5505 2018-01-22 Pedro Alves <palves@redhat.com>
5506 Sergio Durigan Junior <sergiodj@redhat.com>
5508 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5511 2018-01-22 Maciej W. Rozycki <macro@mips.com>
5513 * MAINTAINERS: Update my company e-mail address.
5515 2018-01-22 Yao Qi <yao.qi@linaro.org>
5517 * regcache.c (cooked_write_test): New function.
5518 (_initialize_regcache): Register the test.
5520 2018-01-22 Yao Qi <yao.qi@linaro.org>
5522 * ia64-tdep.c (ia64_pseudo_register_read): Call
5523 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5524 * m32c-tdep.c (m32c_cat_read): Likewise.
5525 (m32c_r3r2r1r0_read): Likewise.
5526 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5527 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5529 2018-01-22 Yao Qi <yao.qi@linaro.org>
5531 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5532 method raw_read instead of regcache_raw_read.
5533 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5534 * arm-tdep.c (arm_neon_quad_read): Likewise.
5535 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5536 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5537 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5538 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5539 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5540 (i386_pseudo_register_read_into_value): Likewise.
5541 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5542 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5543 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5544 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5545 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5546 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5547 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5548 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5549 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5551 2018-01-22 Yao Qi <yao.qi@linaro.org>
5553 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5554 * configure.tgt: Remove target mt.
5555 * mt-tdep.c: Remove.
5556 * regcache.c (cooked_read_test): Remove the check for mt.
5558 2018-01-22 Yao Qi <yao.qi@linaro.org>
5560 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5561 instead of gdbarch_pseudo_register_read_value.
5563 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5565 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5568 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5570 * linespec.c (create_sals_line_offset): Remove code that preserved
5571 the symtab_and_line's line number.
5573 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5575 * varobj.c (varobj_create): Don't set valid_block when creating a
5578 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5580 * varobj.c (varobj_create): Remove out of date comment.
5582 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5585 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5586 updating innermost block.
5587 * parse.c (innermost_block_tracker::update): Take extra type
5588 parameter, and check types match before updating innermost block.
5589 (write_dollar_variable): Update innermost block for registers.
5590 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5591 (innermost_block_tracker::innermost_block_tracker): Initialise
5593 (innermost_block_tracker::reset): Take type parameter.
5594 (innermost_block_tracker::update): Take type parameter, and pass
5595 type through as needed.
5596 (innermost_block_tracker::m_types): New member.
5597 * varobj.c (varobj_create): Pass type when reseting innermost
5600 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5602 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5603 * ada-lang.c (resolve_subexp): Likewise.
5604 * breakpoint.c (set_breakpoint_condition) Likewise.
5605 (watch_command_1) Likewise.
5606 * c-exp.y (variable): Likewise.
5607 * d-exp.y (PrimaryExpression): Likewise.
5608 * f-exp.y (variable): Likewise.
5609 * go-exp.y (variable): Likewise.
5610 * m2-exp.y (variable): Likewise.
5611 * objfiles.c (objfile::~objfile): Likewise.
5612 * p-exp.y (variable): Likewise.
5613 * parse.c (innermost_block): Change type.
5614 * parser-defs.h (class innermost_block_tracker): New.
5615 (innermost_block): Change to innermost_block_tracker.
5616 * printcmd.c (display_command): Switch to innermost_block API.
5617 (do_one_display): Likewise.
5618 * rust-exp.y (do_one_display): Likewise.
5619 * symfile.c (clear_symtab_users): Likewise.
5620 * varobj.c (varobj_create): Switch to innermost_block API, replace
5621 use of innermost_block with block stored on varobj object.
5623 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5625 * expression.h (innermost_block): Remove declaration.
5626 * varobj.c: Add 'parser-defs.h' include.
5628 2018-01-19 Tom Tromey <tom@tromey.com>
5630 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5631 symbols in the static and global blocks.
5633 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5635 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5636 gdb_ptrace.h, and move including gdb_wait.h ...
5637 * nat/linux-ptrace.h: ... to here.
5639 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5641 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5642 inf_ptrace_detach_success.
5643 (inf_ptrace_detach_success): Add inferior parameter, use it
5644 instead of inferior_ptid, pass it to detach_inferior.
5645 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5647 * inferior.c (detach_inferior): Add overload that takes an
5649 * inferior.h (detach_inferior): Likewise.
5650 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5651 use inferior_ptid, adjust call to inf_ptrace_detach_success.
5652 * linux-thread-db.c (thread_db_detach): Use inf parameter.
5654 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5656 * target.h (struct target_ops) <to_detach>: Add inferior
5658 (target_detach): Likewise.
5659 * target.c (dispose_inferior): Pass inferior down.
5660 (target_detach): Pass inferior down. Assert that it is equal to
5661 the current inferior.
5662 * aix-thread.c (aix_thread_detach): Pass inferior down.
5663 * corefile.c (core_file_command): Pass current_inferior() down.
5664 * corelow.c (core_detach): Add inferior parameter.
5665 * darwin-nat.c (darwin_detach): Likewise.
5666 * gnu-nat.c (gnu_detach): Likewise.
5667 * inf-ptrace.c (inf_ptrace_detach): Likewise.
5668 * infcmd.c (detach_command): Pass current_inferior() down to
5670 * infrun.c (follow_fork_inferior): Pass parent_inf to
5672 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5674 * linux-nat.c (linux_nat_detach): Add inferior parameter.
5675 * linux-thread-db.c (thread_db_detach): Likewise.
5676 * nto-procfs.c (procfs_detach): Likewise.
5677 * procfs.c (procfs_detach): Likewise.
5678 * record.c (record_detach): Likewise.
5679 * record.h (struct inferior): Forward-declare.
5680 (record_detach): Add inferior parameter.
5681 * remote-sim.c (gdbsim_detach): Likewise.
5682 * remote.c (remote_detach_1): Likewise.
5683 (remote_detach): Likewise.
5684 (extended_remote_detach): Likewise.
5685 * sol-thread.c (sol_thread_detach): Likewise.
5686 * target-debug.h (target_debug_print_inferior_p): New macro.
5687 * target-delegates.c: Re-generate.
5688 * top.c (kill_or_detach): Pass inferior down to target_detach.
5689 * windows-nat.c (windows_detach): Add inferior parameter.
5691 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5693 * target.h (struct target_ops) <to_detach>: Remove args
5695 (target_detach): Likewise.
5696 * target.c (dispose_inferior): Adjust.
5697 (target_detach): Remove args parameter, adjust.
5698 * aix-thread.c (aix_thread_detach): Adjust.
5699 * corefile.c (core_file_command): Adjust.
5700 * corelow.c (core_detach): Adjust.
5701 * darwin-nat.c (darwin_detach): Adjust.
5702 * gnu-nat.c (gnu_detach): Adjust.
5703 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5704 * infcmd.c (detach_command): Adjust
5705 * infrun.c (follow_fork_inferior): Adjust.
5706 (handle_vfork_child_exec_or_exit): Adjust.
5707 * linux-fork.c (linux_fork_detach): Remove args parameter.
5708 * linux-fork.h (linux_fork_detach): Likewise.
5709 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5710 * linux-thread-db.c (thread_db_detach): Likewise.
5711 * nto-procfs.c (procfs_detach): Likewise.
5712 * procfs.c (procfs_detach): Likewise.
5713 (do_detach): Remove signo parameter.
5714 * record.c (record_detach): Remove args parameter.
5715 * record.h (record_detach): Likewise.
5716 * remote-sim.c (gdbsim_detach): Likewise.
5717 * remote.c (remote_detach_1): Likewise.
5718 (remote_detach): Likewise.
5719 (extended_remote_detach): Likewise.
5720 * sol-thread.c (sol_thread_detach): Likewise.
5721 * target-delegates.c: Re-generate.
5722 * top.c (struct qt_args) <args>: Remove field.
5723 (kill_or_detach): Don't pass args.
5724 (quit_force): Don't set args.
5725 * windows-nat.c (windows_detach): Remove args parameter.
5727 2018-01-19 Yao Qi <yao.qi@linaro.org>
5729 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5730 (arm_linux_init_abi): Install it.
5732 2018-01-19 Yao Qi <yao.qi@linaro.org>
5734 * osabi.c (gdb_osabi_names): Extend the regexp for
5735 arm-linux-gnueabihf.
5737 2018-01-18 Yao Qi <yao.qi@linaro.org>
5739 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5741 (abbrev_table::add_abbrev): Update.
5742 (abbrev_table::lookup_abbrev): Update.
5744 2018-01-18 Yao Qi <yao.qi@linaro.org>
5746 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5748 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
5750 * compile/compile.c (compile_to_object): Convert "triplet_rx"
5753 2018-01-17 Tom Tromey <tom@tromey.com>
5755 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
5757 2018-01-17 Tom Tromey <tom@tromey.com>
5759 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5760 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5761 (create_array_type_with_stride): Update.
5762 * dwarf2read.c (set_die_type): Update.
5764 2018-01-17 Tom Tromey <tom@tromey.com>
5766 * dwarf2read.c (delayed_method_info): Remove typedef.
5767 (dwarf2_cu::method_info): Now a std::vector.
5768 (add_to_method_list): Update.
5769 (free_delayed_list): Remove.
5770 (compute_delayed_physnames): Update.
5771 (process_full_comp_unit, process_full_type_unit): Clear the method
5772 list. Remove cleanups.
5773 (psymtab_include_file_name): Add name_holder parameter. Use
5775 (dwarf_decode_lines): Update.
5777 2018-01-17 Tom Tromey <tom@tromey.com>
5778 Simon Marchi <simon.marchi@ericsson.com>
5780 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5781 (dwarf2_per_objfile::free_cached_comp_units)
5782 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5783 (init_cutu_and_read_dies_no_follow): Update.
5784 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5785 (dwarf2_cu::~dwarf2_cu): New.
5786 (free_heap_comp_unit, free_stack_comp_unit): Remove.
5787 (age_cached_comp_units, free_one_cached_comp_unit): Update.
5789 2018-01-17 Tom Tromey <tom@tromey.com>
5790 Simon Marchi <simon.marchi@ericsson.com>
5792 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5793 (struct die_reader_specs) <abbrev_table>: New member.
5794 (struct abbrev_table): Add constructor.
5795 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5796 <abbrev_obstack>: Now an auto_obstack.
5797 (abbrev_table_up): New typedef.
5798 (init_cu_die_reader): Add abbrev_table parameter.
5799 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5800 Add result_dwo_abbrev_table.
5801 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5802 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5804 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5806 (skip_children): Update.
5807 (abbrev_table::alloc_abbrev): Rename from
5808 abbrev_table_alloc_abbrev.
5809 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5810 (abbrev_table::lookup_abbrev): Rename from
5811 abbrev_table_lookup_abbrev.
5812 (abbrev_table_read_table): Return abbrev_table_up.
5813 (abbrev_table_free, abbrev_table_free_cleanup)
5814 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5815 (load_partial_dies): Update.
5817 2018-01-17 Tom Tromey <tom@tromey.com>
5819 * dwarf2read.c (dwarf2_compute_name): Update comment.
5820 (read_func_scope, read_variable): Update.
5821 (new_symbol): Remove.
5822 (new_symbol_full): Rename to new_symbol.
5824 2018-01-17 Mike Gulick <mgulick@mathworks.com>
5827 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5828 a warning instead of throwing an error, set section size to 0 and return
5830 * gdb_bfd.h (gdb_bfd_map_section): Update description.
5832 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5834 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5836 (linux_ptrace_attach_fail_reason_string): Likewise.
5837 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5839 (linux_ptrace_attach_fail_reason_string): Likewise.
5840 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5842 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5844 * linux-nat.c (linux_nat_attach): Remove xstrdup.
5846 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5849 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5850 checking for fs_base/gs_base fields in struct user_regs_struct.
5851 * configure: Regenerate.
5853 2018-01-17 Yao Qi <yao.qi@linaro.org>
5855 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5857 (aarch64_linux_init_abi): Install it to gdbarch hook
5860 2018-01-15 Pedro Alves <palves@redhat.com>
5862 * common/signals-state-save-restore.c
5863 (save_original_signals_state): Fix typos.
5865 2017-01-12 Tom Tromey <tom@tromey.com>
5866 Sergio Durigan Junior <sergiodj@redhat.com>
5868 * Makefile.in (install-only): Install gdb-add-index.
5870 2018-01-12 John Baldwin <jhb@FreeBSD.org>
5872 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5874 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5876 * infrun.c (keep_going_pass_signal): Clear step-over info when
5877 insert_breakpoints fails.
5879 2018-01-11 Pedro Alves <palves@redhat.com>
5882 * infrun.c (resume): Rename to ...
5883 (resume_1): ... this.
5884 (resume): Reimplement as wrapper around resume_1.
5886 2018-01-11 Pedro Alves <palves@redhat.com>
5889 * remote.c (remote_parse_stop_reply): Default to the last-set
5890 general thread instead of to 'magic_null_ptid'.
5892 2018-01-10 Pedro Alves <palves@redhat.com>
5894 * language.h (language_get_symbol_name_matcher): Rename ...
5895 (get_symbol_name_matcher): ... this.
5896 * language.c (language_get_symbol_name_matcher): Ditto.
5897 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5900 2018-01-10 Pedro Alves <palves@redhat.com>
5904 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5905 Adjust to use language_get_symbol_name_matcher instead of
5906 language_defn::la_get_symbol_name_matcher.
5907 * language.c (language_get_symbol_name_matcher): If in Ada mode
5908 and the lookup name is a verbatim match, return Ada's matcher.
5909 * language.h (language_get_symbol_name_matcher): Adjust comment.
5910 (ada_lookup_name_info::verbatim_p):: New method.
5912 2018-01-10 Pedro Alves <palves@redhat.com>
5915 * ada-lang.c (ada_collect_symbol_completion_matches): If the
5916 minsym's language is language_auto or language_cplus, pass down
5917 language_ada instead.
5918 * symtab.c (compare_symbol_name): Don't frob symbol language here.
5920 2018-01-10 Pedro Alves <palves@redhat.com>
5923 * minsyms.c (linkage_name_str): New function.
5924 (iterate_over_minimal_symbols): Use it.
5926 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5928 * NEWS: Document that 'info proc' now works on FreeBSD.
5930 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5932 * configure.ac: Check for kinfo_getfile in libutil.
5933 * configure: Regenerate.
5934 * config.in: Regenerate.
5935 * fbsd-nat.c: Include "fbsd-tdep.h".
5936 (fbsd_fetch_cmdline): New.
5937 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5938 rather than calling error.
5939 (fbsd_info_proc): New.
5940 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5941 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5942 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5944 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5946 * fbsd-nat.c (struct free_deleter): Remove.
5947 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5949 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5951 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5952 NULL for an empty pathname.
5954 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5956 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5957 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5958 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5959 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5960 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5961 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5962 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5963 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5964 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5965 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5966 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5967 (fbsd_core_fetch_timeval, fbsd_print_sigset)
5968 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5969 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
5970 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5972 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
5974 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5975 (gnu_xfer_auxv): New function.
5976 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5979 2018-01-08 Yao Qi <yao.qi@linaro.org>
5980 Simon Marchi <simon.marchi@ericsson.com>
5982 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5984 (COMMON_OBS): Remove selftest.o.
5985 * configure.ac: Append selftest-arch.c and common/selftest.c to
5986 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
5987 * configure: Re-generated.
5988 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5990 (maintenance_info_selftests): Likewise.
5992 2018-01-08 Xavier Roirand <roirand@adacore.com>
5994 * ada-valprint.c (val_print_packed_array_elements): Use
5995 proper number of elements when printing an array indexed
5996 by an enumeration type.
5998 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6000 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
6001 (dw2_get_file_names_reader): Adjust.
6002 (lookup_dwo_signatured_type): Adjust.
6003 (lookup_dwp_signatured_type): Adjust.
6004 (lookup_signatured_type): Adjust.
6005 (create_type_unit_group): Adjust.
6006 (get_type_unit_group): Adjust.
6007 (process_psymtab_comp_unit_reader): Adjust.
6008 (build_type_psymtabs_reader): Adjust.
6009 (scan_partial_symbols): Adjust.
6010 (add_partial_symbol): Adjust.
6011 (add_partial_subprogram): Adjust.
6012 (peek_die_abbrev): Adjust.
6013 (fixup_go_packaging): Adjust.
6014 (process_imported_unit_die): Adjust.
6015 (dwarf2_compute_name): Adjust.
6016 (dwarf2_physname): Adjust.
6017 (read_import_statement): Adjust.
6018 (handle_DW_AT_stmt_list): Adjust.
6019 (read_file_scope): Adjust.
6020 (read_func_scope): Adjust.
6021 (read_lexical_block_scope): Adjust.
6022 (read_call_site_scope): Adjust.
6023 (read_variable): Adjust.
6024 (dwarf2_rnglists_process): Adjust.
6025 (dwarf2_ranges_process): Adjust.
6026 (dwarf2_ranges_read): Adjust.
6027 (dwarf2_get_pc_bounds): Adjust.
6028 (dwarf2_record_block_ranges): Adjust.
6029 (dwarf2_add_field): Adjust.
6030 (dwarf2_add_member_fn): Adjust.
6031 (read_structure_type): Adjust.
6032 (process_structure_scope): Adjust.
6033 (read_enumeration_type): Adjust.
6034 (read_array_type): Adjust.
6035 (mark_common_block_symbol_computed): Adjust.
6036 (read_common_block): Adjust.
6037 (read_namespace_type): Adjust.
6038 (read_namespace): Adjust.
6039 (read_module_type): Adjust.
6040 (read_tag_pointer_type): Adjust.
6041 (read_tag_ptr_to_member_type): Adjust.
6042 (read_tag_string_type): Adjust.
6043 (read_subroutine_type): Adjust.
6044 (read_typedef): Adjust.
6045 (read_base_type): Adjust.
6046 (attr_to_dynamic_prop): Adjust.
6047 (read_subrange_type): Adjust.
6048 (read_unspecified_type): Adjust.
6049 (dwarf2_read_abbrevs): Adjust.
6050 (load_partial_dies): Adjust.
6051 (read_partial_die): Adjust.
6052 (find_partial_die): Adjust.
6053 (guess_partial_die_structure_name): Adjust.
6054 (fixup_partial_die): Adjust.
6055 (read_attribute_value): Adjust.
6056 (read_addr_index): Adjust.
6057 (read_addr_index_from_leb128): Adjust.
6058 (read_str_index): Adjust.
6059 (dwarf2_string_attr): Adjust.
6060 (get_debug_line_section): Adjust.
6061 (dwarf_decode_line_header): Adjust.
6062 (lnp_state_machine::check_line_address): Adjust.
6063 (dwarf_decode_lines_1): Adjust.
6064 (dwarf_decode_lines): Adjust.
6065 (dwarf2_start_symtab): Adjust.
6066 (var_decode_location): Adjust.
6067 (new_symbol_full): Adjust.
6068 (dwarf2_const_value_data): Adjust.
6069 (dwarf2_const_value_attr): Adjust.
6070 (dwarf2_const_value): Adjust.
6072 (die_containing_type): Adjust.
6073 (build_error_marker_type): Adjust.
6074 (lookup_die_type): Adjust.
6075 (guess_full_die_structure_name): Adjust.
6076 (anonymous_struct_prefix): Adjust.
6077 (determine_prefix): Adjust.
6078 (dwarf2_name): Adjust.
6079 (follow_die_ref_or_sig): Adjust.
6080 (follow_die_offset): Adjust.
6081 (follow_die_ref): Adjust.
6082 (follow_die_sig_1): Adjust.
6083 (follow_die_sig): Adjust.
6084 (get_signatured_type): Adjust.
6085 (get_DW_AT_signature_type): Adjust.
6086 (decode_locdesc): Adjust.
6087 (dwarf_decode_macros): Adjust.
6088 (cu_debug_loc_section): Adjust.
6089 (fill_in_loclist_baton): Adjust.
6090 (dwarf2_symbol_mark_computed): Adjust.
6091 (init_one_comp_unit): Don't assign
6092 dwarf2_cu::dwarf2_per_objfile.
6093 (set_die_type): Adjust.
6095 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6097 * dwarf2read.c (struct mapped_debug_names): Add constructor.
6098 <dwarf2_per_objfile>: New field.
6099 (dwarf2_per_objfile): Remove global.
6100 (get_dwarf2_per_objfile): New function.
6101 (set_dwarf2_per_objfile): New function.
6102 (dwarf2_build_psymtabs_hard): Change objfile parameter to
6104 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6105 (read_abbrev_offset): Likewise.
6106 (read_indirect_string): Likewise.
6107 (read_indirect_line_string): Likewise.
6108 (read_indirect_string_at_offset): Likewise.
6109 (read_indirect_string_from_dwz): Likewise.
6110 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6112 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6113 (create_all_comp_units): Change objfile parameter to
6115 (create_all_type_units): Likewise.
6116 (process_queue): Add dwarf2_per_objfile parameter.
6117 (read_and_check_comp_unit_head): Likewise.
6118 (lookup_dwo_unit_in_dwp): Likewise.
6119 (get_dwp_file): Likewise.
6120 (process_cu_includes): Likewise.
6121 (struct free_dwo_file_cleanup_data): New struct.
6122 (dwarf2_has_info): Use get_dwarf2_per_objfile and
6123 set_dwarf2_per_objfile.
6124 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6125 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6126 context, adjust calls.
6127 (dw2_instantiate_symtab): Likewise.
6128 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6129 (dw2_get_cu): Likewise.
6130 (create_cu_from_index_list): Change objfile parameter to
6132 (create_cus_from_index_list): Get dwarf2_per_objfile from
6133 context, adjust calls.
6134 (create_cus_from_index): Likewise.
6135 (create_signatured_type_table_from_index): Change objfile
6136 parameter to dwarf2_per_objfile.
6137 (create_signatured_type_table_from_debug_names): Change objfile
6138 parameter to dwarf2_per_objfile.
6139 (create_addrmap_from_index): Likewise.
6140 (create_addrmap_from_aranges): Likewise.
6141 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6142 (dw2_setup): Remove.
6143 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6145 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6146 get_dwarf2_per_objfile.
6147 (dw2_forget_cached_source_info): Likewise.
6148 (dw2_map_symtabs_matching_filename): Likewise.
6149 (struct dw2_symtab_iterator) <index>: Remove.
6150 <dwarf2_per_objfile>: New field.
6151 (dw2_symtab_iter_init): Replace index parameter with
6153 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6154 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6155 (dw2_print_stats): Likewise.
6156 (dw2_dump): Likewise.
6157 (dw2_expand_symtabs_for_function): Likewise.
6158 (dw2_expand_all_symtabs): Likewise.
6159 (dw2_expand_symtabs_with_fullname): Likewise.
6160 (dw2_expand_marked_cus): Replace index and objfile parameters
6161 with dwarf2_per_objfile.
6162 (dw_expand_symtabs_matching_file_matcher): Add
6163 dwarf2_per_objfile parameter and adjust calls.
6164 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6166 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6167 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6169 (create_cus_from_debug_names_list): Replace objfile parameter
6170 with dwarf2_per_objfile and adjust calls.
6171 (create_cus_from_debug_names): Likewise.
6172 (dwarf2_read_debug_names): Likewise.
6173 (mapped_debug_names::namei_to_name): Adjust call.
6174 (dw2_debug_names_iterator::next): Likewise.
6175 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6176 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6177 (dw2_debug_names_dump): Likewise.
6178 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6179 (dw2_debug_names_expand_symtabs_matching): Likewise.
6180 (dwarf2_initialize_objfile): Likewise.
6181 (dwarf2_build_psymtabs): Likewise.
6182 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6184 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6185 (read_and_check_comp_unit_head): Likewise.
6186 (read_abbrev_offset): Likewise.
6187 (create_debug_type_hash_table): Likewise.
6188 (create_debug_types_hash_table): Likewise.
6189 (create_all_type_units): Replace objfile parameter with
6191 (add_type_unit): Add dwarf2_per_objfile parameter.
6192 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6193 with dwarf2_per_objfile.
6194 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6195 (lookup_dwp_signatured_type): Likewise.
6196 (lookup_signatured_type): Likewise.
6197 (read_cutu_die_from_dwo): Likewise.
6198 (init_tu_and_read_dwo_dies): Likewise.
6199 (init_cutu_and_read_dies): Likewise.
6200 (init_cutu_and_read_dies_no_follow): Likewise.
6201 (allocate_type_unit_groups_table): Add objfile parameter.
6202 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6203 (get_type_unit_group): Likewise.
6204 (process_psymtab_comp_unit): Update call.
6205 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6206 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6207 (print_tu_stats): Likewise.
6208 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6210 (build_type_psymtabs): Change objfile parameter to
6212 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6213 passed in void* parameter.
6214 (process_skeletonless_type_units): Change objfile parameter to
6216 (set_partial_user): Likewise.
6217 (dwarf2_build_psymtabs_hard): Likewise.
6218 (read_comp_units_from_section): Likewise.
6219 (create_all_comp_units): Likewise.
6220 (scan_partial_symbols): Update calls.
6221 (add_partial_symbol): Likewise.
6222 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6223 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6224 (process_queue): Add dwarf2_per_objfile parameter.
6225 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6226 (compute_compunit_symtab_includes): Likewise.
6227 (process_cu_includes): Add dwarf2_per_objfile parameter.
6228 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6229 (process_full_type_unit): Likewise.
6230 (process_imported_unit_die): Update call.
6231 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6232 (read_file_scope): Likewise.
6233 (allocate_dwo_file_hash_table): Add objfile parameter.
6234 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6235 (create_cus_hash_table): Likewise.
6236 (create_dwp_hash_table): Likewise.
6237 (create_dwo_unit_in_dwp_v1): Likewise.
6238 (create_dwp_v2_section): Likewise.
6239 (create_dwo_unit_in_dwp_v2): Likewise.
6240 (lookup_dwo_unit_in_dwp): Likewise.
6241 (try_open_dwop_file): Likewise.
6242 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6243 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6244 cleanup to include a reference to dwarf2_per_objfile.
6245 (open_dwp_file): Add dwarf2_per_objfile parameter.
6246 (open_and_init_dwp_file): Likewise.
6247 (get_dwp_file): Likewise.
6248 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6249 (queue_and_load_all_dwo_tus): Update call.
6250 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6252 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6253 (dwarf2_ranges_process): Likewise.
6254 (dwarf2_get_pc_bounds): Likewise.
6255 (mark_common_block_symbol_computed): Likewise.
6256 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6257 (dwarf2_read_abbrevs): Update call.
6258 (read_partial_die): Use dwarf2_per_objfile from cu.
6259 (find_partial_die): Likewise.
6260 (fixup_partial_die): Likewise.
6261 (read_attribute_value): Likewise.
6262 (read_indirect_string_at_offset_from): Add objfile parameter.
6263 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6265 (read_indirect_string_from_dwz): Add objfile parameter.
6266 (read_indirect_string): Add objfile parameter.
6267 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6268 (read_addr_index): Use dwarf2_per_objfile from cu.
6269 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6271 (read_str_index): Use dwarf2_per_objfile from cu.
6272 (get_debug_line_section): Likewise.
6273 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6274 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6275 (new_symbol_full): Use dwarf2_per_objfile from cu.
6276 (build_error_marker_type): Likewise.
6277 (lookup_die_type): Likewise.
6278 (determine_prefix): Likewise.
6279 (follow_die_offset): Likewise.
6280 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6281 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6282 (dwarf2_fetch_die_type_sect_off): Likewise.
6283 (dwarf2_get_die_type): Likewise.
6284 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6285 (get_signatured_type): Likewise.
6286 (get_DW_AT_signature_type): Likewise.
6287 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6288 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6289 (cu_debug_loc_section): Likewise.
6290 (fill_in_loclist_baton): Likewise.
6291 (dwarf2_symbol_mark_computed): Likewise.
6292 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6294 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6296 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6297 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6298 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6299 (set_die_type): Use dwarf2_free_objfile from cu.
6300 (get_die_type_at_offset): Likewise.
6301 (dwarf2_per_objfile_free): Don't assign global variable.
6302 (debug_names) <constructor>: Add dwarf2_per_objfile
6303 parameter, update m_debugstrlookup construction.
6304 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6306 <m_dwarf2_per_objfile>: New field.
6307 <lookup>: Use m_dwarf2_per_objfile.
6308 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6309 (psyms_seen_size): Likewise.
6310 (write_gdbindex): Replace objfile parameter with
6312 (write_debug_names): Likewise.
6313 (write_psymtabs_to_index): Likewise.
6314 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6317 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6319 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6320 <dwarf2_per_objfile>: New field.
6321 (struct dwarf2_per_cu_data) <objfile>: Remove.
6322 <dwarf2_per_objfile>: New field.
6323 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6325 (create_signatured_type_table_from_index): Likewise.
6326 (create_debug_type_hash_table): Likewise.
6327 (fill_in_sig_entry_from_dwo_entry): Likewise.
6328 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6329 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6331 (create_partial_symtab): Access objfile through
6333 (process_psymtab_comp_unit_reader): Likewise.
6334 (read_comp_units_from_section): Likewise.
6335 (scan_partial_symbols): Likewise.
6336 (add_partial_symbol): Likewise.
6337 (add_partial_subprogram): Likewise.
6338 (peek_die_abbrev): Likewise.
6339 (fixup_go_packaging): Likewise.
6340 (process_full_comp_unit): Likewise.
6341 (process_full_type_unit): Likewise.
6342 (process_imported_unit_die): Likewise.
6343 (dwarf2_compute_name): Likewise.
6344 (dwarf2_physname): Likewise.
6345 (read_import_statement): Likewise.
6346 (create_cus_hash_table): Assign dwarf2_physname instead of
6348 (read_func_scope): Access objfile through dwarf2_per_objfile.
6349 (read_lexical_block_scope): Likewise.
6350 (read_call_site_scope): Likewise.
6351 (read_variable): Likewise.
6352 (dwarf2_rnglists_process): Likewise.
6353 (dwarf2_ranges_process): Likewise.
6354 (dwarf2_ranges_read): Likewise.
6355 (dwarf2_record_block_ranges): Likewise.
6356 (dwarf2_add_field): Likewise.
6357 (dwarf2_add_member_fn): Likewise.
6358 (read_structure_type): Likewise.
6359 (process_structure_scope): Likewise.
6360 (read_enumeration_type): Likewise.
6361 (read_array_type): Likewise.
6362 (read_common_block): Likewise.
6363 (read_namespace_type): Likewise.
6364 (read_namespace): Likewise.
6365 (read_module_type): Likewise.
6366 (read_tag_pointer_type): Likewise.
6367 (read_tag_ptr_to_member_type): Likewise.
6368 (read_tag_string_type): Likewise.
6369 (read_subroutine_type): Likewise.
6370 (read_typedef): Likewise.
6371 (read_base_type): Likewise.
6372 (attr_to_dynamic_prop): Likewise.
6373 (read_subrange_type): Likewise.
6374 (read_unspecified_type): Likewise.
6375 (load_partial_dies): Likewise.
6376 (read_partial_die): Likewise.
6377 (find_partial_die): Likewise.
6378 (guess_partial_die_structure_name): Likewise.
6379 (fixup_partial_die): Likewise.
6380 (read_attribute_value): Likewise.
6381 (read_addr_index_from_leb128): Likewise.
6382 (dwarf2_read_addr_index): Likewise.
6383 (dwarf2_string_attr): Likewise.
6384 (lnp_state_machine::check_line_address): Likewise.
6385 (dwarf_decode_lines_1): Likewise.
6386 (dwarf_decode_lines): Likewise.
6387 (dwarf2_start_symtab): Likewise.
6388 (var_decode_location): Likewise.
6389 (new_symbol_full): Likewise.
6390 (dwarf2_const_value_data): Likewise.
6391 (dwarf2_const_value_attr): Likewise.
6392 (dwarf2_const_value): Likewise.
6393 (die_type): Likewise.
6394 (die_containing_type): Likewise.
6395 (lookup_die_type): Likewise.
6396 (guess_full_die_structure_name): Likewise.
6397 (anonymous_struct_prefix): Likewise.
6398 (dwarf2_name): Likewise.
6399 (follow_die_ref_or_sig): Likewise.
6400 (follow_die_offset): Likewise.
6401 (follow_die_ref): Likewise.
6402 (dwarf2_fetch_die_loc_sect_off): Likewise.
6403 (dwarf2_fetch_constant_bytes): Likewise.
6404 (dwarf2_fetch_die_type_sect_off): Likewise.
6405 (dwarf2_get_die_type): Likewise.
6406 (follow_die_sig): Likewise.
6407 (decode_locdesc): Likewise.
6408 (dwarf2_per_cu_objfile): Likewise.
6409 (dwarf2_per_cu_text_offset): Likewise.
6410 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6412 (set_die_type): Access objfile through
6415 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6417 * valprint.c (converted_character_d): Remove typedef.
6418 (DEF_VEC_O (converted_character_d)): Remove.
6419 (count_next_character): Use std::vector.
6420 (print_converted_chars_to_obstack): Likewise.
6421 (generic_printstr): Likewise.
6423 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6425 * xml-support.h (struct gdb_xml_value): Add constructor.
6426 <value>: Change type to unique_xmalloc_ptr.
6427 (gdb_xml_value_s): Remove typedef.
6428 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6429 (gdb_xml_element_start_handler): Change parameter type to
6431 (xml_find_attribute): Likewise.
6432 * xml-support.c (xml_find_attribute): Change parameter type to
6433 std::vector and adjust.
6434 (gdb_xml_values_cleanup): Remove.
6435 (gdb_xml_parser::start_element): Adjust to std::vector.
6436 (xinclude_start_include): Change paraeter type to std::vector
6438 * btrace.c (check_xml_btrace_version): Likewise.
6439 (parse_xml_btrace_block): Likewise.
6440 (parse_xml_btrace_pt_config_cpu): Likewise.
6441 (parse_xml_btrace_pt): Likewise.
6442 (parse_xml_btrace_conf_bts): Likewise.
6443 (parse_xml_btrace_conf_pt): Likewise.
6444 * memory-map.c (memory_map_start_memory): Likewise.
6445 (memory_map_start_property): Likewise.
6446 * osdata.c (osdata_start_osdata): Likewise.
6447 (osdata_start_item): Likewise.
6448 (osdata_start_column): Likewise.
6449 * remote.c (start_thread): Likewise.
6450 * solib-aix.c (library_list_start_library): Likewise.
6451 (library_list_start_list): Likewise.
6452 * solib-svr4.c (library_list_start_library): Likewise.
6453 (svr4_library_list_start_list): Likewise.
6454 * solib-target.c (library_list_start_segment): Likewise.
6455 (library_list_start_section): Likewise.
6456 (library_list_start_library): Likewise.
6457 (library_list_start_list): Likewise.
6458 * tracepoint.c (traceframe_info_start_memory): Likewise.
6459 (traceframe_info_start_tvar): Likewise.
6460 * xml-syscall.c (syscall_start_syscall): Likewise.
6461 * xml-tdesc.c (tdesc_start_target): Likewise.
6462 (tdesc_start_feature): Likewise.
6463 (tdesc_start_reg): Likewise.
6464 (tdesc_start_union): Likewise.
6465 (tdesc_start_struct): Likewise.
6466 (tdesc_start_flags): Likewise.
6467 (tdesc_start_enum): Likewise.
6468 (tdesc_start_field): Likewise.
6469 (tdesc_start_enum_value): Likewise.
6470 (tdesc_start_vector): Likewise.
6472 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6474 * extension.h (struct xmethod_worker) <clone>: Remove.
6475 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6477 (python_xmethod_worker::clone): Remove.
6478 * valops.c (find_overload_match): Use std::move instead of
6481 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6483 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6484 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6485 <free_xmethod_worker_data>: Remove.
6486 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6487 <get_xmethod_arg_types>: Remove.
6488 <get_xmethod_result_type>: Remove.
6489 <invoke_xmethod>: Remove.
6490 * extension.c (new_xmethod_worker): Remove.
6491 (clone_xmethod_worker): Remove.
6492 (get_matching_xmethod_workers): Return void, pass std::vector by
6494 (get_xmethod_arg_types): Rename to...
6495 (xmethod_worker::get_arg_types): ... this, and adjust.
6496 (get_xmethod_result_type): Rename to...
6497 (xmethod_worker::get_result_type): ... this, and adjust.
6498 (invoke_xmethod): Remove.
6499 (free_xmethod_worker): Remove.
6500 (free_xmethod_worker_vec): Remove.
6501 * extension.h (enum ext_lang_rc): Move here from
6503 (struct xmethod_worker): Add constructor and destructor.
6506 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6507 virtual pure methods.
6508 <get_arg_types, get_result_type>: New methods.
6509 (xmethod_worker_ptr): Remove typedef.
6510 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6511 (xmethod_worker_vec): Remove typedef.
6512 (xmethod_worker_up): New typedef.
6513 (invoke_xmethod): Remove.
6514 (clone_xmethod_worker): Remove.
6515 (free_xmethod_worker): Remove.
6516 (free_xmethod_worker_vec): Remove.
6517 (get_xmethod_arg_types): Remove.
6518 (get_xmethod_result_type): Remove.
6519 * valops.c (find_method_list): Use std::vector, don't use
6520 intermediate vector.
6521 (value_find_oload_method_list): Use std::vector.
6522 (find_overload_match): Use std::vector.
6523 (find_oload_champ): Use std::vector.
6524 * value.c (value_free): Use operator delete.
6525 (value_of_xmethod): Rename to...
6526 (value_from_xmethod): ... this. Don't assign
6527 xmethod_worker::value, take rvalue-reference.
6528 (result_type_of_xmethod): Adjust.
6529 (call_xmethod): Adjust.
6530 * value.h: Include extension.h.
6531 (struct xmethod_worker): Don't forward-declare.
6532 (value_of_xmethod): Rename to...
6533 (value_from_xmethod): ... this, take rvalue-reference.
6534 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6535 (struct python_xmethod_worker): ... this, add constructor and
6537 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6538 (gdbpy_free_xmethod_worker_data): Rename to...
6539 (python_xmethod_worker::~python_xmethod_worker): ... this and
6541 (gdbpy_clone_xmethod_worker_data): Rename to...
6542 (python_xmethod_worker::clone): ... this and adjust.
6543 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6545 (gdbpy_get_xmethod_arg_types): Rename to...
6546 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6547 (gdbpy_get_xmethod_result_type): Rename to...
6548 (python_xmethod_worker::do_get_result_type): ... this and
6550 (gdbpy_invoke_xmethod): Rename to...
6551 (python_xmethod_worker::invoke): ... this and adjust.
6552 (new_python_xmethod_worker): Rename to...
6553 (python_xmethod_worker::python_xmethod_worker): ... this and
6555 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6557 (gdbpy_free_xmethod_worker_data): Remove.
6558 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6559 (gdbpy_get_xmethod_arg_types): Remove.
6560 (gdbpy_get_xmethod_result_type): Remove.
6561 (gdbpy_invoke_xmethod): Remove.
6562 * python/python.c (python_extension_ops): Remove obsolete
6565 2018-01-05 Pedro Alves <palves@redhat.com>
6568 * common/signals-state-save-restore.c
6569 (save_original_signals_state): New parameter 'quiet'. Warn if we
6570 find a custom handler preinstalled, instead of internal erroring.
6571 But only warn if !quiet.
6572 * common/signals-state-save-restore.h
6573 (save_original_signals_state): New parameter 'quiet'.
6574 * main.c (captured_main_1): Move save_original_signals_state call
6575 after option handling, and pass QUIET.
6577 2018-01-05 Pedro Alves <palves@redhat.com>
6579 * spu-tdep.c (spu_catch_start): Pass
6580 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6582 2018-01-05 Pedro Alves <palves@redhat.com>
6585 * ada-lang.c (literal_symbol_name_matcher): New function.
6586 (ada_get_symbol_name_matcher): Use it for
6587 symbol_name_match_type::SEARCH_NAME.
6588 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6589 it down instead of assuming symbol_name_match_type::FULL.
6590 * block.h (block_lookup_symbol): New parameter 'match_type'.
6591 * c-valprint.c (print_unpacked_pointer): Use
6592 lookup_symbol_search_name instead of lookup_symbol.
6593 * compile/compile-object-load.c (get_out_value_type): Pass down
6594 symbol_name_match_type::SEARCH_NAME.
6595 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6596 symbol_name_match_type::FULL.
6597 * cp-support.c (cp_get_symbol_name_matcher): Handle
6598 symbol_name_match_type::SEARCH_NAME.
6599 * infrun.c (insert_exception_resume_breakpoint): Use
6600 lookup_symbol_search_name.
6601 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6602 * psymtab.c (maintenance_check_psymtabs): Use
6603 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6604 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6606 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6607 if symbol_name_match_type::SEARCH_NAME.
6608 (lookup_symbol_in_language): Pass down
6609 symbol_name_match_type::FULL.
6610 (lookup_symbol_search_name): New.
6611 (lookup_language_this): Pass down
6612 symbol_name_match_type::SEARCH_NAME.
6613 (lookup_symbol_aux, lookup_local_symbol): New parameter
6614 'match_type'. Pass it down.
6615 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6616 (lookup_symbol_search_name): New declaration.
6617 (lookup_symbol_in_block): New 'match_type' parameter.
6619 2018-01-05 Pedro Alves <palves@redhat.com>
6622 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6624 (ada_lookup_symbol): Reimplement in terms of
6625 ada_lookup_symbol_list, bits factored out from
6626 ada_lookup_encoded_symbol.
6628 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6630 * ada-exp.y (write_object_renaming): When subscripting an array
6631 using a symbol as the index, pass the block in call to
6632 ada_lookup_encoded_symbol when looking that symbol up.
6634 2018-01-05 Jerome Guitton <guitton@adacore.com>
6636 * ada-lang.c (ada_array_length): Use ada_index_type instead of
6639 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6641 * ada-lang.c (ada_to_fixed_value_create): Add handling of
6642 the case where VALUE_LVAL (val0) is not lval_memory.
6644 2018-01-05 Xavier Roirand <roirand@adacore.com>
6646 * ada-valprint.c (print_optional_low_bound): Handle
6647 character-indexed array printing like boolean-indexed array
6650 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6652 * NEWS: Create a new section for the next release branch.
6653 Rename the section of the current branch, now that it has
6656 2018-01-05 Joel Brobecker <brobecker@adacore.com>
6658 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6659 * version.in: Bump version to 8.1.50.DATE-git.
6661 2018-01-03 Xavier Roirand <roirand@adacore.com>
6663 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6665 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6667 (default_exception_support_info) <catch_handlers_sym>: Add field.
6668 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6669 (ada_exception_name_addr_1): Add "catch handlers" handling.
6670 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6672 (create_excep_cond_exprs) <ex>: Add parameter.
6673 (re_set_exception): Update create_excep_cond_exprs call.
6674 (print_it_exception, print_one_exception, print_mention_exception)
6675 (print_recreate_exception): Add "catch handler" handling.
6676 (allocate_location_catch_handlers, re_set_catch_handlers)
6677 (check_status_catch_handlers, print_it_catch_handlers)
6678 (print_one_catch_handlers, print_mention_catch_handlers)
6679 (print_recreate_catch_handlers): New function.
6680 (catch_handlers_breakpoint_ops): New variable.
6681 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6682 Add parameter. Add "catch handler" handling.
6683 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6684 Add "catch handler" handling.
6685 (ada_exception_catchpoint_cond_string): Add "catch handler"
6687 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6689 (catch_ada_handlers_command): New function.
6690 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6691 operations structure.
6692 (_initialize_ada_language): Add "catch handlers" command entry.
6693 * NEWS: Document "catch handlers" feature.
6695 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6697 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6698 account when creating the array type of the slice.
6699 (ada_value_slice): Likewise.
6701 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6703 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6705 (create_array_type_with_stride): Add byte_stride_prop parameter.
6706 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6707 New parameter. Update all callers in this file.
6708 (array_type_has_dynamic_stride): New function.
6709 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6710 of arrays with dynamic byte strides.
6711 * dwarf2read.c (read_array_type): Add support for dynamic
6712 DW_AT_byte_stride attributes.
6714 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6716 * dwarf2read.c (read_unspecified_type): Treat
6717 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6719 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6721 Update copyright year range in all GDB files.
6723 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6725 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6726 and gdb/testsuite/gdb.base/step-line.c.
6728 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6730 * copyright.py (main): Dump the contents of
6731 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6732 even if BY_HAND is empty.
6734 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6736 * top.c (print_gdb_version): Update Copyright year in version
6739 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6741 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
6743 For older changes see ChangeLog-2017.
6749 version-control: never