1 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6 for vector register offset fields.
7 (ppc64_fbsd_reg_offsets): Likewise.
8 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9 to vector register offset fields.
10 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
11 to vector register offset fields.
12 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
13 vector register offset fields.
14 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
15 initializers for vector register offset fields.
16 (rs6000_aix64_reg_offsets): Likewise.
17 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
18 (ppc_supply_vrregset): Remove.
19 (ppc_collect_vrregset): Remove.
20 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
21 (ppc_linux_vrregset) : New function.
22 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
23 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
24 (ppc32_linux_vrregset): Remove.
25 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
26 and use result instead of ppc32_linux_vrregset.
27 (ppc32_linux_reg_offsets): Remove initializers for vector register
29 (ppc64_linux_reg_offsets): Likewise.
30 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
31 * ppc-linux-nat.c: Include regset.h.
32 (gdb_vrregset_t): Adjust comment to account for little-endian
34 (supply_vrregset, fill_vrregset): Remove.
35 (fetch_altivec_register, store_altivec_register): Remove.
36 (fetch_altivec_registers): Add regno parameter. Get regset using
37 ppc_linux_vrregset. Use regset to supply registers.
38 (store_altivec_registers): Add regno parameter. Get regset using
39 ppc_linux_vrregset. Use regset to collect registers.
40 (fetch_register): Call fetch_altivec_registers instead of
41 fetch_altivec_register.
42 (store_register): Call store_altivec_registers instead of
43 store_altivec_register.
44 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
45 the new regno parameter.
46 (store_ppc_registers): Call store_altivec_registers with -1 for
47 the new regno parameter.
49 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
51 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
52 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
53 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
54 (gdb_vrregset_t): Change array type size to
55 PPC_LINUX_SIZEOF_VRREGSET.
56 (gdb_vsxregset_t): Change array type size to
57 PPC_LINUX_SIZEOF_VSXREGSET.
58 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
59 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
60 PPC_LINUX_SIZEOF_VSXREGSET.
62 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
64 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
65 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
67 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
68 ppc_linux_target_wordsize with tid.
69 (ppc_linux_nat_target::read_description): Call ppc_linux_target
71 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
72 (ppc64_64bit_inferior_p): Add static and inline specifiers.
73 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
74 tid parameter. Remove static specifier.
75 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
76 (ppc_linux_target_wordsize): New declaration.
78 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
80 * arch/ppc-linux-common.c: New file.
81 * arch/ppc-linux-common.h: New file.
82 * arch/ppc-linux-tdesc.h: New file.
83 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
84 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
85 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
86 arch/ppc-linux-tdesc.h.
87 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
88 arch/ppc-linux-tdesc.h.
89 (ppc_linux_nat_target::read_description): Remove target
90 description matching code. Fill a ppc_linux_features struct and
91 call ppc_linux_match_description with it. Move comment about ISA
92 2.05 to ppc-linux-common.c.
93 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
94 arch/ppc-linux-tdesc.h.
95 (ppc_linux_core_read_description): Remove target description
96 matching code. Fill a ppc_linux_features struct and call
97 ppc_linux_match_description with it.
98 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
99 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
100 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
101 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
102 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
103 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
104 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
105 (tdesc_powerpc_e500l): Remove.
107 2018-05-22 Joel Brobecker <brobecker@adacore.com>
109 * ada-lang.c (catch_assert_command): Pass empty string instead
110 of NULL for excep_string argument.
112 2018-05-22 Maciej W. Rozycki <macro@mips.com>
114 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
115 the width of the requested register exceeds the width of the
118 2018-05-21 Tom Tromey <tom@tromey.com>
120 * printcmd.c (output_command): Remove.
121 (output_command_const): Rename to output_command.
122 * valprint.h (output_command): Rename from output_command_const.
123 * tracepoint.c (trace_dump_actions): Call output_command.
125 2018-05-21 Tom Tromey <tom@tromey.com>
127 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
128 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
129 * ada-lang.h (create_ada_exception_catchpoint): Update.
130 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
132 (create_excep_cond_exprs, ~ada_catchpoint)
133 (should_stop_exception, print_one_exception)
134 (print_mention_exception, print_recreate_exception): Update.
135 (ada_get_next_arg): Remove.
136 (catch_ada_exception_command_split): Use std::string. Change type
137 of "excep_string", "cond_string".
138 (catch_ada_exception_command): Update.
139 (create_ada_exception_catchpoint): Change type of excep_string.
140 (ada_exception_sal): Remove excep_string parameter.
141 (~ada_catchpoint): Remove.
143 2018-05-21 Tom Tromey <tom@tromey.com>
145 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
148 2018-05-21 Tom Tromey <tom@tromey.com>
150 * ada-lang.c (ada_exception_message_1, ada_exception_message):
151 Return unique_xmalloc_ptr.
152 (print_it_exception): Update.
154 2018-05-21 Tom Tromey <tom@tromey.com>
156 * tracepoint.c (trace_dump_actions): Use std::string.
158 2018-05-21 Tom Tromey <tom@tromey.com>
160 * symfile.c (reread_symbols): Use std::string for original_name.
162 2018-05-21 Tom Tromey <tom@tromey.com>
164 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
165 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
168 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
170 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
172 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
173 * objfiles.c (get_objfile_bfd_data): Allocate
174 objfile_per_bfd_storage with obstack_new when allocating on
177 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
179 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
181 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
182 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
183 * mdebugread.c (mdebug_build_psymtabs): Likewise.
184 (add_pending): Likewise.
185 (parse_symbol): Likewise.
186 (parse_partial_symbols): Likewise.
187 (psymtab_to_symtab_1): Likewise.
188 (new_psymtab): Likewise.
189 (elfmdebug_build_psymtabs): Likewise.
190 * minsyms.c (terminate_minimal_symbol_table): Likewise.
191 * objfiles.c (get_objfile_bfd_data): Likewise.
192 (objfile_register_static_link): Likewise.
193 * psymtab.c (allocate_psymtab): Likewise.
194 * stabsread.c (read_member_functions): Likewise.
195 * xcoffread.c (xcoff_end_psymtab): Likewise.
197 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
199 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
200 compiler supports std::is_trivially_constructible.
201 * common/poison.h: Include obstack.h.
202 (IsMallocable): Define to is_trivially_constructible if the
203 compiler supports it, define to true_type otherwise.
207 (XOBNEWVEC): Redefine.
208 * gdb_obstack.h (obstack_zalloc): New.
209 (OBSTACK_ZALLOC): Redefine.
210 (obstack_calloc): New.
211 (OBSTACK_CALLOC): Redefine.
213 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
214 (gdbarch_obstack): New declaration in gdbarch.h, definition in
216 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
217 obstack_calloc/obstack_zalloc.
218 (gdbarch_obstack_zalloc): Remove.
219 * target-descriptions.c (tdesc_data_init): Use obstack_new.
221 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
223 * stack.c (backtrace_command_1): Remove useless variable int i.
225 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
227 * stack.c (print_frame_info): Fix comment.
229 2018-05-18 Tom Tromey <tom@tromey.com>
231 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
232 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
233 (~dwarf2_per_objfile): Update
234 (dwarf2_get_dwz_file): Use new.
235 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
238 2018-05-18 Tom Tromey <tom@tromey.com>
240 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
242 * dwarf2read.c (struct dwp_file): Add constructor and
244 (open_and_init_dwp_file): Return a unique_ptr.
245 (dwarf2_per_objfile, create_dwp_hash_table)
246 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
247 (lookup_dwo_unit_in_dwp): Update.
248 (open_and_init_dwp_file, get_dwp_file): Update.
250 2018-05-18 Tom Tromey <tom@tromey.com>
252 * dwarf2read.c (dwarf2_per_objfile): Update.
253 (struct mapped_index): Add initializers.
254 (dwarf2_read_index): Use new.
255 (dw2_symtab_iter_init): Update.
256 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
259 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
261 * dwarf2read.c (mapped_index) <total_size>: Remove.
263 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
265 * unittests/format_pieces-selftests.c (test_format_specifier):
268 2018-05-18 Tom Tromey <tom@tromey.com>
270 * c-typeprint.c (maybe_print_hole): New function.
271 (c_print_type_struct_field_offset): Update.
272 (c_type_print_base_struct_union): Call maybe_print_hole.
274 2018-05-17 Keith Seitz <keiths@redhat.com>
276 * breakpoint.c (build_bpstat_chain): New function, moved from
278 (bpstat_stop_status): Add optional parameter, `stop_chain'.
279 If no stop chain is passed, call build_bpstat_chain to build it.
280 * breakpoint.h (build_bpstat_chain): Declare.
281 (bpstat_stop_status): Move documentation here from breakpoint.c.
282 * infrun.c (handle_signal_stop): Before eliding inlined frames,
283 build the stop chain and pass it to skip_inline_frames.
284 Pass this stop chain to bpstat_stop_status.
285 * inline-frame.c: Include breakpoint.h.
286 (stopped_by_user_bp_inline_frame): New function.
287 (skip_inline_frames): Add parameter `stop_chain'.
288 Move documention to inline-frame.h.
289 If non-NULL, use stopped_by_user_bp_inline_frame to determine
290 whether the frame should be elided.
291 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
292 Add moved documentation and update for new parameter.
294 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
297 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
298 unittests/format_pieces-selftests.c.
299 * common/format.h (format_piece) <operator==>: New.
300 (format_pieces) <operator[]>: Remove.
301 * common/format.c (format_pieces::format_pieces): Handle \e.
302 * unittests/format_pieces-selftests.c: New.
304 2018-05-17 Tom Tromey <tom@tromey.com>
307 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
308 (dw2_instantiate_symtab): Add skip_partial parameter.
309 (dw2_find_last_source_symtab, dw2_map_expand_apply)
310 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
311 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
312 (dw2_expand_symtabs_matching_one)
313 (dw2_find_pc_sect_compunit_symtab)
314 (dw2_debug_names_lookup_symbol)
315 (dw2_debug_names_expand_symtabs_for_function): Update.
316 (init_cutu_and_read_dies): Add skip_partial parameter.
317 (process_psymtab_comp_unit, build_type_psymtabs_1)
318 (process_skeletonless_type_unit, load_partial_comp_unit)
319 (psymtab_to_symtab_1): Update.
320 (load_full_comp_unit): Add skip_partial parameter.
321 (process_imported_unit_die, dwarf2_read_addr_index)
322 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
323 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
324 (read_signatured_type): Update.
326 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
328 * value.c (release_value): Remove unused variable.
329 (record_latest_value): Likewise.
330 (access_value_history): Likewise.
331 (preserve_values): Likewise.
333 2018-05-17 Tom Tromey <tom@tromey.com>
335 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
338 2018-05-16 Maciej W. Rozycki <macro@mips.com>
341 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
342 Also handle registers whose width is not a multiple of
344 (linux_nat_trad_target::store_register): Likewise.
346 2018-05-16 Tom Tromey <tom@tromey.com>
348 * gdbcore.h (core_bfd): Redefine.
349 * corelow.c (core_target::close): Update.
350 (core_target_open): Update.
351 * progspace.h (struct program_space) <cbfd>: Now a
354 2018-05-16 Tom Tromey <tom@tromey.com>
357 * symfile-add-flags.h (enum symfile_add_flags)
358 <SYMFILE_NOT_FILENAME>: New constant.
359 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
360 objfile name from BFD.
361 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
362 * minidebug.c (find_separate_debug_file_in_section): Put
363 ".gnu_debugdata" into BFD's file name.
365 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
367 * regcache.c (regcache_read_ftype, regcache_write_ftype):
370 2018-05-15 Tamar Christina <tamar.christina@arm.com>
373 * aarch64-tdep.c (aarch64_analyze_prologue,
374 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
375 Indicate not interested in errors.
377 2018-05-15 Maciej W. Rozycki <macro@mips.com>
379 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
380 Supply the MIPS_ZERO_REGNUM register.
382 2018-05-15 Maciej W. Rozycki <macro@mips.com>
384 * mips-tdep.c (mask_address_var): Make variable static.
386 2018-05-14 Tom Tromey <tom@tromey.com>
388 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
390 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
392 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
393 FXSAVE_ADDR for the mxcsr register.
395 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
397 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
399 2018-05-11 Pedro Alves <palves@redhat.com>
401 * corelow.c (core_target) <core_target>: No longer inline.
402 Initialize m_core_gdbarch, m_core_vec and build the section table
405 <core_gdbarch, get_core_register_section>: New methods.
406 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
407 factored out from ...
408 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
410 (sniff_core_bfd): Add gdbarch parameter.
411 (core_close): Delete, merged into ...
412 (core_target::close): ... here. Delete self.
413 (core_close_cleanup): Delete.
414 (core_target_open): Allocate a core_target on the heap. Use a
415 unique_ptr instead of a cleanup. Bits moved into the core_target
416 ctor. Adjust to use core_target methods instead of globals.
417 (get_core_register_section): Rename to ...
418 (core_target::get_core_register_section): ... this and adjust.
419 (struct get_core_registers_cb_data): New.
420 (get_core_registers_cb): Use it. Use bool.
421 (core_target::fetch_registers, core_target::files_info)
422 (core_target::xfer_partial, core_target::read_description)
423 (core_target::pid_to, core_target::thread_name): Adjust to
424 reference class fields instead of globals.
425 * target.h (struct target_ops_deleter, target_ops_up): New.
427 2018-05-11 Pedro Alves <palves@redhat.com>
429 * corefile.c (core_file_command): Move to corelow.c.
430 * corelow.c (the_core_target): Delete.
431 (core_file_command): Moved from corefile.c. Check exec_bfd
432 instead of the_core_target. Use target_detach instead of calling
433 into the_core_target directly.
434 (maybe_say_no_core_file_now): New.
435 (core_target::detach): Use it.
436 (_initialize_corelow): Remove references to the_core_target.
437 * gdbcore.h (the_core_target): Delete.
439 2018-05-11 Tom Tromey <tromey@redhat.com>
440 Pedro Alves <palves@redhat.com>
442 * corefile.c (core_bfd): Remove.
443 * gdbcore.h (core_bfd): Now a macro.
444 * progspace.h (struct program_space) <cbfd>: New field.
446 2018-05-11 Tom Tromey <tom@tromey.com>
448 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
451 2018-05-10 Tom Tromey <tom@tromey.com>
453 * configure: Rebuild.
454 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
456 2018-05-10 Joel Brobecker <brobecker@adacore.com>
459 * regformats/regdat.sh: Adjust script, following the addition
460 of the new expedite_regs parameter to init_target_desc.
462 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
465 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
466 set_gdbarch_significant_addr_bit.
467 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
468 set_gdbarch_significant_addr_bit.
469 * utils.c (address_significant): Update to sign extend addr.
471 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
473 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
474 (xtensa_linux_init_abi): Limit tdep->num_regs by
475 tdep->num_nopriv_regs.
476 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
477 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
480 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
482 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
484 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
486 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
487 (I387_MXCSR_INIT_VAL): New constant.
488 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
489 buffer if it was supplied by the inferior.
490 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
491 (i387_xsave_get_clear_bv): New function.
492 (i387_supply_xsave): Only read x87 control registers from the
493 xsave buffer if the feature is enabled, and the state will have
494 been written, otherwise, provide a suitable default.
495 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
496 including x87 control registers. Update control registers if they
497 have changed from the default value, and mark features as enabled
499 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
501 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
503 * spu-tdep.c (info_spu_event_command): Fix output formatting.
505 2018-05-07 Tom Tromey <tom@tromey.com>
507 * configure: Rebuild.
508 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
510 2018-05-07 Tom Tromey <tom@tromey.com>
513 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
514 bit. Use correct value for VDIV.
516 2018-05-04 Tom Tromey <tom@tromey.com>
518 * configure: Rebuild.
519 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
521 2018-05-04 Tom Tromey <tom@tromey.com>
523 * linux-record.c (record_linux_system_call) <case
524 RECORD_SYS_RECVFROM>: Add "break".
526 2018-05-04 Tom Tromey <tom@tromey.com>
528 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
530 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
533 2018-05-04 Tom Tromey <tom@tromey.com>
535 * rs6000-tdep.c (ppc_process_record_op4)
536 (ppc_process_record_op63): Add fall-through comment.
538 2018-05-04 Tom Tromey <tom@tromey.com>
540 * i386-tdep.c (i386_process_record): Add fall-through comment.
542 2018-05-04 Tom Tromey <tom@tromey.com>
544 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
547 2018-05-04 Tom Tromey <tom@tromey.com>
549 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
550 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
551 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
553 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
555 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
558 2018-05-04 Tom Tromey <tom@tromey.com>
560 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
562 2018-05-04 Tom Tromey <tom@tromey.com>
564 * s390-tdep.c (s390_process_record): Fix fall-through comments.
565 * xcoffread.c (scan_xcoff_symtab): Move comment later.
566 * symfile.c (section_is_mapped): Fix fall-through comment.
567 * stabsread.c (define_symbol, read_member_functions): Fix
568 fall-through comment.
569 * s390-linux-tdep.c (s390_process_record): Fix fall-through
571 * remote.c (remote_wait_as): Fix fall-through comment.
572 * p-exp.y (yylex): Fix fall-through comment.
573 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
575 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
576 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
577 * jv-exp.y (yylex): Fix fall-through comment.
578 * go-exp.y (lex_one_token): Fix fall-through comment.
579 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
580 fall-through comment.
581 * f-exp.y (yylex): Fix fall-through comment.
582 * dwarf2read.c (process_die): Fix fall-through comments.
583 * dbxread.c (process_one_symbol): Fix fall-through comment.
584 * d-exp.y (lex_one_token): Fix fall-through comment.
585 * cp-name-parser.y (yylex): Fix fall-through comment.
586 * coffread.c (coff_symtab_read): Fix fall-through comment.
587 * c-exp.y (lex_one_token): Fix fall-through comment.
588 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
590 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
593 2018-05-04 Tom Tromey <tom@tromey.com>
596 * NEWS: Mention gdb.execute change.
597 * gdbcmd.h (execute_control_command): Don't declare.
598 * python/python.c (execute_gdb_command): Use read_command_lines_1,
599 execute_control_commands, execute_control_commands_to_string.
600 * cli/cli-script.h (execute_control_commands)
601 (execute_control_commands_to_string): Declare.
602 (execute_control_command): Add from_tty parameter.
603 * cli/cli-script.c (execute_control_commands)
604 (execute_control_commands_to_string): New functions.
605 (execute_user_command): Use execute_control_commands.
606 (execute_control_command_1): Add "from_tty" parameter. Update.
607 (execute_control_command): Likewise.
609 2018-05-04 Tom Tromey <tom@tromey.com>
612 * NEWS: Mention that breakpoint commands are writable.
613 * python/py-breakpoint.c (bppy_set_commands): New function.
614 (breakpoint_object_getset) <"commands">: Use it.
616 2018-05-04 Tom Tromey <tom@tromey.com>
618 * tracepoint.c (actions_command): Update.
619 * mi/mi-cmd-break.c (mi_command_line_array)
620 (mi_command_line_array_cnt, mi_command_line_array_ptr)
621 (mi_read_next_line): Remove.
622 (mi_cmd_break_commands): Update.
623 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
625 * cli/cli-script.c (get_command_line): Update.
626 (process_next_line): Use function_view. Constify.
627 (recurse_read_control_structure, read_command_lines)
628 (read_command_lines_1): Change argument types to function_view.
629 (do_define_command, document_command): Update.
630 * breakpoint.h (check_tracepoint_command): Don't declare.
631 * breakpoint.c (check_tracepoint_command): Remove.
632 (commands_command_1, create_tracepoint_from_upload): Update.
634 2018-05-04 Tom Tromey <tom@tromey.com>
637 * cli/cli-script.h (enum command_control_type) <define_control>:
639 * cli/cli-script.c (multi_line_command_p): Handle define_control.
640 (build_command_line, execute_control_command_1)
641 (process_next_line): Likewise.
642 (do_define_command): New function, extracted from define_command.
643 (define_command): Use it.
645 2018-05-04 Tom Tromey <tom@tromey.com>
647 * tracepoint.c (actions_command): Update.
648 * cli/cli-script.h (read_command_lines): Update.
649 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
650 (MAX_TMPBUF): Remove define.
651 (define_command): Use string_printf.
652 (document_command): Likewise.
653 * breakpoint.c (commands_command_1): Update.
655 2018-05-04 Tom Tromey <tom@tromey.com>
657 * top.c (execute_command): Update.
658 * cli/cli-script.h (print_command_lines): Now varargs.
659 * cli/cli-script.c (print_command_lines): Now varargs.
660 (execute_control_command_1) <case while_control, case if_control>:
663 2018-05-04 Tom Tromey <tom@tromey.com>
665 * tracepoint.c (all_tracepoint_actions): Rename from
666 all_tracepoint_actions_and_cleanup. Change return type.
667 (actions_command, encode_actions_1, encode_actions)
668 (trace_dump_actions, tdump_command): Update.
669 * remote.c (remote_download_command_source): Update.
670 * python/python.c (gdbpy_eval_from_control_command)
671 (python_command, python_interactive_command): Update.
672 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
673 * guile/guile.c (guile_command)
674 (gdbscm_eval_from_control_command, guile_command): Update.
675 * compile/compile.c (compile_code_command)
676 (compile_print_command, compile_to_object): Update.
677 * cli/cli-script.h (struct command_lines_deleter): New.
678 (counted_command_line): New typedef.
679 (struct command_line): Add constructor, destructor.
681 <body_list_0, body_list_1>: New members.
682 (command_line_up): Remove typedef.
683 (read_command_lines, read_command_lines_1, get_command_line):
685 (copy_command_lines): Don't declare.
686 * cli/cli-script.c (build_command_line): Use "new".
687 (get_command_line): Return counted_command_line.
688 (print_command_lines, execute_user_command)
689 (execute_control_command_1, while_command, if_command): Update.
690 (realloc_body_list): Remove.
691 (process_next_line, recurse_read_control_structure): Update.
692 (read_command_lines, read_command_lines_1): Return counted_command_line.
693 (free_command_lines): Use "delete".
694 (copy_command_lines): Remove.
695 (define_command, document_command, show_user_1): Update.
696 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
697 a counted_command_line.
698 * breakpoint.h (counted_command_line): Remove typedef.
699 (breakpoint_set_commands): Update.
700 * breakpoint.c (check_no_tracepoint_commands)
701 (validate_commands_for_breakpoint): Update.
702 (breakpoint_set_commands): Change commands to be a
703 counted_command_line.
704 (commands_command_1, update_dprintf_command_list)
705 (create_tracepoint_from_upload): Update.
707 2018-05-04 Tom Tromey <tom@tromey.com>
709 * cli/cli-decode.h (cmd_list_element): New constructor.
710 (~cmd_list_element): New destructor.
711 (struct cmd_list_element): Add initializers.
712 * cli/cli-decode.c (do_add_cmd): Use "new".
713 (delete_cmd): Use "delete".
715 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
716 Pedro Alves <palves@redhat.com>
718 PR breakpoints/19806 and support for PR external/20207.
719 * NEWS: Mention Aarch64 watchpoint improvements.
720 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
721 watchpoints and PR external/20207 watchpoints.
722 * nat/aarch64-linux-hw-point.c
723 (kernel_supports_any_contiguous_range): New.
724 (aarch64_watchpoint_offset): New.
725 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
726 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
727 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
728 (aarch64_align_watchpoint): New parameters aligned_offset_p and
729 next_addr_orig_p. Support PR external/20207 watchpoints.
730 (aarch64_downgrade_regs): New.
731 (aarch64_dr_state_insert_one_point): New parameters offset and
733 (aarch64_dr_state_remove_one_point): Likewise.
734 (aarch64_handle_breakpoint): Update caller.
735 (aarch64_handle_aligned_watchpoint): Likewise.
736 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
738 (aarch64_linux_set_debug_regs): Remove const from state. Call
739 aarch64_downgrade_regs.
740 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
741 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
742 (DR_CONTROL_MASK): ... this.
743 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
744 (unsigned int aarch64_watchpoint_offset): New prototype.
745 (aarch64_linux_set_debug_regs): Remove const from state.
746 * utils.c (align_up, align_down): Move to ...
747 * common/common-utils.c (align_up, align_down): ... here.
748 * utils.h (align_up, align_down): Move to ...
749 * common/common-utils.h (align_up, align_down): ... here.
751 2018-05-04 Joel Brobecker <brobecker@adacore.com>
753 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
754 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
755 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
756 Re-implement to match the ABI as summarized in GCC's
757 gcc/config/sparc/sparc.c. All callers updated.
758 (sparc32_store_arguments): Remove assertion.
760 2018-05-04 Tom Tromey <tom@tromey.com>
762 * printcmd.c: Don't include tui.h.
763 (decode_format): Use skip_spaces.
765 2018-05-04 Tom Tromey <tom@tromey.com>
768 * printcmd.c (last_count): New global.
769 (x_command): Use saved count when repeating.
771 2018-05-04 Tom Tromey <tom@tromey.com>
773 * nto-procfs.c (do_closedir_cleanup): Remove.
774 (procfs_pidlist): Use gdb_dir_up.
775 * procfs.c (do_closedir_cleanup): Remove.
776 (proc_update_threads): Use gdb_dir_up.
777 * common/filestuff.h (struct gdb_dir_deleter): New.
778 (gdb_dir_up): New typedef.
780 2018-05-04 Tom Tromey <tom@tromey.com>
782 * ada-lang.c (print_mention_exception): Use std::string.
784 2018-05-04 Tom Tromey <tom@tromey.com>
786 * ada-lang.c (create_excep_cond_exprs): Update.
787 (ada_exception_catchpoint_cond_string): Use std::string.
789 2018-05-04 Tom Tromey <tom@tromey.com>
791 * ada-lang.c (xget_renaming_scope): Return std::string.
792 (old_renaming_is_invisible): Update.
794 2018-05-04 Tom Tromey <tom@tromey.com>
796 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
797 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
799 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
801 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
803 2018-05-04 Tom Tromey <tom@tromey.com>
805 * remote.c (remote_query_supported_append): Change type.
806 (remote_check_symbols): Update.
808 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
811 * configure.ac: Prepend libpython.
812 * python/python-config.py: Likewise.
813 * configure: Regenerate.
815 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
817 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
819 2018-05-03 Pedro Alves <palves@redhat.com>
822 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
823 override. Write 'true' instead of '1'.
824 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
827 2018-05-02 Pedro Alves <palves@redhat.com>
829 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
830 add_inf_child_target.
831 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
832 add_inf_child_target.
833 * aix-thread.c (aix_thread_target_info): New.
834 (aix_thread_target) <shortname, longname, doc>: Delete.
836 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
837 add_inf_child_target.
838 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
839 add_inf_child_target.
840 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
841 add_inf_child_target.
842 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
843 add_inf_child_target.
844 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
845 add_inf_child_target.
846 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
847 add_inf_child_target.
848 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
849 add_inf_child_target.
850 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
851 add_inf_child_target.
852 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
853 add_inf_child_target.
854 * bfd-target.c (target_bfd_target_info): New.
855 (target_bfd) <shortname, longname, doc>: Delete.
857 * bsd-kvm.c (bsd_kvm_target_info): New.
858 (bsd_kvm_target) <shortname, longname, doc>: Delete.
860 (bsd_kvm_target::open): Rename to ...
861 (bsd_kvm_target_open): ... this. Adjust.
862 * bsd-uthread.c (bsd_uthread_target_info): New.
863 (bsd_uthread_target) <shortname, longname, doc>: Delete.
865 * corefile.c (core_file_command): Adjust.
866 * corelow.c (core_target_info): New.
867 (core_target) <shortname, longname, doc>: Delete.
869 (core_target::open): Rename to ...
870 (core_target_open): ... this. Adjust.
871 * ctf.c (ctf_target_info): New.
872 (ctf_target) <shortname, longname, doc>: Delete.
874 (ctf_target::open): Rename to ...
875 (ctf_target_open): ... this.
876 (_initialize_ctf): Adjust.
877 * exec.c (exec_target_info): New.
878 (exec_target) <shortname, longname, doc>: Delete.
880 (exec_target::open): Rename to ...
881 (exec_target_open): ... this.
882 * gdbcore.h (core_target_open): Declare.
883 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
884 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
885 add_inf_child_target.
886 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
887 add_inf_child_target.
888 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
889 add_inf_child_target.
890 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
891 add_inf_child_target.
892 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
893 add_inf_child_target.
894 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
895 add_inf_child_target.
896 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
897 add_inf_child_target.
898 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
899 add_inf_child_target.
900 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
901 add_inf_child_target.
902 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
903 add_inf_child_target.
904 * inf-child.c (inf_child_target_info): New.
905 (inf_child_target::info): New.
906 (inf_child_open_target): Remove 'target' parameter. Use
907 get_native_target instead.
908 (inf_child_target::open): Delete.
909 (add_inf_child_target): New.
910 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
913 (add_inf_child_target): Declare.
914 (inf_child_open_target): Declare.
915 * linux-thread-db.c (thread_db_target_info): New.
916 (thread_db_target) <shortname, longname, doc>: Delete.
918 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
919 add_inf_child_target.
920 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
921 add_inf_child_target.
922 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
923 add_inf_child_target.
924 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
925 add_inf_child_target.
926 * make-target-delegates (print_class): Adjust.
927 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
928 add_inf_child_target.
929 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
930 add_inf_child_target.
931 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
932 add_inf_child_target.
933 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
934 add_inf_child_target.
935 * nto-procfs.c (nto_native_target_info): New.
936 (nto_procfs_target_native) <shortname, longname, doc>:
939 (nto_procfs_target_info): New.
940 (nto_procfs_target_procfs) <shortname, longname, doc>:
943 (init_procfs_targets): Adjust.
944 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
945 add_inf_child_target.
946 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
947 add_inf_child_target.
948 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
949 add_inf_child_target.
950 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
951 add_inf_child_target.
952 * ravenscar-thread.c (ravenscar_target_info): New.
953 (ravenscar_thread_target) <shortname, longname, doc>:
956 * record-btrace.c (record_btrace_target_info):
957 (record_btrace_target) <shortname, longname, doc>: Delete.
959 (record_btrace_target::open): Rename to ...
960 (record_btrace_target_open): ... this. Adjust.
961 * record-full.c (record_longname, record_doc): New.
962 (record_full_base_target) <shortname, longname, doc>: Delete.
964 (record_full_target_info): New.
965 (record_full_target): <shortname>: Delete.
967 (record_full_core_open_1, record_full_open_1): Update comments.
968 (record_full_base_target::open): Rename to ...
969 (record_full_open): ... this.
970 (cmd_record_full_restore): Update.
971 (_initialize_record_full): Update.
972 * remote-sim.c (remote_sim_target_info): New.
973 (gdbsim_target) <shortname, longname, doc>: Delete.
975 (gdbsim_target::open): Rename to ...
976 (gdbsim_target_open): ... this.
977 (_initialize_remote_sim): Adjust.
978 * remote.c (remote_doc): New.
979 (remote_target_info): New.
980 (remote_target) <shortname, longname, doc>: Delete.
982 (extended_remote_target_info): New.
983 (extended_remote_target) <shortname, longname, doc>: Delete.
985 (remote_target::open_1): Make static. Adjust.
986 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
987 * s390-linux-nat.c (_initialize_s390_nat): Use
988 add_inf_child_target.
989 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
990 add_inf_child_target.
991 * sol-thread.c (thread_db_target_info): New.
992 (sol_thread_target) <shortname, longname, doc>: Delete.
994 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
995 add_inf_child_target.
996 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
997 add_inf_child_target.
998 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
999 add_inf_child_target.
1000 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1001 add_inf_child_target.
1002 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1003 add_inf_child_target.
1004 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1005 add_inf_child_target.
1006 * spu-linux-nat.c (_initialize_spu_nat): Use
1007 add_inf_child_target.
1008 * spu-multiarch.c (spu_multiarch_target_info): New.
1009 (spu_multiarch_target) <shortname, longname, doc>: Delete.
1011 * target-delegates.c: Regenerate.
1012 * target.c: Include <unordered_map>.
1013 (target_ops_p): Delete.
1014 (DEF_VEC_P(target_ops_p)): Delete.
1015 (target_factories): New.
1016 (test_target_info): New.
1017 (test_target_ops::info): New.
1018 (open_target): Adjust to use target_factories.
1019 (add_target_with_completer): Rename to ...
1020 (add_target): ... this. Change prototype. Register target_info
1021 and open callback in target_factories. Register target_info in
1022 command context instead of target_ops.
1023 (add_target): Delete old implementation.
1024 (add_deprecated_target_alias): Change prototype. Adjust.
1025 (the_native_target): New.
1026 (set_native_target, get_native_target): New.
1027 (find_default_run_target): Use the_native_target.
1028 (find_attach_target, find_run_target): Simplify.
1029 (target_ops::open): Delete.
1030 (dummy_target_info): New.
1031 (dummy_target::shortname, dummy_target::longname)
1032 (dummy_target::doc): Delete.
1033 (dummy_target::info): New.
1034 (debug_target::shortname, debug_target::longname)
1035 (debug_target::doc): Delete.
1036 (debug_target::info): New.
1037 * target.h (struct target_info): New.
1038 (target_ops::~target_ops): Add comment.
1039 (target_ops::info): New.
1040 (target_ops::shortname, target_ops::longname, target_ops::doc): No
1041 longer virtual. Implement in terms of target_info.
1042 (set_native_target, get_native_target): Declare.
1043 (target_open_ftype): New.
1044 (add_target, add_target_with_completer)
1045 (add_deprecated_target_alias): Change prototype.
1046 (test_target) <shortname, longname, doc>: Delete.
1048 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1049 add_inf_child_target.
1050 * tracefile-tfile.c (tfile_target_info): New.
1051 (tfile_target) <shortname, longname, doc>: Delete.
1053 (tfile_target::open): Rename to ...
1054 (tfile_target_open): ... this.
1055 (_initialize_tracefile_tfile): Adjust.
1056 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1057 add_inf_child_target.
1058 * windows-nat.c (_initialize_windows_nat): Use
1059 add_inf_child_target.
1060 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1061 add_inf_child_target.
1063 2018-05-02 Pedro Alves <palves@redhat.com>
1065 * linux-nat.h (linux_nat_target) <low_new_thread,
1066 low_delete_thread, low_new_fork, low_forget_process,
1067 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1068 New virtual methods.
1069 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1070 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1071 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1072 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1073 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1075 * linux-fork.c (delete_fork): Adjust to call low method.
1076 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1077 (linux_nat_new_fork, linux_nat_forget_process_hook)
1078 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1079 (linux_nat_status_is_event):
1080 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1081 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1083 (sigtrap_is_event): Rename to ...
1084 (linux_nat_target::low_status_is_event): ... this.
1085 (linux_nat_set_status_is_event): Delete.
1086 (save_stop_reason, linux_nat_wait_1)
1087 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1089 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1090 (linux_nat_set_new_fork, linux_nat_set_forget_process)
1091 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1092 (linux_nat_set_prepare_to_resume): Delete.
1093 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
1094 low virtual methods.
1095 * amd64-linux-nat.c: Likewise.
1096 * arm-linux-nat.c: Likewise.
1097 * i386-linux-nat.c: Likewise.
1098 * ia64-linux-nat.c: Likewise.
1099 * mips-linux-nat.c: Likewise.
1100 * ppc-linux-nat.c: Likewise.
1101 * s390-linux-nat.c: Likewise.
1102 * sparc64-linux-nat.c: Likewise.
1103 * x86-linux-nat.c: Likewise.
1104 * x86-linux-nat.h: Include "nat/x86-linux.h".
1105 (x86_linux_nat_target) <low_new_fork, low_forget_process,
1106 low_prepare_to_resume, low_new_thread, low_delete_thread>:
1109 2018-05-02 Pedro Alves <palves@redhat.com>
1111 * target.h (target_ops)
1112 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1113 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
1114 stopped_by_watchpoint, have_continuable_watchpoint,
1115 stopped_data_address, watchpoint_addr_within_range,
1116 can_accel_watchpoint_condition, can_run, thread_alive,
1117 has_all_memory, has_memory, has_stack, has_registers,
1118 has_execution, can_async_p, is_async_p, supports_non_stop,
1119 always_non_stop_p, can_execute_reverse, supports_multi_process,
1120 supports_enable_disable_tracepoint,
1121 supports_disable_randomization, supports_string_tracing,
1122 supports_evaluation_of_breakpoint_conditions,
1123 can_run_breakpoint_commands, filesystem_is_local,
1124 can_download_tracepoint, get_trace_state_variable_value,
1125 set_trace_notes, get_tib_address, use_agent, can_use_agent,
1126 record_is_replaying, record_will_replay,
1127 augmented_libraries_svr4_read>: Adjust to return bool.
1128 * aarch64-linux-nat.c: All implementations adjusted.
1129 * aix-thread.c: All implementations adjusted.
1130 * arm-linux-nat.c: All implementations adjusted.
1131 * breakpoint.c: All implementations adjusted.
1132 * bsd-kvm.c: All implementations adjusted.
1133 * bsd-uthread.c: All implementations adjusted.
1134 * corelow.c: All implementations adjusted.
1135 * ctf.c: All implementations adjusted.
1136 * darwin-nat.c: All implementations adjusted.
1137 * darwin-nat.h: All implementations adjusted.
1138 * exec.c: All implementations adjusted.
1139 * fbsd-nat.c: All implementations adjusted.
1140 * fbsd-nat.h: All implementations adjusted.
1141 * gnu-nat.c: All implementations adjusted.
1142 * gnu-nat.h: All implementations adjusted.
1143 * go32-nat.c: All implementations adjusted.
1144 * ia64-linux-nat.c: All implementations adjusted.
1145 * inf-child.c: All implementations adjusted.
1146 * inf-child.h: All implementations adjusted.
1147 * inf-ptrace.c: All implementations adjusted.
1148 * inf-ptrace.h: All implementations adjusted.
1149 * linux-nat.c: All implementations adjusted.
1150 * linux-nat.h: All implementations adjusted.
1151 * mips-linux-nat.c: All implementations adjusted.
1152 * nto-procfs.c: All implementations adjusted.
1153 * ppc-linux-nat.c: All implementations adjusted.
1154 * procfs.c: All implementations adjusted.
1155 * ravenscar-thread.c: All implementations adjusted.
1156 * record-btrace.c: All implementations adjusted.
1157 * record-full.c: All implementations adjusted.
1158 * remote-sim.c: All implementations adjusted.
1159 * remote.c: All implementations adjusted.
1160 * s390-linux-nat.c: All implementations adjusted.
1161 * sol-thread.c: All implementations adjusted.
1162 * spu-multiarch.c: All implementations adjusted.
1163 * target-delegates.c: All implementations adjusted.
1164 * target.c: All implementations adjusted.
1165 * target.h: All implementations adjusted.
1166 * tracefile-tfile.c: All implementations adjusted.
1167 * tracefile.c: All implementations adjusted.
1168 * tracefile.h: All implementations adjusted.
1169 * windows-nat.c: All implementations adjusted.
1170 * x86-linux-nat.h: All implementations adjusted.
1171 * x86-nat.h: All implementations adjusted.
1173 2018-05-02 Pedro Alves <palves@redhat.com>
1175 * make-target-delegates (scan_target_h): Don't trim lines here.
1176 Replace sequences of tabs and/or whitespace with a single
1178 (top level, parsing methods): Trim each line before processing it
1181 2018-05-02 Pedro Alves <palves@redhat.com>
1182 John Baldwin <jhb@freebsd.org>
1184 * target.h (enum strata) <debug_stratum>: New.
1185 (struct target_ops) <all delegation methods>: Replace by C++
1186 virtual methods, and drop "to_" prefix. All references updated
1188 <to_shortname, to_longname, to_doc, to_data,
1189 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
1190 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
1191 virtual methods. All references updated throughout.
1192 <can_attach, supports_terminal_ours, can_create_inferior,
1193 get_thread_control_capabilities, attach_no_wait>: New
1195 <insert_breakpoint, remove_breakpoint>: Now
1196 TARGET_DEFAULT_NORETURN methods.
1197 <info_proc>: Now returns bool.
1199 (OPS_MAGIC): Delete.
1200 (current_target): Delete. All references replaced by references
1202 (target_stack): ... this. New.
1203 (target_shortname, target_longname): Adjust.
1204 (target_can_run): Now a function declaration.
1205 (default_child_has_all_memory, default_child_has_memory)
1206 (default_child_has_stack, default_child_has_registers)
1207 (default_child_has_execution): Remove target_ops parameter.
1208 (complete_target_initialization): Delete.
1209 (memory_breakpoint_target): New template class.
1210 (test_target_ops): Refactor as a C++ class with virtual methods.
1211 * make-target-delegates (NAME_PART): Tighten.
1212 (POINTER_PART, CP_SYMBOL): New.
1213 (SIMPLE_RETURN_PART): Reimplement.
1214 (VEC_RETURN_PART): Expect less.
1215 (RETURN_PART, VIRTUAL_PART): New.
1216 (METHOD): Adjust to C++ virtual methods.
1217 (scan_target_h): Remove reference to C99.
1218 (dname): Output "target_ops::" prefix.
1219 (write_function_header): Adjust to output a C++ class method.
1220 (write_declaration): New.
1221 (write_delegator): Adjust to output a C++ class method.
1222 (tdname): Output "dummy_target::" prefix.
1223 (write_tdefault, write_debugmethod): Adjust to output a C++ class
1225 (tdefault_names, debug_names): Delete.
1226 (return_types, tdefaults, styles, argtypes_array): New.
1227 (top level): All methods are delegators.
1229 (top level): Print dummy_target and debug_target classes.
1230 * target-delegates.c: Regenerate.
1231 * target-debug.h (target_debug_print_enum_info_proc_what)
1232 (target_debug_print_thread_control_capabilities)
1233 (target_debug_print_thread_info_p): New.
1234 * target.c (dummy_target): Delete.
1235 (the_dummy_target, the_debug_target): New.
1236 (target_stack): Now extern.
1237 (set_targetdebug): Push/unpush debug target.
1238 (default_child_has_all_memory, default_child_has_memory)
1239 (default_child_has_stack, default_child_has_registers)
1240 (default_child_has_execution): Remove target_ops parameter.
1241 (complete_target_initialization): Delete.
1242 (add_target_with_completer): No longer call
1243 complete_target_initialization.
1244 (target_supports_terminal_ours): Use regular delegation.
1245 (update_current_target): Delete.
1246 (push_target): No longer check magic number. Don't call
1247 update_current_target.
1248 (unpush_target): Don't call update_current_target.
1249 (target_is_pushed): No longer check magic number.
1250 (target_require_runnable): Skip for all stratums over
1252 (target_ops::info_proc): New.
1253 (target_info_proc): Use find_target_at and
1254 find_default_run_target.
1255 (target_supports_disable_randomization): Use regular delegation.
1256 (target_get_osdata): Use find_target_at.
1257 (target_ops::open, target_ops::close, target_ops::can_attach)
1258 (target_ops::attach, target_ops::can_create_inferior)
1259 (target_ops::create_inferior, target_ops::can_run)
1260 (target_can_run): New.
1261 (default_fileio_target): Use regular delegation.
1262 (target_ops::fileio_open, target_ops::fileio_pwrite)
1263 (target_ops::fileio_pread, target_ops::fileio_fstat)
1264 (target_ops::fileio_close, target_ops::fileio_unlink)
1265 (target_ops::fileio_readlink): New.
1266 (target_fileio_open_1, target_fileio_unlink)
1267 (target_fileio_readlink): Always call the target method. Handle
1269 (return_zero, return_zero_has_execution): Delete.
1270 (init_dummy_target): Delete.
1271 (dummy_target::dummy_target, dummy_target::shortname)
1272 (dummy_target::longname, dummy_target::doc)
1273 (debug_target::debug_target, debug_target::shortname)
1274 (debug_target::longname, debug_target::doc): New.
1275 (target_supports_delete_record): Use regular delegation.
1276 (setup_target_debug): Delete.
1277 (maintenance_print_target_stack): Skip debug_stratum.
1278 (initialize_targets): Instantiate the_dummy_target and
1280 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
1282 (target_auxv_search, fprint_target_auxv): Adjust.
1283 (info_auxv_command): Adjust to use target_stack.
1284 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
1285 * exceptions.c (print_flush): Handle a NULL target_stack.
1286 * regcache.c (target_ops_no_register): Refactor as class with
1289 * exec.c (exec_target): New class.
1290 (exec_ops): Now an exec_target.
1291 (exec_open, exec_close_1, exec_get_section_table)
1292 (exec_xfer_partial, exec_files_info, exec_has_memory)
1293 (exec_make_note_section): Refactor as exec_target methods.
1294 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
1296 (exec_target::find_memory_regions): New.
1297 (_initialize_exec): Don't call init_exec_ops.
1298 * gdbcore.h (exec_file_clear): Delete.
1300 * corefile.c (core_target): Delete.
1301 (core_file_command): Adjust.
1302 * corelow.c (core_target): New class.
1303 (the_core_target): New.
1304 (core_close): Remove target_ops parameter.
1305 (core_close_cleanup): Adjust.
1306 (core_target::close): New.
1307 (core_open, core_detach, get_core_registers, core_files_info)
1308 (core_xfer_partial, core_thread_alive, core_read_description)
1309 (core_pid_to_str, core_thread_name, core_has_memory)
1310 (core_has_stack, core_has_registers, core_info_proc): Rework as
1311 core_target methods.
1312 (ignore, core_remove_breakpoint, init_core_ops): Delete.
1313 (_initialize_corelow): Initialize the_core_target.
1314 * gdbcore.h (core_target): Delete.
1315 (the_core_target): New.
1317 * ctf.c: (ctf_target): New class.
1318 (ctf_ops): Now a ctf_target.
1319 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
1320 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
1321 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
1323 (init_ctf_ops): Delete.
1324 (_initialize_ctf): Don't call it.
1325 * tracefile-tfile.c (tfile_target): New class.
1326 (tfile_ops): Now a tfile_target.
1327 (tfile_open, tfile_close, tfile_files_info)
1328 (tfile_get_tracepoint_status, tfile_trace_find)
1329 (tfile_fetch_registers, tfile_xfer_partial)
1330 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
1331 Refactor as tfile_target methods.
1332 (tfile_xfer_partial_features): Remove target_ops parameter.
1333 (init_tfile_ops): Delete.
1334 (_initialize_tracefile_tfile): Don't call it.
1335 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
1336 (tracefile_has_stack, tracefile_has_registers)
1337 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
1338 tracefile_target methods.
1339 (init_tracefile_ops): Delete.
1340 (tracefile_target::tracefile_target): New.
1341 * tracefile.h: Include "target.h".
1342 (tracefile_target): New class.
1343 (init_tracefile_ops): Delete.
1345 * spu-multiarch.c (spu_multiarch_target): New class.
1346 (spu_ops): Now a spu_multiarch_target.
1347 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
1348 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
1349 (spu_search_memory, spu_mourn_inferior): Refactor as
1350 spu_multiarch_target methods.
1351 (init_spu_ops): Delete.
1352 (_initialize_spu_multiarch): Remove references to init_spu_ops,
1353 complete_target_initialization.
1355 * ravenscar-thread.c (ravenscar_thread_target): New class.
1356 (ravenscar_ops): Now a ravenscar_thread_target.
1357 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
1358 (ravenscar_thread_alive, ravenscar_pid_to_str)
1359 (ravenscar_fetch_registers, ravenscar_store_registers)
1360 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
1361 (ravenscar_stopped_by_hw_breakpoint)
1362 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
1363 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
1364 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
1366 (init_ravenscar_thread_ops): Delete.
1367 (_initialize_ravenscar): Remove references to
1368 init_ravenscar_thread_ops and complete_target_initialization.
1370 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
1371 (bsd_uthread_target): New class.
1372 (bsd_uthread_ops): Now a bsd_uthread_target.
1373 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
1374 (bsd_uthread_close, bsd_uthread_mourn_inferior)
1375 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
1376 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
1377 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
1378 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
1379 (bsd_uthread_target): Delete function.
1380 (_initialize_bsd_uthread): Remove reference to
1381 complete_target_initialization.
1383 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
1384 (target_bfd): ... this new class.
1385 (target_bfd_xfer_partial, target_bfd_get_section_table)
1386 (target_bfd_close): Refactor as target_bfd methods.
1387 (target_bfd::~target_bfd): New.
1388 (target_bfd_reopen): Adjust.
1389 (target_bfd::close): New.
1391 * record-btrace.c (record_btrace_target): New class.
1392 (record_btrace_ops): Now a record_btrace_target.
1393 (record_btrace_open, record_btrace_stop_recording)
1394 (record_btrace_disconnect, record_btrace_close)
1395 (record_btrace_async, record_btrace_info)
1396 (record_btrace_insn_history, record_btrace_insn_history_range)
1397 (record_btrace_insn_history_from, record_btrace_call_history)
1398 (record_btrace_call_history_range)
1399 (record_btrace_call_history_from, record_btrace_record_method)
1400 (record_btrace_is_replaying, record_btrace_will_replay)
1401 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
1402 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
1403 (record_btrace_store_registers, record_btrace_prepare_to_store)
1404 (record_btrace_to_get_unwinder)
1405 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
1406 (record_btrace_commit_resume, record_btrace_wait)
1407 (record_btrace_stop, record_btrace_can_execute_reverse)
1408 (record_btrace_stopped_by_sw_breakpoint)
1409 (record_btrace_supports_stopped_by_sw_breakpoint)
1410 (record_btrace_stopped_by_hw_breakpoint)
1411 (record_btrace_supports_stopped_by_hw_breakpoint)
1412 (record_btrace_update_thread_list, record_btrace_thread_alive)
1413 (record_btrace_goto_begin, record_btrace_goto_end)
1414 (record_btrace_goto, record_btrace_stop_replaying_all)
1415 (record_btrace_execution_direction)
1416 (record_btrace_prepare_to_generate_core)
1417 (record_btrace_done_generating_core): Refactor as
1418 record_btrace_target methods.
1419 (init_record_btrace_ops): Delete.
1420 (_initialize_record_btrace): Remove reference to
1421 init_record_btrace_ops.
1422 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
1423 the execution_direction global.
1424 (record_full_base_target, record_full_target)
1425 (record_full_core_target): New classes.
1426 (record_full_ops): Now a record_full_target.
1427 (record_full_core_ops): Now a record_full_core_target.
1428 (record_full_target::detach, record_full_target::disconnect)
1429 (record_full_core_target::disconnect)
1430 (record_full_target::mourn_inferior, record_full_target::kill):
1432 (record_full_open, record_full_close, record_full_async): Refactor
1433 as methods of the record_full_base_target class.
1434 (record_full_resume, record_full_commit_resume): Refactor
1435 as methods of the record_full_target class.
1436 (record_full_wait, record_full_stopped_by_watchpoint)
1437 (record_full_stopped_data_address)
1438 (record_full_stopped_by_sw_breakpoint)
1439 (record_full_supports_stopped_by_sw_breakpoint)
1440 (record_full_stopped_by_hw_breakpoint)
1441 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
1442 methods of the record_full_base_target class.
1443 (record_full_store_registers, record_full_xfer_partial)
1444 (record_full_insert_breakpoint, record_full_remove_breakpoint):
1445 Refactor as methods of the record_full_target class.
1446 (record_full_can_execute_reverse, record_full_get_bookmark)
1447 (record_full_goto_bookmark, record_full_execution_direction)
1448 (record_full_record_method, record_full_info, record_full_delete)
1449 (record_full_is_replaying, record_full_will_replay)
1450 (record_full_goto_begin, record_full_goto_end, record_full_goto)
1451 (record_full_stop_replaying): Refactor as methods of the
1452 record_full_base_target class.
1453 (record_full_core_resume, record_full_core_kill)
1454 (record_full_core_fetch_registers)
1455 (record_full_core_prepare_to_store)
1456 (record_full_core_store_registers, record_full_core_xfer_partial)
1457 (record_full_core_insert_breakpoint)
1458 (record_full_core_remove_breakpoint)
1459 (record_full_core_has_execution): Refactor
1460 as methods of the record_full_core_target class.
1461 (record_full_base_target::supports_delete_record): New.
1462 (init_record_full_ops): Delete.
1463 (init_record_full_core_ops): Delete.
1464 (record_full_save): Refactor as method of the
1465 record_full_base_target class.
1466 (_initialize_record_full): Remove references to
1467 init_record_full_ops and init_record_full_core_ops.
1469 * remote.c (remote_target, extended_remote_target): New classes.
1470 (remote_ops): Now a remote_target.
1471 (extended_remote_ops): Now an extended_remote_target.
1472 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
1473 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
1474 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
1475 (remote_pass_signals, remote_set_syscall_catchpoint)
1476 (remote_program_signals, )
1477 (remote_thread_always_alive): Remove target_ops parameter.
1478 (remote_thread_alive, remote_thread_name)
1479 (remote_update_thread_list, remote_threads_extra_info)
1480 (remote_static_tracepoint_marker_at)
1481 (remote_static_tracepoint_markers_by_strid)
1482 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1483 (remote_open): Refactor as methods of remote_target.
1484 (extended_remote_open, extended_remote_detach)
1485 (extended_remote_attach, extended_remote_post_attach):
1486 (extended_remote_supports_disable_randomization)
1487 (extended_remote_create_inferior): : Refactor as method of
1488 extended_remote_target.
1489 (remote_set_permissions, remote_open_1, remote_detach)
1490 (remote_follow_fork, remote_follow_exec, remote_disconnect)
1491 (remote_resume, remote_commit_resume, remote_stop)
1492 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1493 (remote_terminal_ours, remote_wait, remote_fetch_registers)
1494 (remote_prepare_to_store, remote_store_registers)
1495 (remote_flash_erase, remote_flash_done, remote_files_info)
1496 (remote_kill, remote_mourn, remote_insert_breakpoint)
1497 (remote_remove_breakpoint, remote_insert_watchpoint)
1498 (remote_watchpoint_addr_within_range)
1499 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1500 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1501 (remote_supports_stopped_by_sw_breakpoint)
1502 (remote_stopped_by_hw_breakpoint)
1503 (remote_supports_stopped_by_hw_breakpoint)
1504 (remote_stopped_by_watchpoint, remote_stopped_data_address)
1505 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1506 (remote_verify_memory): Refactor as methods of remote_target.
1507 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1509 (remote_xfer_partial, remote_get_memory_xfer_limit)
1510 (remote_search_memory, remote_rcmd, remote_memory_map)
1511 (remote_pid_to_str, remote_get_thread_local_address)
1512 (remote_get_tib_address, remote_read_description): Refactor as
1513 methods of remote_target.
1514 (remote_target::fileio_open, remote_target::fileio_pwrite)
1515 (remote_target::fileio_pread, remote_target::fileio_close): New.
1516 (remote_hostio_readlink, remote_hostio_fstat)
1517 (remote_filesystem_is_local, remote_can_execute_reverse)
1518 (remote_supports_non_stop, remote_supports_disable_randomization)
1519 (remote_supports_multi_process, remote_supports_cond_breakpoints)
1520 (remote_supports_enable_disable_tracepoint)
1521 (remote_supports_string_tracing)
1522 (remote_can_run_breakpoint_commands, remote_trace_init)
1523 (remote_download_tracepoint, remote_can_download_tracepoint)
1524 (remote_download_trace_state_variable, remote_enable_tracepoint)
1525 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1526 (remote_trace_start, remote_get_trace_status)
1527 (remote_get_tracepoint_status, remote_trace_stop)
1528 (remote_trace_find, remote_get_trace_state_variable_value)
1529 (remote_save_trace_data, remote_get_raw_trace_data)
1530 (remote_set_disconnected_tracing, remote_core_of_thread)
1531 (remote_set_circular_trace_buffer, remote_traceframe_info)
1532 (remote_get_min_fast_tracepoint_insn_len)
1533 (remote_set_trace_buffer_size, remote_set_trace_notes)
1534 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1535 (remote_disable_btrace, remote_teardown_btrace)
1536 (remote_read_btrace, remote_btrace_conf)
1537 (remote_augmented_libraries_svr4_read, remote_load)
1538 (remote_pid_to_exec_file, remote_can_do_single_step)
1539 (remote_execution_direction, remote_thread_handle_to_thread_info):
1540 Refactor as methods of remote_target.
1541 (init_remote_ops, init_extended_remote_ops): Delete.
1542 (remote_can_async_p, remote_is_async_p, remote_async)
1543 (remote_thread_events, remote_upload_tracepoints)
1544 (remote_upload_trace_state_variables): Refactor as methods of
1546 (_initialize_remote): Remove references to init_remote_ops and
1547 init_extended_remote_ops.
1549 * remote-sim.c (gdbsim_target): New class.
1550 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1551 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1552 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1553 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1554 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1555 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1556 Refactor as methods of gdbsim_target.
1557 (gdbsim_ops): Now a gdbsim_target.
1558 (init_gdbsim_ops): Delete.
1559 (gdbsim_cntrl_c): Adjust.
1560 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1562 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1563 (the_amd64_linux_nat_target): New.
1564 (amd64_linux_fetch_inferior_registers)
1565 (amd64_linux_store_inferior_registers): Refactor as methods of
1566 amd64_linux_nat_target.
1567 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1568 * i386-linux-nat.c: Don't include "linux-nat.h".
1569 (i386_linux_nat_target): New class.
1570 (the_i386_linux_nat_target): New.
1571 (i386_linux_fetch_inferior_registers)
1572 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1573 as methods of i386_linux_nat_target.
1574 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1575 * inf-child.c (inf_child_ops): Delete.
1576 (inf_child_fetch_inferior_registers)
1577 (inf_child_store_inferior_registers): Delete.
1578 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1579 methods of inf_child_target.
1580 (inf_child_target::supports_terminal_ours)
1581 (inf_child_target::terminal_init)
1582 (inf_child_target::terminal_inferior)
1583 (inf_child_target::terminal_ours_for_output)
1584 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1585 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1587 (inf_child_open, inf_child_disconnect, inf_child_close)
1588 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1589 (inf_child_post_startup_inferior, inf_child_can_run)
1590 (inf_child_pid_to_exec_file): Refactor as methods of
1592 (inf_child_follow_fork): Delete.
1593 (inf_child_target::can_create_inferior)
1594 (inf_child_target::can_attach): New.
1595 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1596 (inf_child_target::has_stack, inf_child_target::has_registers)
1597 (inf_child_target::has_execution): New.
1598 (inf_child_fileio_open, inf_child_fileio_pwrite)
1599 (inf_child_fileio_pread, inf_child_fileio_fstat)
1600 (inf_child_fileio_close, inf_child_fileio_unlink)
1601 (inf_child_fileio_readlink, inf_child_use_agent)
1602 (inf_child_can_use_agent): Refactor as methods of
1604 (return_zero, inf_child_target): Delete.
1605 (inf_child_target::inf_child_target): New.
1606 * inf-child.h: Include "target.h".
1607 (inf_child_target): Delete function prototype.
1608 (inf_child_target): New class.
1609 (inf_child_open_target, inf_child_mourn_inferior)
1610 (inf_child_maybe_unpush_target): Delete.
1611 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1612 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1613 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1614 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1615 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1616 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1617 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1618 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1619 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1620 methods of inf_ptrace_target.
1621 (inf_ptrace_target): Delete function.
1622 * inf-ptrace.h: Include "inf-child.h".
1623 (inf_ptrace_target): Delete function declaration.
1624 (inf_ptrace_target): New class.
1625 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1626 * linux-nat.c (linux_target): New.
1627 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1628 (linux_nat_target::~linux_nat_target): New.
1629 (linux_child_post_attach, linux_child_post_startup_inferior)
1630 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1631 (linux_child_remove_fork_catchpoint)
1632 (linux_child_insert_vfork_catchpoint)
1633 (linux_child_remove_vfork_catchpoint)
1634 (linux_child_insert_exec_catchpoint)
1635 (linux_child_remove_exec_catchpoint)
1636 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1637 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1638 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1639 (linux_nat_stopped_data_address)
1640 (linux_nat_stopped_by_sw_breakpoint)
1641 (linux_nat_supports_stopped_by_sw_breakpoint)
1642 (linux_nat_stopped_by_hw_breakpoint)
1643 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1644 (linux_nat_kill, linux_nat_mourn_inferior)
1645 (linux_nat_xfer_partial, linux_nat_thread_alive)
1646 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1647 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1648 (linux_child_static_tracepoint_markers_by_strid)
1649 (linux_nat_is_async_p, linux_nat_can_async_p)
1650 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1651 (linux_nat_supports_multi_process)
1652 (linux_nat_supports_disable_randomization, linux_nat_async)
1653 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1654 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1655 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1656 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1657 methods of linux_nat_target.
1658 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1659 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1661 (check_stopped_by_watchpoint): Adjust.
1662 (linux_xfer_partial): Delete.
1663 (linux_target_install_ops, linux_target, linux_nat_add_target):
1665 (linux_nat_target::linux_nat_target): New.
1666 * linux-nat.h: Include "inf-ptrace.h".
1667 (linux_nat_target): New.
1668 (linux_target, linux_target_install_ops, linux_nat_add_target):
1669 Delete function declarations.
1670 (linux_target): Declare global.
1671 * linux-thread-db.c (thread_db_target): New.
1672 (thread_db_target::thread_db_target): New.
1673 (thread_db_ops): Delete.
1674 (the_thread_db_target): New.
1675 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1676 (thread_db_update_thread_list, thread_db_pid_to_str)
1677 (thread_db_extra_thread_info)
1678 (thread_db_thread_handle_to_thread_info)
1679 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1680 (thread_db_resume): Refactor as methods of thread_db_target.
1681 (init_thread_db_ops): Delete.
1682 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1683 * x86-linux-nat.c: Don't include "linux-nat.h".
1684 (super_post_startup_inferior): Delete.
1685 (x86_linux_nat_target::~x86_linux_nat_target): New.
1686 (x86_linux_child_post_startup_inferior)
1687 (x86_linux_read_description, x86_linux_enable_btrace)
1688 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1689 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1690 methods of x86_linux_nat_target.
1691 (x86_linux_create_target): Delete. Bits folded ...
1692 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1694 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1695 (x86_linux_nat_target): New class.
1696 (x86_linux_create_target): Delete.
1697 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1698 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1699 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1700 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1701 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1702 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1704 (x86_use_watchpoints): Delete.
1705 * x86-nat.h: Include "breakpoint.h" and "target.h".
1706 (x86_use_watchpoints): Delete.
1707 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1708 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1709 (x86_insert_watchpoint, x86_remove_watchpoint)
1710 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1711 (x86_stopped_by_hw_breakpoint): New declarations.
1712 (x86_nat_target): New template class.
1714 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1715 (the_ppc_linux_nat_target): New.
1716 (ppc_linux_fetch_inferior_registers)
1717 (ppc_linux_can_use_hw_breakpoint)
1718 (ppc_linux_region_ok_for_hw_watchpoint)
1719 (ppc_linux_ranged_break_num_registers)
1720 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1721 (ppc_linux_insert_mask_watchpoint)
1722 (ppc_linux_remove_mask_watchpoint)
1723 (ppc_linux_can_accel_watchpoint_condition)
1724 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1725 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1726 (ppc_linux_watchpoint_addr_within_range)
1727 (ppc_linux_masked_watch_num_registers)
1728 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1729 (ppc_linux_read_description): Refactor as methods of
1730 ppc_linux_nat_target.
1731 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1733 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1734 (procfs_target): New class.
1735 (the_procfs_target): New.
1736 (procfs_target): Delete function.
1737 (procfs_auxv_parse, procfs_attach, procfs_detach)
1738 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1739 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1740 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1741 (procfs_create_inferior, procfs_update_thread_list)
1742 (procfs_thread_alive, procfs_pid_to_str)
1743 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1744 (procfs_stopped_data_address, procfs_insert_watchpoint)
1745 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1746 (proc_find_memory_regions, procfs_info_proc)
1747 (procfs_make_note_section): Refactor as methods of procfs_target.
1748 (_initialize_procfs): Adjust.
1749 * sol-thread.c (sol_thread_target): New class.
1750 (sol_thread_ops): Now a sol_thread_target.
1751 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1752 (sol_thread_fetch_registers, sol_thread_store_registers)
1753 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1754 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1755 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1756 (init_sol_thread_ops): Delete.
1757 (_initialize_sol_thread): Adjust. Remove references to
1758 init_sol_thread_ops and complete_target_initialization.
1760 * windows-nat.c (windows_nat_target): New class.
1761 (windows_fetch_inferior_registers)
1762 (windows_store_inferior_registers, windows_resume, windows_wait)
1763 (windows_attach, windows_detach, windows_pid_to_exec_file)
1764 (windows_files_info, windows_create_inferior)
1765 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1766 (windows_close, windows_pid_to_str, windows_xfer_partial)
1767 (windows_get_tib_address, windows_get_ada_task_ptid)
1768 (windows_thread_name, windows_thread_alive): Refactor as
1769 windows_nat_target methods.
1770 (do_initial_windows_stuff): Adjust.
1771 (windows_target): Delete function.
1772 (_initialize_windows_nat): Adjust.
1774 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1775 (darwin_mourn_inferior, darwin_kill_inferior)
1776 (darwin_create_inferior, darwin_attach, darwin_detach)
1777 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1778 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1779 (darwin_supports_multi_process): Refactor as darwin_nat_target
1781 (darwin_resume_to, darwin_files_info): Delete.
1782 (_initialize_darwin_inferior): Rename to ...
1783 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1784 * darwin-nat.h: Include "inf-child.h".
1785 (darwin_nat_target): New class.
1786 (darwin_complete_target): Delete.
1787 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1788 (darwin_target): New.
1789 (i386_darwin_fetch_inferior_registers)
1790 (i386_darwin_store_inferior_registers): Refactor as methods of
1792 (darwin_complete_target): Delete, with ...
1793 (_initialize_i386_darwin_nat): ... bits factored out here.
1795 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1796 (the_alpha_linux_nat_target): New.
1797 (alpha_linux_register_u_offset): Refactor as
1798 alpha_linux_nat_target method.
1799 (_initialize_alpha_linux_nat): Adjust.
1800 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1801 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1802 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1803 methods of linux_nat_trad_target.
1804 (linux_trad_target): Delete.
1805 * linux-nat-trad.h (linux_trad_target): Delete function.
1806 (linux_nat_trad_target): New class.
1807 * mips-linux-nat.c (mips_linux_nat_target): New class.
1808 (super_fetch_registers, super_store_registers, super_close):
1810 (the_mips_linux_nat_target): New.
1811 (mips64_linux_regsets_fetch_registers)
1812 (mips64_linux_regsets_store_registers)
1813 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1814 (mips_linux_register_u_offset, mips_linux_read_description)
1815 (mips_linux_can_use_hw_breakpoint)
1816 (mips_linux_stopped_by_watchpoint)
1817 (mips_linux_stopped_data_address)
1818 (mips_linux_region_ok_for_hw_watchpoint)
1819 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1820 (mips_linux_close): Refactor as methods of mips_linux_nat.
1821 (_initialize_mips_linux_nat): Adjust to C++ification.
1823 * aix-thread.c (aix_thread_target): New class.
1824 (aix_thread_ops): Now an aix_thread_target.
1825 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1826 (aix_thread_fetch_registers, aix_thread_store_registers)
1827 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1828 (aix_thread_thread_alive, aix_thread_pid_to_str)
1829 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1830 Refactor as methods of aix_thread_target.
1831 (init_aix_thread_ops): Delete.
1832 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1833 and complete_target_initialization.
1834 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1835 (rs6000_nat_target): New class.
1836 (the_rs6000_nat_target): New.
1837 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1838 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1839 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1840 (super_create_inferior): Delete.
1841 (_initialize_rs6000_nat): Adjust to C++ification.
1843 * arm-linux-nat.c (arm_linux_nat_target): New class.
1844 (the_arm_linux_nat_target): New.
1845 (arm_linux_fetch_inferior_registers)
1846 (arm_linux_store_inferior_registers, arm_linux_read_description)
1847 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1848 (arm_linux_remove_hw_breakpoint)
1849 (arm_linux_region_ok_for_hw_watchpoint)
1850 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1851 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1852 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1853 arm_linux_nat_target.
1854 (_initialize_arm_linux_nat): Adjust to C++ification.
1856 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1857 (the_aarch64_linux_nat_target): New.
1858 (aarch64_linux_fetch_inferior_registers)
1859 (aarch64_linux_store_inferior_registers)
1860 (aarch64_linux_child_post_startup_inferior)
1861 (aarch64_linux_read_description)
1862 (aarch64_linux_can_use_hw_breakpoint)
1863 (aarch64_linux_insert_hw_breakpoint)
1864 (aarch64_linux_remove_hw_breakpoint)
1865 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1866 (aarch64_linux_region_ok_for_hw_watchpoint)
1867 (aarch64_linux_stopped_data_address)
1868 (aarch64_linux_stopped_by_watchpoint)
1869 (aarch64_linux_watchpoint_addr_within_range)
1870 (aarch64_linux_can_do_single_step): Refactor as methods of
1871 aarch64_linux_nat_target.
1872 (super_post_startup_inferior): Delete.
1873 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1875 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1876 (the_hppa_linux_nat_target): New.
1877 (hppa_linux_fetch_inferior_registers)
1878 (hppa_linux_store_inferior_registers): Refactor as methods of
1879 hppa_linux_nat_target.
1880 (_initialize_hppa_linux_nat): Adjust to C++ification.
1882 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1883 (the_ia64_linux_nat_target): New.
1884 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1885 (ia64_linux_stopped_data_address)
1886 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1887 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1888 ia64_linux_nat_target methods.
1889 (super_xfer_partial): Delete.
1890 (_initialize_ia64_linux_nat): Adjust to C++ification.
1892 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1893 (the_m32r_linux_nat_target): New.
1894 (m32r_linux_fetch_inferior_registers)
1895 (m32r_linux_store_inferior_registers): Refactor as
1896 m32r_linux_nat_target methods.
1897 (_initialize_m32r_linux_nat): Adjust to C++ification.
1899 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1900 (the_m68k_linux_nat_target): New.
1901 (m68k_linux_fetch_inferior_registers)
1902 (m68k_linux_store_inferior_registers): Refactor as
1903 m68k_linux_nat_target methods.
1904 (_initialize_m68k_linux_nat): Adjust to C++ification.
1906 * s390-linux-nat.c (s390_linux_nat_target): New class.
1907 (the_s390_linux_nat_target): New.
1908 (s390_linux_fetch_inferior_registers)
1909 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1910 (s390_insert_watchpoint, s390_remove_watchpoint)
1911 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1912 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1913 (s390_auxv_parse, s390_read_description): Refactor as methods of
1914 s390_linux_nat_target.
1915 (_initialize_s390_nat): Adjust to C++ification.
1917 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1918 (the_sparc_linux_nat_target): New.
1919 (_initialize_sparc_linux_nat): Adjust to C++ification.
1920 * sparc-nat.c (sparc_fetch_inferior_registers)
1921 (sparc_store_inferior_registers): Remove target_ops parameter.
1922 * sparc-nat.h (sparc_fetch_inferior_registers)
1923 (sparc_store_inferior_registers): Remove target_ops parameter.
1924 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1925 (the_sparc64_linux_nat_target): New.
1926 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1928 * spu-linux-nat.c (spu_linux_nat_target): New class.
1929 (the_spu_linux_nat_target): New.
1930 (spu_child_post_startup_inferior, spu_child_post_attach)
1931 (spu_child_wait, spu_fetch_inferior_registers)
1932 (spu_store_inferior_registers, spu_xfer_partial)
1933 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1935 (_initialize_spu_nat): Adjust to C++ification.
1937 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1938 (the_tilegx_linux_nat_target): New.
1939 (fetch_inferior_registers, store_inferior_registers):
1940 Refactor as methods.
1941 (_initialize_tile_linux_nat): Adjust to C++ification.
1943 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1944 (the_xtensa_linux_nat_target): New.
1945 (xtensa_linux_fetch_inferior_registers)
1946 (xtensa_linux_store_inferior_registers): Refactor as
1947 xtensa_linux_nat_target methods.
1948 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1950 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1951 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1952 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1953 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1954 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1955 (fbsd_stopped_by_sw_breakpoint)
1956 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1957 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1958 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1959 (fbsd_post_startup_inferior, fbsd_post_attach)
1960 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1961 (fbsd_set_syscall_catchpoint)
1962 (super_xfer_partial, super_resume, super_wait)
1963 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1964 (fbsd_handle_debug_trap): Remove target_ops parameter.
1965 (fbsd_nat_add_target): Delete.
1966 * fbsd-nat.h: Include "inf-ptrace.h".
1967 (fbsd_nat_add_target): Delete.
1968 (USE_SIGTRAP_SIGINFO): Define.
1969 (fbsd_nat_target): New class.
1971 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1972 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1973 (amd64bsd_target): Delete.
1974 * amd64-bsd-nat.h: New file.
1975 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1977 (amd64_fbsd_nat_target): New class.
1978 (the_amd64_fbsd_nat_target): New.
1979 (amd64fbsd_read_description): Refactor as method of
1980 amd64_fbsd_nat_target.
1981 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1982 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1983 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1984 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1985 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1986 (i386bsd_target): Delete.
1987 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1988 (i386bsd_fetch_inferior_registers)
1989 (i386bsd_store_inferior_registers): Declare.
1990 (i386_bsd_nat_target): New class.
1991 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1992 (the_i386_fbsd_nat_target): New.
1993 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1994 i386_fbsd_nat_target methods.
1995 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1996 (_initialize_i386fbsd_nat): Adjust to C++ification.
1997 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1998 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1999 (_initialize_x86_bsd_nat): Adjust to C++ification.
2000 * x86-bsd-nat.h: Include "x86-nat.h".
2001 (x86bsd_target): Delete declaration.
2002 (x86bsd_nat_target): New class.
2004 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2005 (the_aarch64_fbsd_nat_target): New.
2006 (aarch64_fbsd_fetch_inferior_registers)
2007 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2008 aarch64_fbsd_nat_target.
2009 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2010 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2011 (the_alpha_bsd_nat_target): New.
2012 (alphabsd_fetch_inferior_registers)
2013 (alphabsd_store_inferior_registers): Refactor as
2014 alpha_bsd_nat_target methods.
2015 (_initialize_alphabsd_nat): Refactor as methods of
2016 alpha_bsd_nat_target.
2017 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2018 (the_amd64_nbsd_nat_target): New.
2019 (_initialize_amd64nbsd_nat): Adjust to C++ification.
2020 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2021 (the_amd64_obsd_nat_target): New.
2022 (_initialize_amd64obsd_nat): Adjust to C++ification.
2023 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2024 (the_arm_fbsd_nat_target): New.
2025 (arm_fbsd_fetch_inferior_registers)
2026 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2027 (_initialize_arm_fbsd_nat): Refactor as methods of
2028 arm_fbsd_nat_target.
2029 (_initialize_arm_fbsd_nat): Adjust to C++ification.
2030 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2031 (the_arm_netbsd_nat_target): New.
2032 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2033 arm_netbsd_nat_target.
2034 (_initialize_arm_netbsd_nat): Adjust to C++ification.
2035 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2036 (the_hppa_nbsd_nat_target): New.
2037 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2038 hppa_nbsd_nat_target methods.
2039 (_initialize_hppanbsd_nat): Adjust to C++ification.
2040 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2041 (the_hppa_obsd_nat_target): New.
2042 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2043 methods of hppa_obsd_nat_target.
2044 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
2046 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2047 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
2049 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2050 (_initialize_i386obsd_nat): Use add_target.
2051 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2052 (the_m68k_bsd_nat_target): New.
2053 (m68kbsd_fetch_inferior_registers)
2054 (m68kbsd_store_inferior_registers): Refactor as methods of
2055 m68k_bsd_nat_target.
2056 (_initialize_m68kbsd_nat): Adjust to C++ification.
2057 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2058 (the_mips_fbsd_nat_target): New.
2059 (mips_fbsd_fetch_inferior_registers)
2060 (mips_fbsd_store_inferior_registers): Refactor as methods of
2061 mips_fbsd_nat_target.
2062 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
2064 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2065 (the_mips_nbsd_nat_target): New.
2066 (mipsnbsd_fetch_inferior_registers)
2067 (mipsnbsd_store_inferior_registers): Refactor as methods of
2068 mips_nbsd_nat_target.
2069 (_initialize_mipsnbsd_nat): Adjust to C++ification.
2070 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2071 (the_mips64_obsd_nat_target): New.
2072 (mips64obsd_fetch_inferior_registers)
2073 (mips64obsd_store_inferior_registers): Refactor as methods of
2074 mips64_obsd_nat_target.
2075 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
2077 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2079 * nbsd-nat.h: Include "inf-ptrace.h".
2080 (nbsd_nat_target): New class.
2081 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2082 (obsd_wait): Refactor as methods of obsd_nat_target.
2083 (obsd_add_target): Delete.
2084 * obsd-nat.h: Include "inf-ptrace.h".
2085 (obsd_nat_target): New class.
2086 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2087 (the_ppc_fbsd_nat_target): New.
2088 (ppcfbsd_fetch_inferior_registers)
2089 (ppcfbsd_store_inferior_registers): Refactor as methods of
2090 ppc_fbsd_nat_target.
2091 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
2093 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
2094 (the_ppc_nbsd_nat_target): New.
2095 (ppcnbsd_fetch_inferior_registers)
2096 (ppcnbsd_store_inferior_registers): Refactor as methods of
2097 ppc_nbsd_nat_target.
2098 (_initialize_ppcnbsd_nat): Adjust to C++ification.
2099 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
2100 (the_ppc_obsd_nat_target): New.
2101 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
2102 methods of ppc_obsd_nat_target.
2103 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
2105 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
2106 (the_sh_nbsd_nat_target): New.
2107 (shnbsd_fetch_inferior_registers)
2108 (shnbsd_store_inferior_registers): Refactor as methods of
2110 (_initialize_shnbsd_nat): Adjust to C++ification.
2111 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
2112 (inf_ptrace_xfer_partial): Delete.
2113 (sparc_xfer_partial, sparc_target): Delete.
2114 * sparc-nat.h (sparc_fetch_inferior_registers)
2115 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
2116 (sparc_target): Delete function declaration.
2117 (sparc_target): New template class.
2118 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
2119 (_initialize_sparcnbsd_nat): Adjust to C++ification.
2120 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
2121 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
2123 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2124 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2125 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2126 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
2128 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2129 (the_vax_bsd_nat_target): New.
2130 (vaxbsd_fetch_inferior_registers)
2131 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2133 (_initialize_vaxbsd_nat): Adjust to C++ification.
2135 * bsd-kvm.c (bsd_kvm_target): New class.
2136 (bsd_kvm_ops): Now a bsd_kvm_target.
2137 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2138 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2139 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
2141 (bsd_kvm_return_one): Delete.
2142 (bsd_kvm_add_target): Adjust to C++ification.
2144 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
2145 (nto_procfs_target_procfs): New classes.
2146 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
2147 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
2148 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
2149 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
2150 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
2151 (procfs_remove_hw_breakpoint, procfs_resume)
2152 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
2153 (procfs_kill_inferior, procfs_store_registers)
2154 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
2155 as methods of nto_procfs_target.
2156 (nto_procfs_ops): Now an nto_procfs_target_procfs.
2157 (nto_native_ops): Delete.
2158 (procfs_open, procfs_native_open): Delete.
2159 (nto_native_ops): Now an nto_procfs_target_native.
2160 (init_procfs_targets): Adjust to C++ification.
2161 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
2162 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
2163 Refactor as methods of nto_procfs_target.
2165 * go32-nat.c (go32_nat_target): New class.
2166 (the_go32_nat_target): New.
2167 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
2168 (go32_store_registers, go32_xfer_partial, go32_files_info)
2169 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
2170 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
2171 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
2172 (go32_pid_to_str): Refactor as methods of go32_nat_target.
2173 (go32_target): Delete.
2174 (_initialize_go32_nat): Adjust to C++ification.
2176 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
2177 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
2178 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
2179 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
2181 (gnu_target): Delete.
2182 * gnu-nat.h (gnu_target): Delete.
2183 (gnu_nat_target): New class.
2184 * i386-gnu-nat.c (gnu_base_target): New.
2185 (i386_gnu_nat_target): New class.
2186 (the_i386_gnu_nat_target): New.
2187 (_initialize_i386gnu_nat): Adjust to C++ification.
2189 2018-05-02 Pedro Alves <palves@redhat.com>
2191 * bfd-target.c (target_bfd_xclose): Rename to ...
2192 (target_bfd_close): ... this.
2193 (target_bfd_reopen): Adjust.
2194 * target.c (target_close): Remove references to to_xclose.
2195 * target.h (target_ops::to_xclose): Delete.
2196 (target_ops::to_close): Update comments.
2198 2018-05-02 Pedro Alves <palves@redhat.com>
2200 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
2202 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
2203 * inf-ptrace.c (inf_ptrace_register_u_offset)
2204 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2205 (inf_ptrace_store_register, inf_ptrace_store_registers)
2206 (inf_ptrace_trad_target): Move to ...
2207 * linux-nat-trad.c: ... this new file.
2208 * linux-nat-trad.h: New file.
2209 * linux-nat.c (linux_target_install_ops): Make extern.
2210 (linux_trad_target): Delete.
2211 * linux-nat.h (linux_trad_target): Delete declaration.
2212 (linux_target_install_ops): Declare.
2213 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
2216 2018-05-02 Pedro Alves <palves@redhat.com>
2218 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2219 procfs_target/add_target here.
2220 * procfs.c (procfs_target): Make static.
2221 (_initialize_procfs): Call add_target here.
2222 * procfs.h (struct target_ops): Remove forward declaration.
2223 (procfs_target): Remove declaration.
2224 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
2226 2018-05-02 Pedro Alves <palves@redhat.com>
2228 * procfs.c (procfs_stopped_by_watchpoint)
2229 (procfs_insert_watchpoint, procfs_remove_watchpoint)
2230 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
2232 (procfs_use_watchpoints): Delete, move contents...
2233 (procfs_target): ... here.
2234 * procfs.h (procfs_use_watchpoints): Delete declaration.
2235 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2236 procfs_use_watchpoints.
2237 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
2238 procfs_use_watchpoints.
2240 2018-05-02 Tom Tromey <tom@tromey.com>
2243 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
2244 and var_zuinteger_unlimited.
2245 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
2246 and PARAM_ZUINTEGER_UNLIMITED.
2247 (set_parameter_value): Handle var_zuinteger and
2248 var_zuinteger_unlimited.
2249 (add_setshow_generic): Likewise.
2250 (parmpy_init): Likewise.
2252 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
2255 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
2256 pointer is not null before dereferencing it.
2258 2018-04-30 Tom Tromey <tom@tromey.com>
2260 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
2263 2018-04-30 Tom Tromey <tom@tromey.com>
2265 * breakpoint.c (mention): Remove use of is_mi_like_p.
2266 (print_mention_ranged_breakpoint): Likewise.
2267 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
2270 2018-04-30 Tom Tromey <tom@tromey.com>
2272 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
2274 2018-04-30 Tom Tromey <tom@tromey.com>
2276 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
2277 (info_spu_event_command): Remove some uses of is_mi_like_p.
2279 2018-04-30 Tom Tromey <tom@tromey.com>
2281 * python/py-framefilter.c (py_print_single_arg)
2282 (enumerate_locals, py_print_args, py_print_frame): Remove some
2283 uses of is_mi_like_p.
2285 2018-04-30 Tom Tromey <tom@tromey.com>
2288 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
2289 * ui-out.h (ui_out::is_mi_like_p): Now const.
2290 (ui_out::do_is_mi_like_p): Now const.
2291 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
2293 2018-04-30 Tom Tromey <tom@tromey.com>
2295 * varobj.c (varobj_set_visualizer): Use new_reference.
2296 * python/python.c (gdbpy_decode_line): Use new_reference.
2297 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
2300 2018-04-30 Tom Tromey <tom@tromey.com>
2302 * varobj.c (install_new_value): Use new_reference.
2303 * value.h (value_incref): Return void. Swap intro comment with
2305 * value.c (set_value_parent): Use new_reference.
2306 (value_incref): Return void. Update intro comment.
2307 (release_value): Use new_reference.
2308 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
2310 2018-04-30 Tom Tromey <tom@tromey.com>
2312 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
2313 * gdb_bfd.h (new_bfd_ref): Remove.
2314 (gdb_bfd_open): Update comment.
2315 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2316 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
2317 (gdb_bfd_fdopenr): Use new_reference.
2318 * exec.c (exec_file_attach): Use new_reference.
2320 2018-04-30 Tom Tromey <tom@tromey.com>
2322 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
2325 2018-04-30 Tom Tromey <tom@tromey.com>
2327 * jit.c (jit_read_code_entry): Use type_align.
2328 * i386-tdep.c (i386_gdbarch_init): Don't call
2329 set_gdbarch_long_long_align_bit.
2330 * gdbarch.sh: Remove long_long_align_bit.
2331 * gdbarch.c, gdbarch.h: Rebuild.
2332 * arc-tdep.c (arc_type_align): New function.
2333 (arc_gdbarch_init): Use arc_type_align. Don't call
2334 set_gdbarch_long_long_align_bit.
2336 2018-04-30 Tom Tromey <tom@tromey.com>
2338 * rust-lang.c (rust_type_alignment): Remove.
2339 (rust_composite_type): Use type_align.
2341 2018-04-30 Tom Tromey <tom@tromey.com>
2343 * NEWS: Mention Type.align.
2344 * python/py-type.c (typy_get_alignof): New function.
2345 (type_object_getset): Add "alignof".
2347 2018-04-30 Tom Tromey <tom@tromey.com>
2351 * std-operator.def (UNOP_ALIGNOF): New operator.
2352 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
2354 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
2355 * c-lang.c (c_op_print_tab): Add alignof.
2356 * c-exp.y (ALIGNOF): New token.
2357 (exp): Add "ALIGNOF" production.
2358 (ident_tokens): Add _Alignof and alignof.
2360 2018-04-30 Tom Tromey <tom@tromey.com>
2362 * i386-tdep.c (i386_type_align): New function.
2363 (i386_gdbarch_init): Update.
2364 * gdbarch.sh (type_align): New method.
2365 * gdbarch.c, gdbarch.h: Rebuild.
2366 * arch-utils.h (default_type_align): Declare.
2367 * arch-utils.c (default_type_align): New function.
2368 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
2369 (struct type) <align_log2>: New field.
2370 <instance_flags>: Now a bitfield.
2371 (TYPE_RAW_ALIGN): New macro.
2372 (type_align, type_raw_align, set_type_align): Declare.
2373 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
2375 * dwarf2read.c (quirk_rust_enum): Set type alignment.
2376 (get_alignment, maybe_set_alignment): New functions.
2377 (read_structure_type, read_enumeration_type, read_array_type)
2378 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
2379 (read_subrange_type, read_base_type): Set type alignment.
2381 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
2383 * dwarf2read.c (read_index_from_section): Use bool.
2385 2018-04-29 Fabian Groffen <grobian@gentoo.org>
2388 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
2391 2018-04-29 John Reiser <jreiser@BitWagon.com>
2394 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
2395 last step, and do it atomically.
2397 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
2399 * compile/compile-c-types.c (convert_int, convert_float):
2402 2018-04-27 Tom Tromey <tom@tromey.com>
2405 * rust-lang.c (rust_inclusive_range_type_p): New function.
2406 (rust_range): Handle inclusive ranges.
2407 (rust_compute_range): Likewise.
2408 * rust-exp.y (struct rust_op) <inclusive>: New field.
2409 (DOTDOTEQ): New constant.
2410 (range_expr): Add "..=" productions.
2411 (operator_tokens): Add "..=" token.
2412 (ast_range): Add "inclusive" parameter.
2413 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
2415 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
2417 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
2418 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
2420 * expprint.c (print_subexp_standard): Handle new bounds values.
2421 (dump_subexp_body_standard): Likewise.
2423 2018-04-27 Tom Tromey <tom@tromey.com>
2425 * configure: Rebuild.
2426 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
2427 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
2429 (class symbol_needs_eval_context): Likewise.
2430 * dwarf2read.c (mock_mapped_index::symbol_name_count)
2431 (mock_mapped_index::symbol_name_at): Use "override". Remove
2433 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
2435 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
2436 * aarch64-tdep.c (instruction_reader::read): Use "override".
2437 (instruction_reader_test::read): Likewise.
2438 * arm-tdep.c (instruction_reader::read): Use "override".
2439 (instruction_reader_thumb::read): Likewise.
2441 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2444 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
2445 instead of remote_send.
2446 (remote_send): Remove.
2448 2018-04-26 Pedro Alves <palves@redhat.com>
2450 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
2451 find_function_start_sal instead of find_pc_line.
2453 2018-04-26 Pedro Alves <palves@redhat.com>
2455 * breakpoint.c (set_breakpoint_location_function): Handle
2457 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
2458 * elfread.c (elf_symtab_read): Give data symbols with
2459 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
2460 (elf_rel_plt_read): Update comment.
2461 * linespec.c (convert_linespec_to_sals): Handle
2463 (minsym_found): Handle mst_data_gnu_ifunc.
2464 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
2465 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
2466 * parse.c (find_minsym_type_and_address): Handle
2468 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
2469 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
2470 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
2472 <mst_data_gnu_ifunc>: New enumerator.
2474 2018-04-26 Pedro Alves <palves@redhat.com>
2476 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
2477 (lookup_minimal_symbol_by_pc_section): ... this. Replace
2478 'want_trampoline' parameter by a lookup_msym_prefer parameter.
2480 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
2481 (lookup_minimal_symbol_by_pc): Adjust.
2482 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2483 (lookup_solib_trampoline_symbol_by_pc): Adjust.
2484 * minsyms.h (lookup_msym_prefer): New enum.
2485 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2486 parameter by a lookup_msym_prefer parameter.
2488 2018-04-26 Pedro Alves <palves@redhat.com>
2490 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2491 ends in "@plt" instead of looking at the symbol's section.
2493 2018-04-26 Pedro Alves <palves@redhat.com>
2495 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
2497 (find_pc_partial_function_gnu_ifunc): Rename to ...
2498 (find_pc_partial_function): ... this, and remove references to
2500 (find_pc_partial_function): Delete old implementation.
2501 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2503 2018-04-26 Pedro Alves <palves@redhat.com>
2505 * linespec.c (struct bound_minimal_symbol_search_key): New.
2506 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
2507 skip first line if we found a GNU ifunc minimal symbol by name.
2508 (compare_msymbols): Change parameters to work with a destructured
2510 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2513 2018-04-26 Pedro Alves <palves@redhat.com>
2515 * breakpoint.c (set_breakpoint_location_function): Don't resolve
2516 ifunc targets here. Instead, if we have an ifunc minsym, use its
2518 (add_location_to_breakpoint): Store the minsym and the objfile in
2519 the breakpoint location.
2520 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2521 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2522 Record the minsym in the sal.
2523 * symtab.h (symtab_and_line) <msymbol>: New field.
2525 2018-04-26 Pedro Alves <palves@redhat.com>
2527 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2528 unless we actually resolved the ifunc.
2530 2018-04-26 Pedro Alves <palves@redhat.com>
2532 * c-exp.y (variable production): Prefer ifunc minsyms over
2533 regular function symbols.
2534 * symtab.c (find_gnu_ifunc): New function.
2535 * minsyms.h (lookup_msym_prefer): New enum.
2536 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2537 parameter by a lookup_msym_prefer parameter.
2538 * symtab.h (find_gnu_ifunc): New declaration.
2540 2018-04-26 Pedro Alves <palves@redhat.com>
2542 * blockframe.c (find_gnu_ifunc_target_type): New function.
2543 (find_function_type): New.
2544 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2545 return a value with a memory address.
2546 (eval_call): For calls to GNU ifunc functions, try to find the
2547 type of the target function from the type that the resolver
2549 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2551 * infcall.c (find_function_return_type): Delete.
2552 (find_function_addr): Add 'function_type' parameter. For calls to
2553 GNU ifunc functions, try to find the type of the target function
2554 from the type that the resolver returns, and return it via
2556 (call_function_by_hand_dummy): Adjust to use the function type
2557 returned by find_function_addr.
2558 (find_function_addr): Add 'function_type' parameter and move
2560 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2563 2018-04-26 Pedro Alves <palves@redhat.com>
2565 * c-exp.y (variable production): Skip finding an alias for ifunc
2568 2018-04-26 Pedro Alves <palves@redhat.com>
2570 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2572 2018-04-25 Pedro Alves <palves@redhat.com>
2574 * infcmd.c (kill_command): Print the pid as string, not the whole
2575 thread's ptid. Add comment. s/has been killed/killed/ in output
2577 * remote.c (remote_detach_1): Print the pid as string, not the
2578 whole thread's ptid.
2580 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2581 Sergio Durigan Junior <sergiodj@redhat.com>
2582 Pedro Alves <palves@redhat.com>
2584 * infcmd.c (kill_command): Print message when inferior has
2586 * inferior.c (print_inferior_events): Remove 'static'. Set as
2588 (add_inferior): Improve message printed when
2589 'print_inferior_events' is on.
2590 (exit_inferior): Remove message printed when
2591 'print_inferior_events' is on.
2592 (detach_inferior): Improve message printed when
2593 'print_inferior_events' is on.
2594 (initialize_inferiors): Use 'add_inferior_silent' to set
2595 'current_inferior_'.
2596 * inferior.h (print_inferior_events): Declare here as
2598 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2599 '[Detaching...]' messages when 'print_inferior_events' is on.
2600 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2601 as prefix/suffix for messages. Remove periods. Fix erroneous
2602 'Detaching after fork from child...', replace it by '... from
2604 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2605 prefix/suffix when printing 'Detaching...' messages. Print
2606 them when 'print_inferior_events' is on.
2607 * remote.c (remote_detach_1): Print message when detaching
2608 from inferior and '!is_fork_parent'.
2610 2018-04-24 Tom Tromey <tom@tromey.com>
2612 * cli-out.h: Reindent.
2614 2018-04-24 Tom Tromey <tom@tromey.com>
2616 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2617 (cli_ui_out::do_field_string): Use fputs_filtered.
2618 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2620 2018-04-23 Tom Tromey <tom@tromey.com>
2622 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2623 gdb::unique_xmalloc_ptr.
2625 2018-04-23 Tom Tromey <tom@tromey.com>
2627 * configure: Rebuild.
2629 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2632 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2633 prepare_for_testing. Set normal_bp to r_debug_state if target
2636 2018-04-21 Pedro Alves <palves@redhat.com>
2637 Rajendra SY <rajendra.sy@gmail.com>
2639 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2640 * remote.c (extended_remote_attach): In all-stop mode, mark the
2641 thread as executing.
2643 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2645 * thread.c (thread_apply_all_command): Fix comment.
2646 (thread_command): Fix comment.
2648 2018-04-10 Alan Hayward <alan.hayward@arm.com>
2650 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2652 * features/aarch64-core.c (create_feature_aarch64_core):
2654 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2656 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2658 * features/i386/32bit-avx512.c
2659 (create_feature_i386_32bit_avx512): Likewise.
2660 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2662 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2664 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2666 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2668 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2670 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2672 * features/i386/64bit-avx512.c
2673 (create_feature_i386_64bit_avx512): Likewise.
2674 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2676 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2678 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2680 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2682 * features/i386/64bit-segments.c
2683 (create_feature_i386_64bit_segments): Likewise.
2684 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2686 * features/i386/x32-core.c
2687 (create_feature_i386_x32_core): Likewise.
2688 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2689 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2690 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2691 * target-descriptions.c: In generated code, don't pass xml
2694 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2696 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2697 (print_xml_feature::visit_post): Likewise.
2698 (print_xml_feature::visit): Likewise.
2699 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2700 (print_xml_feature): Add new class.
2701 * regformats/regdat.sh: Null xmltarget on feature targets.
2702 * target-descriptions.c (struct target_desc): Add xmltarget.
2703 (maintenance_check_tdesc_xml_convert): Add unittest function.
2704 (tdesc_get_features_xml): Add function to get xml.
2705 (maintenance_check_xml_descriptions): Test xml generation.
2706 * xml-tdesc.c (string_read_description_xml): Add function.
2707 * xml-tdesc.h (string_read_description_xml): Add declaration.
2709 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2711 * features/Makefile: Add feature marker to targets with new style
2712 target descriptions.
2713 * regformats/aarch64.dat: Regenerate.
2714 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2715 * regformats/i386/amd64-avx-linux.dat: Likewise.
2716 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2717 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2718 * regformats/i386/amd64-linux.dat: Likewise.
2719 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2720 * regformats/i386/amd64.dat: Likewise.
2721 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2722 * regformats/i386/i386-avx-linux.dat: Likewise.
2723 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2724 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2725 * regformats/i386/i386-linux.dat: Likewise.
2726 * regformats/i386/i386-mmx-linux.dat: Likewise.
2727 * regformats/i386/i386-mpx-linux.dat: Likewise.
2728 * regformats/i386/i386.dat: Likewise.
2729 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2730 * regformats/i386/x32-avx-linux.dat: Likewise.
2731 * regformats/i386/x32-linux.dat: Likewise.
2732 * regformats/tic6x-c62x-linux.dat: Likewise.
2733 * regformats/tic6x-c64x-linux.dat: Likewise.
2734 * regformats/tic6x-c64xp-linux.dat: Likewise.
2735 * regformats/regdat.sh: Parse feature marker.
2737 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2739 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2740 (tdesc_osabi_name): Likewise.
2741 * target-descriptions.c (tdesc_architecture_name): Add new
2743 (tdesc_osabi_name): Likewise.
2745 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2747 * common/tdesc.c (tdesc_predefined_type): Move to here.
2748 (tdesc_named_type): Likewise.
2749 (tdesc_create_vector): Likewise.
2750 (tdesc_create_struct): Likewise.
2751 (tdesc_set_struct_size): Likewise.
2752 (tdesc_create_union): Likewise.
2753 (tdesc_create_flags): Likewise.
2754 (tdesc_create_enum): Likewise.
2755 (tdesc_add_field): Likewise.
2756 (tdesc_add_typed_bitfield): Likewise.
2757 (tdesc_add_bitfield): Likewise.
2758 (tdesc_add_flag): Likewise.
2759 (tdesc_add_enum_value): Likewise.
2760 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2761 (struct tdesc_type_vector): Likewise.
2762 (struct tdesc_type_field): Likewise.
2763 (struct tdesc_type_with_fields): Likewise.
2764 (tdesc_create_enum): Add declaration.
2765 (tdesc_add_typed_bitfield): Likewise.
2766 (tdesc_add_enum_value): Likewise.
2767 * target-descriptions.c (tdesc_type_field): Move from here.
2768 (tdesc_type_builtin): Likewise.
2769 (tdesc_type_vector): Likewise.
2770 (tdesc_type_with_fields): Likewise.
2771 (tdesc_predefined_types): Likewise.
2772 (tdesc_named_type): Likewise.
2773 (tdesc_create_vector): Likewise.
2774 (tdesc_create_struct): Likewise.
2775 (tdesc_set_struct_size): Likewise.
2776 (tdesc_create_union): Likewise.
2777 (tdesc_create_flags): Likewise.
2778 (tdesc_create_enum): Likewise.
2779 (tdesc_add_field): Likewise.
2780 (tdesc_add_typed_bitfield): Likewise.
2781 (tdesc_add_bitfield): Likewise.
2782 (tdesc_add_flag): Likewise.
2783 (tdesc_add_enum_value): Likewise.
2784 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2785 (tdesc_add_typed_bitfield): Likewise.
2786 (tdesc_add_enum_value): Likewise.
2788 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2790 * common/tdesc.c (tdesc_feature::accept): Move to here.
2791 (tdesc_feature::operator==): Likewise.
2792 (tdesc_create_reg): Likewise.
2793 * common/tdesc.h (tdesc_type_kind): Likewise.
2794 (struct tdesc_type): Likewise.
2795 (struct tdesc_feature): Likewise.
2796 * regformats/regdat.sh: Create a feature.
2797 * target-descriptions.c (tdesc_type_kind): Move from here.
2798 (tdesc_type): Likewise.
2799 (tdesc_type_up): Likewise.
2800 (tdesc_feature): Likewise.
2801 (tdesc_create_reg): Likewise.
2803 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2805 * Makefile.in: Add arch/tdesc.c
2806 * common/tdesc.c: New file.
2807 * common/tdesc.h (tdesc_element_visitor): Move to here.
2808 (tdesc_element): Likewise.
2809 (tdesc_reg): Likewise.
2810 (tdesc_reg_up): Likewise.
2811 * regformats/regdef.h (reg): Add offset to constructors.
2812 * target-descriptions.c (tdesc_element_visitor): Move from here.
2813 (tdesc_element): Likewise.
2814 (tdesc_reg): Likewise.
2815 (tdesc_reg_up): Likewise.
2817 2018-04-17 Tom Tromey <tom@tromey.com>
2819 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2822 2018-04-17 Tom Tromey <tom@tromey.com>
2824 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2826 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2828 * symtab.c (print_symbol_info): Skip printing filename and line
2829 number when `last' is NULL.
2830 (symtab_symbol_info): Use empty string instead of NULL for first
2831 invocation of print_symbol_info.
2832 (rbreak_command): Pass NULL to `last' parameter of
2835 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2837 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2840 2018-04-16 Pedro Alves <palves@redhat.com>
2842 * MAINTAINERS (sh): Remove.
2843 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2844 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2845 (ALLDEPFILES): Remove sh64-tdep.c.
2846 * NEWS: Mentions that support for SH-5/SH64 is removed.
2847 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2848 (sh*-*-openbsd*): Ditto.
2849 (sh64-*-elf*): Remove.
2851 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2852 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2853 * sh-tdep.c: No longer include "sh64-tdep.h".
2854 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2855 * sh64-tdep.c, sh64-tdep.h: Remove files.
2857 2018-04-16 Pedro Alves <palves@redhat.com>
2859 * MAINTAINERS: Remove m88k.
2860 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2861 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2862 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2863 * NEWS: Mention that support for m88k was removed.
2864 * configure.host (m88*-*-*): Remove support.
2865 * configure.nat (m88k-*-*): Remove support.
2866 * configure.tgt (m88*-*-openbsd*): Remove.
2867 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2869 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2871 * configure.tgt (x86_tobjs): New variable.
2872 (amd64_tobjs, i386_tobjs): Use it.
2874 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2876 * symtab.c (print_symbol_info): Precede the symbol definition by
2877 the line number when available.
2878 * NEWS: Advertise this enhancement.
2880 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2882 * NEWS (New options): announce set/show record btrace cpu.
2883 * btrace.c: Include record-btrace.h.
2884 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2885 the vendor is unknown.
2886 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2887 Maybe overwrite the btrace configuration's cpu.
2888 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2889 (btrace_fetch): Add cpu parameter. Update callers.
2890 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2891 Maybe overwrite the btrace configuration's cpu. Skip enabling
2892 errata workarounds if the vendor is unknown.
2893 * python/py-record-btrace.c: Include record-btrace.h.
2894 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2895 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2896 * record-btrace.c (record_btrace_cpu_state_kind): New.
2897 (record_btrace_cpu): New.
2898 (set_record_btrace_cpu_cmdlist): New.
2899 (record_btrace_get_cpu): New.
2900 (require_btrace_thread, record_btrace_info)
2901 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2902 (cmd_set_record_btrace_cpu_none): New.
2903 (cmd_set_record_btrace_cpu_auto): New.
2904 (cmd_set_record_btrace_cpu): New.
2905 (cmd_show_record_btrace_cpu): New.
2906 (_initialize_record_btrace): Initialize set/show record btrace cpu
2908 * record-btrace.h (record_btrace_get_cpu): New.
2910 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2912 * record.c (set_record_command): Fix typo in message.
2914 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2916 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2918 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2920 * infrun.c (process_event_stop_test): Call
2921 gdbarch_in_indirect_branch_thunk.
2922 * gdbarch.sh (in_indirect_branch_thunk): New.
2923 * gdbarch.c: Regenerated.
2924 * gdbarch.h: Regenerated.
2927 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2928 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2929 (ALLDEPFILES): Add x86-tdep.c.
2930 * arch-utils.h (default_in_indirect_branch_thunk): New.
2931 * arch-utils.c (default_in_indirect_branch_thunk): New.
2932 * i386-tdep: Include x86-tdep.h.
2933 (i386_in_indirect_branch_thunk): New.
2934 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2936 * amd64-tdep: Include x86-tdep.h.
2937 (amd64_in_indirect_branch_thunk): New.
2938 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2940 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2943 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2944 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2945 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2948 2018-04-12 Tom Tromey <tom@tromey.com>
2950 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2951 (rust_evaluate_subexp): Likewise.
2953 2018-04-12 Pedro Alves <palves@redhat.com>
2955 * procfs.c (procfs_detach): Make forward declaration's prototype
2956 match definition's protototype.
2957 (proc_get_LDT_entry): Remove stale do_cleanups call.
2959 2018-04-12 Pedro Alves <palves@redhat.com>
2961 * target.h (target_ops::to_has_exited): Delete.
2962 (target_has_exited): Delete.
2963 * target-delegates.c: Regenerate.
2965 2018-04-11 Pedro Alves <palves@redhat.com>
2967 * target.c (fileio_fh_t::t): Add comment.
2968 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2969 (target_fileio_close): Handle a NULL target.
2970 (invalidate_fileio_fh): New.
2971 (target_close): Call it.
2972 * remote.c (remote_hostio_send_command): No longer check whether
2973 remote_desc is open.
2975 2018-04-11 Pedro Alves <palves@redhat.com>
2977 * target.c (fileio_fh_t): Make it a named struct instead of a
2979 (fileio_fh_t::is_closed): New method.
2980 (DEF_VEC_O (fileio_fh_t)): Remove.
2981 (fileio_fhandles): Now a std::vector.
2982 (is_closed_fileio_fh): Delete.
2983 (acquire_fileio_fd): Adjust. Rename parameters.
2984 (release_fileio_fd): Adjust.
2985 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2986 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2987 (target_fileio_close): Adjust.
2989 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2991 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2994 2018-04-10 Pedro Alves <palves@redhat.com>
2996 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2997 (scoped_finish_thread_state): New class.
2998 * infcmd.c (run_command_1): Use it instead of finish_thread_state
3000 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3001 (fetch_inferior_event, normal_stop): Likewise.
3002 * thread.c (finish_thread_state_cleanup): Delete.
3004 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3005 Pedro Alves <palves@redhat.com>
3007 * value.c: Include "selftest.h" and "common/array-view.h".
3008 (struct range) <operator ==>: New.
3009 (test_ranges_contain): New.
3010 (check_ranges_vector): New.
3011 (test_insert_into_bit_range_vector): New.
3012 (_initialize_values): Register selftests.
3013 * common/array-view.h (operator==, operator!=): New.
3015 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3017 * common/gdb_vecs.h (unordered_remove): Add overload that takes
3019 * inline-frame.c: Include <algorithm>.
3020 (struct inline_state): Add constructor.
3021 (inline_state_s): Remove.
3022 (DEF_VEC_O(inline_state_s)): Remove.
3023 (inline_states): Change type to std::vector.
3024 (find_inline_frame_state): Adjust to std::vector.
3025 (allocate_inline_frame_state): Remove.
3026 (clear_inline_frame_state): Adjust to std::vector.
3027 (skip_inline_frames): Adjust to std::vector.
3029 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3031 * tracepoint.h (struct trace_state_variable): Add constructor.
3032 <name>: Change type to std::string.
3033 * tracepoint.c (tsv_s): Remove.
3034 (DEF_VEC_O(tsv_s)): Remove.
3035 (tvariables): Change to std::vector.
3036 (create_trace_state_variable): Adjust to std::vector.
3037 (find_trace_state_variable): Likewise.
3038 (find_trace_state_variable_by_number): Likewise.
3039 (delete_trace_state_variable): Likewise.
3040 (trace_variable_command): Adjust to std::string.
3041 (delete_trace_variable_command): Likewise.
3042 (tvariables_info_1): Adjust to std::vector.
3043 (save_trace_state_variables): Likewise.
3044 (start_tracing): Likewise.
3045 (merge_uploaded_trace_state_variables): Adjust to std::vector
3047 * target.h (struct target_ops)
3048 <to_download_trace_state_variable>: Pass reference to
3049 trace_state_variable.
3050 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3051 * target-delegates.c: Re-generate.
3052 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3053 (mi_tsv_deleted): Likewise.
3054 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3055 * remote.c (remote_download_trace_state_variable): Change
3056 pointer to reference and adjust.
3057 * make-target-delegates (parse_argtypes): Handle references.
3058 (write_function_header): Likewise.
3059 (munge_type): Likewise.
3061 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3063 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3064 string_view-selftests.c.
3065 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3067 * unittests/basic_string_view/cons/char/1.cc: Likewise.
3068 * unittests/basic_string_view/cons/char/2.cc: Likewise.
3069 * unittests/basic_string_view/cons/char/3.cc: Likewise.
3070 * unittests/basic_string_view/element_access/char/1.cc:
3072 * unittests/basic_string_view/element_access/char/empty.cc:
3074 * unittests/basic_string_view/element_access/char/front_back.cc:
3076 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3077 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3079 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3081 * unittests/basic_string_view/modifiers/swap/char/1.cc:
3083 * unittests/basic_string_view/operations/compare/char/1.cc:
3085 * unittests/basic_string_view/operations/compare/char/13650.cc:
3087 * unittests/basic_string_view/operations/copy/char/1.cc:
3089 * unittests/basic_string_view/operations/data/char/1.cc:
3091 * unittests/basic_string_view/operations/find/char/1.cc:
3093 * unittests/basic_string_view/operations/find/char/2.cc:
3095 * unittests/basic_string_view/operations/find/char/3.cc:
3097 * unittests/basic_string_view/operations/find/char/4.cc:
3099 * unittests/basic_string_view/operations/rfind/char/1.cc:
3101 * unittests/basic_string_view/operations/rfind/char/2.cc:
3103 * unittests/basic_string_view/operations/rfind/char/3.cc:
3105 * unittests/basic_string_view/operations/substr/char/1.cc:
3107 * unittests/basic_string_view/operators/char/2.cc: Likewise.
3108 * unittests/string_view-selftests.c: New file.
3110 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3112 * unittests/basic_string_view/capacity/1.cc: New file.
3113 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
3114 * unittests/basic_string_view/cons/char/1.cc: New file.
3115 * unittests/basic_string_view/cons/char/2.cc: New file.
3116 * unittests/basic_string_view/cons/char/3.cc: New file.
3117 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
3118 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
3119 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
3120 * unittests/basic_string_view/element_access/char/1.cc: New file.
3121 * unittests/basic_string_view/element_access/char/2.cc: New file.
3122 * unittests/basic_string_view/element_access/char/empty.cc: New file.
3123 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3124 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3125 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3126 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3127 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3128 * unittests/basic_string_view/include.cc: New file.
3129 * unittests/basic_string_view/inserters/char/1.cc: New file.
3130 * unittests/basic_string_view/inserters/char/2.cc: New file.
3131 * unittests/basic_string_view/inserters/char/3.cc: New file.
3132 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3133 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3134 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3135 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3136 * unittests/basic_string_view/literals/types.cc: New file.
3137 * unittests/basic_string_view/literals/values.cc: New file.
3138 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3139 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
3140 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
3141 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
3142 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
3143 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
3144 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
3145 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
3146 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
3147 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
3148 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
3149 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
3150 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
3151 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
3152 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
3153 * unittests/basic_string_view/operations/data/char/1.cc: New file.
3154 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
3155 * unittests/basic_string_view/operations/find/char/1.cc: New file.
3156 * unittests/basic_string_view/operations/find/char/2.cc: New file.
3157 * unittests/basic_string_view/operations/find/char/3.cc: New file.
3158 * unittests/basic_string_view/operations/find/char/4.cc: New file.
3159 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
3160 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
3161 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
3162 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
3163 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
3164 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
3165 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
3166 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
3167 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
3168 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
3169 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
3170 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
3171 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
3172 * unittests/basic_string_view/operators/char/2.cc: New file.
3173 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
3174 * unittests/basic_string_view/range_access/char/1.cc: New file.
3175 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
3176 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
3177 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
3178 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
3179 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
3180 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
3181 * unittests/basic_string_view/requirements/typedefs.cc: New file.
3182 * unittests/basic_string_view/typedefs.cc: New file.
3183 * unittests/basic_string_view/types/1.cc: New file.
3185 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3187 * common/gdb_string_view.h: Remove libstdc++ implementation
3188 details, adjust to gdb reality.
3189 * common/gdb_string_view.tcc: Likewise.
3190 * cli/cli-script.c (struct string_view): Remove.
3191 (user_args) <m_args>: Change element type to gdb::string_view.
3192 (user_args::insert_args): Adjust.
3194 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3196 * common/gdb_string_view.h: New file.
3197 * common/gdb_string_view.tcc: New file.
3199 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3201 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
3202 * configure: Re-generate.
3204 2018-04-09 Pedro Alves <palves@redhat.com>
3206 * gdbarch.sh: Include "observable.h" instead of "observer.h".
3207 (set_target_gdbarch): Call
3208 gdb::observers::architecture_changed.notify instead of
3209 observer_notify_architecture_changed.
3211 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3213 * tracepoint.c (struct current_traceframe_cleanup): Remove.
3214 (do_restore_current_traceframe_cleanup): Remove.
3215 (restore_current_traceframe_cleanup_dtor): Remove.
3216 (make_cleanup_restore_current_traceframe): Remove.
3217 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
3219 * tracepoint.h (struct scoped_restore_current_traceframe): New.
3220 * infrun.c (fetch_inferior_event): Use
3221 scoped_restore_current_traceframe.
3223 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3225 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
3227 <n_allocated_type_units>: Remove.
3228 <all_type_units>: Change to std::vector.
3229 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3230 to std::vector change.
3231 (dwarf2_per_objfile::get_cutu): Likewise.
3232 (dwarf2_per_objfile::get_tu): Likewise.
3233 (create_signatured_type_table_from_index): Likewise.
3234 (create_signatured_type_table_from_debug_names): Likewise.
3235 (dw2_symtab_iter_next): Likewise.
3236 (dw2_print_stats): Likewise.
3237 (dw2_expand_all_symtabs): Likewise.
3238 (dw2_expand_marked_cus): Likewise.
3239 (dw2_debug_names_iterator::next): Likewise.
3240 (dwarf2_initialize_objfile): Likewise.
3241 (add_signatured_type_cu_to_table): Likewise.
3242 (create_all_type_units): Likewise.
3243 (add_type_unit): Likewise.
3244 (struct tu_abbrev_offset): Add constructor.
3245 (build_type_psymtabs_1): Adjust to std::vector change.
3246 (print_tu_stats): Likewise.
3247 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3248 (write_debug_names): Likewise.
3250 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3252 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
3253 Make an std::vector.
3254 <n_comp_units>: Remove.
3255 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3256 to std::vector change.
3257 (dwarf2_per_objfile::get_cutu): Likewise.
3258 (dwarf2_per_objfile::get_cu): Likewise.
3259 (create_cus_from_index): Likewise.
3260 (create_addrmap_from_index): Likewise.
3261 (create_addrmap_from_aranges): Likewise.
3262 (dwarf2_read_index): Likewise.
3263 (dw2_find_last_source_symtab): Likewise.
3264 (dw2_map_symtabs_matching_filename): Likewise.
3265 (dw2_symtab_iter_next): Likewise.
3266 (dw2_print_stats): Likewise.
3267 (dw2_expand_all_symtabs): Likewise.
3268 (dw2_expand_symtabs_with_fullname): Likewise.
3269 (dw2_expand_marked_cus): Likewise.
3270 (dw2_map_symbol_filenames): Likewise.
3271 (create_cus_from_debug_names): Likewise.
3272 (dwarf2_read_debug_names): Likewise.
3273 (dw2_debug_names_iterator::next): Likewise.
3274 (dwarf2_initialize_objfile): Likewise.
3275 (set_partial_user): Likewise.
3276 (dwarf2_build_psymtabs_hard): Likewise.
3277 (read_comp_units_from_section): Remove arguments, adjust to
3279 (create_all_comp_units): Adjust to std::vector and
3280 read_comp_units_from_section changes.
3281 (dwarf2_find_containing_comp_unit): Adjust to std::vector
3283 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3284 (psyms_seen_size): Likewise.
3285 (write_gdbindex): Likewise.
3286 (write_debug_names): Likewise.
3288 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3290 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
3291 with dwarf2_per_objfile.
3292 (create_cus_from_index): Likewise.
3293 (create_signatured_type_table_from_index): Likewise.
3294 (dwarf2_read_index): Likewise.
3295 (dwarf2_initialize_objfile): Likewise.
3296 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
3297 per_cu rather than get_dwarf2_per_objfile.
3299 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3301 * dwarf2read.h (struct signatured_type): Forward declare.
3302 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
3304 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
3305 (dw2_get_cutu): ...this.
3306 (dwarf2_per_objfile::get_cu): Rename from...
3307 (dw2_get_cu): ...this.
3308 (dwarf2_per_objfile::get_tu): New.
3309 (create_addrmap_from_index): Adjust.
3310 (create_addrmap_from_aranges): Adjust.
3311 (dw2_find_last_source_symtab): Adjust.
3312 (dw2_map_symtabs_matching_filename): Adjust.
3313 (dw2_symtab_iter_next): Adjust.
3314 (dw2_print_stats): Adjust.
3315 (dw2_expand_all_symtabs): Adjust.
3316 (dw2_expand_symtabs_with_fullname): Adjust.
3317 (dw2_expand_marked_cus): Adjust.
3318 (dw_expand_symtabs_matching_file_matcher): Adjust.
3319 (dw2_map_symbol_filenames): Adjust.
3320 (dw2_debug_names_iterator::next): Adjust.
3321 (dwarf2_initialize_objfile): Adjust.
3322 (set_partial_user): Adjust.
3323 (dwarf2_build_psymtabs_hard): Adjust.
3325 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3327 * dwarf2read.c (create_signatured_type_table_from_debug_names):
3328 Remove unused variables.
3329 (dw2_map_symtabs_matching_filename): Likewise.
3330 (dwarf2_record_block_ranges): Likewise.
3331 (dwarf2_read_addr_index): Likewise.
3332 (follow_die_offset): Likewise.
3334 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3336 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
3337 to symbol_file_add_main.
3339 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3342 * mi/mi-console.c (do_fputc_async_safe): New.
3343 (mi_console_file::write_async_safe): New.
3344 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
3345 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
3347 * ui-file.c (ui_file::putstrn): Adjust call to
3348 fputstrn_unfiltered.
3349 * utils.c (printchar): Replace do_fputs and do_fprintf
3350 parameters by do_fputc.
3351 (fputstr_filtered): Adjust call to printchar.
3352 (fputstr_unfiltered): Likewise.
3353 (fputstrn_filtered): Likewise.
3354 (fputstrn_unfiltered): Add do_fputc parameter, pass to
3356 * utils.h (do_fputc_ftype): New typedef.
3357 (fputstrn_unfiltered): Add do_fputc parameter.
3359 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3361 * regformats/i386/i386-avx.dat: Remove.
3363 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3366 * amd64-tdep.c (amd64_none_init_abi): New function.
3367 (amd64_x32_none_init_abi): New function.
3368 (_initialize_amd64_tdep): Register handlers for x86-64 and
3369 x64_32 with GDB_OSABI_NONE.
3370 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
3371 GDB_OSABI_NONE osabi.
3373 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3376 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
3378 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
3379 * osabi.c (gdb_osabi_names): Add "unknown" entry.
3381 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3383 * common/byte-vector.h (char_vector): New type.
3384 * target.h (target_read_alloc): Return
3385 gdb::optional<byte_vector>.
3386 (target_read_stralloc): Return gdb::optional<char_vector>.
3387 (target_get_osdata): Return gdb::optional<char_vector>.
3388 * target.c (target_read_alloc_1): Templatize. Replacement
3389 manual memory management with vector.
3390 (target_read_alloc): Change return type, adjust.
3391 (target_read_stralloc): Change return type, adjust.
3392 (target_get_osdata): Change return type, adjust.
3393 * auxv.c (struct auxv_info) <length>: Remove.
3394 <data>: Change type to gdb::optional<byte_vector>.
3395 (auxv_inferior_data_cleanup): Free auxv_info with delete.
3396 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
3397 (target_auxv_search): Adjust.
3398 (fprint_target_auxv): Adjust.
3399 * avr-tdep.c (avr_io_reg_read_command): Adjust.
3400 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
3401 (linux_make_corefile_notes): Adjust.
3402 * osdata.c (get_osdata): Adjust.
3403 * remote.c (remote_get_threads_with_qxfer): Adjust.
3404 (remote_memory_map): Adjust.
3405 (remote_traceframe_info): Adjust.
3406 (btrace_read_config): Adjust.
3407 (remote_read_btrace): Adjust.
3408 (remote_pid_to_exec_file): Adjust.
3409 * solib-aix.c (solib_aix_get_library_list): Adjust.
3410 * solib-dsbt.c (decode_loadmap): Don't free buf.
3411 (dsbt_get_initial_loadmaps): Adjust.
3412 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
3413 * solib-target.c (solib_target_current_sos): Adjust.
3414 * tracepoint.c (sdata_make_value): Adjust.
3415 * xml-support.c (xinclude_start_include): Adjust.
3416 (xml_fetch_content_from_file): Adjust.
3417 * xml-support.h (xml_fetch_another): Change return type.
3418 (xml_fetch_content_from_file): Change return type.
3419 * xml-syscall.c (xml_init_syscalls_info): Adjust.
3420 * xml-tdesc.c (file_read_description_xml): Adjust.
3421 (fetch_available_features_from_target): Change return type.
3422 (target_fetch_description_xml): Adjust.
3423 (target_read_description_xml): Adjust.
3425 2018-04-06 Tom Tromey <tom@tromey.com>
3427 * value.c (~value): Update.
3428 (struct value) <contents>: Now unique_xmalloc_ptr.
3429 (value_contents_bits_eq, allocate_value_contents)
3430 (value_contents_raw, value_contents_all_raw)
3431 (value_contents_for_printing, value_contents_for_printing_const)
3432 (set_value_enclosing_type): Update.
3434 2018-04-06 Tom Tromey <tom@tromey.com>
3436 * value.c (range_s): Remove typedef, VEC.
3437 (struct range): Add operator<.
3438 (range_lessthan): Remove.
3439 (ranges_contain): Change type.
3441 (struct value) <unavailable, optimized_out>: Now std::vector.
3442 (value_entirely_available)
3443 (value_entirely_covered_by_range_vector)
3444 (value_entirely_unavailable, value_entirely_optimized_out):
3446 (insert_into_bit_range_vector): Change argument type.
3447 (find_first_range_overlap): Likewise.
3448 (struct ranges_and_idx, value_contents_bits_eq)
3449 (require_not_optimized_out, require_available): Update.
3450 (ranges_copy_adjusted): Change argument types.
3451 (value_optimized_out, value_copy, value_fetch_lazy): Update.
3453 2018-04-06 Tom Tromey <tom@tromey.com>
3455 * value.c (~value): Update.
3456 (struct value) <parent>: Now a value_ref_ptr.
3457 (value_parent, set_value_parent, value_address, value_copy):
3460 2018-04-06 Tom Tromey <tom@tromey.com>
3462 * value.c (struct value): Add constructor, destructor, and member
3464 (allocate_value_lazy, value_decref): Update.
3466 2018-04-06 Tom Tromey <tom@tromey.com>
3468 * value.c (struct value) <released, next>: Remove.
3469 (all_values): Now a std::vector.
3470 (allocate_value_lazy): Update.
3471 (value_next): Remove.
3472 (value_mark, value_free_to_mark, release_value)
3473 (value_release_to_mark): Update.
3475 2018-04-06 Tom Tromey <tom@tromey.com>
3477 * value.h (fetch_subexp_value, value_release_to_mark): Update.
3478 (free_value_chain): Remove.
3479 * value.c (free_value_chain): Remove.
3480 (value_release_to_mark): Return a std::vector.
3481 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
3483 (check_condition): Update.
3484 * eval.c (fetch_subexp_value): Change "val_chain" to a
3486 * breakpoint.c (update_watchpoint): Update.
3487 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3489 2018-04-06 Tom Tromey <tom@tromey.com>
3491 * value.h (free_all_values): Remove.
3492 * value.c (free_all_values): Remove.
3494 2018-04-06 Tom Tromey <tom@tromey.com>
3496 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3497 (value_history_chain, value_history_count): Remove.
3498 (value_history): New global.
3499 (record_latest_value, access_value_history, show_values)
3500 (preserve_values): Update.
3502 2018-04-06 Tom Tromey <tom@tromey.com>
3504 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3505 * varobj.c (varobj_set_display_format, varobj_set_value)
3506 (install_default_visualizer, construct_visualizer)
3507 (install_new_value, ~varobj, varobj_get_value_type)
3508 (my_value_of_variable, varobj_editable_p): Update.
3509 * c-varobj.c (c_describe_child, c_value_of_variable)
3510 (cplus_number_of_children, cplus_describe_child): Update.
3511 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3512 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3513 (ada_value_of_variable, ada_value_is_changeable_p): Update.
3515 2018-04-06 Tom Tromey <tom@tromey.com>
3517 * printcmd.c (last_examine_address): Change type to
3519 (do_examine, x_command): Update.
3521 2018-04-06 Tom Tromey <tom@tromey.com>
3523 * value.c (release_value): Update.
3524 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3525 (struct bpstats) <val>: Now a value_ref_ptr.
3526 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3527 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3528 (~watchpoint, print_it_watchpoint, watch_command_1)
3529 (invalidate_bp_value_on_memory_change): Update.
3531 2018-04-06 Tom Tromey <tom@tromey.com>
3533 * varobj.c (varobj_clear_saved_item)
3534 (update_dynamic_varobj_children, install_new_value, ~varobj):
3536 * value.h (value_incref): Move declaration earlier.
3537 (value_decref): Rename from value_free.
3538 (struct value_ref_policy): New.
3539 (value_ref_ptr): New typedef.
3540 (struct value_deleter): Remove.
3541 (gdb_value_up): Remove typedef.
3542 (release_value): Change return type.
3543 (release_value_or_incref): Remove.
3544 * value.c (set_value_parent): Update.
3545 (value_incref): Change return type.
3546 (value_decref): Rename from value_free.
3547 (value_free_to_mark, free_all_values, free_value_chain): Update.
3548 (release_value): Return value_ref_ptr.
3549 (release_value_or_incref): Remove.
3550 (record_latest_value, set_internalvar, clear_internalvar):
3552 * stack.c (info_frame_command): Don't call value_free.
3553 * python/py-value.c (valpy_dealloc, valpy_new)
3554 (value_to_value_object): Update.
3555 * printcmd.c (do_examine): Update.
3556 * opencl-lang.c (lval_func_free_closure): Update.
3557 * mi/mi-main.c (register_changed_p): Don't call value_free.
3558 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3559 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3560 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3562 * guile/scm-value.c (vlscm_free_value_smob)
3563 (vlscm_scm_from_value): Update.
3564 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3565 (frame_unwind_register_unsigned, get_frame_register_bytes)
3566 (put_frame_register_bytes): Don't call value_free.
3567 * findvar.c (address_from_register): Don't call value_free.
3568 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3569 * dwarf2loc.c (entry_data_value_free_closure)
3570 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3571 (dwarf2_evaluate_loc_desc_full): Update.
3572 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3573 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3574 (~watchpoint, watch_command_1)
3575 (invalidate_bp_value_on_memory_change): Update.
3576 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3578 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3581 * warning.m4: Add -Wno-error=deprecated-register.
3582 * configure: Re-generate.
3584 2018-04-05 Tom Tromey <tom@tromey.com>
3586 * linespec.h: Remove include of "vec.h".
3588 2018-04-05 Tom Tromey <tom@tromey.com>
3590 * linespec.c (typep): Remove typedef.
3591 (find_methods, find_superclass_methods): Take a std::vector.
3592 (find_method): Use std::vector.
3594 2018-04-05 Tom Tromey <tom@tromey.com>
3596 * utils.c (compare_strings): Remove.
3597 * utils.h (compare_strings): Remove.
3598 * objc-lang.h (find_imps): Update.
3599 * objc-lang.c (find_methods): Take a std::vector.
3600 (uniquify_strings, find_imps): Likewise.
3601 * linespec.c (find_methods): Take a std::vector.
3602 (decode_objc): Use std::vector.
3603 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3605 (find_method, find_function_symbols): Use std::vector.
3607 2018-04-05 Tom Tromey <tom@tromey.com>
3609 * completer.c (completion_tracker::completion_tracker): Remove
3611 (completion_tracker::discard_completions): Likewise.
3612 * breakpoint.c (ambiguous_names_p): Remove cast.
3613 * ada-lang.c (_initialize_ada_language): Remove cast.
3614 * utils.h (streq): Update.
3615 (streq_hash): Add new declaration.
3616 * utils.c (streq): Return bool.
3617 (streq_hash): New function.
3619 2018-04-05 Tom Tromey <tom@tromey.com>
3621 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3622 Remove a string copy.
3624 2018-04-05 Tom Tromey <tom@tromey.com>
3626 * linespec.c (filter_results): Use std::vector.
3627 (decode_line_2, decode_line_full): Update.
3629 2018-04-05 Tom Tromey <tom@tromey.com>
3631 * linespec.c (canonical_to_fullform): Return std::string.
3632 (filter_results): Update.
3633 (struct decode_line_2_item): Add constructor.
3634 <fullform, displayform>: Now std::string.
3635 (decode_line_2_compare_items): Now a std::sort comparator.
3636 (decode_line_2): Update.
3638 2018-04-05 Tom Tromey <tom@tromey.com>
3640 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3641 (unexpected_linespec_error): Update.
3642 (linespec_parse_basic, parse_linespec): Update.
3644 2018-04-05 Tom Tromey <tom@tromey.com>
3646 * linespec.c (linespec_parse_basic): Reindent.
3648 2018-04-05 Tom Tromey <tom@tromey.com>
3650 * minsyms.h (iterate_over_minimal_symbols): Update.
3651 * minsyms.c (iterate_over_minimal_symbols): Take a
3653 * linespec.c (struct collect_minsyms): Remove.
3654 (compare_msyms): Now a std::sort comparator.
3655 (add_minsym): Add parameters.
3656 (search_minsyms_for_name): Update. Use std::vector.
3658 2018-04-03 Tom Tromey <tom@tromey.com>
3660 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3663 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3665 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3667 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3670 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3671 printing static type.
3673 2018-04-01 Tom Tromey <tom@tromey.com>
3675 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3676 (rs6000_xfer_shared_libraries): Update.
3678 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3680 * common/gdb_vecs.h (char_ptr): Remove.
3681 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3683 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3685 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3687 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3689 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3691 * tracepoint.h (struct uploaded_tp): Initialize fields.
3692 <actions, step_actions, cmd_strings>: Change type to
3693 std::vector<char *>.
3694 * tracepoint.c (get_uploaded_tp): Allocate with new.
3695 (free_uploaded_tps): Free with delete.
3696 (parse_tracepoint_definition): Adjust to std::vector change.
3697 * breakpoint.c (read_uploaded_action): Likewise.
3698 (create_tracepoint_from_upload): Likewise.
3699 * ctf.c (ctf_write_uploaded_tp): Likewise.
3700 (SET_ARRAY_FIELD): Likewise.
3701 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3703 2018-03-30 Tom Tromey <tom@tromey.com>
3705 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3707 (svr4_keep_data_in_core): Update.
3708 (svr4_read_so_list): Update.
3710 2018-03-30 Tom Tromey <tom@tromey.com>
3712 * windows-nat.c (handle_output_debug_string, handle_exception):
3714 * target.h (target_read_string): Update.
3715 * target.c (target_read_string): Change "string" to
3717 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3719 * solib-frv.c (frv_current_sos): Update.
3720 * solib-dsbt.c (dsbt_current_sos): Update.
3721 * solib-darwin.c (darwin_current_sos): Update.
3722 * linux-thread-db.c (inferior_has_bug): Update.
3723 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3724 Update. Remove alloca.
3725 * ada-lang.c (ada_main_name): Update.
3727 2018-03-30 Tom Tromey <tom@tromey.com>
3729 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3730 (struct dwo_file_deleter): New.
3731 (dwo_file_up): New typedef.
3732 (open_and_init_dwo_file): Use dwo_file_up.
3733 (free_dwo_file_cleanup): Remove.
3735 2018-03-30 Tom Tromey <tom@tromey.com>
3737 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3738 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3740 2018-03-30 Tom Tromey <tom@tromey.com>
3742 * dwarf2read.c (class free_cached_comp_units): New class.
3743 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3744 (free_cached_comp_units): Remove function.
3746 2018-03-30 Tom Tromey <tom@tromey.com>
3748 * utils.h (make_cleanup_unpush_target): Remove.
3749 * inf-ptrace.c (struct target_unpusher): New.
3750 (target_unpush_up) New typedef.
3751 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3753 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3755 2018-03-27 Tom Tromey <tom@tromey.com>
3757 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3759 2018-03-27 Pedro Alves <palves@redhat.com>
3760 Tom Tromey <tom@tromey.com>
3762 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3763 destructor. Now a class.
3764 (gdb_readline_wrapper_cleanup): Remove function.
3765 (gdb_readline_wrapper): Remove cleanups.
3767 2018-03-27 Tom Tromey <tom@tromey.com>
3769 * typeprint.h (struct type_print_options) <local_typedefs,
3770 global_typedefs>: Remove "struct" keyword.
3771 (class typedef_hash_table): New class.
3772 (recursively_update_typedef_hash, add_template_parameters)
3773 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3774 (find_typedef_in_hash): Don't declare.
3775 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3776 (typedef_hash_table::recursively_update): Rename from
3777 recursively_update_typedef_hash. Now a member.
3778 (typedef_hash_table::add_template_parameters): Rename from
3779 add_template_parameters. Now a member.
3780 (typedef_hash_table::typedef_hash_table): Now a constructor;
3781 rename from create_typedef_hash.
3782 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3783 rename from free_typedef_hash.
3784 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3785 (do_free_global_table): Remove.
3786 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3787 from copy_type_recursive.
3788 (create_global_typedef_table): Remove.
3789 (typedef_hash_table::find_global_typedef): Now a member of
3791 (typedef_hash_table::find_typedef): Rename from
3792 find_typedef_in_hash; now a member.
3793 (whatis_exp): Update.
3794 * extension.h (struct ext_lang_type_printers): Add constructor and
3796 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3798 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3799 Now a constructor; rename from start_ext_lang_type_printers.
3800 (ext_lang_type_printers): Now a destructor; rename from
3801 free_ext_lang_type_printers.
3802 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3804 (c_type_print_base_struct_union): Update. Remove cleanups.
3806 2018-03-27 Tom Tromey <tom@tromey.com>
3808 * dwarf-index-write.c: Include <cmath>.
3810 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3812 * NEWS: Add entry describing new "set|show varsize-limit" command.
3813 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3815 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3818 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3820 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3822 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3823 * dwarf-index-common.c: New file.
3824 * dwarf-index-common.h: New file.
3825 * dwarf-index-write.c: New file.
3826 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3827 (struct dwarf2_section_info): Move from here.
3828 (dwarf2_section_info_def): Likewise.
3829 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3830 (offset_type): Likewise.
3831 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3832 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3833 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3834 (byte_swap): Likewise.
3835 (MAYBE_SWAP): Likewise.
3836 (dwarf2_per_cu_ptr): Likewise.
3837 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3838 (struct tu_stats): Likewise.
3839 (struct dwarf2_per_objfile): Likewise.
3840 (struct dwarf2_per_cu_data): Likewise.
3841 (struct signatured_type): Likewise.
3842 (sig_type_ptr): Likewise.
3843 (DEF_VEC_P (sig_type_ptr)): Likewise.
3844 (INDEX4_SUFFIX): Likewise.
3845 (INDEX5_SUFFIX): Likewise.
3846 (DEBUG_STR_SUFFIX): Likewise.
3847 (dwarf2_read_section): Make non-static.
3848 (mapped_index_string_hash): Move from here.
3849 (dwarf5_djb_hash): Likewise.
3850 (file_write): Likewise.
3851 (class data_buf): Likewise.
3852 (struct symtab_index_entry): Likewise.
3853 (struct mapped_symtab): Likewise.
3854 (find_slot): Likewise.
3855 (hash_expand): Likewise.
3856 (add_index_entry): Likewise.
3857 (uniquify_cu_indices): Likewise.
3858 (class c_str_view): Likewise.
3859 (class c_str_view_hasher): Likewise.
3860 (class vector_hasher): Likewise.
3861 (write_hash_table): Likewise.
3862 (psym_index_map): Likewise.
3863 (struct addrmap_index_data): Likewise.
3864 (add_address_entry): Likewise.
3865 (add_address_entry_worker): Likewise.
3866 (write_address_map): Likewise.
3867 (symbol_kind): Likewise.
3868 (write_psymbols): Likewise.
3869 (struct signatured_type_index_data): Likewise.
3870 (write_one_signatured_type): Likewise.
3871 (recursively_count_psymbols): Likewise.
3872 (recursively_write_psymbols): Likewise.
3873 (class debug_names): Likewise.
3874 (check_dwarf64_offsets): Likewise.
3875 (psyms_seen_size): Likewise.
3876 (write_gdbindex): Likewise.
3877 (write_debug_names): Likewise.
3878 (assert_file_size): Likewise.
3879 (write_psymtabs_to_index): Likewise.
3880 (save_gdb_index_command): Likewise.
3881 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3883 * dwarf2read.h: New file.
3885 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3888 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3889 symbol name if the CU's language stores symbol names in linkage
3891 * language.h (struct language_defn)
3892 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3893 all instances of this struct.
3895 2018-03-26 Tom Tromey <tom@tromey.com>
3897 * stack.c (backtrace_command_1): Remove verbose code.
3899 2018-03-26 Tom Tromey <tom@tromey.com>
3901 * python/py-framefilter.c (py_print_type): Don't catch
3902 exceptions. Return void.
3903 (py_print_value): Likewise.
3904 (py_print_single_arg): Likewise.
3905 (enumerate_args): Don't catch exceptions.
3906 (py_print_args): Likewise.
3907 (py_print_frame): Likewise.
3908 (gdbpy_apply_frame_filter): Catch exceptions here.
3910 2018-03-26 Tom Tromey <tom@tromey.com>
3912 * stack.c (_initialize_stack): Remove trailing newlines from help
3913 text. Add "Usage" line to "backtrace" help.
3915 2018-03-26 Tom Tromey <tom@tromey.com>
3918 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3920 2018-03-26 Tom Tromey <tom@tromey.com>
3922 * python/py-framefilter.c (py_print_single_arg): Return
3923 EXT_LANG_BT_ERROR from catch.
3925 2018-03-26 Tom Tromey <tom@tromey.com>
3928 * stack.c (backtrace_command_1): Move some code into no-filters
3931 2018-03-26 Tom Tromey <tom@tromey.com>
3933 * python/py-framefilter.c (throw_quit_or_print_exception): New
3935 (gdbpy_apply_frame_filter): Use it.
3937 2018-03-26 Tom Tromey <tom@tromey.com>
3940 * python/py-framefilter.c (py_print_type, py_print_value)
3941 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3944 2018-03-26 Tom Tromey <tom@tromey.com>
3946 * python/py-framefilter.c (enumerate_args): Use
3947 gdb::unique_xmalloc_ptr.
3949 2018-03-26 Tom Tromey <tom@tromey.com>
3951 * python/py-framefilter.c (py_print_frame): Return
3953 (gdbpy_apply_frame_filter): Update comment.
3954 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3956 <EXT_LANG_BT_NO_FILTERS>: Change value.
3958 2018-03-26 Tom Tromey <tom@tromey.com>
3961 * stack.c (backtrace_command): Parse "hide" argument.
3962 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3963 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3966 2018-03-26 Tom Tromey <tom@tromey.com>
3968 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3970 (backtrace_command): Remove "fulltrace", add "flags".
3972 2018-03-26 Tom Tromey <tom@tromey.com>
3974 * stack.c (backtrace_command): Rewrite command line parsing.
3976 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3978 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3980 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3982 * filename-seen-cache.h: Add include guard.
3984 2018-03-26 Keith Seitz <keiths@redhat.com>
3986 * symfile.c (place_section): Remove "struct" from section_addr_info
3988 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3989 "struct" keyword from section_addr_info.
3991 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3993 * regformats/regdef.h (reg): Add constructors.
3995 2018-03-25 Pedro Alves <palves@redhat.com>
3997 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3998 if then/else bodies in var_func_name extraction.
4000 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
4002 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4003 lookup_minimal_symbol() to find symbol entry.
4004 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4006 2018-03-23 Keith Seitz <keiths@redhat.com>
4009 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4010 nested type definitions for C++, too.
4012 2018-03-23 Tom Tromey <tom@tromey.com>
4014 * machoread.c (struct oso_el): Add a constructor. Don't define as
4016 (macho_register_oso): Remove.
4017 (macho_symtab_read): Take a std::vector.
4018 (oso_el_compare_name): Now a std::sort comparator.
4019 (macho_symfile_read_all_oso): Take a std::vector.
4020 (macho_symfile_read): Use std::vector. Remove cleanups.
4022 2018-03-22 Tom Tromey <tom@tromey.com>
4024 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4025 (record_full_goto_bookmark): Use std::string.
4027 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4030 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4033 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4035 * rs6000-tdep.c (store_insn_p): New function.
4036 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4037 and cr_reg to their unshifted values. Use store_insn_p to
4038 match LR saves using either R1 or fdata->alloca_reg. Use
4039 store_insn_p to match CR saves. Set alloca_reg_offset
4040 when alloca_reg and framep are set. Remove lr_reg shift
4041 when assigning to fdata->lr_register.
4043 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4045 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4046 command line args instead of emitting a warning.
4048 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4050 * tracepoint.h (struct static_tracepoint_marker): Initialize
4051 fields, define default constructor, move constructor and move
4052 assignment, disable the rest.
4053 <str_id, extra>: Make std::string.
4054 (release_static_tracepoint_marker): Remove.
4055 (free_current_marker): Remove.
4056 * tracepoint.c (free_current_marker): Remove.
4057 (parse_static_tracepoint_marker_definition): Adjust to
4058 std::string, use new hex2str overload.
4059 (release_static_tracepoint_marker): Remove.
4060 (print_one_static_tracepoint_marker): Get marker by reference
4061 and adjust to std::string.
4062 (info_static_tracepoint_markers_command): Adjust to std::vector
4064 * target.h (static_tracepoint_marker_p): Remove typedef.
4065 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4066 (struct target_ops) <to_static_tracepoint_marker_at>: Return
4068 <to_static_tracepoint_markers_by_strid>: Return std::vector.
4070 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4071 (target_debug_print_std_vector_static_tracepoint_marker): New.
4072 (target_debug_print_struct_static_tracepoint_marker_p): Rename
4074 (target_debug_print_static_tracepoint_marker_p): ... this.
4075 * target-delegates.c: Re-generate.
4076 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4078 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4079 (decode_static_tracepoint_spec): Adjust to std::vector.
4080 (tracepoint_print_one_detail): Adjust to std::string.
4081 (strace_marker_decode_location): Adjust to std::string.
4082 (update_static_tracepoint): Adjust to std::string, remove call
4083 to release_static_tracepoint_marker.
4084 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4085 Adjust to std::vector.
4086 * remote.c (remote_static_tracepoint_marker_at): Return bool.
4087 (remote_static_tracepoint_markers_by_strid): Adjust to
4089 * common/rsp-low.h (hex2str): New overload with explicit count
4091 * common/rsp-low.c (hex2str): New overload with explicit count
4093 * unittests/rsp-low-selftests.c (test_hex2str): New function.
4094 (_initialize_rsp_low_selftests): Add test_hex2str test.
4095 * unittests/tracepoint-selftests.c
4096 (test_parse_static_tracepoint_marker_definition): Adjust to
4099 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4101 * tracepoint.c (parse_static_tracepoint_marker_definition):
4102 Consider case where the definition is followed by more
4104 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4105 tracepoint-selftests.c.
4106 * unittests/tracepoint-selftests.c: New.
4108 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4110 * MAINTAINERS (Write After Approval): Add Pedro Franco de
4113 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4115 * symtab.c (find_pc_sect_line): fixed indentation.
4117 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4119 * symtab.c (find_pc_sect_line): now uses binary search.
4121 2018-03-19 Tom Tromey <tom@tromey.com>
4123 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4126 2018-03-19 Pedro Alves <palves@redhat.com>
4127 Tom Tromey <tom@tromey.com>
4129 * unittests/observable-selftests.c: New file.
4130 * common/observable.h: New file.
4131 * observable.h: New file.
4132 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4133 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4134 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4135 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4136 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4137 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4138 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4139 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
4140 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
4141 python/py-breakpoint.c, python/py-finishbreakpoint.c,
4142 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
4143 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
4144 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
4145 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
4146 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
4147 tui/tui-interp.c, valops.c: Update all users.
4148 * tui/tui-hooks.c (tui_bp_created_observer)
4149 (tui_bp_deleted_observer, tui_bp_modified_observer)
4150 (tui_inferior_exit_observer, tui_before_prompt_observer)
4151 (tui_normal_stop_observer, tui_register_changed_observer):
4153 (tui_observers_token): New global.
4154 (attach_or_detach, tui_attach_detach_observers): New functions.
4155 (tui_install_hooks, tui_remove_hooks): Use
4156 tui_attach_detach_observers.
4157 * record-btrace.c (record_btrace_thread_observer): Remove.
4158 (record_btrace_thread_observer_token): New global.
4159 * observer.sh: Remove.
4160 * observer.c: Rename to observable.c.
4161 * observable.c (namespace gdb_observers): Define new objects.
4162 (observer_debug): Move into gdb_observers namespace.
4163 (struct observer, struct observer_list, xalloc_observer_list_node)
4164 (xfree_observer_list_node, generic_observer_attach)
4165 (generic_observer_detach, generic_observer_notify): Remove.
4166 (_initialize_observer): Update.
4167 Don't include observer.inc.
4168 * Makefile.in (generated_files): Remove observer.h, observer.inc.
4169 (clean mostlyclean): Likewise.
4170 (observer.h, observer.inc): Remove targets.
4171 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
4172 (COMMON_SFILES): Use observable.c, not observer.c.
4173 * .gitignore: Remove observer.h.
4175 2018-03-18 Tom Tromey <tom@tromey.com>
4177 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
4179 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
4181 2018-03-17 Tom Tromey <tom@tromey.com>
4183 * auto-load.c (auto_load_objfile_script_1): Use std::string.
4185 2018-03-17 Tom Tromey <tom@tromey.com>
4187 * target.c (class scoped_target_fd): New.
4188 (target_fileio_close_cleanup): Remove.
4189 (target_fileio_read_alloc_1): Use scoped_target_fd.
4191 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4193 * silent-rules.mk: New.
4194 * Makefile.in: Include silent-rules.mk
4195 (srcdir, VPATH, top_srcdir): Move up.
4196 (COMPILE): Add ECHO_CXX.
4197 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
4198 (init.c): Add ECHO_INIT_C.
4199 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4200 (version.c): Add ECHO_GEN.
4201 (printcmd.o): Add ECHO_CXX.
4202 (target-float.o): Add ECHO_CXX.
4203 (ada-exp.o): Add ECHO_CXX.
4204 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
4205 (insight$(EXEEXT)): Add ECHO_CXXLD.
4206 * gnulib/configure.ac: Add AM_SILENT_RULES.
4207 * gnulib/aclocal.m4: Re-generate.
4208 * gnulib/configure: Re-generate.
4209 * gnulib/import/Makefile.in: Re-generate.
4211 2018-03-16 Tom Tromey <tom@tromey.com>
4213 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
4214 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
4215 * utils.c (do_free_section_addr_info)
4216 (make_cleanup_free_section_addr_info): Remove.
4217 * symfile.h (struct other_sections): Add constructor.
4218 (struct section_addr_info): Remove.
4219 (section_addr_info): New typedef.
4220 (struct sym_fns) <sym_offsets>: Change type of parameter.
4221 (build_section_addr_info_from_objfile)
4222 (relative_addr_info_to_section_offsets, addr_info_make_relative)
4223 (default_symfile_offsets, symbol_file_add)
4224 (symbol_file_add_from_bfd)
4225 (build_section_addr_info_from_section_table): Update.
4226 (alloc_section_addr_info, free_section_addr_info): Don't declare.
4227 * symfile.c (alloc_section_addr_info): Remove.
4228 (build_section_addr_info_from_section_table): Change return type.
4230 (build_section_addr_info_from_bfd)
4231 (build_section_addr_info_from_objfile): Likewise.
4232 (free_section_addr_info): Remove.
4233 (relative_addr_info_to_section_offsets): Change type of "addrs".
4234 (addrs_section_compar): Now a std::sort comparator.
4235 (addrs_section_sort): Change return type.
4236 (addr_info_make_relative): Change type of "addrs". Update.
4237 (default_symfile_offsets, syms_from_objfile_1)
4238 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
4239 (symbol_file_add_separate): Update.
4240 (symbol_file_add): Change type of "addrs". Update.
4241 (add_symbol_file_command): Update. Remove cleanups.
4242 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
4244 * symfile-debug.c (debug_sym_offsets): Change type of "info".
4245 * solib.c (solib_read_symbols): Update.
4246 * objfiles.c (objfile_relocate): Update. Remove cleanups.
4247 * machoread.c (macho_symfile_offsets): Update.
4248 * jit.c (jit_bfd_try_read_symtab): Update.
4250 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
4252 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4253 unittests/utils-selftests.c.
4254 * unittests/utils-selftests.c: New file.
4256 2018-03-14 Tom Tromey <tom@tromey.com>
4259 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
4262 2018-03-14 Tom Tromey <tom@tromey.com>
4265 * printcmd.c (printf_pointer): Allow "-" in format.
4267 2018-03-14 Tom Tromey <tom@tromey.com>
4269 * printcmd.c (_initialize_printcmd): Add usage to printf.
4271 2018-03-14 Yao Qi <qiyao@sourceware.org>
4273 * MAINTAINERS: Update my email address.
4275 2018-03-13 Tom Tromey <tom@tromey.com>
4277 * machoread.c (macho_check_dsym): Change filenamep to a
4279 (macho_symfile_read): Update.
4280 * symfile.c (load_command): Use std::string.
4282 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
4284 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
4285 to error message string.
4286 (riscv_register_name): Use xsnprintf instead of sprintf.
4287 (riscv_insn::fetch_instruction): Use gdb_assert instead of
4289 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
4291 (riscv_push_dummy_call): Likewise.
4293 2018-03-12 Tom Tromey <tom@tromey.com>
4295 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
4296 Use gdb::byte_vector.
4297 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
4299 2018-03-12 Yao Qi <yao.qi@linaro.org>
4301 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
4302 parameter type to readable_regcache.
4303 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
4306 2018-03-11 Tom Tromey <tom@tromey.com>
4308 * dwarf2read.c (struct nextfield): Add initializers.
4309 (struct nextfnfield): Remove.
4310 (struct fnfieldlist): Add initializers. Remove "length" and
4311 "head", use std::vector.
4312 (struct decl_field_list): Remove.
4313 (struct field_info): Add initializers.
4314 <fields, baseclasses>: Now std::vector.
4315 <nbaseclasses, nfnfields, typedef_field_list_count,
4316 nested_types_list_count>: Remove.
4317 (dwarf2_add_field, dwarf2_add_type_defn)
4318 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
4319 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
4320 (process_structure_scope): Update.
4322 2018-03-11 Tom Tromey <tom@tromey.com>
4324 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
4325 for use by std::sort.
4326 (build_type_psymtabs_1): Use std::vector.
4328 2018-03-09 Eli Zaretskii <eliz@gnu.org>
4330 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
4331 and LIBMPFR in the printed configuration.
4333 2018-03-08 Tom Tromey <tom@tromey.com>
4335 * source.c (get_filename_and_charpos): Use scoped_fd.
4336 * nto-procfs.c (procfs_open_1): Use scoped_fd.
4337 (procfs_pidlist): Likewise.
4338 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
4339 (iterate_over_mappings): Likewise.
4341 2018-03-08 Tom Tromey <tom@tromey.com>
4343 * infcall.c (struct call_return_meta_info)
4344 <stack_temporaries_enabled>: Remove.
4345 (get_call_return_value, call_function_by_hand_dummy): Update.
4346 * thread.c (disable_thread_stack_temporaries): Remove.
4347 (enable_thread_stack_temporaries): Remove.
4348 (thread_stack_temporaries_enabled_p): Return bool.
4349 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
4350 (get_last_thread_stack_temporary): Update.
4351 * eval.c (evaluate_subexp): Update.
4352 * gdbthread.h (class enable_thread_stack_temporaries): Now a
4353 class, not a function.
4354 (value_ptr, value_vec): Remove typedefs.
4355 (class thread_info) <stack_temporaries_enabled>: Now bool.
4356 <stack_temporaries>: Now a std::vector.
4357 (thread_stack_temporaries_enabled_p)
4358 (value_in_thread_stack_temporaries): Return bool.
4360 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
4362 * remote.c (putpkt_binary): Fix omitted bytes reporting.
4363 (getpkt_or_notif_sane_1): Likewise.
4365 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4367 * build-id.c (build_id_to_debug_bfd): Use std::string.
4369 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4371 * build-id.c (find_separate_debug_file_by_buildid): Return
4373 * build-id.h (find_separate_debug_file_by_buildid): Return
4375 * coffread.c (coff_symfile_read): Adjust to std::string.
4376 * elfread.c (elf_symfile_read): Adjust to std::string.
4377 * symfile.c (separate_debug_file_exists): Change parameter to
4379 (find_separate_debug_file): Return std::string.
4380 (find_separate_debug_file_by_debuglink): Return std::string.
4381 * symfile.h (find_separate_debug_file_by_debuglink): Return
4384 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4386 * common/xml-utils.c (xml_escape_text): Move code to...
4387 (xml_escape_text_append): ... this new function.
4388 * common/xml-utils.h (xml_escape_text_append): New declaration.
4389 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
4391 (_initialize_xml_utils): register test_xml_escape_text_append as
4394 2018-03-07 Alan Hayward <alan.hayward@arm.com>
4396 * defs.h: Remove MAX_REGISTER_SIZE.
4397 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
4399 * python/py-unwind.c (pyuw_sniffer): Likewise.
4401 2018-03-07 Tom Tromey <tom@tromey.com>
4403 * linux-tdep.c (linux_info_proc): Update.
4404 * target.h (struct target_ops) <to_fileio_readlink>: Return
4406 (target_fileio_readlink): Return optional<string>.
4407 * remote.c (remote_hostio_readlink): Return optional<string>.
4408 * inf-child.c (inf_child_fileio_readlink): Return
4410 * target.c (target_fileio_readlink): Return optional<string>.
4412 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
4414 * regcache.c (cooked_read_test): Add riscv to the list of
4415 architectures that have a save_reggroup.
4417 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
4419 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
4420 value is not a dynamic class object.
4422 2018-03-06 Tom Tromey <tom@tromey.com>
4424 * rust-exp.y: Formatting fixes.
4426 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4428 * riscv-tdep.c (riscv_register_name): Remove target description
4430 (riscv_gdbarch_init): Remove target description check.
4432 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4434 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
4436 * riscv-tdep.h: Likewise.
4438 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4440 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
4441 (riscv_pseudo_register_write): Delete.
4442 (riscv_gdbarch_init): Remove all use of pseudo registers.
4444 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4446 * record-btrace.c (btrace_print_lines): Replace cleanup
4447 parameter with RAII equivalents.
4448 (btrace_insn_history): Replace cleanup with RAII equivalents.
4449 * ui-out.h (make_cleanup_ui_out_list_begin_end,
4450 make_cleanup_ui_out_tuple_begin_end): Remove.
4451 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
4452 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
4453 make_cleanup_ui_out_list_begin_end): Remove.
4455 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4457 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
4458 parameter types to std::vector. Use bool.
4459 (record_btrace_wait): Replace VEC(tp_t) with
4460 std::vector<thread_info *>.
4461 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
4463 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4465 * record-btrace.c (record_btrace_disable_callback): Remove.
4466 (struct scoped_btrace_disable): New.
4467 (record_btrace_open): Use scoped_btrace_disable.
4469 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4471 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
4472 reading values from registers.
4474 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4476 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
4479 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4481 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
4482 change parameter type. Use GDB's print functions, and use
4483 core_addr_to_string where appropriate.
4484 (riscv_push_dummy_call): Use core_addr_to_string where
4485 appropriate, update call to riscv_print_arg_location, and reindent
4487 (riscv_return_value): Update call to riscv_print_arg_location.
4489 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4490 Tim Newsome <tim@sifive.com>
4491 Albert Ou <a0u@eecs.berkeley.edu>
4492 Darius Rad <darius@bluespec.com>
4494 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4495 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4496 (ALLDEPFILES): Add riscv-tdep.c
4497 * configure.tgt: Add riscv support.
4498 * riscv-tdep.c: New file.
4499 * riscv-tdep.h: New file.
4500 * NEWS: Mention new target.
4501 * MAINTAINERS: Add entry for riscv.
4503 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4505 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4506 fields within aggregates.
4508 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
4510 * record-btrace.c (btrace_print_lines): Change type of flags to
4511 gdb_disassembly_flags.
4513 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4515 * fbsd-nat.c: Include "inf-ptrace.h".
4516 (USE_SIGTRAP_SIGINFO): Conditionally define.
4517 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4518 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4519 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4521 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4523 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4525 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4526 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4527 "supports_stopped_by_hw_breakpoint" target methods.
4529 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4531 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4532 * fbsd-nat.c (debug_fbsd_nat): New variable.
4533 (show_fbsd_nat_debug): New function.
4534 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4535 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4537 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4539 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4540 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4542 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4543 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4546 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4548 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4549 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4551 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4553 * charset.c (struct charset_vector): New.
4554 (charsets): Change type to charset_vector.
4555 (find_charset_names): Adjust.
4557 (_initialize_charset): Adjust.
4559 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4561 * progspace.h (struct program_space) <deleted_solibs>: Change
4562 type to std::vector<std::string>.
4563 * progspace.c (clear_program_space_solib_cache): Adjust.
4564 * breakpoint.c (print_solib_event): Adjust.
4565 (check_status_catch_solib): Adjust.
4566 * solib.c (update_solib_list): Adjust.
4567 * ui-out.h (class ui_out) <field_string>: New overload.
4568 * ui-out.c (ui_out::field_string): New overload.
4570 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4572 * progspace.h (struct program_space): Add constructor and
4573 destructor, initialize fields.
4574 (add_program_space): Remove.
4575 * progspace.c (add_program_space): Rename to...
4576 (program_space::program_space): ... this.
4577 (release_program_space): Rename to...
4578 (program_space::~program_space): ... this.
4579 (delete_program_space): Use delete to delete program_space.
4580 (initialize_progspace): Use new to allocate program_space.
4581 * inferior.c (add_inferior_with_spaces): Likewise.
4582 (clone_inferior_command): Likewise.
4583 * infrun.c (follow_fork_inferior): Likewise.
4584 (handle_vfork_child_exec_or_exit): Likewise.
4586 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4588 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4589 (delim_string_to_char_ptr_vec): Return std::vector of
4590 gdb::unique_xmalloc_ptr.
4591 (dirnames_to_char_ptr_vec_append): Take std::vector of
4592 gdb::unique_xmalloc_ptr.
4593 (dirnames_to_char_ptr_vec): Return std::vector of
4594 gdb::unique_xmalloc_ptr.
4595 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4596 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4597 (delim_string_to_char_ptr_vec): Return an std::vector of
4598 gdb::unique_xmalloc_ptr, adjust the code.
4599 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4600 gdb::unique_xmalloc_ptr, adjust the code.
4601 (dirnames_to_char_ptr_vec): Return an std::vector of
4602 gdb::unique_xmalloc_ptr, adjust the code.
4603 * auto-load.c (auto_load_safe_path_vec): Change type to
4604 std::vector of gdb::unique_xmalloc_ptr.
4605 (auto_load_expand_dir_vars): Return an std::vector of
4606 gdb::unique_xmalloc_ptr, adjust the code.
4607 (auto_load_safe_path_vec_update): Adjust.
4608 (filename_is_in_auto_load_safe_path_vec): Adjust.
4609 (auto_load_objfile_script_1): Adjust.
4610 * build-id.c (build_id_to_debug_bfd): Adjust.
4611 * linux-thread-db.c (thread_db_load_search): Adjust.
4612 * source.c (add_path): Adjust.
4614 * symfile.c (find_separate_debug_file): Adjust.
4615 * utils.c (do_free_char_ptr_vec): Remove.
4616 (make_cleanup_free_char_ptr_vec): Remove.
4618 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4621 * common/pathstuff.c: Conditionally include "<windows.h>".
4623 2018-03-01 Georg Sauthoff <mail@georg.so>
4626 * gcore.in: Quote variables and switch interpreter to bash.
4628 2018-03-01 Tom Tromey <tom@tromey.com>
4630 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4631 assertion. Add assertion for discriminant_index.
4632 (quirk_rust_enum): Use correct base type name in univariant case.
4634 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4636 * record.c (get_call_history_modifiers): Return a
4638 (cmd_record_call_history): Adjust.
4639 * record-btrace.c (record_btrace_call_history): Adjust.
4640 (record_btrace_call_history_range): Adjust.
4641 (record_btrace_call_history_from): Adjust.
4642 * target-debug.h (target_debug_print_record_print_flags): New.
4643 * target-delegates.c: Re-generate.
4644 * target.c (target_call_history): Change flags type.
4645 (target_call_history_from): Likewise.
4646 (target_call_history_range): Likewise.
4647 * target.h (struct target_ops) <target_call_history>: Likewise.
4648 (target_call_history_from): Likewise.
4649 (target_call_history_range): Likewise.
4651 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4652 Simon Marchi <simon.marchi@polymtl.ca>
4654 * common/common-utils.c: Include "sys/stat.h".
4655 (is_regular_file): Move here from "source.c"; change return
4657 * common/common-utils.h (is_regular_file): New prototype.
4658 * common/pathstuff.c (contains_dir_separator): New function.
4659 * common/pathstuff.h (contains_dir_separator): New prototype.
4660 * source.c: Don't include "sys/stat.h".
4661 (is_regular_file): Move to "common/common-utils.c".
4663 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4665 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4666 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4667 * auto-load.c: Include "common/pathstuff.h".
4668 * common/common-def.h (current_directory): Move here.
4669 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4671 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4673 * common/pathstuff.c: New file.
4674 * common/pathstuff.h: New file.
4675 * compile/compile.c: Include "common/pathstuff.h".
4676 * defs.h (current_directory): Move to "common/common-defs.h".
4677 * dwarf2read.c: Include "common/pathstuff.h".
4679 * guile/scm-safe-call.c: Likewise.
4680 * linux-thread-db.c: Likewise.
4682 * nto-tdep.c: Likewise.
4683 * objfiles.c: Likewise.
4684 * source.c: Likewise.
4685 * symtab.c: Likewise.
4686 * utils.c: Include "common/pathstuff.h".
4687 (gdb_realpath): Move to "common/pathstuff.c".
4688 (gdb_realpath_keepfile): Likewise.
4689 (gdb_abspath): Likewise.
4690 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4691 (gdb_realpath_keepfile): Likewise.
4692 (gdb_abspath): Likewise.
4694 2018-02-28 John Baldwin <jhb@FreeBSD.org>
4696 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4697 wildcard process pid for super_resume for kernels with a
4700 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4702 * compile/compile.c (get_args): Add additional comments
4703 explaining function.
4705 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4706 Tom Tromey <tom@tromey.com>
4708 * target.h (memory_write_request_s): Remove typedef. Don't define
4710 (target_write_memory_blocks): Change argument to std::vector.
4711 (struct memory_write_request): Add constructor.
4712 * target-memory.c (compare_block_starting_address): Return bool.
4713 Change argument types.
4714 (claim_memory): Change arguments to use std::vector.
4715 (split_regular_and_flash_blocks, blocks_to_erase)
4716 (compute_garbled_blocks): Likewise.
4717 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4718 (target_write_memory_blocks): Change argument to std::vector.
4719 * symfile.c (struct load_section_data): Add constructor and
4720 destructor. Use std::vector for "requests".
4721 (struct load_progress_data): Add initializers.
4722 (load_section_callback): Update. Use "new".
4723 (clear_memory_write_data): Remove.
4724 (generic_load): Update.
4726 2018-02-27 Alan Hayward <alan.hayward@arm.com>
4728 * arch/aarch64.h: Use common/tdesc.h.
4730 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4732 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4733 architecture with a 64-bit ABI.
4735 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4737 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4738 ahead of target description loading.
4740 2018-02-26 Tom Tromey <tom@tromey.com>
4742 * stack.c (backtrace_command_1): Update.
4743 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4745 * python/py-framefilter.c (py_print_frame)
4746 (gdbpy_apply_frame_filter): Change type of "flags".
4747 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4749 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4750 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4751 * extension.h (enum frame_filter_flag): Rename from
4753 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4754 (apply_ext_lang_frame_filter): Change type of "flags".
4755 * extension.c (apply_ext_lang_frame_filter): Change type of
4757 * extension-priv.h (struct extension_language_ops)
4758 <apply_frame_filter>: Change type of "flags".
4760 2018-02-26 Tom Tromey <tom@tromey.com>
4763 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4764 off-by-one in py_end computation.
4765 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4767 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4770 2018-02-26 Tom Tromey <tom@tromey.com>
4772 * dwarf2read.c (struct variant_field): New.
4773 (struct nextfield) <variant>: New field.
4774 (dwarf2_add_field): Handle DW_TAG_variant_part.
4775 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4776 discriminated union.
4777 (read_structure_type): Handle DW_TAG_variant_part.
4778 (handle_struct_member_die): New function, extracted from
4779 process_structure_scope. Handle DW_TAG_variant.
4780 (process_structure_scope): Handle discriminated unions. Call
4781 handle_struct_member_die.
4783 2018-02-26 Tom Tromey <tom@tromey.com>
4785 * rust-lang.h (rust_last_path_segment): Declare.
4786 * rust-lang.c (rust_last_path_segment): Now public. Change
4788 (struct disr_info): Remove.
4789 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4790 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4791 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4792 (rust_enum_p, rust_enum_variant): New function.
4793 (rust_underscore_fields): Remove "offset" parameter.
4794 (rust_print_enum): New function.
4795 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4796 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4797 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4799 (rust_internal_print_type): New function, from rust_print_type.
4801 (rust_print_type): Call rust_internal_print_type.
4802 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4803 Update enum handling.
4804 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4805 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4806 (rust_union_quirks): New functions.
4807 (process_full_comp_unit, process_full_type_unit): Call
4809 (process_structure_scope): Update rust_unions if necessary.
4811 2018-02-26 Tom Tromey <tom@tromey.com>
4813 * value.h (value_union_variant): Declare.
4814 * valops.c (value_union_variant): New function.
4815 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4816 (struct discriminant_info): New.
4817 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4819 (struct main_type) <flag_discriminated_union>: New field.
4821 2018-02-26 Tom Tromey <tom@tromey.com>
4823 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4824 unittests/unpack-selftests.c.
4825 * unittests/unpack-selftests.c: New file.
4826 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4828 2018-02-26 Yao Qi <yao.qi@linaro.org>
4830 * dwarf2read.c (struct partial_die_info) <read>: New method.
4831 (read_partial_die): Remove the declaration.
4832 (load_partial_dies): Update.
4833 (partial_die_info::partial_die_info):
4834 (read_partial_die): Change it to partial_die_info::read.
4836 2018-02-26 Yao Qi <yao.qi@linaro.org>
4838 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4839 (fixup_partial_die): Remove declaration.
4840 (scan_partial_symbols): Update.
4841 (partial_die_parent_scope): Likewise.
4842 (partial_die_full_name): Likewise.
4843 (fixup_partial_die): Change it to partial_die_info::fixup.
4845 2018-02-26 Yao Qi <yao.qi@linaro.org>
4847 * dwarf2read.c (read_partial_die): Update the declaration.
4848 (load_partial_dies): Caller update.
4849 (read_partial_die): Remove one argument abbrev_len.
4851 2018-02-26 Yao Qi <yao.qi@linaro.org>
4853 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4854 assignment operator.
4855 (load_partial_dies): Use ctor and copy ctor.
4856 (read_partial_die): Update.
4857 (dwarf2_cu::find_partial_die): Use ctor.
4859 2018-02-26 Yao Qi <yao.qi@linaro.org>
4861 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4862 (find_partial_die_in_comp_unit): Change it to
4863 dwarf2_cu::find_partial_die.
4864 (find_partial_die): Update.
4866 2018-02-26 Yao Qi <yao.qi@linaro.org>
4868 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4871 2018-02-26 Yao Qi <yao.qi@linaro.org>
4873 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4875 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4877 * arch/amd64.h: Use common/tdesc.h.
4878 * arch/i386.c: Likewise.
4879 * arch/i386.h: Likewise.
4880 * arch/tic6x.c: Likewise.
4881 * arch/tdesc.h: Move file from here...
4882 * common/tdesc.h: ...to here.
4883 * features/aarch64-core.c: Regenerate.
4884 * features/aarch64-fpu.c: Regenerate.
4885 * features/i386/32bit-avx.c: Regenerate.
4886 * features/i386/32bit-avx512.c: Regenerate.
4887 * features/i386/32bit-core.c: Regenerate.
4888 * features/i386/32bit-linux.c: Regenerate.
4889 * features/i386/32bit-mpx.c: Regenerate.
4890 * features/i386/32bit-pkeys.c: Regenerate.
4891 * features/i386/32bit-sse.c: Regenerate.
4892 * features/i386/64bit-avx.c: Regenerate.
4893 * features/i386/64bit-avx512.c: Regenerate.
4894 * features/i386/64bit-core.c: Regenerate.
4895 * features/i386/64bit-linux.c: Regenerate.
4896 * features/i386/64bit-mpx.c: Regenerate.
4897 * features/i386/64bit-pkeys.c: Regenerate.
4898 * features/i386/64bit-segments.c: Regenerate.
4899 * features/i386/64bit-sse.c: Regenerate.
4900 * features/i386/x32-core.c: Regenerate.
4901 * features/tic6x-c6xp.c: Regenerate.
4902 * features/tic6x-core.c: Regenerate.
4903 * features/tic6x-gp.c: Regenerate.
4904 * target-descriptions.c: Use common/tdesc.h.
4905 * target-descriptions.h: Likewise.
4907 2018-02-24 Tom Tromey <tom@tromey.com>
4909 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4910 (try_thread_db_load_from_dir, thread_db_load_search): Use
4912 (info_auto_load_libthread_db_compare): Return bool. Change
4914 (info_auto_load_libthread_db): Use std::vector, std::string.
4917 2018-02-24 Tom Tromey <tom@tromey.com>
4919 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4921 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4923 * gdbarch.c: Rebuild.
4924 * gdbarch.h: Rebuild.
4925 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4926 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4927 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4930 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4932 * gdbtypes.h (sect_offset): Change type to uint64_t.
4933 (sect_offset_str): New function.
4934 * dwarf2read.c (create_addrmap_from_aranges): Use
4936 (error_check_comp_unit_head): Likewise.
4937 (create_debug_type_hash_table): Likewise.
4938 (read_cutu_die_from_dwo): Likewise.
4939 (init_cutu_and_read_dies): Likewise.
4940 (init_cutu_and_read_dies_no_follow): Likewise.
4941 (process_psymtab_comp_unit_reader): Likewise.
4942 (partial_die_parent_scope): Likewise.
4943 (peek_die_abbrev): Likewise.
4944 (process_queue): Likewise.
4945 (dwarf2_physname): Likewise.
4946 (read_namespace_alias): Likewise.
4947 (read_import_statement): Likewise.
4948 (create_dwo_cu_reader): Likewise.
4949 (create_cus_hash_table): Likewise.
4950 (lookup_dwo_cutu): Likewise.
4951 (inherit_abstract_dies): Likewise.
4952 (read_func_scope): Likewise.
4953 (read_call_site_scope): Likewise.
4954 (dwarf2_add_member_fn): Likewise.
4955 (read_common_block): Likewise.
4956 (read_module_type): Likewise.
4957 (read_typedef): Likewise.
4958 (read_subrange_type): Likewise.
4959 (load_partial_dies): Likewise.
4960 (read_partial_die): Likewise.
4961 (find_partial_die): Likewise.
4962 (read_str_index): Likewise.
4963 (dwarf2_string_attr): Likewise.
4964 (build_error_marker_type): Likewise.
4965 (lookup_die_type): Likewise.
4966 (dump_die_shallow): Likewise.
4967 (follow_die_ref): Likewise.
4968 (dwarf2_fetch_die_loc_sect_off): Likewise.
4969 (dwarf2_fetch_constant_bytes): Likewise.
4970 (follow_die_sig): Likewise.
4971 (get_signatured_type): Likewise.
4972 (get_DW_AT_signature_type): Likewise.
4973 (dwarf2_find_containing_comp_unit): Likewise.
4974 (set_die_type): Likewise.
4976 2018-02-21 John Baldwin <jhb@FreeBSD.org>
4978 * arch/aarch64.c: Include "common-defs.h".
4979 * arch/amd64.c: Likewise.
4980 * arch/i386.c: Likewise.
4982 2018-02-21 Tom Tromey <tom@tromey.com>
4984 * value.h: (extract_field_op): Update.
4985 * eval.c (extract_field_op): Return a const char *.
4986 * expression.h (parse_expression_for_completion): Update.
4987 * completer.c (complete_expression): Update.
4988 (add_struct_fields): Make fieldname const.
4989 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4990 (mark_completion_tag, parse_exp_in_context_1): Update.
4991 (parse_expression_for_completion): Change "name" to
4992 unique_xmalloc_ptr*.
4994 2018-02-21 Tom Tromey <tom@tromey.com>
4996 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4998 2018-02-21 Yao Qi <yao.qi@linaro.org>
5000 * avr-tdep.c (avr_read_pc): Change parameter type to
5002 * gdbarch.sh (read_pc): Likewise.
5003 * gdbarch.c: Re-generated.
5004 * gdbarch.h: Re-generated.
5005 * hppa-tdep.c (hppa_read_pc): Change parameter type to
5007 * ia64-tdep.c (ia64_read_pc): Likewise.
5008 * mips-tdep.c (mips_read_pc): Likewise.
5009 * spu-tdep.c (spu_read_pc): Likewise.
5011 2018-02-21 Yao Qi <yao.qi@linaro.org>
5013 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5014 * regcache-dump.c: New file.
5015 * regcache.c: Move register_dump to regcache-dump.c.
5016 (maintenance_print_registers): Likewise.
5017 (maintenance_print_raw_registers): Likewise.
5018 (maintenance_print_cooked_registers): Likewise.
5019 (maintenance_print_register_groups): Likewise.
5020 (maintenance_print_remote_registers): Likewise.
5021 (_initialize_regcache): Likewise.
5022 * regcache.h (register_dump): Moved from regcache.c.
5024 2018-02-21 Yao Qi <yao.qi@linaro.org>
5026 * regcache.c (regcache::regcache): Update.
5027 (regcache::invalidate): Move it to detached_regcache::invalidate.
5028 (get_thread_arch_aspace_regcache): Update.
5029 (regcache::raw_update): Update.
5030 (regcache::cooked_read): Remove some code.
5031 (regcache::cooked_read_value): Likewise.
5032 (regcache::raw_write): Remove assert on m_readonly_p.
5033 (regcache::raw_supply_integer): Move it to
5034 detached_regcache::raw_supply_integer.
5035 (regcache::raw_supply_zeroed): Likewise.
5036 * regcache.h (detached_regcache) <raw_supply_integer>: New
5038 <raw_supply_zeroed, invalidate>: Likewise.
5039 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5040 <invalidate>: Likewise.
5041 <m_readonly_p>: Removed.
5043 2018-02-21 Yao Qi <yao.qi@linaro.org>
5045 * infcmd.c (get_return_value): Let stop_regs point to
5046 get_current_regcache.
5047 * regcache.c (regcache::regcache): Remove.
5048 (register_dump_reg_buffer): New class.
5049 (regcache_print): Adjust.
5050 * regcache.h (regcache): Remove constructors.
5052 2018-02-21 Yao Qi <yao.qi@linaro.org>
5054 * regcache.c (class register_dump): New class.
5055 (register_dump_regcache, register_dump_none): New class.
5056 (register_dump_remote, register_dump_groups): New class.
5057 (regcache_print): Update.
5058 * regcache.h (regcache_dump_what): Move it to regcache.c.
5059 (regcache) <dump>: Remove.
5061 2018-02-21 Yao Qi <yao.qi@linaro.org>
5063 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5065 (jit_unwind_reg_set_impl): Call raw_supply.
5066 (jit_frame_sniffer): Use reg_buffer_rw.
5067 * record-full.c (record_full_core_regbuf): Change its type.
5068 (record_full_core_open_1): Use reg_buffer_rw.
5069 (record_full_close): Likewise.
5070 (record_full_core_fetch_registers): Use regcache->raw_supply.
5071 (record_full_core_store_registers): Likewise.
5072 * regcache.c (regcache::get_register_status): Move it to
5074 (regcache_raw_set_cached_value): Remove.
5075 (regcache::raw_set_cached_value): Remove.
5076 (regcache::raw_write): Call raw_supply.
5077 (regcache::raw_supply): Move it to reg_buffer_rw.
5078 * regcache.h (regcache_raw_set_cached_value): Remove.
5079 (reg_buffer_rw): New class.
5081 2018-02-21 Yao Qi <yao.qi@linaro.org>
5083 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5084 readonly_detached_regcache.
5085 (dummy_frame_prev_register): Use regcache->cooked_read.
5086 * frame.c (frame_save_as_regcache): Change return type.
5087 (frame_pop): Update.
5088 * frame.h (frame_save_as_regcache): Update declaration.
5089 * inferior.h (get_infcall_suspend_state_regcache): Update
5091 * infrun.c (infcall_suspend_state) <registers>: use
5092 readonly_detached_regcache.
5093 (save_infcall_suspend_state): Don't use regcache_dup.
5094 (get_infcall_suspend_state_regcache): Change return type.
5095 * linux-fork.c (struct fork_info) <savedregs>: Change to
5096 readonly_detached_regcache.
5098 (fork_save_infrun_state): Don't use regcache_dup.
5099 (info_checkpoints_command): Adjust.
5100 * mi/mi-main.c (register_changed_p): Update declaration.
5101 (mi_cmd_data_list_changed_registers): Use
5102 readonly_detached_regcache.
5103 (register_changed_p): Change parameter type to
5104 readonly_detached_regcache.
5105 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
5106 readonly_detached_regcache.
5107 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
5108 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
5110 (regcache::save): Move it to reg_buffer.
5111 (regcache::restore): Change parameter type.
5112 (regcache_dup): Remove.
5113 * regcache.h (reg_buffer) <save>: New method.
5114 (readonly_detached_regcache): New class.
5115 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
5116 readonly_detached_regcache.
5117 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
5119 2018-02-21 Yao Qi <yao.qi@linaro.org>
5121 * frame.c (frame_save_as_regcache): Use regcache method save.
5122 (frame_pop): Use regcache method restore.
5123 * infrun.c (restore_infcall_suspend_state): Likewise.
5124 * linux-fork.c (fork_load_infrun_state): Likewise.
5125 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5127 * regcache.c (regcache_save): Remove.
5128 (regcache::restore): More asserts.
5129 (regcache_cpy): Remove.
5130 * regcache.h (regcache_save): Remove the declaration.
5131 (regcache::restore): Move from private to public.
5132 Remove the friend declaration of regcache_cpy.
5133 (regcache_cpy): Remove declaration.
5135 2018-02-21 Yao Qi <yao.qi@linaro.org>
5137 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5138 parameter type to 'readable_regcache *'.
5139 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5140 * arm-tdep.c (arm_neon_quad_read): Likewise.
5141 (arm_pseudo_read): Likewise.
5142 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5143 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5144 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5145 * gdbarch.c: Re-generated.
5146 * gdbarch.h: Re-generated.
5147 * gdbarch.sh (pseudo_register_read): Change parameter type to
5148 'readable_regcache *'.
5149 (pseudo_register_read_value): Likewise.
5150 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
5151 (h8300_pseudo_register_read): Likewise.
5152 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
5153 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5154 (i386_pseudo_register_read_into_value): Likewise.
5155 (i386_pseudo_register_read_value): Likewise.
5156 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
5158 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
5159 * m32c-tdep.c (m32c_raw_read): Likewise.
5160 (m32c_read_flg): Likewise.
5161 (m32c_banked_register): Likewise.
5162 (m32c_banked_read): Likewise.
5163 (m32c_sb_read): Likewise.
5164 (m32c_part_read): Likewise.
5165 (m32c_cat_read): Likewise.
5166 (m32c_r3r2r1r0_read): Likewise.
5167 (m32c_pseudo_register_read): Likewise.
5168 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5169 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5170 (mep_pseudo_cr64_read): Likewise.
5171 (mep_pseudo_register_read): Likewise.
5172 * mips-tdep.c (mips_pseudo_register_read): Likewise.
5173 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5174 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5175 * regcache.c (regcache::raw_read): Move it to readable_regcache.
5176 (regcache::cooked_read): Likewise.
5177 (regcache::cooked_read_value): Likewise.
5178 (regcache_cooked_read_signed):
5179 (regcache::cooked_read): Likewise.
5180 * regcache.h (readable_regcache): New class.
5181 (regcache): Inherit readable_regcache. Move some methods to
5183 * rl78-tdep.c (rl78_pseudo_register_read): Change
5184 parameter type to 'readable_regcache *'.
5185 * rs6000-tdep.c (do_regcache_raw_read): Remove.
5186 (e500_pseudo_register_read): Change parameter type to
5187 'readable_regcache *'.
5188 (dfp_pseudo_register_read): Likewise.
5189 (vsx_pseudo_register_read): Likewise.
5190 (efpr_pseudo_register_read): Likewise.
5191 * s390-tdep.c (s390_pseudo_register_read): Likewise.
5192 * sh-tdep.c (sh_pseudo_register_read): Likewise.
5193 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
5194 (sh64_pseudo_register_read): Likewise.
5195 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5196 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5197 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5198 (spu_pseudo_register_read): Likewise.
5199 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5200 (xtensa_pseudo_register_read): Likewise.
5202 2018-02-21 Yao Qi <yao.qi@linaro.org>
5204 * regcache.c (regcache::regcache): Call reg_buffer ctor.
5205 (regcache::arch): Move it to reg_buffer::arch.
5206 (regcache::register_buffer): Likewise.
5207 (regcache::assert_regnum): Likewise.
5208 (regcache::num_raw_registers): Likewise.
5209 * regcache.h (reg_buffer): New class.
5210 (regcache): Inherit reg_buffer.
5212 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
5214 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
5215 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
5217 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
5219 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
5221 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5223 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
5224 (SFILES): Remove common/*.c files.
5225 (COMMON_OBS): Remove some *.o files built from common/*.c files.
5226 * common/common.host: Add common reference.
5227 * configure.ac: Likewise.
5228 * configure: Regenerate.
5230 2018-02-16 Yao Qi <yao.qi@linaro.org>
5232 * block.c (block_namespace_info): Inherit allocate_on_obstack.
5233 (block_initialize_namespace): Use new.
5234 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
5235 (dwarf2_free_objfile): Use delete.
5236 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
5237 (copy_type_recursive): Use new.
5238 * gdb_obstack.h (allocate_on_obstack): New.
5240 2018-02-15 Yao Qi <yao.qi@linaro.org>
5243 * inferior.c (exit_inferior_1): Reset inf->control.
5245 2018-02-15 Joel Brobecker <brobecker@adacore.com>
5247 * ada-lang.c (ada_to_fixed_value_create): Delete advance
5250 2018-02-14 Pedro Alves <palves@redhat.com>
5252 * frame-unwind.c (frame_unwind_try_unwinder): Always call
5253 frame_cleanup_after_sniffer on exception.
5255 2018-02-14 Tom Tromey <tom@tromey.com>
5257 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
5259 (solib_bfd_open): Make pathname const.
5260 * solib.c (solib_bfd_open): Make pathname const.
5261 * solib-spu.c (spu_bfd_fopen): Make name const.
5262 (spu_bfd_open): Make pathname const.
5263 * solib-darwin.c (darwin_bfd_open): Make pathname const.
5264 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
5266 2018-02-14 Tom Tromey <tom@tromey.com>
5268 * symfile.c (symfile_bfd_open): Update.
5269 * source.h (openp, source_full_path_of, find_and_open_source):
5270 Change argument type to unique_xmalloc_ptr.
5271 * source.c (openp): Take a unique_xmalloc_ptr.
5272 (source_full_path_of, find_and_open_source): Likewise.
5273 (open_source_file, symtab_to_fullname): Update.
5274 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
5276 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
5277 (exec_file_find): Update.
5278 * psymtab.c (psymtab_to_fullname): Update.
5279 * nto-tdep.h (nto_find_and_open_solib): Update.
5280 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
5282 * exec.c (exec_file_attach): Update.
5283 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
5284 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
5286 2018-02-14 Tom Tromey <tom@tromey.com>
5288 * solib.c: Include source.h.
5289 * nto-tdep.c: Include source.h.
5290 * mi/mi-cmd-env.c: Include source.h.
5291 * infcmd.c: Include source.h.
5292 * exec.c: Include source.h.
5293 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
5294 (add_path, directory_switch, source_path, init_source_path): Move
5296 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
5297 (add_path, directory_switch, source_path, init_source_path):
5300 2018-02-14 Tom Tromey <tom@tromey.com>
5302 * solist.h (exec_file_find, solib_find): Return
5304 (solib_bfd_fopen): Take a const char *.
5305 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
5306 (exec_file_find, solib_find): Likewise.
5307 (solib_bfd_fopen): Do not take ownership of "pathname".
5308 (solib_bfd_open): Use unique_xmalloc_ptr.
5309 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
5310 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
5311 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
5312 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
5314 2018-02-14 Joel Brobecker <brobecker@adacore.com>
5316 * ada-lang.c (name_match_type_from_name): Remove reference to
5317 ada_name_for_lookup in function's documentation.
5318 * ada-lang.h (ada_name_for_lookup): Delete declaration.
5320 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5322 * defs.h (enum openp_flags): New enum.
5323 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
5324 Move to enum openp_flags.
5325 (openp_flags): New enum flags.
5326 (openp): Change parameter type to openp_flags.
5327 * source.c (openp): Change parameter type to openp_flags.
5328 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
5329 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
5331 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5333 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
5336 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
5338 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
5340 (class dwarf2_queue_guard): ...the destructor of this new class.
5341 (dw2_do_instantiate_symtab): Create instance of the new class
5342 dwarf2_queue_guard, remove cleanup.
5344 2018-02-09 Tom Tromey <tom@tromey.com>
5346 * source.c (find_source_lines): Don't reference past the end of
5349 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5351 * remote.c (remote_btrace_maybe_reopen): Change error message.
5352 * btrace.c (btrace_enable): Likewise.
5353 (parse_xml_btrace): Likewise.
5354 (parse_xml_btrace_conf): Likewise.
5356 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5358 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
5359 (linux_enable_pt, linux_enable_bts): Call
5360 diagnose_perf_event_open_fail.
5362 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5364 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
5365 Remove parameter and change return type. Update callers. Move it.
5366 (linux_enable_bts, linux_enable_pt): Improve error message.
5367 (linux_enable_pt): Remove zero buffer size check.
5368 (linux_enable_btrace): Improve error messages. Remove NULL return
5371 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5373 * btrace.c (btrace_enable): Remove target_supports_btrace call.
5374 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
5375 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
5376 (linux_supports_pt, linux_supports_btrace): Remove.
5377 (linux_enable_bts): Call cpu_supports_bts.
5378 * nat/linux-btrace.h (linux_supports_btrace): Remove.
5379 * remote.c (remote_supports_btrace): Remove.
5380 (init_remote_ops): Remove remote_supports_btrace.
5381 * target-delegates.c: Regenerated.
5382 * target.c (target_supports_btrace): Remove.
5383 * target.h (target_ops) <to_supports_btrace>: Remove
5384 (target_supports_btrace): Remove.
5385 * x86-linux-nat.c (x86_linux_create_target): Remove
5386 linux_supports_btrace.
5388 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5390 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
5392 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
5393 exception and use message in own exception.
5395 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5397 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
5398 (perf_event_pt_event_type): Use gdb_file_up.
5399 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
5400 scoped_fd, and scoped_mmap.
5402 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5404 * common/scoped_mmap.h: New.
5405 * unittests/scoped_mmap-selftest.c: New.
5406 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5407 unittests/scoped_mmap-selftest.c.
5409 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5411 * common/scoped_fd.h: New.
5412 * unittests/scoped_fd-selftest.c: New.
5413 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5414 unittests/scoped_fd-selftest.c.
5416 2018-02-09 Tom Tromey <tom@tromey.com>
5418 * auto-load.c (auto_load_section_scripts): Use
5419 gdb::unique_xmalloc_ptr.
5421 2018-02-09 Tom Tromey <tom@tromey.com>
5423 * auto-load.c (execute_script_contents): Use std::string.
5425 2018-02-09 Joel Brobecker <brobecker@adacore.com>
5427 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
5428 Python function, rather than a new command.
5430 2018-02-08 Tom Tromey <tom@tromey.com>
5432 * solib.c (solib_find_1): Use std::string.
5433 (solib_bfd_fopen): Use unique_xmalloc_ptr.
5435 2018-02-08 Tom Tromey <tom@tromey.com>
5437 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
5439 2018-02-08 Tom Tromey <tom@tromey.com>
5441 * source.c (find_source_lines): Use gdb::def_vector.
5443 2018-02-08 Tom Tromey <tom@tromey.com>
5445 * macrocmd.c (struct temporary_macro_definition): New.
5446 (macro_define_command): Use temporary_macro_definition. Remove
5448 (free_macro_definition_ptr): Remove.
5450 2018-02-08 Tom Tromey <tom@tromey.com>
5452 * macroexp.c (maybe_expand): Use std::string.
5454 2018-02-08 Tom Tromey <tom@tromey.com>
5456 * macroexp.c (struct macro_buffer): Add initializers for some
5458 (init_buffer, init_shared_buffer, free_buffer)
5459 (free_buffer_return_text): Remove.
5460 (macro_buffer): New constructors.
5461 (~macro_buffer): New destructor.
5462 (macro_buffer::set_shared): New method.
5463 (macro_buffer::resize_buffer, macro_buffer::appendc)
5464 (macro_buffer::appendmem): Now methods, not free functions.
5465 (set_token, append_tokens_without_splicing, stringify)
5466 (macro_stringify): Update.
5467 (gather_arguments): Change return type. Remove argc_p argument,
5468 add args_ptr argument. Use std::vector.
5469 (substitute_args): Remove argc argument. Accept std::vector.
5470 (expand): Update. Use std::vector.
5471 (scan, macro_expand, macro_expand_next): Update.
5473 2018-02-08 Tom Tromey <tom@tromey.com>
5475 * symtab.c (default_collect_symbol_completion_matches_break_on):
5476 Use unique_xmalloc_ptr.
5477 * macroscope.h: (sal_macro_scope, user_macro_scope)
5478 (default_macro_scope): Return unique_xmalloc_ptr.
5479 * macroscope.c (sal_macro_scope, user_macro_scope)
5480 (default_macro_scope): Return unique_xmalloc_ptr.
5481 * macroexp.h (macro_expand, macro_expand_once): Return
5483 * macroexp.c (macro_expand, macro_expand_once): Return
5485 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5486 (info_macro_command, info_macros_command): Use
5488 * compile/compile-c-support.c (write_macro_definitions): Use
5490 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5492 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
5494 * value.c (value_static_field): Assign field type instead of
5495 containing type when returning an optimized out value.
5497 2018-02-06 Yao Qi <yao.qi@linaro.org>
5499 * ft32-tdep.c (ft32_read_pc): Remove.
5500 (ft32_write_pc): Remove.
5501 (ft32_gdbarch_init): Update.
5502 * m32r-tdep.c (m32r_read_pc): Remove.
5503 (m32r_gdbarch_init): Update.
5504 * mep-tdep.c (mep_read_pc): Remove.
5505 (mep_gdbarch_init): Update.
5506 * microblaze-tdep.c (microblaze_write_pc): Remove.
5507 (microblaze_gdbarch_init): Update.
5508 * mn10300-tdep.c (mn10300_read_pc): Remove.
5509 (mn10300_write_pc): Remove.
5510 (mn10300_gdbarch_init): Update.
5511 * moxie-tdep.c (moxie_read_pc): Remove.
5512 (moxie_write_pc): Remove.
5513 (moxie_gdbarch_init): Update.
5515 2018-02-06 Yao Qi <yao.qi@linaro.org>
5517 * expprint.c (print_subexp_standard): Handle
5518 OP_F77_UNDETERMINED_ARGLIST.
5519 (dump_subexp_body_standard): Likewise.
5521 2018-02-05 Alan Hayward <alan.hayward@arm.com>
5523 * target-descriptions.c (tdesc_element_visitor) Add empty
5525 (tdesc_type): Move make_gdb_type from here.
5526 (tdesc_type_builtin): Likewise.
5527 (tdesc_type_vector): Likewise.
5528 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5529 (make_gdb_type_struct): Move from tdesc_type_with_fields.
5530 (make_gdb_type_union): Likewise.
5531 (make_gdb_type_flags): Likewise.
5532 (make_gdb_type_enum): Likewise.
5533 (make_gdb_type): New function.
5534 (tdesc_register_type): Use static make_gdb_type.
5536 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
5538 * infcmd.c (default_print_one_register_info): Align natural-format
5539 column values consistently one under another.
5540 (pad_to_column): New function.
5542 2018-02-05 Joel Brobecker <brobecker@adacore.com>
5544 * dwarf2read.c (dwarf2_physname): Move commment.
5546 2018-02-01 Leszek Swirski <leszeks@google.com>
5548 * varobj.c (varobj_formatted_print_options): Allow recursive
5549 pretty printing if pretty printing is enabled.
5551 2018-02-01 Leszek Swirski <leszeks@google.com>
5553 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5554 names after a structop as a filename.
5556 2018-02-01 Yao Qi <yao.qi@linaro.org>
5558 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5559 (arm_record_coproc_data_proc): Likewise.
5561 2018-02-01 Yao Qi <yao.qi@linaro.org>
5563 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5565 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5567 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5568 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5570 2018-01-31 Pedro Alves <palves@redhat.com>
5572 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5573 * inflow.c (child_terminal_save_inferior): Wrap reference to
5574 tcgetpgrp in HAVE_TERMIOS_H.
5575 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5577 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5578 always iterate over all inferiors.
5579 (gdbsim_cntrl_c): Adjust.
5580 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5582 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5584 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5585 index type is objfile-owned if the element type is as well.
5587 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5591 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5593 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5594 "features/s390x-linux64.c".
5595 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5596 s390_linux32 and s390x_linux64.
5597 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5599 * s390-tdep.c: Include "features/s390-linux32.c" and
5600 "features/s390x-linux64.c".
5601 (s390_tdesc_valid): Add check for tdesc_has_registers.
5602 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5603 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5604 tdesc_s390x_linux64.
5605 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5606 tdesc_s390x_linux64 to...
5607 * s390-tdep.h: ...here.
5609 2018-01-30 Pedro Alves <palves@redhat.com>
5612 * config.in, configure: Regenerate.
5613 * configure.ac: Check for getpgid.
5614 * go32-nat.c (go32_pass_ctrlc): New.
5615 (go32_target): Install it.
5616 * inf-child.c (inf_child_target): Install
5617 child_terminal_save_inferior, child_pass_ctrlc and
5619 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5620 (inf_ptrace_target): No longer install it.
5621 * infcmd.c (interrupt_target_1): Adjust.
5622 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5623 (child_interrupt): Declare.
5624 (inferior::terminal_state): New.
5625 * inflow.c (struct terminal_info): Update comments.
5626 (inferior_process_group): Delete.
5627 (terminal_is_ours): Delete.
5628 (gdb_tty_state): New.
5629 (child_terminal_init): Adjust.
5630 (is_gdb_terminal, sharing_input_terminal_1)
5631 (sharing_input_terminal): New functions.
5632 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5633 Set the process's actual process group in the foreground if
5634 possible. Handle is_ours_for_output/is_ours distinction. Don't
5635 mark terminal as the inferior's if not sharing GDB's terminal.
5636 Don't check attach_flag.
5637 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5638 pass down a target_terminal_state.
5639 (child_terminal_save_inferior): New, factored out from ...
5640 (child_terminal_ours_1): ... this. Handle
5641 target_terminal_state::is_ours_for_output.
5642 (child_interrupt, child_pass_ctrlc): New.
5643 (inflow_inferior_exit): Clear the inferior's terminal_state.
5644 (copy_terminal_info): Copy the inferior's terminal state.
5645 (_initialize_inflow): Remove reference to terminal_is_ours.
5646 * inflow.h (inferior_process_group): Delete.
5647 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5648 * procfs.c (procfs_target): Don't install procfs_interrupt.
5649 (procfs_interrupt): Delete.
5650 * remote.c (remote_serial_quit_handler): Adjust.
5651 (remote_interrupt): Remove ptid parameter. Adjust.
5652 * target-delegates.c: Regenerate.
5653 * target.c: Include "terminal.h".
5654 (target_terminal::terminal_state): Rename to ...
5655 (target_terminal::m_terminal_state): ... this.
5656 (target_terminal::init): Adjust.
5657 (target_terminal::inferior): Adjust to per-inferior
5659 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5660 (target_terminal::ours, target_terminal::ours_for_output): Use
5661 target_terminal_is_ours_kind.
5662 (target_interrupt): Remove ptid parameter. Adjust.
5663 (default_target_pass_ctrlc): Adjust.
5664 * target.h (target_ops::to_terminal_save_inferior): New field.
5665 (target_ops::to_interrupt): Remove ptid_t parameter.
5666 (target_interrupt): Remove ptid_t parameter. Update comment.
5667 (target_pass_ctrlc): Update comment.
5668 * target/target.h (target_terminal_state): New scoped enum,
5670 (target_terminal::terminal_state): ... here.
5671 (target_terminal::inferior): Update comments.
5672 (target_terminal::restore_inferior): New.
5673 (target_terminal::is_inferior, target_terminal::is_ours)
5674 (target_terminal::is_ours_for_output): Adjust.
5675 (target_terminal::scoped_restore_terminal_state): Adjust to
5676 rename, and call restore_inferior() instead of inferior().
5677 (target_terminal::scoped_restore_terminal_state::m_state): Change
5679 (target_terminal::terminal_state): Rename to ...
5680 (target_terminal::m_terminal_state): ... this and change type.
5682 2018-01-30 Pedro Alves <palves@redhat.com>
5684 * linux-nat.c (wait_for_signal): New function.
5685 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5687 (async_terminal_is_ours)
5688 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5689 (linux_nat_add_target): Don't override
5690 to_terminal_inferior/to_terminal_ours.
5692 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5694 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5696 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5698 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5699 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5700 dwarf2_per_objfile_free here.
5701 (dwarf2_per_objfile_free): Remove.
5702 (_initialize_dwarf2_read): Don't register
5703 dwarf2_per_objfile_free as a registry cleanup.
5705 2018-01-27 Eli Zaretskii <eliz@gnu.org>
5707 Avoid compilation errors in MinGW native builds
5709 The error is triggered by including python-internal.h, and the
5712 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5713 from build-gnulib/import/math.h:27,
5714 from d:/usr/Python26/include/pyport.h:235,
5715 from d:/usr/Python26/include/Python.h:58,
5716 from python/python-internal.h:94,
5717 from python/py-arch.c:24:
5718 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5722 This happens because Python headers define 'hypot' to expand t
5723 '_hypot' in the Windows builds.
5724 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5725 'hypoth'. This avoids a compilation error.
5727 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5729 * MAINTAINERS (Write After Approval): Fix ordering.
5731 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5733 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5735 2018-01-26 Alan Modra <amodra@gmail.com>
5737 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5738 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5739 Remove nop. Make const. Comment.
5740 (powerpc32_plt_stub_so_2): New.
5741 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5742 Correct count. Update uses.
5743 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5744 Move common code reading PLT entry word. Correct
5745 powerpc32_plt_stub PLT address calculation.
5746 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5747 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5748 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5749 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5750 (ppc64_standard_linkage8): Likewise.
5751 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5752 Correct insns description.
5753 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5755 2018-01-24 Pedro Alves <palves@redhat.com>
5757 GCC PR libstdc++/83906
5758 * gdbtypes.c (operator==(const dynamic_prop &,
5759 const dynamic_prop &)): New.
5760 (operator==(const range_bounds &, const range_bounds &)): New.
5761 (check_types_equal): Use them instead of memcmp.
5762 * gdbtypes.h (operator==(const dynamic_prop &,
5763 const dynamic_prop &)): Declare.
5764 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5765 (operator==(const range_bounds &, const range_bounds &)): Declare.
5766 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5768 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5770 * s390-linux-tdep.c (s390_record_address_mask)
5771 (s390_record_calc_disp_common, s390_record_calc_disp)
5772 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5773 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5774 (s390_process_record): Move to s390-tdep.c.
5775 (s390_linux_init_abi_any): Adjust.
5776 * s390-tdep.c (s390_record_address_mask)
5777 (s390_record_calc_disp_common, s390_record_calc_disp)
5778 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5779 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5780 (s390_process_record): Moved from s390-linux-tdep.c
5781 (s390_gdbarch_init): Adjust.
5783 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5785 * s390-linux-nat.c (s390-tdep.h): New include.
5786 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5787 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5788 (ALLDEPFILES): Add s390-tdep.c.
5789 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5790 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5791 * s390-tdep.h: ...this. New file.
5792 * s390-linux-tdep.c (s390-tdep.h): New include.
5793 (_initialize_s390_tdep): Rename to...
5794 (_initialize_s390_linux_tdep): ...this and adjust.
5795 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5796 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5798 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5799 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5800 (s390_is_partial_instruction, s390_software_single_step)
5801 (is_non_branch_ril, s390_displaced_step_copy_insn)
5802 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5803 (s390_prologue_data, s390_addr, s390_store, s390_load)
5804 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5805 (s390_register_call_saved, s390_guess_tracepoint_registers)
5806 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5807 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5808 (s390_pseudo_register_name, s390_pseudo_register_type)
5809 (s390_pseudo_register_read, s390_pseudo_register_write)
5810 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5811 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5812 (s390_addr_bits_remove, s390_address_class_type_flags)
5813 (s390_address_class_type_flags_to_name)
5814 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5815 (s390_function_arg_float, s390_function_arg_vector)
5816 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5817 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5818 (s390_frame_align, s390_register_return_value, s390_return_value)
5819 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5820 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5821 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5822 (s390_trad_frame_prev_register, s390_unwind_cache)
5823 (s390_prologue_frame_unwind_cache)
5824 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5825 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5826 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5827 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5828 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5829 (s390_frame_base_address, s390_local_base_address)
5830 (s390_frame_base, s390_gcc_target_options)
5831 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5832 (s390_validate_reg_range, s390_tdesc_valid)
5833 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5834 * s390-tdep.c: ...this. New file.
5836 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5838 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5839 (s390_process_record, s390_gdbarch_tdep_alloc)
5840 (s390_linux_init_abi_any): Use/set new hook.
5842 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5844 * s390-linux-tdep.c (osabi.h): New include.
5845 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5846 (s390_linux_init_abi_any): New functions.
5847 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5849 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5851 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5852 tdesc_has_registers check
5854 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5856 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5857 (s390_validate_reg_range): New macro.
5858 (s390_gdbarch_init): Adjust.
5860 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5862 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5863 (s390_gdbarch_tdep_alloc): Adjust.
5864 (s390_gdbarch_init): Adjust.
5866 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5868 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5869 <have_tdb>: Change type to bool.
5870 (s390_gdbarch_tdep_alloc): Adjust.
5871 (s390_gdbarch_init): Adjust.
5873 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5875 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5876 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5877 (s390_gdbarch_tdep_alloc): New function.
5878 (s390_gdbarch_init): Allocate tdep at start and use its fields
5879 instead of separate variables.
5881 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5883 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5884 when looking for cached gdbarch and add comment for remaining.
5886 2018-01-22 Pedro Alves <palves@redhat.com>
5887 Sergio Durigan Junior <sergiodj@redhat.com>
5889 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5892 2018-01-22 Maciej W. Rozycki <macro@mips.com>
5894 * MAINTAINERS: Update my company e-mail address.
5896 2018-01-22 Yao Qi <yao.qi@linaro.org>
5898 * regcache.c (cooked_write_test): New function.
5899 (_initialize_regcache): Register the test.
5901 2018-01-22 Yao Qi <yao.qi@linaro.org>
5903 * ia64-tdep.c (ia64_pseudo_register_read): Call
5904 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5905 * m32c-tdep.c (m32c_cat_read): Likewise.
5906 (m32c_r3r2r1r0_read): Likewise.
5907 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5908 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5910 2018-01-22 Yao Qi <yao.qi@linaro.org>
5912 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5913 method raw_read instead of regcache_raw_read.
5914 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5915 * arm-tdep.c (arm_neon_quad_read): Likewise.
5916 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5917 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5918 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5919 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5920 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5921 (i386_pseudo_register_read_into_value): Likewise.
5922 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5923 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5924 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5925 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5926 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5927 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5928 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5929 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5930 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5932 2018-01-22 Yao Qi <yao.qi@linaro.org>
5934 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5935 * configure.tgt: Remove target mt.
5936 * mt-tdep.c: Remove.
5937 * regcache.c (cooked_read_test): Remove the check for mt.
5939 2018-01-22 Yao Qi <yao.qi@linaro.org>
5941 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5942 instead of gdbarch_pseudo_register_read_value.
5944 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5946 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5949 2018-01-22 Joel Brobecker <brobecker@adacore.com>
5951 * linespec.c (create_sals_line_offset): Remove code that preserved
5952 the symtab_and_line's line number.
5954 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5956 * varobj.c (varobj_create): Don't set valid_block when creating a
5959 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5961 * varobj.c (varobj_create): Remove out of date comment.
5963 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5966 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5967 updating innermost block.
5968 * parse.c (innermost_block_tracker::update): Take extra type
5969 parameter, and check types match before updating innermost block.
5970 (write_dollar_variable): Update innermost block for registers.
5971 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5972 (innermost_block_tracker::innermost_block_tracker): Initialise
5974 (innermost_block_tracker::reset): Take type parameter.
5975 (innermost_block_tracker::update): Take type parameter, and pass
5976 type through as needed.
5977 (innermost_block_tracker::m_types): New member.
5978 * varobj.c (varobj_create): Pass type when reseting innermost
5981 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5983 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5984 * ada-lang.c (resolve_subexp): Likewise.
5985 * breakpoint.c (set_breakpoint_condition) Likewise.
5986 (watch_command_1) Likewise.
5987 * c-exp.y (variable): Likewise.
5988 * d-exp.y (PrimaryExpression): Likewise.
5989 * f-exp.y (variable): Likewise.
5990 * go-exp.y (variable): Likewise.
5991 * m2-exp.y (variable): Likewise.
5992 * objfiles.c (objfile::~objfile): Likewise.
5993 * p-exp.y (variable): Likewise.
5994 * parse.c (innermost_block): Change type.
5995 * parser-defs.h (class innermost_block_tracker): New.
5996 (innermost_block): Change to innermost_block_tracker.
5997 * printcmd.c (display_command): Switch to innermost_block API.
5998 (do_one_display): Likewise.
5999 * rust-exp.y (do_one_display): Likewise.
6000 * symfile.c (clear_symtab_users): Likewise.
6001 * varobj.c (varobj_create): Switch to innermost_block API, replace
6002 use of innermost_block with block stored on varobj object.
6004 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6006 * expression.h (innermost_block): Remove declaration.
6007 * varobj.c: Add 'parser-defs.h' include.
6009 2018-01-19 Tom Tromey <tom@tromey.com>
6011 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6012 symbols in the static and global blocks.
6014 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6016 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6017 gdb_ptrace.h, and move including gdb_wait.h ...
6018 * nat/linux-ptrace.h: ... to here.
6020 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6022 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6023 inf_ptrace_detach_success.
6024 (inf_ptrace_detach_success): Add inferior parameter, use it
6025 instead of inferior_ptid, pass it to detach_inferior.
6026 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6028 * inferior.c (detach_inferior): Add overload that takes an
6030 * inferior.h (detach_inferior): Likewise.
6031 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6032 use inferior_ptid, adjust call to inf_ptrace_detach_success.
6033 * linux-thread-db.c (thread_db_detach): Use inf parameter.
6035 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6037 * target.h (struct target_ops) <to_detach>: Add inferior
6039 (target_detach): Likewise.
6040 * target.c (dispose_inferior): Pass inferior down.
6041 (target_detach): Pass inferior down. Assert that it is equal to
6042 the current inferior.
6043 * aix-thread.c (aix_thread_detach): Pass inferior down.
6044 * corefile.c (core_file_command): Pass current_inferior() down.
6045 * corelow.c (core_detach): Add inferior parameter.
6046 * darwin-nat.c (darwin_detach): Likewise.
6047 * gnu-nat.c (gnu_detach): Likewise.
6048 * inf-ptrace.c (inf_ptrace_detach): Likewise.
6049 * infcmd.c (detach_command): Pass current_inferior() down to
6051 * infrun.c (follow_fork_inferior): Pass parent_inf to
6053 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6055 * linux-nat.c (linux_nat_detach): Add inferior parameter.
6056 * linux-thread-db.c (thread_db_detach): Likewise.
6057 * nto-procfs.c (procfs_detach): Likewise.
6058 * procfs.c (procfs_detach): Likewise.
6059 * record.c (record_detach): Likewise.
6060 * record.h (struct inferior): Forward-declare.
6061 (record_detach): Add inferior parameter.
6062 * remote-sim.c (gdbsim_detach): Likewise.
6063 * remote.c (remote_detach_1): Likewise.
6064 (remote_detach): Likewise.
6065 (extended_remote_detach): Likewise.
6066 * sol-thread.c (sol_thread_detach): Likewise.
6067 * target-debug.h (target_debug_print_inferior_p): New macro.
6068 * target-delegates.c: Re-generate.
6069 * top.c (kill_or_detach): Pass inferior down to target_detach.
6070 * windows-nat.c (windows_detach): Add inferior parameter.
6072 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6074 * target.h (struct target_ops) <to_detach>: Remove args
6076 (target_detach): Likewise.
6077 * target.c (dispose_inferior): Adjust.
6078 (target_detach): Remove args parameter, adjust.
6079 * aix-thread.c (aix_thread_detach): Adjust.
6080 * corefile.c (core_file_command): Adjust.
6081 * corelow.c (core_detach): Adjust.
6082 * darwin-nat.c (darwin_detach): Adjust.
6083 * gnu-nat.c (gnu_detach): Adjust.
6084 * inf-ptrace.c (inf_ptrace_detach): Adjust.
6085 * infcmd.c (detach_command): Adjust
6086 * infrun.c (follow_fork_inferior): Adjust.
6087 (handle_vfork_child_exec_or_exit): Adjust.
6088 * linux-fork.c (linux_fork_detach): Remove args parameter.
6089 * linux-fork.h (linux_fork_detach): Likewise.
6090 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6091 * linux-thread-db.c (thread_db_detach): Likewise.
6092 * nto-procfs.c (procfs_detach): Likewise.
6093 * procfs.c (procfs_detach): Likewise.
6094 (do_detach): Remove signo parameter.
6095 * record.c (record_detach): Remove args parameter.
6096 * record.h (record_detach): Likewise.
6097 * remote-sim.c (gdbsim_detach): Likewise.
6098 * remote.c (remote_detach_1): Likewise.
6099 (remote_detach): Likewise.
6100 (extended_remote_detach): Likewise.
6101 * sol-thread.c (sol_thread_detach): Likewise.
6102 * target-delegates.c: Re-generate.
6103 * top.c (struct qt_args) <args>: Remove field.
6104 (kill_or_detach): Don't pass args.
6105 (quit_force): Don't set args.
6106 * windows-nat.c (windows_detach): Remove args parameter.
6108 2018-01-19 Yao Qi <yao.qi@linaro.org>
6110 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
6111 (arm_linux_init_abi): Install it.
6113 2018-01-19 Yao Qi <yao.qi@linaro.org>
6115 * osabi.c (gdb_osabi_names): Extend the regexp for
6116 arm-linux-gnueabihf.
6118 2018-01-18 Yao Qi <yao.qi@linaro.org>
6120 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
6122 (abbrev_table::add_abbrev): Update.
6123 (abbrev_table::lookup_abbrev): Update.
6125 2018-01-18 Yao Qi <yao.qi@linaro.org>
6127 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6129 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
6131 * compile/compile.c (compile_to_object): Convert "triplet_rx"
6134 2018-01-17 Tom Tromey <tom@tromey.com>
6136 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
6138 2018-01-17 Tom Tromey <tom@tromey.com>
6140 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
6141 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
6142 (create_array_type_with_stride): Update.
6143 * dwarf2read.c (set_die_type): Update.
6145 2018-01-17 Tom Tromey <tom@tromey.com>
6147 * dwarf2read.c (delayed_method_info): Remove typedef.
6148 (dwarf2_cu::method_info): Now a std::vector.
6149 (add_to_method_list): Update.
6150 (free_delayed_list): Remove.
6151 (compute_delayed_physnames): Update.
6152 (process_full_comp_unit, process_full_type_unit): Clear the method
6153 list. Remove cleanups.
6154 (psymtab_include_file_name): Add name_holder parameter. Use
6156 (dwarf_decode_lines): Update.
6158 2018-01-17 Tom Tromey <tom@tromey.com>
6159 Simon Marchi <simon.marchi@ericsson.com>
6161 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
6162 (dwarf2_per_objfile::free_cached_comp_units)
6163 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6164 (init_cutu_and_read_dies_no_follow): Update.
6165 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
6166 (dwarf2_cu::~dwarf2_cu): New.
6167 (free_heap_comp_unit, free_stack_comp_unit): Remove.
6168 (age_cached_comp_units, free_one_cached_comp_unit): Update.
6170 2018-01-17 Tom Tromey <tom@tromey.com>
6171 Simon Marchi <simon.marchi@ericsson.com>
6173 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
6174 (struct die_reader_specs) <abbrev_table>: New member.
6175 (struct abbrev_table): Add constructor.
6176 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
6177 <abbrev_obstack>: Now an auto_obstack.
6178 (abbrev_table_up): New typedef.
6179 (init_cu_die_reader): Add abbrev_table parameter.
6180 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
6181 Add result_dwo_abbrev_table.
6182 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6183 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
6185 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
6187 (skip_children): Update.
6188 (abbrev_table::alloc_abbrev): Rename from
6189 abbrev_table_alloc_abbrev.
6190 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
6191 (abbrev_table::lookup_abbrev): Rename from
6192 abbrev_table_lookup_abbrev.
6193 (abbrev_table_read_table): Return abbrev_table_up.
6194 (abbrev_table_free, abbrev_table_free_cleanup)
6195 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
6196 (load_partial_dies): Update.
6198 2018-01-17 Tom Tromey <tom@tromey.com>
6200 * dwarf2read.c (dwarf2_compute_name): Update comment.
6201 (read_func_scope, read_variable): Update.
6202 (new_symbol): Remove.
6203 (new_symbol_full): Rename to new_symbol.
6205 2018-01-17 Mike Gulick <mgulick@mathworks.com>
6208 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
6209 a warning instead of throwing an error, set section size to 0 and return
6211 * gdb_bfd.h (gdb_bfd_map_section): Update description.
6213 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6215 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
6217 (linux_ptrace_attach_fail_reason_string): Likewise.
6218 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
6220 (linux_ptrace_attach_fail_reason_string): Likewise.
6221 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
6223 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6225 * linux-nat.c (linux_nat_attach): Remove xstrdup.
6227 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6230 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6231 checking for fs_base/gs_base fields in struct user_regs_struct.
6232 * configure: Regenerate.
6234 2018-01-17 Yao Qi <yao.qi@linaro.org>
6236 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
6238 (aarch64_linux_init_abi): Install it to gdbarch hook
6241 2018-01-15 Pedro Alves <palves@redhat.com>
6243 * common/signals-state-save-restore.c
6244 (save_original_signals_state): Fix typos.
6246 2017-01-12 Tom Tromey <tom@tromey.com>
6247 Sergio Durigan Junior <sergiodj@redhat.com>
6249 * Makefile.in (install-only): Install gdb-add-index.
6251 2018-01-12 John Baldwin <jhb@FreeBSD.org>
6253 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
6255 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6257 * infrun.c (keep_going_pass_signal): Clear step-over info when
6258 insert_breakpoints fails.
6260 2018-01-11 Pedro Alves <palves@redhat.com>
6263 * infrun.c (resume): Rename to ...
6264 (resume_1): ... this.
6265 (resume): Reimplement as wrapper around resume_1.
6267 2018-01-11 Pedro Alves <palves@redhat.com>
6270 * remote.c (remote_parse_stop_reply): Default to the last-set
6271 general thread instead of to 'magic_null_ptid'.
6273 2018-01-10 Pedro Alves <palves@redhat.com>
6275 * language.h (language_get_symbol_name_matcher): Rename ...
6276 (get_symbol_name_matcher): ... this.
6277 * language.c (language_get_symbol_name_matcher): Ditto.
6278 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
6281 2018-01-10 Pedro Alves <palves@redhat.com>
6285 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
6286 Adjust to use language_get_symbol_name_matcher instead of
6287 language_defn::la_get_symbol_name_matcher.
6288 * language.c (language_get_symbol_name_matcher): If in Ada mode
6289 and the lookup name is a verbatim match, return Ada's matcher.
6290 * language.h (language_get_symbol_name_matcher): Adjust comment.
6291 (ada_lookup_name_info::verbatim_p):: New method.
6293 2018-01-10 Pedro Alves <palves@redhat.com>
6296 * ada-lang.c (ada_collect_symbol_completion_matches): If the
6297 minsym's language is language_auto or language_cplus, pass down
6298 language_ada instead.
6299 * symtab.c (compare_symbol_name): Don't frob symbol language here.
6301 2018-01-10 Pedro Alves <palves@redhat.com>
6304 * minsyms.c (linkage_name_str): New function.
6305 (iterate_over_minimal_symbols): Use it.
6307 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6309 * NEWS: Document that 'info proc' now works on FreeBSD.
6311 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6313 * configure.ac: Check for kinfo_getfile in libutil.
6314 * configure: Regenerate.
6315 * config.in: Regenerate.
6316 * fbsd-nat.c: Include "fbsd-tdep.h".
6317 (fbsd_fetch_cmdline): New.
6318 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
6319 rather than calling error.
6320 (fbsd_info_proc): New.
6321 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
6322 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
6323 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
6325 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6327 * fbsd-nat.c (struct free_deleter): Remove.
6328 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
6330 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6332 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
6333 NULL for an empty pathname.
6335 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6337 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
6338 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
6339 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6340 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6341 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
6342 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
6343 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
6344 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
6345 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
6346 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
6347 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
6348 (fbsd_core_fetch_timeval, fbsd_print_sigset)
6349 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
6350 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
6351 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
6353 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
6355 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
6356 (gnu_xfer_auxv): New function.
6357 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
6360 2018-01-08 Yao Qi <yao.qi@linaro.org>
6361 Simon Marchi <simon.marchi@ericsson.com>
6363 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
6365 (COMMON_OBS): Remove selftest.o.
6366 * configure.ac: Append selftest-arch.c and common/selftest.c to
6367 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
6368 * configure: Re-generated.
6369 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
6371 (maintenance_info_selftests): Likewise.
6373 2018-01-08 Xavier Roirand <roirand@adacore.com>
6375 * ada-valprint.c (val_print_packed_array_elements): Use
6376 proper number of elements when printing an array indexed
6377 by an enumeration type.
6379 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6381 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
6382 (dw2_get_file_names_reader): Adjust.
6383 (lookup_dwo_signatured_type): Adjust.
6384 (lookup_dwp_signatured_type): Adjust.
6385 (lookup_signatured_type): Adjust.
6386 (create_type_unit_group): Adjust.
6387 (get_type_unit_group): Adjust.
6388 (process_psymtab_comp_unit_reader): Adjust.
6389 (build_type_psymtabs_reader): Adjust.
6390 (scan_partial_symbols): Adjust.
6391 (add_partial_symbol): Adjust.
6392 (add_partial_subprogram): Adjust.
6393 (peek_die_abbrev): Adjust.
6394 (fixup_go_packaging): Adjust.
6395 (process_imported_unit_die): Adjust.
6396 (dwarf2_compute_name): Adjust.
6397 (dwarf2_physname): Adjust.
6398 (read_import_statement): Adjust.
6399 (handle_DW_AT_stmt_list): Adjust.
6400 (read_file_scope): Adjust.
6401 (read_func_scope): Adjust.
6402 (read_lexical_block_scope): Adjust.
6403 (read_call_site_scope): Adjust.
6404 (read_variable): Adjust.
6405 (dwarf2_rnglists_process): Adjust.
6406 (dwarf2_ranges_process): Adjust.
6407 (dwarf2_ranges_read): Adjust.
6408 (dwarf2_get_pc_bounds): Adjust.
6409 (dwarf2_record_block_ranges): Adjust.
6410 (dwarf2_add_field): Adjust.
6411 (dwarf2_add_member_fn): Adjust.
6412 (read_structure_type): Adjust.
6413 (process_structure_scope): Adjust.
6414 (read_enumeration_type): Adjust.
6415 (read_array_type): Adjust.
6416 (mark_common_block_symbol_computed): Adjust.
6417 (read_common_block): Adjust.
6418 (read_namespace_type): Adjust.
6419 (read_namespace): Adjust.
6420 (read_module_type): Adjust.
6421 (read_tag_pointer_type): Adjust.
6422 (read_tag_ptr_to_member_type): Adjust.
6423 (read_tag_string_type): Adjust.
6424 (read_subroutine_type): Adjust.
6425 (read_typedef): Adjust.
6426 (read_base_type): Adjust.
6427 (attr_to_dynamic_prop): Adjust.
6428 (read_subrange_type): Adjust.
6429 (read_unspecified_type): Adjust.
6430 (dwarf2_read_abbrevs): Adjust.
6431 (load_partial_dies): Adjust.
6432 (read_partial_die): Adjust.
6433 (find_partial_die): Adjust.
6434 (guess_partial_die_structure_name): Adjust.
6435 (fixup_partial_die): Adjust.
6436 (read_attribute_value): Adjust.
6437 (read_addr_index): Adjust.
6438 (read_addr_index_from_leb128): Adjust.
6439 (read_str_index): Adjust.
6440 (dwarf2_string_attr): Adjust.
6441 (get_debug_line_section): Adjust.
6442 (dwarf_decode_line_header): Adjust.
6443 (lnp_state_machine::check_line_address): Adjust.
6444 (dwarf_decode_lines_1): Adjust.
6445 (dwarf_decode_lines): Adjust.
6446 (dwarf2_start_symtab): Adjust.
6447 (var_decode_location): Adjust.
6448 (new_symbol_full): Adjust.
6449 (dwarf2_const_value_data): Adjust.
6450 (dwarf2_const_value_attr): Adjust.
6451 (dwarf2_const_value): Adjust.
6453 (die_containing_type): Adjust.
6454 (build_error_marker_type): Adjust.
6455 (lookup_die_type): Adjust.
6456 (guess_full_die_structure_name): Adjust.
6457 (anonymous_struct_prefix): Adjust.
6458 (determine_prefix): Adjust.
6459 (dwarf2_name): Adjust.
6460 (follow_die_ref_or_sig): Adjust.
6461 (follow_die_offset): Adjust.
6462 (follow_die_ref): Adjust.
6463 (follow_die_sig_1): Adjust.
6464 (follow_die_sig): Adjust.
6465 (get_signatured_type): Adjust.
6466 (get_DW_AT_signature_type): Adjust.
6467 (decode_locdesc): Adjust.
6468 (dwarf_decode_macros): Adjust.
6469 (cu_debug_loc_section): Adjust.
6470 (fill_in_loclist_baton): Adjust.
6471 (dwarf2_symbol_mark_computed): Adjust.
6472 (init_one_comp_unit): Don't assign
6473 dwarf2_cu::dwarf2_per_objfile.
6474 (set_die_type): Adjust.
6476 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6478 * dwarf2read.c (struct mapped_debug_names): Add constructor.
6479 <dwarf2_per_objfile>: New field.
6480 (dwarf2_per_objfile): Remove global.
6481 (get_dwarf2_per_objfile): New function.
6482 (set_dwarf2_per_objfile): New function.
6483 (dwarf2_build_psymtabs_hard): Change objfile parameter to
6485 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6486 (read_abbrev_offset): Likewise.
6487 (read_indirect_string): Likewise.
6488 (read_indirect_line_string): Likewise.
6489 (read_indirect_string_at_offset): Likewise.
6490 (read_indirect_string_from_dwz): Likewise.
6491 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6493 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6494 (create_all_comp_units): Change objfile parameter to
6496 (create_all_type_units): Likewise.
6497 (process_queue): Add dwarf2_per_objfile parameter.
6498 (read_and_check_comp_unit_head): Likewise.
6499 (lookup_dwo_unit_in_dwp): Likewise.
6500 (get_dwp_file): Likewise.
6501 (process_cu_includes): Likewise.
6502 (struct free_dwo_file_cleanup_data): New struct.
6503 (dwarf2_has_info): Use get_dwarf2_per_objfile and
6504 set_dwarf2_per_objfile.
6505 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6506 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6507 context, adjust calls.
6508 (dw2_instantiate_symtab): Likewise.
6509 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6510 (dw2_get_cu): Likewise.
6511 (create_cu_from_index_list): Change objfile parameter to
6513 (create_cus_from_index_list): Get dwarf2_per_objfile from
6514 context, adjust calls.
6515 (create_cus_from_index): Likewise.
6516 (create_signatured_type_table_from_index): Change objfile
6517 parameter to dwarf2_per_objfile.
6518 (create_signatured_type_table_from_debug_names): Change objfile
6519 parameter to dwarf2_per_objfile.
6520 (create_addrmap_from_index): Likewise.
6521 (create_addrmap_from_aranges): Likewise.
6522 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6523 (dw2_setup): Remove.
6524 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6526 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6527 get_dwarf2_per_objfile.
6528 (dw2_forget_cached_source_info): Likewise.
6529 (dw2_map_symtabs_matching_filename): Likewise.
6530 (struct dw2_symtab_iterator) <index>: Remove.
6531 <dwarf2_per_objfile>: New field.
6532 (dw2_symtab_iter_init): Replace index parameter with
6534 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6535 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6536 (dw2_print_stats): Likewise.
6537 (dw2_dump): Likewise.
6538 (dw2_expand_symtabs_for_function): Likewise.
6539 (dw2_expand_all_symtabs): Likewise.
6540 (dw2_expand_symtabs_with_fullname): Likewise.
6541 (dw2_expand_marked_cus): Replace index and objfile parameters
6542 with dwarf2_per_objfile.
6543 (dw_expand_symtabs_matching_file_matcher): Add
6544 dwarf2_per_objfile parameter and adjust calls.
6545 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6547 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6548 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6550 (create_cus_from_debug_names_list): Replace objfile parameter
6551 with dwarf2_per_objfile and adjust calls.
6552 (create_cus_from_debug_names): Likewise.
6553 (dwarf2_read_debug_names): Likewise.
6554 (mapped_debug_names::namei_to_name): Adjust call.
6555 (dw2_debug_names_iterator::next): Likewise.
6556 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6557 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6558 (dw2_debug_names_dump): Likewise.
6559 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6560 (dw2_debug_names_expand_symtabs_matching): Likewise.
6561 (dwarf2_initialize_objfile): Likewise.
6562 (dwarf2_build_psymtabs): Likewise.
6563 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6565 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6566 (read_and_check_comp_unit_head): Likewise.
6567 (read_abbrev_offset): Likewise.
6568 (create_debug_type_hash_table): Likewise.
6569 (create_debug_types_hash_table): Likewise.
6570 (create_all_type_units): Replace objfile parameter with
6572 (add_type_unit): Add dwarf2_per_objfile parameter.
6573 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6574 with dwarf2_per_objfile.
6575 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6576 (lookup_dwp_signatured_type): Likewise.
6577 (lookup_signatured_type): Likewise.
6578 (read_cutu_die_from_dwo): Likewise.
6579 (init_tu_and_read_dwo_dies): Likewise.
6580 (init_cutu_and_read_dies): Likewise.
6581 (init_cutu_and_read_dies_no_follow): Likewise.
6582 (allocate_type_unit_groups_table): Add objfile parameter.
6583 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6584 (get_type_unit_group): Likewise.
6585 (process_psymtab_comp_unit): Update call.
6586 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6587 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6588 (print_tu_stats): Likewise.
6589 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6591 (build_type_psymtabs): Change objfile parameter to
6593 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6594 passed in void* parameter.
6595 (process_skeletonless_type_units): Change objfile parameter to
6597 (set_partial_user): Likewise.
6598 (dwarf2_build_psymtabs_hard): Likewise.
6599 (read_comp_units_from_section): Likewise.
6600 (create_all_comp_units): Likewise.
6601 (scan_partial_symbols): Update calls.
6602 (add_partial_symbol): Likewise.
6603 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6604 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6605 (process_queue): Add dwarf2_per_objfile parameter.
6606 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6607 (compute_compunit_symtab_includes): Likewise.
6608 (process_cu_includes): Add dwarf2_per_objfile parameter.
6609 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6610 (process_full_type_unit): Likewise.
6611 (process_imported_unit_die): Update call.
6612 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6613 (read_file_scope): Likewise.
6614 (allocate_dwo_file_hash_table): Add objfile parameter.
6615 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6616 (create_cus_hash_table): Likewise.
6617 (create_dwp_hash_table): Likewise.
6618 (create_dwo_unit_in_dwp_v1): Likewise.
6619 (create_dwp_v2_section): Likewise.
6620 (create_dwo_unit_in_dwp_v2): Likewise.
6621 (lookup_dwo_unit_in_dwp): Likewise.
6622 (try_open_dwop_file): Likewise.
6623 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6624 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6625 cleanup to include a reference to dwarf2_per_objfile.
6626 (open_dwp_file): Add dwarf2_per_objfile parameter.
6627 (open_and_init_dwp_file): Likewise.
6628 (get_dwp_file): Likewise.
6629 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6630 (queue_and_load_all_dwo_tus): Update call.
6631 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6633 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6634 (dwarf2_ranges_process): Likewise.
6635 (dwarf2_get_pc_bounds): Likewise.
6636 (mark_common_block_symbol_computed): Likewise.
6637 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6638 (dwarf2_read_abbrevs): Update call.
6639 (read_partial_die): Use dwarf2_per_objfile from cu.
6640 (find_partial_die): Likewise.
6641 (fixup_partial_die): Likewise.
6642 (read_attribute_value): Likewise.
6643 (read_indirect_string_at_offset_from): Add objfile parameter.
6644 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6646 (read_indirect_string_from_dwz): Add objfile parameter.
6647 (read_indirect_string): Add objfile parameter.
6648 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6649 (read_addr_index): Use dwarf2_per_objfile from cu.
6650 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6652 (read_str_index): Use dwarf2_per_objfile from cu.
6653 (get_debug_line_section): Likewise.
6654 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6655 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6656 (new_symbol_full): Use dwarf2_per_objfile from cu.
6657 (build_error_marker_type): Likewise.
6658 (lookup_die_type): Likewise.
6659 (determine_prefix): Likewise.
6660 (follow_die_offset): Likewise.
6661 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6662 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6663 (dwarf2_fetch_die_type_sect_off): Likewise.
6664 (dwarf2_get_die_type): Likewise.
6665 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6666 (get_signatured_type): Likewise.
6667 (get_DW_AT_signature_type): Likewise.
6668 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6669 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6670 (cu_debug_loc_section): Likewise.
6671 (fill_in_loclist_baton): Likewise.
6672 (dwarf2_symbol_mark_computed): Likewise.
6673 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6675 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6677 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6678 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6679 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6680 (set_die_type): Use dwarf2_free_objfile from cu.
6681 (get_die_type_at_offset): Likewise.
6682 (dwarf2_per_objfile_free): Don't assign global variable.
6683 (debug_names) <constructor>: Add dwarf2_per_objfile
6684 parameter, update m_debugstrlookup construction.
6685 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6687 <m_dwarf2_per_objfile>: New field.
6688 <lookup>: Use m_dwarf2_per_objfile.
6689 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6690 (psyms_seen_size): Likewise.
6691 (write_gdbindex): Replace objfile parameter with
6693 (write_debug_names): Likewise.
6694 (write_psymtabs_to_index): Likewise.
6695 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6698 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6700 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6701 <dwarf2_per_objfile>: New field.
6702 (struct dwarf2_per_cu_data) <objfile>: Remove.
6703 <dwarf2_per_objfile>: New field.
6704 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6706 (create_signatured_type_table_from_index): Likewise.
6707 (create_debug_type_hash_table): Likewise.
6708 (fill_in_sig_entry_from_dwo_entry): Likewise.
6709 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6710 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6712 (create_partial_symtab): Access objfile through
6714 (process_psymtab_comp_unit_reader): Likewise.
6715 (read_comp_units_from_section): Likewise.
6716 (scan_partial_symbols): Likewise.
6717 (add_partial_symbol): Likewise.
6718 (add_partial_subprogram): Likewise.
6719 (peek_die_abbrev): Likewise.
6720 (fixup_go_packaging): Likewise.
6721 (process_full_comp_unit): Likewise.
6722 (process_full_type_unit): Likewise.
6723 (process_imported_unit_die): Likewise.
6724 (dwarf2_compute_name): Likewise.
6725 (dwarf2_physname): Likewise.
6726 (read_import_statement): Likewise.
6727 (create_cus_hash_table): Assign dwarf2_physname instead of
6729 (read_func_scope): Access objfile through dwarf2_per_objfile.
6730 (read_lexical_block_scope): Likewise.
6731 (read_call_site_scope): Likewise.
6732 (read_variable): Likewise.
6733 (dwarf2_rnglists_process): Likewise.
6734 (dwarf2_ranges_process): Likewise.
6735 (dwarf2_ranges_read): Likewise.
6736 (dwarf2_record_block_ranges): Likewise.
6737 (dwarf2_add_field): Likewise.
6738 (dwarf2_add_member_fn): Likewise.
6739 (read_structure_type): Likewise.
6740 (process_structure_scope): Likewise.
6741 (read_enumeration_type): Likewise.
6742 (read_array_type): Likewise.
6743 (read_common_block): Likewise.
6744 (read_namespace_type): Likewise.
6745 (read_namespace): Likewise.
6746 (read_module_type): Likewise.
6747 (read_tag_pointer_type): Likewise.
6748 (read_tag_ptr_to_member_type): Likewise.
6749 (read_tag_string_type): Likewise.
6750 (read_subroutine_type): Likewise.
6751 (read_typedef): Likewise.
6752 (read_base_type): Likewise.
6753 (attr_to_dynamic_prop): Likewise.
6754 (read_subrange_type): Likewise.
6755 (read_unspecified_type): Likewise.
6756 (load_partial_dies): Likewise.
6757 (read_partial_die): Likewise.
6758 (find_partial_die): Likewise.
6759 (guess_partial_die_structure_name): Likewise.
6760 (fixup_partial_die): Likewise.
6761 (read_attribute_value): Likewise.
6762 (read_addr_index_from_leb128): Likewise.
6763 (dwarf2_read_addr_index): Likewise.
6764 (dwarf2_string_attr): Likewise.
6765 (lnp_state_machine::check_line_address): Likewise.
6766 (dwarf_decode_lines_1): Likewise.
6767 (dwarf_decode_lines): Likewise.
6768 (dwarf2_start_symtab): Likewise.
6769 (var_decode_location): Likewise.
6770 (new_symbol_full): Likewise.
6771 (dwarf2_const_value_data): Likewise.
6772 (dwarf2_const_value_attr): Likewise.
6773 (dwarf2_const_value): Likewise.
6774 (die_type): Likewise.
6775 (die_containing_type): Likewise.
6776 (lookup_die_type): Likewise.
6777 (guess_full_die_structure_name): Likewise.
6778 (anonymous_struct_prefix): Likewise.
6779 (dwarf2_name): Likewise.
6780 (follow_die_ref_or_sig): Likewise.
6781 (follow_die_offset): Likewise.
6782 (follow_die_ref): Likewise.
6783 (dwarf2_fetch_die_loc_sect_off): Likewise.
6784 (dwarf2_fetch_constant_bytes): Likewise.
6785 (dwarf2_fetch_die_type_sect_off): Likewise.
6786 (dwarf2_get_die_type): Likewise.
6787 (follow_die_sig): Likewise.
6788 (decode_locdesc): Likewise.
6789 (dwarf2_per_cu_objfile): Likewise.
6790 (dwarf2_per_cu_text_offset): Likewise.
6791 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6793 (set_die_type): Access objfile through
6796 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6798 * valprint.c (converted_character_d): Remove typedef.
6799 (DEF_VEC_O (converted_character_d)): Remove.
6800 (count_next_character): Use std::vector.
6801 (print_converted_chars_to_obstack): Likewise.
6802 (generic_printstr): Likewise.
6804 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6806 * xml-support.h (struct gdb_xml_value): Add constructor.
6807 <value>: Change type to unique_xmalloc_ptr.
6808 (gdb_xml_value_s): Remove typedef.
6809 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6810 (gdb_xml_element_start_handler): Change parameter type to
6812 (xml_find_attribute): Likewise.
6813 * xml-support.c (xml_find_attribute): Change parameter type to
6814 std::vector and adjust.
6815 (gdb_xml_values_cleanup): Remove.
6816 (gdb_xml_parser::start_element): Adjust to std::vector.
6817 (xinclude_start_include): Change paraeter type to std::vector
6819 * btrace.c (check_xml_btrace_version): Likewise.
6820 (parse_xml_btrace_block): Likewise.
6821 (parse_xml_btrace_pt_config_cpu): Likewise.
6822 (parse_xml_btrace_pt): Likewise.
6823 (parse_xml_btrace_conf_bts): Likewise.
6824 (parse_xml_btrace_conf_pt): Likewise.
6825 * memory-map.c (memory_map_start_memory): Likewise.
6826 (memory_map_start_property): Likewise.
6827 * osdata.c (osdata_start_osdata): Likewise.
6828 (osdata_start_item): Likewise.
6829 (osdata_start_column): Likewise.
6830 * remote.c (start_thread): Likewise.
6831 * solib-aix.c (library_list_start_library): Likewise.
6832 (library_list_start_list): Likewise.
6833 * solib-svr4.c (library_list_start_library): Likewise.
6834 (svr4_library_list_start_list): Likewise.
6835 * solib-target.c (library_list_start_segment): Likewise.
6836 (library_list_start_section): Likewise.
6837 (library_list_start_library): Likewise.
6838 (library_list_start_list): Likewise.
6839 * tracepoint.c (traceframe_info_start_memory): Likewise.
6840 (traceframe_info_start_tvar): Likewise.
6841 * xml-syscall.c (syscall_start_syscall): Likewise.
6842 * xml-tdesc.c (tdesc_start_target): Likewise.
6843 (tdesc_start_feature): Likewise.
6844 (tdesc_start_reg): Likewise.
6845 (tdesc_start_union): Likewise.
6846 (tdesc_start_struct): Likewise.
6847 (tdesc_start_flags): Likewise.
6848 (tdesc_start_enum): Likewise.
6849 (tdesc_start_field): Likewise.
6850 (tdesc_start_enum_value): Likewise.
6851 (tdesc_start_vector): Likewise.
6853 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6855 * extension.h (struct xmethod_worker) <clone>: Remove.
6856 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6858 (python_xmethod_worker::clone): Remove.
6859 * valops.c (find_overload_match): Use std::move instead of
6862 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6864 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6865 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6866 <free_xmethod_worker_data>: Remove.
6867 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6868 <get_xmethod_arg_types>: Remove.
6869 <get_xmethod_result_type>: Remove.
6870 <invoke_xmethod>: Remove.
6871 * extension.c (new_xmethod_worker): Remove.
6872 (clone_xmethod_worker): Remove.
6873 (get_matching_xmethod_workers): Return void, pass std::vector by
6875 (get_xmethod_arg_types): Rename to...
6876 (xmethod_worker::get_arg_types): ... this, and adjust.
6877 (get_xmethod_result_type): Rename to...
6878 (xmethod_worker::get_result_type): ... this, and adjust.
6879 (invoke_xmethod): Remove.
6880 (free_xmethod_worker): Remove.
6881 (free_xmethod_worker_vec): Remove.
6882 * extension.h (enum ext_lang_rc): Move here from
6884 (struct xmethod_worker): Add constructor and destructor.
6887 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6888 virtual pure methods.
6889 <get_arg_types, get_result_type>: New methods.
6890 (xmethod_worker_ptr): Remove typedef.
6891 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6892 (xmethod_worker_vec): Remove typedef.
6893 (xmethod_worker_up): New typedef.
6894 (invoke_xmethod): Remove.
6895 (clone_xmethod_worker): Remove.
6896 (free_xmethod_worker): Remove.
6897 (free_xmethod_worker_vec): Remove.
6898 (get_xmethod_arg_types): Remove.
6899 (get_xmethod_result_type): Remove.
6900 * valops.c (find_method_list): Use std::vector, don't use
6901 intermediate vector.
6902 (value_find_oload_method_list): Use std::vector.
6903 (find_overload_match): Use std::vector.
6904 (find_oload_champ): Use std::vector.
6905 * value.c (value_free): Use operator delete.
6906 (value_of_xmethod): Rename to...
6907 (value_from_xmethod): ... this. Don't assign
6908 xmethod_worker::value, take rvalue-reference.
6909 (result_type_of_xmethod): Adjust.
6910 (call_xmethod): Adjust.
6911 * value.h: Include extension.h.
6912 (struct xmethod_worker): Don't forward-declare.
6913 (value_of_xmethod): Rename to...
6914 (value_from_xmethod): ... this, take rvalue-reference.
6915 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6916 (struct python_xmethod_worker): ... this, add constructor and
6918 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6919 (gdbpy_free_xmethod_worker_data): Rename to...
6920 (python_xmethod_worker::~python_xmethod_worker): ... this and
6922 (gdbpy_clone_xmethod_worker_data): Rename to...
6923 (python_xmethod_worker::clone): ... this and adjust.
6924 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6926 (gdbpy_get_xmethod_arg_types): Rename to...
6927 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6928 (gdbpy_get_xmethod_result_type): Rename to...
6929 (python_xmethod_worker::do_get_result_type): ... this and
6931 (gdbpy_invoke_xmethod): Rename to...
6932 (python_xmethod_worker::invoke): ... this and adjust.
6933 (new_python_xmethod_worker): Rename to...
6934 (python_xmethod_worker::python_xmethod_worker): ... this and
6936 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6938 (gdbpy_free_xmethod_worker_data): Remove.
6939 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6940 (gdbpy_get_xmethod_arg_types): Remove.
6941 (gdbpy_get_xmethod_result_type): Remove.
6942 (gdbpy_invoke_xmethod): Remove.
6943 * python/python.c (python_extension_ops): Remove obsolete
6946 2018-01-05 Pedro Alves <palves@redhat.com>
6949 * common/signals-state-save-restore.c
6950 (save_original_signals_state): New parameter 'quiet'. Warn if we
6951 find a custom handler preinstalled, instead of internal erroring.
6952 But only warn if !quiet.
6953 * common/signals-state-save-restore.h
6954 (save_original_signals_state): New parameter 'quiet'.
6955 * main.c (captured_main_1): Move save_original_signals_state call
6956 after option handling, and pass QUIET.
6958 2018-01-05 Pedro Alves <palves@redhat.com>
6960 * spu-tdep.c (spu_catch_start): Pass
6961 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6963 2018-01-05 Pedro Alves <palves@redhat.com>
6966 * ada-lang.c (literal_symbol_name_matcher): New function.
6967 (ada_get_symbol_name_matcher): Use it for
6968 symbol_name_match_type::SEARCH_NAME.
6969 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6970 it down instead of assuming symbol_name_match_type::FULL.
6971 * block.h (block_lookup_symbol): New parameter 'match_type'.
6972 * c-valprint.c (print_unpacked_pointer): Use
6973 lookup_symbol_search_name instead of lookup_symbol.
6974 * compile/compile-object-load.c (get_out_value_type): Pass down
6975 symbol_name_match_type::SEARCH_NAME.
6976 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6977 symbol_name_match_type::FULL.
6978 * cp-support.c (cp_get_symbol_name_matcher): Handle
6979 symbol_name_match_type::SEARCH_NAME.
6980 * infrun.c (insert_exception_resume_breakpoint): Use
6981 lookup_symbol_search_name.
6982 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6983 * psymtab.c (maintenance_check_psymtabs): Use
6984 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6985 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6987 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6988 if symbol_name_match_type::SEARCH_NAME.
6989 (lookup_symbol_in_language): Pass down
6990 symbol_name_match_type::FULL.
6991 (lookup_symbol_search_name): New.
6992 (lookup_language_this): Pass down
6993 symbol_name_match_type::SEARCH_NAME.
6994 (lookup_symbol_aux, lookup_local_symbol): New parameter
6995 'match_type'. Pass it down.
6996 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6997 (lookup_symbol_search_name): New declaration.
6998 (lookup_symbol_in_block): New 'match_type' parameter.
7000 2018-01-05 Pedro Alves <palves@redhat.com>
7003 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7005 (ada_lookup_symbol): Reimplement in terms of
7006 ada_lookup_symbol_list, bits factored out from
7007 ada_lookup_encoded_symbol.
7009 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7011 * ada-exp.y (write_object_renaming): When subscripting an array
7012 using a symbol as the index, pass the block in call to
7013 ada_lookup_encoded_symbol when looking that symbol up.
7015 2018-01-05 Jerome Guitton <guitton@adacore.com>
7017 * ada-lang.c (ada_array_length): Use ada_index_type instead of
7020 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7022 * ada-lang.c (ada_to_fixed_value_create): Add handling of
7023 the case where VALUE_LVAL (val0) is not lval_memory.
7025 2018-01-05 Xavier Roirand <roirand@adacore.com>
7027 * ada-valprint.c (print_optional_low_bound): Handle
7028 character-indexed array printing like boolean-indexed array
7031 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7033 * NEWS: Create a new section for the next release branch.
7034 Rename the section of the current branch, now that it has
7037 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7039 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7040 * version.in: Bump version to 8.1.50.DATE-git.
7042 2018-01-03 Xavier Roirand <roirand@adacore.com>
7044 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7046 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7048 (default_exception_support_info) <catch_handlers_sym>: Add field.
7049 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7050 (ada_exception_name_addr_1): Add "catch handlers" handling.
7051 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7053 (create_excep_cond_exprs) <ex>: Add parameter.
7054 (re_set_exception): Update create_excep_cond_exprs call.
7055 (print_it_exception, print_one_exception, print_mention_exception)
7056 (print_recreate_exception): Add "catch handler" handling.
7057 (allocate_location_catch_handlers, re_set_catch_handlers)
7058 (check_status_catch_handlers, print_it_catch_handlers)
7059 (print_one_catch_handlers, print_mention_catch_handlers)
7060 (print_recreate_catch_handlers): New function.
7061 (catch_handlers_breakpoint_ops): New variable.
7062 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7063 Add parameter. Add "catch handler" handling.
7064 (ada_exception_sym_name, ada_exception_breakpoint_ops):
7065 Add "catch handler" handling.
7066 (ada_exception_catchpoint_cond_string): Add "catch handler"
7068 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7070 (catch_ada_handlers_command): New function.
7071 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7072 operations structure.
7073 (_initialize_ada_language): Add "catch handlers" command entry.
7074 * NEWS: Document "catch handlers" feature.
7076 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7078 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7079 account when creating the array type of the slice.
7080 (ada_value_slice): Likewise.
7082 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7084 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7086 (create_array_type_with_stride): Add byte_stride_prop parameter.
7087 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7088 New parameter. Update all callers in this file.
7089 (array_type_has_dynamic_stride): New function.
7090 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7091 of arrays with dynamic byte strides.
7092 * dwarf2read.c (read_array_type): Add support for dynamic
7093 DW_AT_byte_stride attributes.
7095 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7097 * dwarf2read.c (read_unspecified_type): Treat
7098 DW_TAG_enumeration_type DIEs from Ada units as stubs.
7100 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7102 Update copyright year range in all GDB files.
7104 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7106 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
7107 and gdb/testsuite/gdb.base/step-line.c.
7109 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7111 * copyright.py (main): Dump the contents of
7112 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
7113 even if BY_HAND is empty.
7115 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7117 * top.c (print_gdb_version): Update Copyright year in version
7120 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7122 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
7124 For older changes see ChangeLog-2017.
7130 version-control: never