1 2018-05-22 Pedro Alves <palves@redhat.com>
5 * c-exp.y: Include "c-support.h".
6 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7 of tolower. Use c_ident_is_alpha to scan names.
8 * c-lang.c: Include "c-support.h".
9 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
10 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
11 * c-support.h: New file, with bits factored out from ...
12 * cp-name-parser.y: ... this file.
13 Include "c-support.h".
14 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
15 c-support.h and renamed.
16 (symbol_end, yylex): Adjust.
18 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
20 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
21 parameter type to CORE_ADDR.
22 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
23 parameter type in declaration to CORE_ADDR.
24 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
25 target_auxv_search to get AT_HWCAP and use the result to get the
27 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
28 to CORE_ADDR. Remove the cast of the return value to unsigned
29 long. Fix error predicate of target_auxv_search.
30 (ppc_linux_nat_target::read_description): Change the type of the
31 hwcap variable to CORE_ADDR.
33 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
35 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
36 if the size of fpscr is larger than 32 bits.
38 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
40 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
41 (ppc32_linux_vsxregmap): New global.
42 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
43 regcache_supply_regset, and regcache_collect_regset.
44 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
45 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
46 (fetch_vsx_register, store_vsx_register): Remove.
47 (fetch_vsx_registers): Add regno parameter. Get regset using
48 ppc_linux_vsxregset. Use regset to supply registers.
49 (store_vsx_registers): Add regno parameter. Get regset using
50 ppc_linux_vsxregset. Use regset to collect registers.
51 (fetch_register): Call fetch_vsx_registers instead of
53 (store_register): Call store_vsx_registers instead of
55 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
57 (store_ppc_registers): Call store_vsx_registers with -1 for the
59 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
60 (ppc_collect_vsxregset): Remove.
62 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
64 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
66 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
67 for vector register offset fields.
68 (ppc64_fbsd_reg_offsets): Likewise.
69 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
70 to vector register offset fields.
71 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
72 to vector register offset fields.
73 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
74 vector register offset fields.
75 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
76 initializers for vector register offset fields.
77 (rs6000_aix64_reg_offsets): Likewise.
78 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
79 (ppc_supply_vrregset): Remove.
80 (ppc_collect_vrregset): Remove.
81 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
82 (ppc_linux_vrregset) : New function.
83 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
84 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
85 (ppc32_linux_vrregset): Remove.
86 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
87 and use result instead of ppc32_linux_vrregset.
88 (ppc32_linux_reg_offsets): Remove initializers for vector register
90 (ppc64_linux_reg_offsets): Likewise.
91 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
92 * ppc-linux-nat.c: Include regset.h.
93 (gdb_vrregset_t): Adjust comment to account for little-endian
95 (supply_vrregset, fill_vrregset): Remove.
96 (fetch_altivec_register, store_altivec_register): Remove.
97 (fetch_altivec_registers): Add regno parameter. Get regset using
98 ppc_linux_vrregset. Use regset to supply registers.
99 (store_altivec_registers): Add regno parameter. Get regset using
100 ppc_linux_vrregset. Use regset to collect registers.
101 (fetch_register): Call fetch_altivec_registers instead of
102 fetch_altivec_register.
103 (store_register): Call store_altivec_registers instead of
104 store_altivec_register.
105 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
106 the new regno parameter.
107 (store_ppc_registers): Call store_altivec_registers with -1 for
108 the new regno parameter.
110 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
112 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
113 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
114 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
115 (gdb_vrregset_t): Change array type size to
116 PPC_LINUX_SIZEOF_VRREGSET.
117 (gdb_vsxregset_t): Change array type size to
118 PPC_LINUX_SIZEOF_VSXREGSET.
119 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
120 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
121 PPC_LINUX_SIZEOF_VSXREGSET.
123 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
125 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
126 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
128 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
129 ppc_linux_target_wordsize with tid.
130 (ppc_linux_nat_target::read_description): Call ppc_linux_target
132 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
133 (ppc64_64bit_inferior_p): Add static and inline specifiers.
134 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
135 tid parameter. Remove static specifier.
136 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
137 (ppc_linux_target_wordsize): New declaration.
139 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
141 * arch/ppc-linux-common.c: New file.
142 * arch/ppc-linux-common.h: New file.
143 * arch/ppc-linux-tdesc.h: New file.
144 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
145 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
146 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
147 arch/ppc-linux-tdesc.h.
148 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
149 arch/ppc-linux-tdesc.h.
150 (ppc_linux_nat_target::read_description): Remove target
151 description matching code. Fill a ppc_linux_features struct and
152 call ppc_linux_match_description with it. Move comment about ISA
153 2.05 to ppc-linux-common.c.
154 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
155 arch/ppc-linux-tdesc.h.
156 (ppc_linux_core_read_description): Remove target description
157 matching code. Fill a ppc_linux_features struct and call
158 ppc_linux_match_description with it.
159 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
160 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
161 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
162 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
163 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
164 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
165 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
166 (tdesc_powerpc_e500l): Remove.
168 2018-05-22 Joel Brobecker <brobecker@adacore.com>
170 * ada-lang.c (catch_assert_command): Pass empty string instead
171 of NULL for excep_string argument.
173 2018-05-22 Maciej W. Rozycki <macro@mips.com>
175 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
176 the width of the requested register exceeds the width of the
179 2018-05-21 Tom Tromey <tom@tromey.com>
181 * printcmd.c (output_command): Remove.
182 (output_command_const): Rename to output_command.
183 * valprint.h (output_command): Rename from output_command_const.
184 * tracepoint.c (trace_dump_actions): Call output_command.
186 2018-05-21 Tom Tromey <tom@tromey.com>
188 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
189 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
190 * ada-lang.h (create_ada_exception_catchpoint): Update.
191 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
193 (create_excep_cond_exprs, ~ada_catchpoint)
194 (should_stop_exception, print_one_exception)
195 (print_mention_exception, print_recreate_exception): Update.
196 (ada_get_next_arg): Remove.
197 (catch_ada_exception_command_split): Use std::string. Change type
198 of "excep_string", "cond_string".
199 (catch_ada_exception_command): Update.
200 (create_ada_exception_catchpoint): Change type of excep_string.
201 (ada_exception_sal): Remove excep_string parameter.
202 (~ada_catchpoint): Remove.
204 2018-05-21 Tom Tromey <tom@tromey.com>
206 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
209 2018-05-21 Tom Tromey <tom@tromey.com>
211 * ada-lang.c (ada_exception_message_1, ada_exception_message):
212 Return unique_xmalloc_ptr.
213 (print_it_exception): Update.
215 2018-05-21 Tom Tromey <tom@tromey.com>
217 * tracepoint.c (trace_dump_actions): Use std::string.
219 2018-05-21 Tom Tromey <tom@tromey.com>
221 * symfile.c (reread_symbols): Use std::string for original_name.
223 2018-05-21 Tom Tromey <tom@tromey.com>
225 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
226 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
229 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
231 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
233 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
234 * objfiles.c (get_objfile_bfd_data): Allocate
235 objfile_per_bfd_storage with obstack_new when allocating on
238 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
240 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
242 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
243 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
244 * mdebugread.c (mdebug_build_psymtabs): Likewise.
245 (add_pending): Likewise.
246 (parse_symbol): Likewise.
247 (parse_partial_symbols): Likewise.
248 (psymtab_to_symtab_1): Likewise.
249 (new_psymtab): Likewise.
250 (elfmdebug_build_psymtabs): Likewise.
251 * minsyms.c (terminate_minimal_symbol_table): Likewise.
252 * objfiles.c (get_objfile_bfd_data): Likewise.
253 (objfile_register_static_link): Likewise.
254 * psymtab.c (allocate_psymtab): Likewise.
255 * stabsread.c (read_member_functions): Likewise.
256 * xcoffread.c (xcoff_end_psymtab): Likewise.
258 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
260 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
261 compiler supports std::is_trivially_constructible.
262 * common/poison.h: Include obstack.h.
263 (IsMallocable): Define to is_trivially_constructible if the
264 compiler supports it, define to true_type otherwise.
268 (XOBNEWVEC): Redefine.
269 * gdb_obstack.h (obstack_zalloc): New.
270 (OBSTACK_ZALLOC): Redefine.
271 (obstack_calloc): New.
272 (OBSTACK_CALLOC): Redefine.
274 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
275 (gdbarch_obstack): New declaration in gdbarch.h, definition in
277 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
278 obstack_calloc/obstack_zalloc.
279 (gdbarch_obstack_zalloc): Remove.
280 * target-descriptions.c (tdesc_data_init): Use obstack_new.
282 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
284 * stack.c (backtrace_command_1): Remove useless variable int i.
286 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
288 * stack.c (print_frame_info): Fix comment.
290 2018-05-18 Tom Tromey <tom@tromey.com>
292 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
293 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
294 (~dwarf2_per_objfile): Update
295 (dwarf2_get_dwz_file): Use new.
296 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
299 2018-05-18 Tom Tromey <tom@tromey.com>
301 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
303 * dwarf2read.c (struct dwp_file): Add constructor and
305 (open_and_init_dwp_file): Return a unique_ptr.
306 (dwarf2_per_objfile, create_dwp_hash_table)
307 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
308 (lookup_dwo_unit_in_dwp): Update.
309 (open_and_init_dwp_file, get_dwp_file): Update.
311 2018-05-18 Tom Tromey <tom@tromey.com>
313 * dwarf2read.c (dwarf2_per_objfile): Update.
314 (struct mapped_index): Add initializers.
315 (dwarf2_read_index): Use new.
316 (dw2_symtab_iter_init): Update.
317 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
320 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
322 * dwarf2read.c (mapped_index) <total_size>: Remove.
324 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
326 * unittests/format_pieces-selftests.c (test_format_specifier):
329 2018-05-18 Tom Tromey <tom@tromey.com>
331 * c-typeprint.c (maybe_print_hole): New function.
332 (c_print_type_struct_field_offset): Update.
333 (c_type_print_base_struct_union): Call maybe_print_hole.
335 2018-05-17 Keith Seitz <keiths@redhat.com>
337 * breakpoint.c (build_bpstat_chain): New function, moved from
339 (bpstat_stop_status): Add optional parameter, `stop_chain'.
340 If no stop chain is passed, call build_bpstat_chain to build it.
341 * breakpoint.h (build_bpstat_chain): Declare.
342 (bpstat_stop_status): Move documentation here from breakpoint.c.
343 * infrun.c (handle_signal_stop): Before eliding inlined frames,
344 build the stop chain and pass it to skip_inline_frames.
345 Pass this stop chain to bpstat_stop_status.
346 * inline-frame.c: Include breakpoint.h.
347 (stopped_by_user_bp_inline_frame): New function.
348 (skip_inline_frames): Add parameter `stop_chain'.
349 Move documention to inline-frame.h.
350 If non-NULL, use stopped_by_user_bp_inline_frame to determine
351 whether the frame should be elided.
352 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
353 Add moved documentation and update for new parameter.
355 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
358 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
359 unittests/format_pieces-selftests.c.
360 * common/format.h (format_piece) <operator==>: New.
361 (format_pieces) <operator[]>: Remove.
362 * common/format.c (format_pieces::format_pieces): Handle \e.
363 * unittests/format_pieces-selftests.c: New.
365 2018-05-17 Tom Tromey <tom@tromey.com>
368 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
369 (dw2_instantiate_symtab): Add skip_partial parameter.
370 (dw2_find_last_source_symtab, dw2_map_expand_apply)
371 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
372 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
373 (dw2_expand_symtabs_matching_one)
374 (dw2_find_pc_sect_compunit_symtab)
375 (dw2_debug_names_lookup_symbol)
376 (dw2_debug_names_expand_symtabs_for_function): Update.
377 (init_cutu_and_read_dies): Add skip_partial parameter.
378 (process_psymtab_comp_unit, build_type_psymtabs_1)
379 (process_skeletonless_type_unit, load_partial_comp_unit)
380 (psymtab_to_symtab_1): Update.
381 (load_full_comp_unit): Add skip_partial parameter.
382 (process_imported_unit_die, dwarf2_read_addr_index)
383 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
384 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
385 (read_signatured_type): Update.
387 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
389 * value.c (release_value): Remove unused variable.
390 (record_latest_value): Likewise.
391 (access_value_history): Likewise.
392 (preserve_values): Likewise.
394 2018-05-17 Tom Tromey <tom@tromey.com>
396 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
399 2018-05-16 Maciej W. Rozycki <macro@mips.com>
402 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
403 Also handle registers whose width is not a multiple of
405 (linux_nat_trad_target::store_register): Likewise.
407 2018-05-16 Tom Tromey <tom@tromey.com>
409 * gdbcore.h (core_bfd): Redefine.
410 * corelow.c (core_target::close): Update.
411 (core_target_open): Update.
412 * progspace.h (struct program_space) <cbfd>: Now a
415 2018-05-16 Tom Tromey <tom@tromey.com>
418 * symfile-add-flags.h (enum symfile_add_flags)
419 <SYMFILE_NOT_FILENAME>: New constant.
420 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
421 objfile name from BFD.
422 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
423 * minidebug.c (find_separate_debug_file_in_section): Put
424 ".gnu_debugdata" into BFD's file name.
426 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
428 * regcache.c (regcache_read_ftype, regcache_write_ftype):
431 2018-05-15 Tamar Christina <tamar.christina@arm.com>
434 * aarch64-tdep.c (aarch64_analyze_prologue,
435 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
436 Indicate not interested in errors.
438 2018-05-15 Maciej W. Rozycki <macro@mips.com>
440 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
441 Supply the MIPS_ZERO_REGNUM register.
443 2018-05-15 Maciej W. Rozycki <macro@mips.com>
445 * mips-tdep.c (mask_address_var): Make variable static.
447 2018-05-14 Tom Tromey <tom@tromey.com>
449 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
451 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
453 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
454 FXSAVE_ADDR for the mxcsr register.
456 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
458 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
460 2018-05-11 Pedro Alves <palves@redhat.com>
462 * corelow.c (core_target) <core_target>: No longer inline.
463 Initialize m_core_gdbarch, m_core_vec and build the section table
466 <core_gdbarch, get_core_register_section>: New methods.
467 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
468 factored out from ...
469 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
471 (sniff_core_bfd): Add gdbarch parameter.
472 (core_close): Delete, merged into ...
473 (core_target::close): ... here. Delete self.
474 (core_close_cleanup): Delete.
475 (core_target_open): Allocate a core_target on the heap. Use a
476 unique_ptr instead of a cleanup. Bits moved into the core_target
477 ctor. Adjust to use core_target methods instead of globals.
478 (get_core_register_section): Rename to ...
479 (core_target::get_core_register_section): ... this and adjust.
480 (struct get_core_registers_cb_data): New.
481 (get_core_registers_cb): Use it. Use bool.
482 (core_target::fetch_registers, core_target::files_info)
483 (core_target::xfer_partial, core_target::read_description)
484 (core_target::pid_to, core_target::thread_name): Adjust to
485 reference class fields instead of globals.
486 * target.h (struct target_ops_deleter, target_ops_up): New.
488 2018-05-11 Pedro Alves <palves@redhat.com>
490 * corefile.c (core_file_command): Move to corelow.c.
491 * corelow.c (the_core_target): Delete.
492 (core_file_command): Moved from corefile.c. Check exec_bfd
493 instead of the_core_target. Use target_detach instead of calling
494 into the_core_target directly.
495 (maybe_say_no_core_file_now): New.
496 (core_target::detach): Use it.
497 (_initialize_corelow): Remove references to the_core_target.
498 * gdbcore.h (the_core_target): Delete.
500 2018-05-11 Tom Tromey <tromey@redhat.com>
501 Pedro Alves <palves@redhat.com>
503 * corefile.c (core_bfd): Remove.
504 * gdbcore.h (core_bfd): Now a macro.
505 * progspace.h (struct program_space) <cbfd>: New field.
507 2018-05-11 Tom Tromey <tom@tromey.com>
509 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
512 2018-05-10 Tom Tromey <tom@tromey.com>
514 * configure: Rebuild.
515 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
517 2018-05-10 Joel Brobecker <brobecker@adacore.com>
520 * regformats/regdat.sh: Adjust script, following the addition
521 of the new expedite_regs parameter to init_target_desc.
523 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
526 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
527 set_gdbarch_significant_addr_bit.
528 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
529 set_gdbarch_significant_addr_bit.
530 * utils.c (address_significant): Update to sign extend addr.
532 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
534 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
535 (xtensa_linux_init_abi): Limit tdep->num_regs by
536 tdep->num_nopriv_regs.
537 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
538 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
541 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
543 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
545 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
547 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
548 (I387_MXCSR_INIT_VAL): New constant.
549 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
550 buffer if it was supplied by the inferior.
551 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
552 (i387_xsave_get_clear_bv): New function.
553 (i387_supply_xsave): Only read x87 control registers from the
554 xsave buffer if the feature is enabled, and the state will have
555 been written, otherwise, provide a suitable default.
556 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
557 including x87 control registers. Update control registers if they
558 have changed from the default value, and mark features as enabled
560 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
562 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
564 * spu-tdep.c (info_spu_event_command): Fix output formatting.
566 2018-05-07 Tom Tromey <tom@tromey.com>
568 * configure: Rebuild.
569 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
571 2018-05-07 Tom Tromey <tom@tromey.com>
574 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
575 bit. Use correct value for VDIV.
577 2018-05-04 Tom Tromey <tom@tromey.com>
579 * configure: Rebuild.
580 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
582 2018-05-04 Tom Tromey <tom@tromey.com>
584 * linux-record.c (record_linux_system_call) <case
585 RECORD_SYS_RECVFROM>: Add "break".
587 2018-05-04 Tom Tromey <tom@tromey.com>
589 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
591 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
594 2018-05-04 Tom Tromey <tom@tromey.com>
596 * rs6000-tdep.c (ppc_process_record_op4)
597 (ppc_process_record_op63): Add fall-through comment.
599 2018-05-04 Tom Tromey <tom@tromey.com>
601 * i386-tdep.c (i386_process_record): Add fall-through comment.
603 2018-05-04 Tom Tromey <tom@tromey.com>
605 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
608 2018-05-04 Tom Tromey <tom@tromey.com>
610 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
611 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
612 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
614 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
616 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
619 2018-05-04 Tom Tromey <tom@tromey.com>
621 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
623 2018-05-04 Tom Tromey <tom@tromey.com>
625 * s390-tdep.c (s390_process_record): Fix fall-through comments.
626 * xcoffread.c (scan_xcoff_symtab): Move comment later.
627 * symfile.c (section_is_mapped): Fix fall-through comment.
628 * stabsread.c (define_symbol, read_member_functions): Fix
629 fall-through comment.
630 * s390-linux-tdep.c (s390_process_record): Fix fall-through
632 * remote.c (remote_wait_as): Fix fall-through comment.
633 * p-exp.y (yylex): Fix fall-through comment.
634 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
636 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
637 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
638 * jv-exp.y (yylex): Fix fall-through comment.
639 * go-exp.y (lex_one_token): Fix fall-through comment.
640 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
641 fall-through comment.
642 * f-exp.y (yylex): Fix fall-through comment.
643 * dwarf2read.c (process_die): Fix fall-through comments.
644 * dbxread.c (process_one_symbol): Fix fall-through comment.
645 * d-exp.y (lex_one_token): Fix fall-through comment.
646 * cp-name-parser.y (yylex): Fix fall-through comment.
647 * coffread.c (coff_symtab_read): Fix fall-through comment.
648 * c-exp.y (lex_one_token): Fix fall-through comment.
649 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
651 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
654 2018-05-04 Tom Tromey <tom@tromey.com>
657 * NEWS: Mention gdb.execute change.
658 * gdbcmd.h (execute_control_command): Don't declare.
659 * python/python.c (execute_gdb_command): Use read_command_lines_1,
660 execute_control_commands, execute_control_commands_to_string.
661 * cli/cli-script.h (execute_control_commands)
662 (execute_control_commands_to_string): Declare.
663 (execute_control_command): Add from_tty parameter.
664 * cli/cli-script.c (execute_control_commands)
665 (execute_control_commands_to_string): New functions.
666 (execute_user_command): Use execute_control_commands.
667 (execute_control_command_1): Add "from_tty" parameter. Update.
668 (execute_control_command): Likewise.
670 2018-05-04 Tom Tromey <tom@tromey.com>
673 * NEWS: Mention that breakpoint commands are writable.
674 * python/py-breakpoint.c (bppy_set_commands): New function.
675 (breakpoint_object_getset) <"commands">: Use it.
677 2018-05-04 Tom Tromey <tom@tromey.com>
679 * tracepoint.c (actions_command): Update.
680 * mi/mi-cmd-break.c (mi_command_line_array)
681 (mi_command_line_array_cnt, mi_command_line_array_ptr)
682 (mi_read_next_line): Remove.
683 (mi_cmd_break_commands): Update.
684 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
686 * cli/cli-script.c (get_command_line): Update.
687 (process_next_line): Use function_view. Constify.
688 (recurse_read_control_structure, read_command_lines)
689 (read_command_lines_1): Change argument types to function_view.
690 (do_define_command, document_command): Update.
691 * breakpoint.h (check_tracepoint_command): Don't declare.
692 * breakpoint.c (check_tracepoint_command): Remove.
693 (commands_command_1, create_tracepoint_from_upload): Update.
695 2018-05-04 Tom Tromey <tom@tromey.com>
698 * cli/cli-script.h (enum command_control_type) <define_control>:
700 * cli/cli-script.c (multi_line_command_p): Handle define_control.
701 (build_command_line, execute_control_command_1)
702 (process_next_line): Likewise.
703 (do_define_command): New function, extracted from define_command.
704 (define_command): Use it.
706 2018-05-04 Tom Tromey <tom@tromey.com>
708 * tracepoint.c (actions_command): Update.
709 * cli/cli-script.h (read_command_lines): Update.
710 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
711 (MAX_TMPBUF): Remove define.
712 (define_command): Use string_printf.
713 (document_command): Likewise.
714 * breakpoint.c (commands_command_1): Update.
716 2018-05-04 Tom Tromey <tom@tromey.com>
718 * top.c (execute_command): Update.
719 * cli/cli-script.h (print_command_lines): Now varargs.
720 * cli/cli-script.c (print_command_lines): Now varargs.
721 (execute_control_command_1) <case while_control, case if_control>:
724 2018-05-04 Tom Tromey <tom@tromey.com>
726 * tracepoint.c (all_tracepoint_actions): Rename from
727 all_tracepoint_actions_and_cleanup. Change return type.
728 (actions_command, encode_actions_1, encode_actions)
729 (trace_dump_actions, tdump_command): Update.
730 * remote.c (remote_download_command_source): Update.
731 * python/python.c (gdbpy_eval_from_control_command)
732 (python_command, python_interactive_command): Update.
733 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
734 * guile/guile.c (guile_command)
735 (gdbscm_eval_from_control_command, guile_command): Update.
736 * compile/compile.c (compile_code_command)
737 (compile_print_command, compile_to_object): Update.
738 * cli/cli-script.h (struct command_lines_deleter): New.
739 (counted_command_line): New typedef.
740 (struct command_line): Add constructor, destructor.
742 <body_list_0, body_list_1>: New members.
743 (command_line_up): Remove typedef.
744 (read_command_lines, read_command_lines_1, get_command_line):
746 (copy_command_lines): Don't declare.
747 * cli/cli-script.c (build_command_line): Use "new".
748 (get_command_line): Return counted_command_line.
749 (print_command_lines, execute_user_command)
750 (execute_control_command_1, while_command, if_command): Update.
751 (realloc_body_list): Remove.
752 (process_next_line, recurse_read_control_structure): Update.
753 (read_command_lines, read_command_lines_1): Return counted_command_line.
754 (free_command_lines): Use "delete".
755 (copy_command_lines): Remove.
756 (define_command, document_command, show_user_1): Update.
757 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
758 a counted_command_line.
759 * breakpoint.h (counted_command_line): Remove typedef.
760 (breakpoint_set_commands): Update.
761 * breakpoint.c (check_no_tracepoint_commands)
762 (validate_commands_for_breakpoint): Update.
763 (breakpoint_set_commands): Change commands to be a
764 counted_command_line.
765 (commands_command_1, update_dprintf_command_list)
766 (create_tracepoint_from_upload): Update.
768 2018-05-04 Tom Tromey <tom@tromey.com>
770 * cli/cli-decode.h (cmd_list_element): New constructor.
771 (~cmd_list_element): New destructor.
772 (struct cmd_list_element): Add initializers.
773 * cli/cli-decode.c (do_add_cmd): Use "new".
774 (delete_cmd): Use "delete".
776 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
777 Pedro Alves <palves@redhat.com>
779 PR breakpoints/19806 and support for PR external/20207.
780 * NEWS: Mention Aarch64 watchpoint improvements.
781 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
782 watchpoints and PR external/20207 watchpoints.
783 * nat/aarch64-linux-hw-point.c
784 (kernel_supports_any_contiguous_range): New.
785 (aarch64_watchpoint_offset): New.
786 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
787 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
788 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
789 (aarch64_align_watchpoint): New parameters aligned_offset_p and
790 next_addr_orig_p. Support PR external/20207 watchpoints.
791 (aarch64_downgrade_regs): New.
792 (aarch64_dr_state_insert_one_point): New parameters offset and
794 (aarch64_dr_state_remove_one_point): Likewise.
795 (aarch64_handle_breakpoint): Update caller.
796 (aarch64_handle_aligned_watchpoint): Likewise.
797 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
799 (aarch64_linux_set_debug_regs): Remove const from state. Call
800 aarch64_downgrade_regs.
801 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
802 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
803 (DR_CONTROL_MASK): ... this.
804 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
805 (unsigned int aarch64_watchpoint_offset): New prototype.
806 (aarch64_linux_set_debug_regs): Remove const from state.
807 * utils.c (align_up, align_down): Move to ...
808 * common/common-utils.c (align_up, align_down): ... here.
809 * utils.h (align_up, align_down): Move to ...
810 * common/common-utils.h (align_up, align_down): ... here.
812 2018-05-04 Joel Brobecker <brobecker@adacore.com>
814 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
815 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
816 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
817 Re-implement to match the ABI as summarized in GCC's
818 gcc/config/sparc/sparc.c. All callers updated.
819 (sparc32_store_arguments): Remove assertion.
821 2018-05-04 Tom Tromey <tom@tromey.com>
823 * printcmd.c: Don't include tui.h.
824 (decode_format): Use skip_spaces.
826 2018-05-04 Tom Tromey <tom@tromey.com>
829 * printcmd.c (last_count): New global.
830 (x_command): Use saved count when repeating.
832 2018-05-04 Tom Tromey <tom@tromey.com>
834 * nto-procfs.c (do_closedir_cleanup): Remove.
835 (procfs_pidlist): Use gdb_dir_up.
836 * procfs.c (do_closedir_cleanup): Remove.
837 (proc_update_threads): Use gdb_dir_up.
838 * common/filestuff.h (struct gdb_dir_deleter): New.
839 (gdb_dir_up): New typedef.
841 2018-05-04 Tom Tromey <tom@tromey.com>
843 * ada-lang.c (print_mention_exception): Use std::string.
845 2018-05-04 Tom Tromey <tom@tromey.com>
847 * ada-lang.c (create_excep_cond_exprs): Update.
848 (ada_exception_catchpoint_cond_string): Use std::string.
850 2018-05-04 Tom Tromey <tom@tromey.com>
852 * ada-lang.c (xget_renaming_scope): Return std::string.
853 (old_renaming_is_invisible): Update.
855 2018-05-04 Tom Tromey <tom@tromey.com>
857 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
858 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
860 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
862 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
864 2018-05-04 Tom Tromey <tom@tromey.com>
866 * remote.c (remote_query_supported_append): Change type.
867 (remote_check_symbols): Update.
869 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
872 * configure.ac: Prepend libpython.
873 * python/python-config.py: Likewise.
874 * configure: Regenerate.
876 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
878 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
880 2018-05-03 Pedro Alves <palves@redhat.com>
883 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
884 override. Write 'true' instead of '1'.
885 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
888 2018-05-02 Pedro Alves <palves@redhat.com>
890 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
891 add_inf_child_target.
892 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
893 add_inf_child_target.
894 * aix-thread.c (aix_thread_target_info): New.
895 (aix_thread_target) <shortname, longname, doc>: Delete.
897 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
898 add_inf_child_target.
899 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
900 add_inf_child_target.
901 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
902 add_inf_child_target.
903 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
904 add_inf_child_target.
905 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
906 add_inf_child_target.
907 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
908 add_inf_child_target.
909 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
910 add_inf_child_target.
911 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
912 add_inf_child_target.
913 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
914 add_inf_child_target.
915 * bfd-target.c (target_bfd_target_info): New.
916 (target_bfd) <shortname, longname, doc>: Delete.
918 * bsd-kvm.c (bsd_kvm_target_info): New.
919 (bsd_kvm_target) <shortname, longname, doc>: Delete.
921 (bsd_kvm_target::open): Rename to ...
922 (bsd_kvm_target_open): ... this. Adjust.
923 * bsd-uthread.c (bsd_uthread_target_info): New.
924 (bsd_uthread_target) <shortname, longname, doc>: Delete.
926 * corefile.c (core_file_command): Adjust.
927 * corelow.c (core_target_info): New.
928 (core_target) <shortname, longname, doc>: Delete.
930 (core_target::open): Rename to ...
931 (core_target_open): ... this. Adjust.
932 * ctf.c (ctf_target_info): New.
933 (ctf_target) <shortname, longname, doc>: Delete.
935 (ctf_target::open): Rename to ...
936 (ctf_target_open): ... this.
937 (_initialize_ctf): Adjust.
938 * exec.c (exec_target_info): New.
939 (exec_target) <shortname, longname, doc>: Delete.
941 (exec_target::open): Rename to ...
942 (exec_target_open): ... this.
943 * gdbcore.h (core_target_open): Declare.
944 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
945 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
946 add_inf_child_target.
947 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
948 add_inf_child_target.
949 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
950 add_inf_child_target.
951 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
952 add_inf_child_target.
953 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
954 add_inf_child_target.
955 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
956 add_inf_child_target.
957 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
958 add_inf_child_target.
959 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
960 add_inf_child_target.
961 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
962 add_inf_child_target.
963 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
964 add_inf_child_target.
965 * inf-child.c (inf_child_target_info): New.
966 (inf_child_target::info): New.
967 (inf_child_open_target): Remove 'target' parameter. Use
968 get_native_target instead.
969 (inf_child_target::open): Delete.
970 (add_inf_child_target): New.
971 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
974 (add_inf_child_target): Declare.
975 (inf_child_open_target): Declare.
976 * linux-thread-db.c (thread_db_target_info): New.
977 (thread_db_target) <shortname, longname, doc>: Delete.
979 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
980 add_inf_child_target.
981 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
982 add_inf_child_target.
983 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
984 add_inf_child_target.
985 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
986 add_inf_child_target.
987 * make-target-delegates (print_class): Adjust.
988 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
989 add_inf_child_target.
990 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
991 add_inf_child_target.
992 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
993 add_inf_child_target.
994 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
995 add_inf_child_target.
996 * nto-procfs.c (nto_native_target_info): New.
997 (nto_procfs_target_native) <shortname, longname, doc>:
1000 (nto_procfs_target_info): New.
1001 (nto_procfs_target_procfs) <shortname, longname, doc>:
1004 (init_procfs_targets): Adjust.
1005 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1006 add_inf_child_target.
1007 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
1008 add_inf_child_target.
1009 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
1010 add_inf_child_target.
1011 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
1012 add_inf_child_target.
1013 * ravenscar-thread.c (ravenscar_target_info): New.
1014 (ravenscar_thread_target) <shortname, longname, doc>:
1017 * record-btrace.c (record_btrace_target_info):
1018 (record_btrace_target) <shortname, longname, doc>: Delete.
1020 (record_btrace_target::open): Rename to ...
1021 (record_btrace_target_open): ... this. Adjust.
1022 * record-full.c (record_longname, record_doc): New.
1023 (record_full_base_target) <shortname, longname, doc>: Delete.
1025 (record_full_target_info): New.
1026 (record_full_target): <shortname>: Delete.
1028 (record_full_core_open_1, record_full_open_1): Update comments.
1029 (record_full_base_target::open): Rename to ...
1030 (record_full_open): ... this.
1031 (cmd_record_full_restore): Update.
1032 (_initialize_record_full): Update.
1033 * remote-sim.c (remote_sim_target_info): New.
1034 (gdbsim_target) <shortname, longname, doc>: Delete.
1036 (gdbsim_target::open): Rename to ...
1037 (gdbsim_target_open): ... this.
1038 (_initialize_remote_sim): Adjust.
1039 * remote.c (remote_doc): New.
1040 (remote_target_info): New.
1041 (remote_target) <shortname, longname, doc>: Delete.
1043 (extended_remote_target_info): New.
1044 (extended_remote_target) <shortname, longname, doc>: Delete.
1046 (remote_target::open_1): Make static. Adjust.
1047 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
1048 * s390-linux-nat.c (_initialize_s390_nat): Use
1049 add_inf_child_target.
1050 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
1051 add_inf_child_target.
1052 * sol-thread.c (thread_db_target_info): New.
1053 (sol_thread_target) <shortname, longname, doc>: Delete.
1055 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
1056 add_inf_child_target.
1057 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
1058 add_inf_child_target.
1059 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
1060 add_inf_child_target.
1061 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1062 add_inf_child_target.
1063 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1064 add_inf_child_target.
1065 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1066 add_inf_child_target.
1067 * spu-linux-nat.c (_initialize_spu_nat): Use
1068 add_inf_child_target.
1069 * spu-multiarch.c (spu_multiarch_target_info): New.
1070 (spu_multiarch_target) <shortname, longname, doc>: Delete.
1072 * target-delegates.c: Regenerate.
1073 * target.c: Include <unordered_map>.
1074 (target_ops_p): Delete.
1075 (DEF_VEC_P(target_ops_p)): Delete.
1076 (target_factories): New.
1077 (test_target_info): New.
1078 (test_target_ops::info): New.
1079 (open_target): Adjust to use target_factories.
1080 (add_target_with_completer): Rename to ...
1081 (add_target): ... this. Change prototype. Register target_info
1082 and open callback in target_factories. Register target_info in
1083 command context instead of target_ops.
1084 (add_target): Delete old implementation.
1085 (add_deprecated_target_alias): Change prototype. Adjust.
1086 (the_native_target): New.
1087 (set_native_target, get_native_target): New.
1088 (find_default_run_target): Use the_native_target.
1089 (find_attach_target, find_run_target): Simplify.
1090 (target_ops::open): Delete.
1091 (dummy_target_info): New.
1092 (dummy_target::shortname, dummy_target::longname)
1093 (dummy_target::doc): Delete.
1094 (dummy_target::info): New.
1095 (debug_target::shortname, debug_target::longname)
1096 (debug_target::doc): Delete.
1097 (debug_target::info): New.
1098 * target.h (struct target_info): New.
1099 (target_ops::~target_ops): Add comment.
1100 (target_ops::info): New.
1101 (target_ops::shortname, target_ops::longname, target_ops::doc): No
1102 longer virtual. Implement in terms of target_info.
1103 (set_native_target, get_native_target): Declare.
1104 (target_open_ftype): New.
1105 (add_target, add_target_with_completer)
1106 (add_deprecated_target_alias): Change prototype.
1107 (test_target) <shortname, longname, doc>: Delete.
1109 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1110 add_inf_child_target.
1111 * tracefile-tfile.c (tfile_target_info): New.
1112 (tfile_target) <shortname, longname, doc>: Delete.
1114 (tfile_target::open): Rename to ...
1115 (tfile_target_open): ... this.
1116 (_initialize_tracefile_tfile): Adjust.
1117 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1118 add_inf_child_target.
1119 * windows-nat.c (_initialize_windows_nat): Use
1120 add_inf_child_target.
1121 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1122 add_inf_child_target.
1124 2018-05-02 Pedro Alves <palves@redhat.com>
1126 * linux-nat.h (linux_nat_target) <low_new_thread,
1127 low_delete_thread, low_new_fork, low_forget_process,
1128 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1129 New virtual methods.
1130 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1131 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1132 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1133 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1134 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1136 * linux-fork.c (delete_fork): Adjust to call low method.
1137 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1138 (linux_nat_new_fork, linux_nat_forget_process_hook)
1139 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1140 (linux_nat_status_is_event):
1141 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1142 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1144 (sigtrap_is_event): Rename to ...
1145 (linux_nat_target::low_status_is_event): ... this.
1146 (linux_nat_set_status_is_event): Delete.
1147 (save_stop_reason, linux_nat_wait_1)
1148 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1150 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1151 (linux_nat_set_new_fork, linux_nat_set_forget_process)
1152 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1153 (linux_nat_set_prepare_to_resume): Delete.
1154 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
1155 low virtual methods.
1156 * amd64-linux-nat.c: Likewise.
1157 * arm-linux-nat.c: Likewise.
1158 * i386-linux-nat.c: Likewise.
1159 * ia64-linux-nat.c: Likewise.
1160 * mips-linux-nat.c: Likewise.
1161 * ppc-linux-nat.c: Likewise.
1162 * s390-linux-nat.c: Likewise.
1163 * sparc64-linux-nat.c: Likewise.
1164 * x86-linux-nat.c: Likewise.
1165 * x86-linux-nat.h: Include "nat/x86-linux.h".
1166 (x86_linux_nat_target) <low_new_fork, low_forget_process,
1167 low_prepare_to_resume, low_new_thread, low_delete_thread>:
1170 2018-05-02 Pedro Alves <palves@redhat.com>
1172 * target.h (target_ops)
1173 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1174 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
1175 stopped_by_watchpoint, have_continuable_watchpoint,
1176 stopped_data_address, watchpoint_addr_within_range,
1177 can_accel_watchpoint_condition, can_run, thread_alive,
1178 has_all_memory, has_memory, has_stack, has_registers,
1179 has_execution, can_async_p, is_async_p, supports_non_stop,
1180 always_non_stop_p, can_execute_reverse, supports_multi_process,
1181 supports_enable_disable_tracepoint,
1182 supports_disable_randomization, supports_string_tracing,
1183 supports_evaluation_of_breakpoint_conditions,
1184 can_run_breakpoint_commands, filesystem_is_local,
1185 can_download_tracepoint, get_trace_state_variable_value,
1186 set_trace_notes, get_tib_address, use_agent, can_use_agent,
1187 record_is_replaying, record_will_replay,
1188 augmented_libraries_svr4_read>: Adjust to return bool.
1189 * aarch64-linux-nat.c: All implementations adjusted.
1190 * aix-thread.c: All implementations adjusted.
1191 * arm-linux-nat.c: All implementations adjusted.
1192 * breakpoint.c: All implementations adjusted.
1193 * bsd-kvm.c: All implementations adjusted.
1194 * bsd-uthread.c: All implementations adjusted.
1195 * corelow.c: All implementations adjusted.
1196 * ctf.c: All implementations adjusted.
1197 * darwin-nat.c: All implementations adjusted.
1198 * darwin-nat.h: All implementations adjusted.
1199 * exec.c: All implementations adjusted.
1200 * fbsd-nat.c: All implementations adjusted.
1201 * fbsd-nat.h: All implementations adjusted.
1202 * gnu-nat.c: All implementations adjusted.
1203 * gnu-nat.h: All implementations adjusted.
1204 * go32-nat.c: All implementations adjusted.
1205 * ia64-linux-nat.c: All implementations adjusted.
1206 * inf-child.c: All implementations adjusted.
1207 * inf-child.h: All implementations adjusted.
1208 * inf-ptrace.c: All implementations adjusted.
1209 * inf-ptrace.h: All implementations adjusted.
1210 * linux-nat.c: All implementations adjusted.
1211 * linux-nat.h: All implementations adjusted.
1212 * mips-linux-nat.c: All implementations adjusted.
1213 * nto-procfs.c: All implementations adjusted.
1214 * ppc-linux-nat.c: All implementations adjusted.
1215 * procfs.c: All implementations adjusted.
1216 * ravenscar-thread.c: All implementations adjusted.
1217 * record-btrace.c: All implementations adjusted.
1218 * record-full.c: All implementations adjusted.
1219 * remote-sim.c: All implementations adjusted.
1220 * remote.c: All implementations adjusted.
1221 * s390-linux-nat.c: All implementations adjusted.
1222 * sol-thread.c: All implementations adjusted.
1223 * spu-multiarch.c: All implementations adjusted.
1224 * target-delegates.c: All implementations adjusted.
1225 * target.c: All implementations adjusted.
1226 * target.h: All implementations adjusted.
1227 * tracefile-tfile.c: All implementations adjusted.
1228 * tracefile.c: All implementations adjusted.
1229 * tracefile.h: All implementations adjusted.
1230 * windows-nat.c: All implementations adjusted.
1231 * x86-linux-nat.h: All implementations adjusted.
1232 * x86-nat.h: All implementations adjusted.
1234 2018-05-02 Pedro Alves <palves@redhat.com>
1236 * make-target-delegates (scan_target_h): Don't trim lines here.
1237 Replace sequences of tabs and/or whitespace with a single
1239 (top level, parsing methods): Trim each line before processing it
1242 2018-05-02 Pedro Alves <palves@redhat.com>
1243 John Baldwin <jhb@freebsd.org>
1245 * target.h (enum strata) <debug_stratum>: New.
1246 (struct target_ops) <all delegation methods>: Replace by C++
1247 virtual methods, and drop "to_" prefix. All references updated
1249 <to_shortname, to_longname, to_doc, to_data,
1250 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
1251 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
1252 virtual methods. All references updated throughout.
1253 <can_attach, supports_terminal_ours, can_create_inferior,
1254 get_thread_control_capabilities, attach_no_wait>: New
1256 <insert_breakpoint, remove_breakpoint>: Now
1257 TARGET_DEFAULT_NORETURN methods.
1258 <info_proc>: Now returns bool.
1260 (OPS_MAGIC): Delete.
1261 (current_target): Delete. All references replaced by references
1263 (target_stack): ... this. New.
1264 (target_shortname, target_longname): Adjust.
1265 (target_can_run): Now a function declaration.
1266 (default_child_has_all_memory, default_child_has_memory)
1267 (default_child_has_stack, default_child_has_registers)
1268 (default_child_has_execution): Remove target_ops parameter.
1269 (complete_target_initialization): Delete.
1270 (memory_breakpoint_target): New template class.
1271 (test_target_ops): Refactor as a C++ class with virtual methods.
1272 * make-target-delegates (NAME_PART): Tighten.
1273 (POINTER_PART, CP_SYMBOL): New.
1274 (SIMPLE_RETURN_PART): Reimplement.
1275 (VEC_RETURN_PART): Expect less.
1276 (RETURN_PART, VIRTUAL_PART): New.
1277 (METHOD): Adjust to C++ virtual methods.
1278 (scan_target_h): Remove reference to C99.
1279 (dname): Output "target_ops::" prefix.
1280 (write_function_header): Adjust to output a C++ class method.
1281 (write_declaration): New.
1282 (write_delegator): Adjust to output a C++ class method.
1283 (tdname): Output "dummy_target::" prefix.
1284 (write_tdefault, write_debugmethod): Adjust to output a C++ class
1286 (tdefault_names, debug_names): Delete.
1287 (return_types, tdefaults, styles, argtypes_array): New.
1288 (top level): All methods are delegators.
1290 (top level): Print dummy_target and debug_target classes.
1291 * target-delegates.c: Regenerate.
1292 * target-debug.h (target_debug_print_enum_info_proc_what)
1293 (target_debug_print_thread_control_capabilities)
1294 (target_debug_print_thread_info_p): New.
1295 * target.c (dummy_target): Delete.
1296 (the_dummy_target, the_debug_target): New.
1297 (target_stack): Now extern.
1298 (set_targetdebug): Push/unpush debug target.
1299 (default_child_has_all_memory, default_child_has_memory)
1300 (default_child_has_stack, default_child_has_registers)
1301 (default_child_has_execution): Remove target_ops parameter.
1302 (complete_target_initialization): Delete.
1303 (add_target_with_completer): No longer call
1304 complete_target_initialization.
1305 (target_supports_terminal_ours): Use regular delegation.
1306 (update_current_target): Delete.
1307 (push_target): No longer check magic number. Don't call
1308 update_current_target.
1309 (unpush_target): Don't call update_current_target.
1310 (target_is_pushed): No longer check magic number.
1311 (target_require_runnable): Skip for all stratums over
1313 (target_ops::info_proc): New.
1314 (target_info_proc): Use find_target_at and
1315 find_default_run_target.
1316 (target_supports_disable_randomization): Use regular delegation.
1317 (target_get_osdata): Use find_target_at.
1318 (target_ops::open, target_ops::close, target_ops::can_attach)
1319 (target_ops::attach, target_ops::can_create_inferior)
1320 (target_ops::create_inferior, target_ops::can_run)
1321 (target_can_run): New.
1322 (default_fileio_target): Use regular delegation.
1323 (target_ops::fileio_open, target_ops::fileio_pwrite)
1324 (target_ops::fileio_pread, target_ops::fileio_fstat)
1325 (target_ops::fileio_close, target_ops::fileio_unlink)
1326 (target_ops::fileio_readlink): New.
1327 (target_fileio_open_1, target_fileio_unlink)
1328 (target_fileio_readlink): Always call the target method. Handle
1330 (return_zero, return_zero_has_execution): Delete.
1331 (init_dummy_target): Delete.
1332 (dummy_target::dummy_target, dummy_target::shortname)
1333 (dummy_target::longname, dummy_target::doc)
1334 (debug_target::debug_target, debug_target::shortname)
1335 (debug_target::longname, debug_target::doc): New.
1336 (target_supports_delete_record): Use regular delegation.
1337 (setup_target_debug): Delete.
1338 (maintenance_print_target_stack): Skip debug_stratum.
1339 (initialize_targets): Instantiate the_dummy_target and
1341 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
1343 (target_auxv_search, fprint_target_auxv): Adjust.
1344 (info_auxv_command): Adjust to use target_stack.
1345 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
1346 * exceptions.c (print_flush): Handle a NULL target_stack.
1347 * regcache.c (target_ops_no_register): Refactor as class with
1350 * exec.c (exec_target): New class.
1351 (exec_ops): Now an exec_target.
1352 (exec_open, exec_close_1, exec_get_section_table)
1353 (exec_xfer_partial, exec_files_info, exec_has_memory)
1354 (exec_make_note_section): Refactor as exec_target methods.
1355 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
1357 (exec_target::find_memory_regions): New.
1358 (_initialize_exec): Don't call init_exec_ops.
1359 * gdbcore.h (exec_file_clear): Delete.
1361 * corefile.c (core_target): Delete.
1362 (core_file_command): Adjust.
1363 * corelow.c (core_target): New class.
1364 (the_core_target): New.
1365 (core_close): Remove target_ops parameter.
1366 (core_close_cleanup): Adjust.
1367 (core_target::close): New.
1368 (core_open, core_detach, get_core_registers, core_files_info)
1369 (core_xfer_partial, core_thread_alive, core_read_description)
1370 (core_pid_to_str, core_thread_name, core_has_memory)
1371 (core_has_stack, core_has_registers, core_info_proc): Rework as
1372 core_target methods.
1373 (ignore, core_remove_breakpoint, init_core_ops): Delete.
1374 (_initialize_corelow): Initialize the_core_target.
1375 * gdbcore.h (core_target): Delete.
1376 (the_core_target): New.
1378 * ctf.c: (ctf_target): New class.
1379 (ctf_ops): Now a ctf_target.
1380 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
1381 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
1382 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
1384 (init_ctf_ops): Delete.
1385 (_initialize_ctf): Don't call it.
1386 * tracefile-tfile.c (tfile_target): New class.
1387 (tfile_ops): Now a tfile_target.
1388 (tfile_open, tfile_close, tfile_files_info)
1389 (tfile_get_tracepoint_status, tfile_trace_find)
1390 (tfile_fetch_registers, tfile_xfer_partial)
1391 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
1392 Refactor as tfile_target methods.
1393 (tfile_xfer_partial_features): Remove target_ops parameter.
1394 (init_tfile_ops): Delete.
1395 (_initialize_tracefile_tfile): Don't call it.
1396 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
1397 (tracefile_has_stack, tracefile_has_registers)
1398 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
1399 tracefile_target methods.
1400 (init_tracefile_ops): Delete.
1401 (tracefile_target::tracefile_target): New.
1402 * tracefile.h: Include "target.h".
1403 (tracefile_target): New class.
1404 (init_tracefile_ops): Delete.
1406 * spu-multiarch.c (spu_multiarch_target): New class.
1407 (spu_ops): Now a spu_multiarch_target.
1408 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
1409 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
1410 (spu_search_memory, spu_mourn_inferior): Refactor as
1411 spu_multiarch_target methods.
1412 (init_spu_ops): Delete.
1413 (_initialize_spu_multiarch): Remove references to init_spu_ops,
1414 complete_target_initialization.
1416 * ravenscar-thread.c (ravenscar_thread_target): New class.
1417 (ravenscar_ops): Now a ravenscar_thread_target.
1418 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
1419 (ravenscar_thread_alive, ravenscar_pid_to_str)
1420 (ravenscar_fetch_registers, ravenscar_store_registers)
1421 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
1422 (ravenscar_stopped_by_hw_breakpoint)
1423 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
1424 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
1425 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
1427 (init_ravenscar_thread_ops): Delete.
1428 (_initialize_ravenscar): Remove references to
1429 init_ravenscar_thread_ops and complete_target_initialization.
1431 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
1432 (bsd_uthread_target): New class.
1433 (bsd_uthread_ops): Now a bsd_uthread_target.
1434 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
1435 (bsd_uthread_close, bsd_uthread_mourn_inferior)
1436 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
1437 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
1438 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
1439 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
1440 (bsd_uthread_target): Delete function.
1441 (_initialize_bsd_uthread): Remove reference to
1442 complete_target_initialization.
1444 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
1445 (target_bfd): ... this new class.
1446 (target_bfd_xfer_partial, target_bfd_get_section_table)
1447 (target_bfd_close): Refactor as target_bfd methods.
1448 (target_bfd::~target_bfd): New.
1449 (target_bfd_reopen): Adjust.
1450 (target_bfd::close): New.
1452 * record-btrace.c (record_btrace_target): New class.
1453 (record_btrace_ops): Now a record_btrace_target.
1454 (record_btrace_open, record_btrace_stop_recording)
1455 (record_btrace_disconnect, record_btrace_close)
1456 (record_btrace_async, record_btrace_info)
1457 (record_btrace_insn_history, record_btrace_insn_history_range)
1458 (record_btrace_insn_history_from, record_btrace_call_history)
1459 (record_btrace_call_history_range)
1460 (record_btrace_call_history_from, record_btrace_record_method)
1461 (record_btrace_is_replaying, record_btrace_will_replay)
1462 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
1463 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
1464 (record_btrace_store_registers, record_btrace_prepare_to_store)
1465 (record_btrace_to_get_unwinder)
1466 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
1467 (record_btrace_commit_resume, record_btrace_wait)
1468 (record_btrace_stop, record_btrace_can_execute_reverse)
1469 (record_btrace_stopped_by_sw_breakpoint)
1470 (record_btrace_supports_stopped_by_sw_breakpoint)
1471 (record_btrace_stopped_by_hw_breakpoint)
1472 (record_btrace_supports_stopped_by_hw_breakpoint)
1473 (record_btrace_update_thread_list, record_btrace_thread_alive)
1474 (record_btrace_goto_begin, record_btrace_goto_end)
1475 (record_btrace_goto, record_btrace_stop_replaying_all)
1476 (record_btrace_execution_direction)
1477 (record_btrace_prepare_to_generate_core)
1478 (record_btrace_done_generating_core): Refactor as
1479 record_btrace_target methods.
1480 (init_record_btrace_ops): Delete.
1481 (_initialize_record_btrace): Remove reference to
1482 init_record_btrace_ops.
1483 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
1484 the execution_direction global.
1485 (record_full_base_target, record_full_target)
1486 (record_full_core_target): New classes.
1487 (record_full_ops): Now a record_full_target.
1488 (record_full_core_ops): Now a record_full_core_target.
1489 (record_full_target::detach, record_full_target::disconnect)
1490 (record_full_core_target::disconnect)
1491 (record_full_target::mourn_inferior, record_full_target::kill):
1493 (record_full_open, record_full_close, record_full_async): Refactor
1494 as methods of the record_full_base_target class.
1495 (record_full_resume, record_full_commit_resume): Refactor
1496 as methods of the record_full_target class.
1497 (record_full_wait, record_full_stopped_by_watchpoint)
1498 (record_full_stopped_data_address)
1499 (record_full_stopped_by_sw_breakpoint)
1500 (record_full_supports_stopped_by_sw_breakpoint)
1501 (record_full_stopped_by_hw_breakpoint)
1502 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
1503 methods of the record_full_base_target class.
1504 (record_full_store_registers, record_full_xfer_partial)
1505 (record_full_insert_breakpoint, record_full_remove_breakpoint):
1506 Refactor as methods of the record_full_target class.
1507 (record_full_can_execute_reverse, record_full_get_bookmark)
1508 (record_full_goto_bookmark, record_full_execution_direction)
1509 (record_full_record_method, record_full_info, record_full_delete)
1510 (record_full_is_replaying, record_full_will_replay)
1511 (record_full_goto_begin, record_full_goto_end, record_full_goto)
1512 (record_full_stop_replaying): Refactor as methods of the
1513 record_full_base_target class.
1514 (record_full_core_resume, record_full_core_kill)
1515 (record_full_core_fetch_registers)
1516 (record_full_core_prepare_to_store)
1517 (record_full_core_store_registers, record_full_core_xfer_partial)
1518 (record_full_core_insert_breakpoint)
1519 (record_full_core_remove_breakpoint)
1520 (record_full_core_has_execution): Refactor
1521 as methods of the record_full_core_target class.
1522 (record_full_base_target::supports_delete_record): New.
1523 (init_record_full_ops): Delete.
1524 (init_record_full_core_ops): Delete.
1525 (record_full_save): Refactor as method of the
1526 record_full_base_target class.
1527 (_initialize_record_full): Remove references to
1528 init_record_full_ops and init_record_full_core_ops.
1530 * remote.c (remote_target, extended_remote_target): New classes.
1531 (remote_ops): Now a remote_target.
1532 (extended_remote_ops): Now an extended_remote_target.
1533 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
1534 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
1535 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
1536 (remote_pass_signals, remote_set_syscall_catchpoint)
1537 (remote_program_signals, )
1538 (remote_thread_always_alive): Remove target_ops parameter.
1539 (remote_thread_alive, remote_thread_name)
1540 (remote_update_thread_list, remote_threads_extra_info)
1541 (remote_static_tracepoint_marker_at)
1542 (remote_static_tracepoint_markers_by_strid)
1543 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1544 (remote_open): Refactor as methods of remote_target.
1545 (extended_remote_open, extended_remote_detach)
1546 (extended_remote_attach, extended_remote_post_attach):
1547 (extended_remote_supports_disable_randomization)
1548 (extended_remote_create_inferior): : Refactor as method of
1549 extended_remote_target.
1550 (remote_set_permissions, remote_open_1, remote_detach)
1551 (remote_follow_fork, remote_follow_exec, remote_disconnect)
1552 (remote_resume, remote_commit_resume, remote_stop)
1553 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1554 (remote_terminal_ours, remote_wait, remote_fetch_registers)
1555 (remote_prepare_to_store, remote_store_registers)
1556 (remote_flash_erase, remote_flash_done, remote_files_info)
1557 (remote_kill, remote_mourn, remote_insert_breakpoint)
1558 (remote_remove_breakpoint, remote_insert_watchpoint)
1559 (remote_watchpoint_addr_within_range)
1560 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1561 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1562 (remote_supports_stopped_by_sw_breakpoint)
1563 (remote_stopped_by_hw_breakpoint)
1564 (remote_supports_stopped_by_hw_breakpoint)
1565 (remote_stopped_by_watchpoint, remote_stopped_data_address)
1566 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1567 (remote_verify_memory): Refactor as methods of remote_target.
1568 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1570 (remote_xfer_partial, remote_get_memory_xfer_limit)
1571 (remote_search_memory, remote_rcmd, remote_memory_map)
1572 (remote_pid_to_str, remote_get_thread_local_address)
1573 (remote_get_tib_address, remote_read_description): Refactor as
1574 methods of remote_target.
1575 (remote_target::fileio_open, remote_target::fileio_pwrite)
1576 (remote_target::fileio_pread, remote_target::fileio_close): New.
1577 (remote_hostio_readlink, remote_hostio_fstat)
1578 (remote_filesystem_is_local, remote_can_execute_reverse)
1579 (remote_supports_non_stop, remote_supports_disable_randomization)
1580 (remote_supports_multi_process, remote_supports_cond_breakpoints)
1581 (remote_supports_enable_disable_tracepoint)
1582 (remote_supports_string_tracing)
1583 (remote_can_run_breakpoint_commands, remote_trace_init)
1584 (remote_download_tracepoint, remote_can_download_tracepoint)
1585 (remote_download_trace_state_variable, remote_enable_tracepoint)
1586 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1587 (remote_trace_start, remote_get_trace_status)
1588 (remote_get_tracepoint_status, remote_trace_stop)
1589 (remote_trace_find, remote_get_trace_state_variable_value)
1590 (remote_save_trace_data, remote_get_raw_trace_data)
1591 (remote_set_disconnected_tracing, remote_core_of_thread)
1592 (remote_set_circular_trace_buffer, remote_traceframe_info)
1593 (remote_get_min_fast_tracepoint_insn_len)
1594 (remote_set_trace_buffer_size, remote_set_trace_notes)
1595 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1596 (remote_disable_btrace, remote_teardown_btrace)
1597 (remote_read_btrace, remote_btrace_conf)
1598 (remote_augmented_libraries_svr4_read, remote_load)
1599 (remote_pid_to_exec_file, remote_can_do_single_step)
1600 (remote_execution_direction, remote_thread_handle_to_thread_info):
1601 Refactor as methods of remote_target.
1602 (init_remote_ops, init_extended_remote_ops): Delete.
1603 (remote_can_async_p, remote_is_async_p, remote_async)
1604 (remote_thread_events, remote_upload_tracepoints)
1605 (remote_upload_trace_state_variables): Refactor as methods of
1607 (_initialize_remote): Remove references to init_remote_ops and
1608 init_extended_remote_ops.
1610 * remote-sim.c (gdbsim_target): New class.
1611 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1612 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1613 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1614 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1615 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1616 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1617 Refactor as methods of gdbsim_target.
1618 (gdbsim_ops): Now a gdbsim_target.
1619 (init_gdbsim_ops): Delete.
1620 (gdbsim_cntrl_c): Adjust.
1621 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1623 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1624 (the_amd64_linux_nat_target): New.
1625 (amd64_linux_fetch_inferior_registers)
1626 (amd64_linux_store_inferior_registers): Refactor as methods of
1627 amd64_linux_nat_target.
1628 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1629 * i386-linux-nat.c: Don't include "linux-nat.h".
1630 (i386_linux_nat_target): New class.
1631 (the_i386_linux_nat_target): New.
1632 (i386_linux_fetch_inferior_registers)
1633 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1634 as methods of i386_linux_nat_target.
1635 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1636 * inf-child.c (inf_child_ops): Delete.
1637 (inf_child_fetch_inferior_registers)
1638 (inf_child_store_inferior_registers): Delete.
1639 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1640 methods of inf_child_target.
1641 (inf_child_target::supports_terminal_ours)
1642 (inf_child_target::terminal_init)
1643 (inf_child_target::terminal_inferior)
1644 (inf_child_target::terminal_ours_for_output)
1645 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1646 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1648 (inf_child_open, inf_child_disconnect, inf_child_close)
1649 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1650 (inf_child_post_startup_inferior, inf_child_can_run)
1651 (inf_child_pid_to_exec_file): Refactor as methods of
1653 (inf_child_follow_fork): Delete.
1654 (inf_child_target::can_create_inferior)
1655 (inf_child_target::can_attach): New.
1656 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1657 (inf_child_target::has_stack, inf_child_target::has_registers)
1658 (inf_child_target::has_execution): New.
1659 (inf_child_fileio_open, inf_child_fileio_pwrite)
1660 (inf_child_fileio_pread, inf_child_fileio_fstat)
1661 (inf_child_fileio_close, inf_child_fileio_unlink)
1662 (inf_child_fileio_readlink, inf_child_use_agent)
1663 (inf_child_can_use_agent): Refactor as methods of
1665 (return_zero, inf_child_target): Delete.
1666 (inf_child_target::inf_child_target): New.
1667 * inf-child.h: Include "target.h".
1668 (inf_child_target): Delete function prototype.
1669 (inf_child_target): New class.
1670 (inf_child_open_target, inf_child_mourn_inferior)
1671 (inf_child_maybe_unpush_target): Delete.
1672 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1673 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1674 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1675 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1676 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1677 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1678 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1679 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1680 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1681 methods of inf_ptrace_target.
1682 (inf_ptrace_target): Delete function.
1683 * inf-ptrace.h: Include "inf-child.h".
1684 (inf_ptrace_target): Delete function declaration.
1685 (inf_ptrace_target): New class.
1686 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1687 * linux-nat.c (linux_target): New.
1688 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1689 (linux_nat_target::~linux_nat_target): New.
1690 (linux_child_post_attach, linux_child_post_startup_inferior)
1691 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1692 (linux_child_remove_fork_catchpoint)
1693 (linux_child_insert_vfork_catchpoint)
1694 (linux_child_remove_vfork_catchpoint)
1695 (linux_child_insert_exec_catchpoint)
1696 (linux_child_remove_exec_catchpoint)
1697 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1698 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1699 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1700 (linux_nat_stopped_data_address)
1701 (linux_nat_stopped_by_sw_breakpoint)
1702 (linux_nat_supports_stopped_by_sw_breakpoint)
1703 (linux_nat_stopped_by_hw_breakpoint)
1704 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1705 (linux_nat_kill, linux_nat_mourn_inferior)
1706 (linux_nat_xfer_partial, linux_nat_thread_alive)
1707 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1708 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1709 (linux_child_static_tracepoint_markers_by_strid)
1710 (linux_nat_is_async_p, linux_nat_can_async_p)
1711 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1712 (linux_nat_supports_multi_process)
1713 (linux_nat_supports_disable_randomization, linux_nat_async)
1714 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1715 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1716 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1717 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1718 methods of linux_nat_target.
1719 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1720 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1722 (check_stopped_by_watchpoint): Adjust.
1723 (linux_xfer_partial): Delete.
1724 (linux_target_install_ops, linux_target, linux_nat_add_target):
1726 (linux_nat_target::linux_nat_target): New.
1727 * linux-nat.h: Include "inf-ptrace.h".
1728 (linux_nat_target): New.
1729 (linux_target, linux_target_install_ops, linux_nat_add_target):
1730 Delete function declarations.
1731 (linux_target): Declare global.
1732 * linux-thread-db.c (thread_db_target): New.
1733 (thread_db_target::thread_db_target): New.
1734 (thread_db_ops): Delete.
1735 (the_thread_db_target): New.
1736 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1737 (thread_db_update_thread_list, thread_db_pid_to_str)
1738 (thread_db_extra_thread_info)
1739 (thread_db_thread_handle_to_thread_info)
1740 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1741 (thread_db_resume): Refactor as methods of thread_db_target.
1742 (init_thread_db_ops): Delete.
1743 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1744 * x86-linux-nat.c: Don't include "linux-nat.h".
1745 (super_post_startup_inferior): Delete.
1746 (x86_linux_nat_target::~x86_linux_nat_target): New.
1747 (x86_linux_child_post_startup_inferior)
1748 (x86_linux_read_description, x86_linux_enable_btrace)
1749 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1750 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1751 methods of x86_linux_nat_target.
1752 (x86_linux_create_target): Delete. Bits folded ...
1753 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1755 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1756 (x86_linux_nat_target): New class.
1757 (x86_linux_create_target): Delete.
1758 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1759 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1760 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1761 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1762 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1763 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1765 (x86_use_watchpoints): Delete.
1766 * x86-nat.h: Include "breakpoint.h" and "target.h".
1767 (x86_use_watchpoints): Delete.
1768 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1769 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1770 (x86_insert_watchpoint, x86_remove_watchpoint)
1771 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1772 (x86_stopped_by_hw_breakpoint): New declarations.
1773 (x86_nat_target): New template class.
1775 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1776 (the_ppc_linux_nat_target): New.
1777 (ppc_linux_fetch_inferior_registers)
1778 (ppc_linux_can_use_hw_breakpoint)
1779 (ppc_linux_region_ok_for_hw_watchpoint)
1780 (ppc_linux_ranged_break_num_registers)
1781 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1782 (ppc_linux_insert_mask_watchpoint)
1783 (ppc_linux_remove_mask_watchpoint)
1784 (ppc_linux_can_accel_watchpoint_condition)
1785 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1786 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1787 (ppc_linux_watchpoint_addr_within_range)
1788 (ppc_linux_masked_watch_num_registers)
1789 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1790 (ppc_linux_read_description): Refactor as methods of
1791 ppc_linux_nat_target.
1792 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1794 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1795 (procfs_target): New class.
1796 (the_procfs_target): New.
1797 (procfs_target): Delete function.
1798 (procfs_auxv_parse, procfs_attach, procfs_detach)
1799 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1800 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1801 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1802 (procfs_create_inferior, procfs_update_thread_list)
1803 (procfs_thread_alive, procfs_pid_to_str)
1804 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1805 (procfs_stopped_data_address, procfs_insert_watchpoint)
1806 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1807 (proc_find_memory_regions, procfs_info_proc)
1808 (procfs_make_note_section): Refactor as methods of procfs_target.
1809 (_initialize_procfs): Adjust.
1810 * sol-thread.c (sol_thread_target): New class.
1811 (sol_thread_ops): Now a sol_thread_target.
1812 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1813 (sol_thread_fetch_registers, sol_thread_store_registers)
1814 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1815 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1816 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1817 (init_sol_thread_ops): Delete.
1818 (_initialize_sol_thread): Adjust. Remove references to
1819 init_sol_thread_ops and complete_target_initialization.
1821 * windows-nat.c (windows_nat_target): New class.
1822 (windows_fetch_inferior_registers)
1823 (windows_store_inferior_registers, windows_resume, windows_wait)
1824 (windows_attach, windows_detach, windows_pid_to_exec_file)
1825 (windows_files_info, windows_create_inferior)
1826 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1827 (windows_close, windows_pid_to_str, windows_xfer_partial)
1828 (windows_get_tib_address, windows_get_ada_task_ptid)
1829 (windows_thread_name, windows_thread_alive): Refactor as
1830 windows_nat_target methods.
1831 (do_initial_windows_stuff): Adjust.
1832 (windows_target): Delete function.
1833 (_initialize_windows_nat): Adjust.
1835 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1836 (darwin_mourn_inferior, darwin_kill_inferior)
1837 (darwin_create_inferior, darwin_attach, darwin_detach)
1838 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1839 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1840 (darwin_supports_multi_process): Refactor as darwin_nat_target
1842 (darwin_resume_to, darwin_files_info): Delete.
1843 (_initialize_darwin_inferior): Rename to ...
1844 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1845 * darwin-nat.h: Include "inf-child.h".
1846 (darwin_nat_target): New class.
1847 (darwin_complete_target): Delete.
1848 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1849 (darwin_target): New.
1850 (i386_darwin_fetch_inferior_registers)
1851 (i386_darwin_store_inferior_registers): Refactor as methods of
1853 (darwin_complete_target): Delete, with ...
1854 (_initialize_i386_darwin_nat): ... bits factored out here.
1856 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1857 (the_alpha_linux_nat_target): New.
1858 (alpha_linux_register_u_offset): Refactor as
1859 alpha_linux_nat_target method.
1860 (_initialize_alpha_linux_nat): Adjust.
1861 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1862 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1863 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1864 methods of linux_nat_trad_target.
1865 (linux_trad_target): Delete.
1866 * linux-nat-trad.h (linux_trad_target): Delete function.
1867 (linux_nat_trad_target): New class.
1868 * mips-linux-nat.c (mips_linux_nat_target): New class.
1869 (super_fetch_registers, super_store_registers, super_close):
1871 (the_mips_linux_nat_target): New.
1872 (mips64_linux_regsets_fetch_registers)
1873 (mips64_linux_regsets_store_registers)
1874 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1875 (mips_linux_register_u_offset, mips_linux_read_description)
1876 (mips_linux_can_use_hw_breakpoint)
1877 (mips_linux_stopped_by_watchpoint)
1878 (mips_linux_stopped_data_address)
1879 (mips_linux_region_ok_for_hw_watchpoint)
1880 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1881 (mips_linux_close): Refactor as methods of mips_linux_nat.
1882 (_initialize_mips_linux_nat): Adjust to C++ification.
1884 * aix-thread.c (aix_thread_target): New class.
1885 (aix_thread_ops): Now an aix_thread_target.
1886 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1887 (aix_thread_fetch_registers, aix_thread_store_registers)
1888 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1889 (aix_thread_thread_alive, aix_thread_pid_to_str)
1890 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1891 Refactor as methods of aix_thread_target.
1892 (init_aix_thread_ops): Delete.
1893 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1894 and complete_target_initialization.
1895 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1896 (rs6000_nat_target): New class.
1897 (the_rs6000_nat_target): New.
1898 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1899 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1900 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1901 (super_create_inferior): Delete.
1902 (_initialize_rs6000_nat): Adjust to C++ification.
1904 * arm-linux-nat.c (arm_linux_nat_target): New class.
1905 (the_arm_linux_nat_target): New.
1906 (arm_linux_fetch_inferior_registers)
1907 (arm_linux_store_inferior_registers, arm_linux_read_description)
1908 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1909 (arm_linux_remove_hw_breakpoint)
1910 (arm_linux_region_ok_for_hw_watchpoint)
1911 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1912 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1913 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1914 arm_linux_nat_target.
1915 (_initialize_arm_linux_nat): Adjust to C++ification.
1917 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1918 (the_aarch64_linux_nat_target): New.
1919 (aarch64_linux_fetch_inferior_registers)
1920 (aarch64_linux_store_inferior_registers)
1921 (aarch64_linux_child_post_startup_inferior)
1922 (aarch64_linux_read_description)
1923 (aarch64_linux_can_use_hw_breakpoint)
1924 (aarch64_linux_insert_hw_breakpoint)
1925 (aarch64_linux_remove_hw_breakpoint)
1926 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1927 (aarch64_linux_region_ok_for_hw_watchpoint)
1928 (aarch64_linux_stopped_data_address)
1929 (aarch64_linux_stopped_by_watchpoint)
1930 (aarch64_linux_watchpoint_addr_within_range)
1931 (aarch64_linux_can_do_single_step): Refactor as methods of
1932 aarch64_linux_nat_target.
1933 (super_post_startup_inferior): Delete.
1934 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1936 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1937 (the_hppa_linux_nat_target): New.
1938 (hppa_linux_fetch_inferior_registers)
1939 (hppa_linux_store_inferior_registers): Refactor as methods of
1940 hppa_linux_nat_target.
1941 (_initialize_hppa_linux_nat): Adjust to C++ification.
1943 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1944 (the_ia64_linux_nat_target): New.
1945 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1946 (ia64_linux_stopped_data_address)
1947 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1948 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1949 ia64_linux_nat_target methods.
1950 (super_xfer_partial): Delete.
1951 (_initialize_ia64_linux_nat): Adjust to C++ification.
1953 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1954 (the_m32r_linux_nat_target): New.
1955 (m32r_linux_fetch_inferior_registers)
1956 (m32r_linux_store_inferior_registers): Refactor as
1957 m32r_linux_nat_target methods.
1958 (_initialize_m32r_linux_nat): Adjust to C++ification.
1960 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1961 (the_m68k_linux_nat_target): New.
1962 (m68k_linux_fetch_inferior_registers)
1963 (m68k_linux_store_inferior_registers): Refactor as
1964 m68k_linux_nat_target methods.
1965 (_initialize_m68k_linux_nat): Adjust to C++ification.
1967 * s390-linux-nat.c (s390_linux_nat_target): New class.
1968 (the_s390_linux_nat_target): New.
1969 (s390_linux_fetch_inferior_registers)
1970 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1971 (s390_insert_watchpoint, s390_remove_watchpoint)
1972 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1973 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1974 (s390_auxv_parse, s390_read_description): Refactor as methods of
1975 s390_linux_nat_target.
1976 (_initialize_s390_nat): Adjust to C++ification.
1978 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1979 (the_sparc_linux_nat_target): New.
1980 (_initialize_sparc_linux_nat): Adjust to C++ification.
1981 * sparc-nat.c (sparc_fetch_inferior_registers)
1982 (sparc_store_inferior_registers): Remove target_ops parameter.
1983 * sparc-nat.h (sparc_fetch_inferior_registers)
1984 (sparc_store_inferior_registers): Remove target_ops parameter.
1985 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1986 (the_sparc64_linux_nat_target): New.
1987 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1989 * spu-linux-nat.c (spu_linux_nat_target): New class.
1990 (the_spu_linux_nat_target): New.
1991 (spu_child_post_startup_inferior, spu_child_post_attach)
1992 (spu_child_wait, spu_fetch_inferior_registers)
1993 (spu_store_inferior_registers, spu_xfer_partial)
1994 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1996 (_initialize_spu_nat): Adjust to C++ification.
1998 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1999 (the_tilegx_linux_nat_target): New.
2000 (fetch_inferior_registers, store_inferior_registers):
2001 Refactor as methods.
2002 (_initialize_tile_linux_nat): Adjust to C++ification.
2004 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2005 (the_xtensa_linux_nat_target): New.
2006 (xtensa_linux_fetch_inferior_registers)
2007 (xtensa_linux_store_inferior_registers): Refactor as
2008 xtensa_linux_nat_target methods.
2009 (_initialize_xtensa_linux_nat): Adjust to C++ification.
2011 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
2012 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
2013 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
2014 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
2015 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
2016 (fbsd_stopped_by_sw_breakpoint)
2017 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
2018 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
2019 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
2020 (fbsd_post_startup_inferior, fbsd_post_attach)
2021 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
2022 (fbsd_set_syscall_catchpoint)
2023 (super_xfer_partial, super_resume, super_wait)
2024 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
2025 (fbsd_handle_debug_trap): Remove target_ops parameter.
2026 (fbsd_nat_add_target): Delete.
2027 * fbsd-nat.h: Include "inf-ptrace.h".
2028 (fbsd_nat_add_target): Delete.
2029 (USE_SIGTRAP_SIGINFO): Define.
2030 (fbsd_nat_target): New class.
2032 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
2033 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
2034 (amd64bsd_target): Delete.
2035 * amd64-bsd-nat.h: New file.
2036 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
2038 (amd64_fbsd_nat_target): New class.
2039 (the_amd64_fbsd_nat_target): New.
2040 (amd64fbsd_read_description): Refactor as method of
2041 amd64_fbsd_nat_target.
2042 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2043 (_initialize_amd64fbsd_nat): Adjust to C++ification.
2044 * amd64-nat.h (amd64bsd_target): Delete function declaration.
2045 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
2046 (i386bsd_store_inferior_registers): Remove target_ops parameter.
2047 (i386bsd_target): Delete.
2048 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
2049 (i386bsd_fetch_inferior_registers)
2050 (i386bsd_store_inferior_registers): Declare.
2051 (i386_bsd_nat_target): New class.
2052 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
2053 (the_i386_fbsd_nat_target): New.
2054 (i386fbsd_resume, i386fbsd_read_description): Refactor as
2055 i386_fbsd_nat_target methods.
2056 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2057 (_initialize_i386fbsd_nat): Adjust to C++ification.
2058 * x86-bsd-nat.c (super_mourn_inferior): Delete.
2059 (x86bsd_mourn_inferior, x86bsd_target): Delete.
2060 (_initialize_x86_bsd_nat): Adjust to C++ification.
2061 * x86-bsd-nat.h: Include "x86-nat.h".
2062 (x86bsd_target): Delete declaration.
2063 (x86bsd_nat_target): New class.
2065 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2066 (the_aarch64_fbsd_nat_target): New.
2067 (aarch64_fbsd_fetch_inferior_registers)
2068 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2069 aarch64_fbsd_nat_target.
2070 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2071 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2072 (the_alpha_bsd_nat_target): New.
2073 (alphabsd_fetch_inferior_registers)
2074 (alphabsd_store_inferior_registers): Refactor as
2075 alpha_bsd_nat_target methods.
2076 (_initialize_alphabsd_nat): Refactor as methods of
2077 alpha_bsd_nat_target.
2078 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2079 (the_amd64_nbsd_nat_target): New.
2080 (_initialize_amd64nbsd_nat): Adjust to C++ification.
2081 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2082 (the_amd64_obsd_nat_target): New.
2083 (_initialize_amd64obsd_nat): Adjust to C++ification.
2084 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2085 (the_arm_fbsd_nat_target): New.
2086 (arm_fbsd_fetch_inferior_registers)
2087 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2088 (_initialize_arm_fbsd_nat): Refactor as methods of
2089 arm_fbsd_nat_target.
2090 (_initialize_arm_fbsd_nat): Adjust to C++ification.
2091 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2092 (the_arm_netbsd_nat_target): New.
2093 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2094 arm_netbsd_nat_target.
2095 (_initialize_arm_netbsd_nat): Adjust to C++ification.
2096 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2097 (the_hppa_nbsd_nat_target): New.
2098 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2099 hppa_nbsd_nat_target methods.
2100 (_initialize_hppanbsd_nat): Adjust to C++ification.
2101 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2102 (the_hppa_obsd_nat_target): New.
2103 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2104 methods of hppa_obsd_nat_target.
2105 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
2107 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2108 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
2110 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2111 (_initialize_i386obsd_nat): Use add_target.
2112 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2113 (the_m68k_bsd_nat_target): New.
2114 (m68kbsd_fetch_inferior_registers)
2115 (m68kbsd_store_inferior_registers): Refactor as methods of
2116 m68k_bsd_nat_target.
2117 (_initialize_m68kbsd_nat): Adjust to C++ification.
2118 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2119 (the_mips_fbsd_nat_target): New.
2120 (mips_fbsd_fetch_inferior_registers)
2121 (mips_fbsd_store_inferior_registers): Refactor as methods of
2122 mips_fbsd_nat_target.
2123 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
2125 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2126 (the_mips_nbsd_nat_target): New.
2127 (mipsnbsd_fetch_inferior_registers)
2128 (mipsnbsd_store_inferior_registers): Refactor as methods of
2129 mips_nbsd_nat_target.
2130 (_initialize_mipsnbsd_nat): Adjust to C++ification.
2131 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2132 (the_mips64_obsd_nat_target): New.
2133 (mips64obsd_fetch_inferior_registers)
2134 (mips64obsd_store_inferior_registers): Refactor as methods of
2135 mips64_obsd_nat_target.
2136 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
2138 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2140 * nbsd-nat.h: Include "inf-ptrace.h".
2141 (nbsd_nat_target): New class.
2142 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2143 (obsd_wait): Refactor as methods of obsd_nat_target.
2144 (obsd_add_target): Delete.
2145 * obsd-nat.h: Include "inf-ptrace.h".
2146 (obsd_nat_target): New class.
2147 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2148 (the_ppc_fbsd_nat_target): New.
2149 (ppcfbsd_fetch_inferior_registers)
2150 (ppcfbsd_store_inferior_registers): Refactor as methods of
2151 ppc_fbsd_nat_target.
2152 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
2154 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
2155 (the_ppc_nbsd_nat_target): New.
2156 (ppcnbsd_fetch_inferior_registers)
2157 (ppcnbsd_store_inferior_registers): Refactor as methods of
2158 ppc_nbsd_nat_target.
2159 (_initialize_ppcnbsd_nat): Adjust to C++ification.
2160 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
2161 (the_ppc_obsd_nat_target): New.
2162 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
2163 methods of ppc_obsd_nat_target.
2164 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
2166 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
2167 (the_sh_nbsd_nat_target): New.
2168 (shnbsd_fetch_inferior_registers)
2169 (shnbsd_store_inferior_registers): Refactor as methods of
2171 (_initialize_shnbsd_nat): Adjust to C++ification.
2172 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
2173 (inf_ptrace_xfer_partial): Delete.
2174 (sparc_xfer_partial, sparc_target): Delete.
2175 * sparc-nat.h (sparc_fetch_inferior_registers)
2176 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
2177 (sparc_target): Delete function declaration.
2178 (sparc_target): New template class.
2179 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
2180 (_initialize_sparcnbsd_nat): Adjust to C++ification.
2181 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
2182 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
2184 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2185 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2186 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2187 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
2189 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2190 (the_vax_bsd_nat_target): New.
2191 (vaxbsd_fetch_inferior_registers)
2192 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2194 (_initialize_vaxbsd_nat): Adjust to C++ification.
2196 * bsd-kvm.c (bsd_kvm_target): New class.
2197 (bsd_kvm_ops): Now a bsd_kvm_target.
2198 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2199 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2200 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
2202 (bsd_kvm_return_one): Delete.
2203 (bsd_kvm_add_target): Adjust to C++ification.
2205 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
2206 (nto_procfs_target_procfs): New classes.
2207 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
2208 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
2209 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
2210 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
2211 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
2212 (procfs_remove_hw_breakpoint, procfs_resume)
2213 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
2214 (procfs_kill_inferior, procfs_store_registers)
2215 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
2216 as methods of nto_procfs_target.
2217 (nto_procfs_ops): Now an nto_procfs_target_procfs.
2218 (nto_native_ops): Delete.
2219 (procfs_open, procfs_native_open): Delete.
2220 (nto_native_ops): Now an nto_procfs_target_native.
2221 (init_procfs_targets): Adjust to C++ification.
2222 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
2223 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
2224 Refactor as methods of nto_procfs_target.
2226 * go32-nat.c (go32_nat_target): New class.
2227 (the_go32_nat_target): New.
2228 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
2229 (go32_store_registers, go32_xfer_partial, go32_files_info)
2230 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
2231 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
2232 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
2233 (go32_pid_to_str): Refactor as methods of go32_nat_target.
2234 (go32_target): Delete.
2235 (_initialize_go32_nat): Adjust to C++ification.
2237 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
2238 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
2239 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
2240 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
2242 (gnu_target): Delete.
2243 * gnu-nat.h (gnu_target): Delete.
2244 (gnu_nat_target): New class.
2245 * i386-gnu-nat.c (gnu_base_target): New.
2246 (i386_gnu_nat_target): New class.
2247 (the_i386_gnu_nat_target): New.
2248 (_initialize_i386gnu_nat): Adjust to C++ification.
2250 2018-05-02 Pedro Alves <palves@redhat.com>
2252 * bfd-target.c (target_bfd_xclose): Rename to ...
2253 (target_bfd_close): ... this.
2254 (target_bfd_reopen): Adjust.
2255 * target.c (target_close): Remove references to to_xclose.
2256 * target.h (target_ops::to_xclose): Delete.
2257 (target_ops::to_close): Update comments.
2259 2018-05-02 Pedro Alves <palves@redhat.com>
2261 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
2263 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
2264 * inf-ptrace.c (inf_ptrace_register_u_offset)
2265 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2266 (inf_ptrace_store_register, inf_ptrace_store_registers)
2267 (inf_ptrace_trad_target): Move to ...
2268 * linux-nat-trad.c: ... this new file.
2269 * linux-nat-trad.h: New file.
2270 * linux-nat.c (linux_target_install_ops): Make extern.
2271 (linux_trad_target): Delete.
2272 * linux-nat.h (linux_trad_target): Delete declaration.
2273 (linux_target_install_ops): Declare.
2274 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
2277 2018-05-02 Pedro Alves <palves@redhat.com>
2279 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2280 procfs_target/add_target here.
2281 * procfs.c (procfs_target): Make static.
2282 (_initialize_procfs): Call add_target here.
2283 * procfs.h (struct target_ops): Remove forward declaration.
2284 (procfs_target): Remove declaration.
2285 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
2287 2018-05-02 Pedro Alves <palves@redhat.com>
2289 * procfs.c (procfs_stopped_by_watchpoint)
2290 (procfs_insert_watchpoint, procfs_remove_watchpoint)
2291 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
2293 (procfs_use_watchpoints): Delete, move contents...
2294 (procfs_target): ... here.
2295 * procfs.h (procfs_use_watchpoints): Delete declaration.
2296 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2297 procfs_use_watchpoints.
2298 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
2299 procfs_use_watchpoints.
2301 2018-05-02 Tom Tromey <tom@tromey.com>
2304 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
2305 and var_zuinteger_unlimited.
2306 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
2307 and PARAM_ZUINTEGER_UNLIMITED.
2308 (set_parameter_value): Handle var_zuinteger and
2309 var_zuinteger_unlimited.
2310 (add_setshow_generic): Likewise.
2311 (parmpy_init): Likewise.
2313 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
2316 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
2317 pointer is not null before dereferencing it.
2319 2018-04-30 Tom Tromey <tom@tromey.com>
2321 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
2324 2018-04-30 Tom Tromey <tom@tromey.com>
2326 * breakpoint.c (mention): Remove use of is_mi_like_p.
2327 (print_mention_ranged_breakpoint): Likewise.
2328 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
2331 2018-04-30 Tom Tromey <tom@tromey.com>
2333 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
2335 2018-04-30 Tom Tromey <tom@tromey.com>
2337 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
2338 (info_spu_event_command): Remove some uses of is_mi_like_p.
2340 2018-04-30 Tom Tromey <tom@tromey.com>
2342 * python/py-framefilter.c (py_print_single_arg)
2343 (enumerate_locals, py_print_args, py_print_frame): Remove some
2344 uses of is_mi_like_p.
2346 2018-04-30 Tom Tromey <tom@tromey.com>
2349 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
2350 * ui-out.h (ui_out::is_mi_like_p): Now const.
2351 (ui_out::do_is_mi_like_p): Now const.
2352 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
2354 2018-04-30 Tom Tromey <tom@tromey.com>
2356 * varobj.c (varobj_set_visualizer): Use new_reference.
2357 * python/python.c (gdbpy_decode_line): Use new_reference.
2358 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
2361 2018-04-30 Tom Tromey <tom@tromey.com>
2363 * varobj.c (install_new_value): Use new_reference.
2364 * value.h (value_incref): Return void. Swap intro comment with
2366 * value.c (set_value_parent): Use new_reference.
2367 (value_incref): Return void. Update intro comment.
2368 (release_value): Use new_reference.
2369 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
2371 2018-04-30 Tom Tromey <tom@tromey.com>
2373 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
2374 * gdb_bfd.h (new_bfd_ref): Remove.
2375 (gdb_bfd_open): Update comment.
2376 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2377 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
2378 (gdb_bfd_fdopenr): Use new_reference.
2379 * exec.c (exec_file_attach): Use new_reference.
2381 2018-04-30 Tom Tromey <tom@tromey.com>
2383 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
2386 2018-04-30 Tom Tromey <tom@tromey.com>
2388 * jit.c (jit_read_code_entry): Use type_align.
2389 * i386-tdep.c (i386_gdbarch_init): Don't call
2390 set_gdbarch_long_long_align_bit.
2391 * gdbarch.sh: Remove long_long_align_bit.
2392 * gdbarch.c, gdbarch.h: Rebuild.
2393 * arc-tdep.c (arc_type_align): New function.
2394 (arc_gdbarch_init): Use arc_type_align. Don't call
2395 set_gdbarch_long_long_align_bit.
2397 2018-04-30 Tom Tromey <tom@tromey.com>
2399 * rust-lang.c (rust_type_alignment): Remove.
2400 (rust_composite_type): Use type_align.
2402 2018-04-30 Tom Tromey <tom@tromey.com>
2404 * NEWS: Mention Type.align.
2405 * python/py-type.c (typy_get_alignof): New function.
2406 (type_object_getset): Add "alignof".
2408 2018-04-30 Tom Tromey <tom@tromey.com>
2412 * std-operator.def (UNOP_ALIGNOF): New operator.
2413 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
2415 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
2416 * c-lang.c (c_op_print_tab): Add alignof.
2417 * c-exp.y (ALIGNOF): New token.
2418 (exp): Add "ALIGNOF" production.
2419 (ident_tokens): Add _Alignof and alignof.
2421 2018-04-30 Tom Tromey <tom@tromey.com>
2423 * i386-tdep.c (i386_type_align): New function.
2424 (i386_gdbarch_init): Update.
2425 * gdbarch.sh (type_align): New method.
2426 * gdbarch.c, gdbarch.h: Rebuild.
2427 * arch-utils.h (default_type_align): Declare.
2428 * arch-utils.c (default_type_align): New function.
2429 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
2430 (struct type) <align_log2>: New field.
2431 <instance_flags>: Now a bitfield.
2432 (TYPE_RAW_ALIGN): New macro.
2433 (type_align, type_raw_align, set_type_align): Declare.
2434 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
2436 * dwarf2read.c (quirk_rust_enum): Set type alignment.
2437 (get_alignment, maybe_set_alignment): New functions.
2438 (read_structure_type, read_enumeration_type, read_array_type)
2439 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
2440 (read_subrange_type, read_base_type): Set type alignment.
2442 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
2444 * dwarf2read.c (read_index_from_section): Use bool.
2446 2018-04-29 Fabian Groffen <grobian@gentoo.org>
2449 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
2452 2018-04-29 John Reiser <jreiser@BitWagon.com>
2455 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
2456 last step, and do it atomically.
2458 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
2460 * compile/compile-c-types.c (convert_int, convert_float):
2463 2018-04-27 Tom Tromey <tom@tromey.com>
2466 * rust-lang.c (rust_inclusive_range_type_p): New function.
2467 (rust_range): Handle inclusive ranges.
2468 (rust_compute_range): Likewise.
2469 * rust-exp.y (struct rust_op) <inclusive>: New field.
2470 (DOTDOTEQ): New constant.
2471 (range_expr): Add "..=" productions.
2472 (operator_tokens): Add "..=" token.
2473 (ast_range): Add "inclusive" parameter.
2474 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
2476 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
2478 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
2479 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
2481 * expprint.c (print_subexp_standard): Handle new bounds values.
2482 (dump_subexp_body_standard): Likewise.
2484 2018-04-27 Tom Tromey <tom@tromey.com>
2486 * configure: Rebuild.
2487 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
2488 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
2490 (class symbol_needs_eval_context): Likewise.
2491 * dwarf2read.c (mock_mapped_index::symbol_name_count)
2492 (mock_mapped_index::symbol_name_at): Use "override". Remove
2494 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
2496 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
2497 * aarch64-tdep.c (instruction_reader::read): Use "override".
2498 (instruction_reader_test::read): Likewise.
2499 * arm-tdep.c (instruction_reader::read): Use "override".
2500 (instruction_reader_thumb::read): Likewise.
2502 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2505 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
2506 instead of remote_send.
2507 (remote_send): Remove.
2509 2018-04-26 Pedro Alves <palves@redhat.com>
2511 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
2512 find_function_start_sal instead of find_pc_line.
2514 2018-04-26 Pedro Alves <palves@redhat.com>
2516 * breakpoint.c (set_breakpoint_location_function): Handle
2518 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
2519 * elfread.c (elf_symtab_read): Give data symbols with
2520 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
2521 (elf_rel_plt_read): Update comment.
2522 * linespec.c (convert_linespec_to_sals): Handle
2524 (minsym_found): Handle mst_data_gnu_ifunc.
2525 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
2526 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
2527 * parse.c (find_minsym_type_and_address): Handle
2529 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
2530 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
2531 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
2533 <mst_data_gnu_ifunc>: New enumerator.
2535 2018-04-26 Pedro Alves <palves@redhat.com>
2537 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
2538 (lookup_minimal_symbol_by_pc_section): ... this. Replace
2539 'want_trampoline' parameter by a lookup_msym_prefer parameter.
2541 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
2542 (lookup_minimal_symbol_by_pc): Adjust.
2543 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2544 (lookup_solib_trampoline_symbol_by_pc): Adjust.
2545 * minsyms.h (lookup_msym_prefer): New enum.
2546 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2547 parameter by a lookup_msym_prefer parameter.
2549 2018-04-26 Pedro Alves <palves@redhat.com>
2551 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2552 ends in "@plt" instead of looking at the symbol's section.
2554 2018-04-26 Pedro Alves <palves@redhat.com>
2556 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
2558 (find_pc_partial_function_gnu_ifunc): Rename to ...
2559 (find_pc_partial_function): ... this, and remove references to
2561 (find_pc_partial_function): Delete old implementation.
2562 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2564 2018-04-26 Pedro Alves <palves@redhat.com>
2566 * linespec.c (struct bound_minimal_symbol_search_key): New.
2567 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
2568 skip first line if we found a GNU ifunc minimal symbol by name.
2569 (compare_msymbols): Change parameters to work with a destructured
2571 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2574 2018-04-26 Pedro Alves <palves@redhat.com>
2576 * breakpoint.c (set_breakpoint_location_function): Don't resolve
2577 ifunc targets here. Instead, if we have an ifunc minsym, use its
2579 (add_location_to_breakpoint): Store the minsym and the objfile in
2580 the breakpoint location.
2581 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2582 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2583 Record the minsym in the sal.
2584 * symtab.h (symtab_and_line) <msymbol>: New field.
2586 2018-04-26 Pedro Alves <palves@redhat.com>
2588 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2589 unless we actually resolved the ifunc.
2591 2018-04-26 Pedro Alves <palves@redhat.com>
2593 * c-exp.y (variable production): Prefer ifunc minsyms over
2594 regular function symbols.
2595 * symtab.c (find_gnu_ifunc): New function.
2596 * minsyms.h (lookup_msym_prefer): New enum.
2597 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2598 parameter by a lookup_msym_prefer parameter.
2599 * symtab.h (find_gnu_ifunc): New declaration.
2601 2018-04-26 Pedro Alves <palves@redhat.com>
2603 * blockframe.c (find_gnu_ifunc_target_type): New function.
2604 (find_function_type): New.
2605 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2606 return a value with a memory address.
2607 (eval_call): For calls to GNU ifunc functions, try to find the
2608 type of the target function from the type that the resolver
2610 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2612 * infcall.c (find_function_return_type): Delete.
2613 (find_function_addr): Add 'function_type' parameter. For calls to
2614 GNU ifunc functions, try to find the type of the target function
2615 from the type that the resolver returns, and return it via
2617 (call_function_by_hand_dummy): Adjust to use the function type
2618 returned by find_function_addr.
2619 (find_function_addr): Add 'function_type' parameter and move
2621 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2624 2018-04-26 Pedro Alves <palves@redhat.com>
2626 * c-exp.y (variable production): Skip finding an alias for ifunc
2629 2018-04-26 Pedro Alves <palves@redhat.com>
2631 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2633 2018-04-25 Pedro Alves <palves@redhat.com>
2635 * infcmd.c (kill_command): Print the pid as string, not the whole
2636 thread's ptid. Add comment. s/has been killed/killed/ in output
2638 * remote.c (remote_detach_1): Print the pid as string, not the
2639 whole thread's ptid.
2641 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2642 Sergio Durigan Junior <sergiodj@redhat.com>
2643 Pedro Alves <palves@redhat.com>
2645 * infcmd.c (kill_command): Print message when inferior has
2647 * inferior.c (print_inferior_events): Remove 'static'. Set as
2649 (add_inferior): Improve message printed when
2650 'print_inferior_events' is on.
2651 (exit_inferior): Remove message printed when
2652 'print_inferior_events' is on.
2653 (detach_inferior): Improve message printed when
2654 'print_inferior_events' is on.
2655 (initialize_inferiors): Use 'add_inferior_silent' to set
2656 'current_inferior_'.
2657 * inferior.h (print_inferior_events): Declare here as
2659 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2660 '[Detaching...]' messages when 'print_inferior_events' is on.
2661 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2662 as prefix/suffix for messages. Remove periods. Fix erroneous
2663 'Detaching after fork from child...', replace it by '... from
2665 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2666 prefix/suffix when printing 'Detaching...' messages. Print
2667 them when 'print_inferior_events' is on.
2668 * remote.c (remote_detach_1): Print message when detaching
2669 from inferior and '!is_fork_parent'.
2671 2018-04-24 Tom Tromey <tom@tromey.com>
2673 * cli-out.h: Reindent.
2675 2018-04-24 Tom Tromey <tom@tromey.com>
2677 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2678 (cli_ui_out::do_field_string): Use fputs_filtered.
2679 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2681 2018-04-23 Tom Tromey <tom@tromey.com>
2683 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2684 gdb::unique_xmalloc_ptr.
2686 2018-04-23 Tom Tromey <tom@tromey.com>
2688 * configure: Rebuild.
2690 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2693 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2694 prepare_for_testing. Set normal_bp to r_debug_state if target
2697 2018-04-21 Pedro Alves <palves@redhat.com>
2698 Rajendra SY <rajendra.sy@gmail.com>
2700 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2701 * remote.c (extended_remote_attach): In all-stop mode, mark the
2702 thread as executing.
2704 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2706 * thread.c (thread_apply_all_command): Fix comment.
2707 (thread_command): Fix comment.
2709 2018-04-10 Alan Hayward <alan.hayward@arm.com>
2711 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2713 * features/aarch64-core.c (create_feature_aarch64_core):
2715 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2717 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2719 * features/i386/32bit-avx512.c
2720 (create_feature_i386_32bit_avx512): Likewise.
2721 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2723 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2725 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2727 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2729 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2731 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2733 * features/i386/64bit-avx512.c
2734 (create_feature_i386_64bit_avx512): Likewise.
2735 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2737 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2739 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2741 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2743 * features/i386/64bit-segments.c
2744 (create_feature_i386_64bit_segments): Likewise.
2745 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2747 * features/i386/x32-core.c
2748 (create_feature_i386_x32_core): Likewise.
2749 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2750 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2751 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2752 * target-descriptions.c: In generated code, don't pass xml
2755 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2757 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2758 (print_xml_feature::visit_post): Likewise.
2759 (print_xml_feature::visit): Likewise.
2760 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2761 (print_xml_feature): Add new class.
2762 * regformats/regdat.sh: Null xmltarget on feature targets.
2763 * target-descriptions.c (struct target_desc): Add xmltarget.
2764 (maintenance_check_tdesc_xml_convert): Add unittest function.
2765 (tdesc_get_features_xml): Add function to get xml.
2766 (maintenance_check_xml_descriptions): Test xml generation.
2767 * xml-tdesc.c (string_read_description_xml): Add function.
2768 * xml-tdesc.h (string_read_description_xml): Add declaration.
2770 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2772 * features/Makefile: Add feature marker to targets with new style
2773 target descriptions.
2774 * regformats/aarch64.dat: Regenerate.
2775 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2776 * regformats/i386/amd64-avx-linux.dat: Likewise.
2777 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2778 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2779 * regformats/i386/amd64-linux.dat: Likewise.
2780 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2781 * regformats/i386/amd64.dat: Likewise.
2782 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2783 * regformats/i386/i386-avx-linux.dat: Likewise.
2784 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2785 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2786 * regformats/i386/i386-linux.dat: Likewise.
2787 * regformats/i386/i386-mmx-linux.dat: Likewise.
2788 * regformats/i386/i386-mpx-linux.dat: Likewise.
2789 * regformats/i386/i386.dat: Likewise.
2790 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2791 * regformats/i386/x32-avx-linux.dat: Likewise.
2792 * regformats/i386/x32-linux.dat: Likewise.
2793 * regformats/tic6x-c62x-linux.dat: Likewise.
2794 * regformats/tic6x-c64x-linux.dat: Likewise.
2795 * regformats/tic6x-c64xp-linux.dat: Likewise.
2796 * regformats/regdat.sh: Parse feature marker.
2798 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2800 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2801 (tdesc_osabi_name): Likewise.
2802 * target-descriptions.c (tdesc_architecture_name): Add new
2804 (tdesc_osabi_name): Likewise.
2806 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2808 * common/tdesc.c (tdesc_predefined_type): Move to here.
2809 (tdesc_named_type): Likewise.
2810 (tdesc_create_vector): Likewise.
2811 (tdesc_create_struct): Likewise.
2812 (tdesc_set_struct_size): Likewise.
2813 (tdesc_create_union): Likewise.
2814 (tdesc_create_flags): Likewise.
2815 (tdesc_create_enum): Likewise.
2816 (tdesc_add_field): Likewise.
2817 (tdesc_add_typed_bitfield): Likewise.
2818 (tdesc_add_bitfield): Likewise.
2819 (tdesc_add_flag): Likewise.
2820 (tdesc_add_enum_value): Likewise.
2821 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2822 (struct tdesc_type_vector): Likewise.
2823 (struct tdesc_type_field): Likewise.
2824 (struct tdesc_type_with_fields): Likewise.
2825 (tdesc_create_enum): Add declaration.
2826 (tdesc_add_typed_bitfield): Likewise.
2827 (tdesc_add_enum_value): Likewise.
2828 * target-descriptions.c (tdesc_type_field): Move from here.
2829 (tdesc_type_builtin): Likewise.
2830 (tdesc_type_vector): Likewise.
2831 (tdesc_type_with_fields): Likewise.
2832 (tdesc_predefined_types): Likewise.
2833 (tdesc_named_type): Likewise.
2834 (tdesc_create_vector): Likewise.
2835 (tdesc_create_struct): Likewise.
2836 (tdesc_set_struct_size): Likewise.
2837 (tdesc_create_union): Likewise.
2838 (tdesc_create_flags): Likewise.
2839 (tdesc_create_enum): Likewise.
2840 (tdesc_add_field): Likewise.
2841 (tdesc_add_typed_bitfield): Likewise.
2842 (tdesc_add_bitfield): Likewise.
2843 (tdesc_add_flag): Likewise.
2844 (tdesc_add_enum_value): Likewise.
2845 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2846 (tdesc_add_typed_bitfield): Likewise.
2847 (tdesc_add_enum_value): Likewise.
2849 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2851 * common/tdesc.c (tdesc_feature::accept): Move to here.
2852 (tdesc_feature::operator==): Likewise.
2853 (tdesc_create_reg): Likewise.
2854 * common/tdesc.h (tdesc_type_kind): Likewise.
2855 (struct tdesc_type): Likewise.
2856 (struct tdesc_feature): Likewise.
2857 * regformats/regdat.sh: Create a feature.
2858 * target-descriptions.c (tdesc_type_kind): Move from here.
2859 (tdesc_type): Likewise.
2860 (tdesc_type_up): Likewise.
2861 (tdesc_feature): Likewise.
2862 (tdesc_create_reg): Likewise.
2864 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2866 * Makefile.in: Add arch/tdesc.c
2867 * common/tdesc.c: New file.
2868 * common/tdesc.h (tdesc_element_visitor): Move to here.
2869 (tdesc_element): Likewise.
2870 (tdesc_reg): Likewise.
2871 (tdesc_reg_up): Likewise.
2872 * regformats/regdef.h (reg): Add offset to constructors.
2873 * target-descriptions.c (tdesc_element_visitor): Move from here.
2874 (tdesc_element): Likewise.
2875 (tdesc_reg): Likewise.
2876 (tdesc_reg_up): Likewise.
2878 2018-04-17 Tom Tromey <tom@tromey.com>
2880 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2883 2018-04-17 Tom Tromey <tom@tromey.com>
2885 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2887 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2889 * symtab.c (print_symbol_info): Skip printing filename and line
2890 number when `last' is NULL.
2891 (symtab_symbol_info): Use empty string instead of NULL for first
2892 invocation of print_symbol_info.
2893 (rbreak_command): Pass NULL to `last' parameter of
2896 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2898 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2901 2018-04-16 Pedro Alves <palves@redhat.com>
2903 * MAINTAINERS (sh): Remove.
2904 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2905 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2906 (ALLDEPFILES): Remove sh64-tdep.c.
2907 * NEWS: Mentions that support for SH-5/SH64 is removed.
2908 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2909 (sh*-*-openbsd*): Ditto.
2910 (sh64-*-elf*): Remove.
2912 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2913 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2914 * sh-tdep.c: No longer include "sh64-tdep.h".
2915 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2916 * sh64-tdep.c, sh64-tdep.h: Remove files.
2918 2018-04-16 Pedro Alves <palves@redhat.com>
2920 * MAINTAINERS: Remove m88k.
2921 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2922 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2923 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2924 * NEWS: Mention that support for m88k was removed.
2925 * configure.host (m88*-*-*): Remove support.
2926 * configure.nat (m88k-*-*): Remove support.
2927 * configure.tgt (m88*-*-openbsd*): Remove.
2928 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2930 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2932 * configure.tgt (x86_tobjs): New variable.
2933 (amd64_tobjs, i386_tobjs): Use it.
2935 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2937 * symtab.c (print_symbol_info): Precede the symbol definition by
2938 the line number when available.
2939 * NEWS: Advertise this enhancement.
2941 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2943 * NEWS (New options): announce set/show record btrace cpu.
2944 * btrace.c: Include record-btrace.h.
2945 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2946 the vendor is unknown.
2947 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2948 Maybe overwrite the btrace configuration's cpu.
2949 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2950 (btrace_fetch): Add cpu parameter. Update callers.
2951 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2952 Maybe overwrite the btrace configuration's cpu. Skip enabling
2953 errata workarounds if the vendor is unknown.
2954 * python/py-record-btrace.c: Include record-btrace.h.
2955 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2956 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2957 * record-btrace.c (record_btrace_cpu_state_kind): New.
2958 (record_btrace_cpu): New.
2959 (set_record_btrace_cpu_cmdlist): New.
2960 (record_btrace_get_cpu): New.
2961 (require_btrace_thread, record_btrace_info)
2962 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2963 (cmd_set_record_btrace_cpu_none): New.
2964 (cmd_set_record_btrace_cpu_auto): New.
2965 (cmd_set_record_btrace_cpu): New.
2966 (cmd_show_record_btrace_cpu): New.
2967 (_initialize_record_btrace): Initialize set/show record btrace cpu
2969 * record-btrace.h (record_btrace_get_cpu): New.
2971 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2973 * record.c (set_record_command): Fix typo in message.
2975 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2977 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2979 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2981 * infrun.c (process_event_stop_test): Call
2982 gdbarch_in_indirect_branch_thunk.
2983 * gdbarch.sh (in_indirect_branch_thunk): New.
2984 * gdbarch.c: Regenerated.
2985 * gdbarch.h: Regenerated.
2988 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2989 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2990 (ALLDEPFILES): Add x86-tdep.c.
2991 * arch-utils.h (default_in_indirect_branch_thunk): New.
2992 * arch-utils.c (default_in_indirect_branch_thunk): New.
2993 * i386-tdep: Include x86-tdep.h.
2994 (i386_in_indirect_branch_thunk): New.
2995 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2997 * amd64-tdep: Include x86-tdep.h.
2998 (amd64_in_indirect_branch_thunk): New.
2999 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3001 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3004 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3005 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3006 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3009 2018-04-12 Tom Tromey <tom@tromey.com>
3011 * rust-lang.c (rust_print_struct_def): Remove univariant code.
3012 (rust_evaluate_subexp): Likewise.
3014 2018-04-12 Pedro Alves <palves@redhat.com>
3016 * procfs.c (procfs_detach): Make forward declaration's prototype
3017 match definition's protototype.
3018 (proc_get_LDT_entry): Remove stale do_cleanups call.
3020 2018-04-12 Pedro Alves <palves@redhat.com>
3022 * target.h (target_ops::to_has_exited): Delete.
3023 (target_has_exited): Delete.
3024 * target-delegates.c: Regenerate.
3026 2018-04-11 Pedro Alves <palves@redhat.com>
3028 * target.c (fileio_fh_t::t): Add comment.
3029 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3030 (target_fileio_close): Handle a NULL target.
3031 (invalidate_fileio_fh): New.
3032 (target_close): Call it.
3033 * remote.c (remote_hostio_send_command): No longer check whether
3034 remote_desc is open.
3036 2018-04-11 Pedro Alves <palves@redhat.com>
3038 * target.c (fileio_fh_t): Make it a named struct instead of a
3040 (fileio_fh_t::is_closed): New method.
3041 (DEF_VEC_O (fileio_fh_t)): Remove.
3042 (fileio_fhandles): Now a std::vector.
3043 (is_closed_fileio_fh): Delete.
3044 (acquire_fileio_fd): Adjust. Rename parameters.
3045 (release_fileio_fd): Adjust.
3046 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
3047 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3048 (target_fileio_close): Adjust.
3050 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
3052 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
3055 2018-04-10 Pedro Alves <palves@redhat.com>
3057 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
3058 (scoped_finish_thread_state): New class.
3059 * infcmd.c (run_command_1): Use it instead of finish_thread_state
3061 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3062 (fetch_inferior_event, normal_stop): Likewise.
3063 * thread.c (finish_thread_state_cleanup): Delete.
3065 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3066 Pedro Alves <palves@redhat.com>
3068 * value.c: Include "selftest.h" and "common/array-view.h".
3069 (struct range) <operator ==>: New.
3070 (test_ranges_contain): New.
3071 (check_ranges_vector): New.
3072 (test_insert_into_bit_range_vector): New.
3073 (_initialize_values): Register selftests.
3074 * common/array-view.h (operator==, operator!=): New.
3076 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3078 * common/gdb_vecs.h (unordered_remove): Add overload that takes
3080 * inline-frame.c: Include <algorithm>.
3081 (struct inline_state): Add constructor.
3082 (inline_state_s): Remove.
3083 (DEF_VEC_O(inline_state_s)): Remove.
3084 (inline_states): Change type to std::vector.
3085 (find_inline_frame_state): Adjust to std::vector.
3086 (allocate_inline_frame_state): Remove.
3087 (clear_inline_frame_state): Adjust to std::vector.
3088 (skip_inline_frames): Adjust to std::vector.
3090 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3092 * tracepoint.h (struct trace_state_variable): Add constructor.
3093 <name>: Change type to std::string.
3094 * tracepoint.c (tsv_s): Remove.
3095 (DEF_VEC_O(tsv_s)): Remove.
3096 (tvariables): Change to std::vector.
3097 (create_trace_state_variable): Adjust to std::vector.
3098 (find_trace_state_variable): Likewise.
3099 (find_trace_state_variable_by_number): Likewise.
3100 (delete_trace_state_variable): Likewise.
3101 (trace_variable_command): Adjust to std::string.
3102 (delete_trace_variable_command): Likewise.
3103 (tvariables_info_1): Adjust to std::vector.
3104 (save_trace_state_variables): Likewise.
3105 (start_tracing): Likewise.
3106 (merge_uploaded_trace_state_variables): Adjust to std::vector
3108 * target.h (struct target_ops)
3109 <to_download_trace_state_variable>: Pass reference to
3110 trace_state_variable.
3111 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3112 * target-delegates.c: Re-generate.
3113 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3114 (mi_tsv_deleted): Likewise.
3115 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3116 * remote.c (remote_download_trace_state_variable): Change
3117 pointer to reference and adjust.
3118 * make-target-delegates (parse_argtypes): Handle references.
3119 (write_function_header): Likewise.
3120 (munge_type): Likewise.
3122 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3124 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3125 string_view-selftests.c.
3126 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3128 * unittests/basic_string_view/cons/char/1.cc: Likewise.
3129 * unittests/basic_string_view/cons/char/2.cc: Likewise.
3130 * unittests/basic_string_view/cons/char/3.cc: Likewise.
3131 * unittests/basic_string_view/element_access/char/1.cc:
3133 * unittests/basic_string_view/element_access/char/empty.cc:
3135 * unittests/basic_string_view/element_access/char/front_back.cc:
3137 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3138 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3140 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3142 * unittests/basic_string_view/modifiers/swap/char/1.cc:
3144 * unittests/basic_string_view/operations/compare/char/1.cc:
3146 * unittests/basic_string_view/operations/compare/char/13650.cc:
3148 * unittests/basic_string_view/operations/copy/char/1.cc:
3150 * unittests/basic_string_view/operations/data/char/1.cc:
3152 * unittests/basic_string_view/operations/find/char/1.cc:
3154 * unittests/basic_string_view/operations/find/char/2.cc:
3156 * unittests/basic_string_view/operations/find/char/3.cc:
3158 * unittests/basic_string_view/operations/find/char/4.cc:
3160 * unittests/basic_string_view/operations/rfind/char/1.cc:
3162 * unittests/basic_string_view/operations/rfind/char/2.cc:
3164 * unittests/basic_string_view/operations/rfind/char/3.cc:
3166 * unittests/basic_string_view/operations/substr/char/1.cc:
3168 * unittests/basic_string_view/operators/char/2.cc: Likewise.
3169 * unittests/string_view-selftests.c: New file.
3171 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3173 * unittests/basic_string_view/capacity/1.cc: New file.
3174 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
3175 * unittests/basic_string_view/cons/char/1.cc: New file.
3176 * unittests/basic_string_view/cons/char/2.cc: New file.
3177 * unittests/basic_string_view/cons/char/3.cc: New file.
3178 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
3179 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
3180 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
3181 * unittests/basic_string_view/element_access/char/1.cc: New file.
3182 * unittests/basic_string_view/element_access/char/2.cc: New file.
3183 * unittests/basic_string_view/element_access/char/empty.cc: New file.
3184 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3185 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3186 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3187 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3188 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3189 * unittests/basic_string_view/include.cc: New file.
3190 * unittests/basic_string_view/inserters/char/1.cc: New file.
3191 * unittests/basic_string_view/inserters/char/2.cc: New file.
3192 * unittests/basic_string_view/inserters/char/3.cc: New file.
3193 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3194 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3195 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3196 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3197 * unittests/basic_string_view/literals/types.cc: New file.
3198 * unittests/basic_string_view/literals/values.cc: New file.
3199 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3200 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
3201 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
3202 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
3203 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
3204 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
3205 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
3206 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
3207 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
3208 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
3209 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
3210 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
3211 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
3212 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
3213 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
3214 * unittests/basic_string_view/operations/data/char/1.cc: New file.
3215 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
3216 * unittests/basic_string_view/operations/find/char/1.cc: New file.
3217 * unittests/basic_string_view/operations/find/char/2.cc: New file.
3218 * unittests/basic_string_view/operations/find/char/3.cc: New file.
3219 * unittests/basic_string_view/operations/find/char/4.cc: New file.
3220 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
3221 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
3222 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
3223 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
3224 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
3225 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
3226 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
3227 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
3228 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
3229 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
3230 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
3231 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
3232 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
3233 * unittests/basic_string_view/operators/char/2.cc: New file.
3234 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
3235 * unittests/basic_string_view/range_access/char/1.cc: New file.
3236 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
3237 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
3238 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
3239 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
3240 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
3241 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
3242 * unittests/basic_string_view/requirements/typedefs.cc: New file.
3243 * unittests/basic_string_view/typedefs.cc: New file.
3244 * unittests/basic_string_view/types/1.cc: New file.
3246 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3248 * common/gdb_string_view.h: Remove libstdc++ implementation
3249 details, adjust to gdb reality.
3250 * common/gdb_string_view.tcc: Likewise.
3251 * cli/cli-script.c (struct string_view): Remove.
3252 (user_args) <m_args>: Change element type to gdb::string_view.
3253 (user_args::insert_args): Adjust.
3255 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3257 * common/gdb_string_view.h: New file.
3258 * common/gdb_string_view.tcc: New file.
3260 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3262 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
3263 * configure: Re-generate.
3265 2018-04-09 Pedro Alves <palves@redhat.com>
3267 * gdbarch.sh: Include "observable.h" instead of "observer.h".
3268 (set_target_gdbarch): Call
3269 gdb::observers::architecture_changed.notify instead of
3270 observer_notify_architecture_changed.
3272 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3274 * tracepoint.c (struct current_traceframe_cleanup): Remove.
3275 (do_restore_current_traceframe_cleanup): Remove.
3276 (restore_current_traceframe_cleanup_dtor): Remove.
3277 (make_cleanup_restore_current_traceframe): Remove.
3278 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
3280 * tracepoint.h (struct scoped_restore_current_traceframe): New.
3281 * infrun.c (fetch_inferior_event): Use
3282 scoped_restore_current_traceframe.
3284 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3286 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
3288 <n_allocated_type_units>: Remove.
3289 <all_type_units>: Change to std::vector.
3290 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3291 to std::vector change.
3292 (dwarf2_per_objfile::get_cutu): Likewise.
3293 (dwarf2_per_objfile::get_tu): Likewise.
3294 (create_signatured_type_table_from_index): Likewise.
3295 (create_signatured_type_table_from_debug_names): Likewise.
3296 (dw2_symtab_iter_next): Likewise.
3297 (dw2_print_stats): Likewise.
3298 (dw2_expand_all_symtabs): Likewise.
3299 (dw2_expand_marked_cus): Likewise.
3300 (dw2_debug_names_iterator::next): Likewise.
3301 (dwarf2_initialize_objfile): Likewise.
3302 (add_signatured_type_cu_to_table): Likewise.
3303 (create_all_type_units): Likewise.
3304 (add_type_unit): Likewise.
3305 (struct tu_abbrev_offset): Add constructor.
3306 (build_type_psymtabs_1): Adjust to std::vector change.
3307 (print_tu_stats): Likewise.
3308 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3309 (write_debug_names): Likewise.
3311 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3313 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
3314 Make an std::vector.
3315 <n_comp_units>: Remove.
3316 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3317 to std::vector change.
3318 (dwarf2_per_objfile::get_cutu): Likewise.
3319 (dwarf2_per_objfile::get_cu): Likewise.
3320 (create_cus_from_index): Likewise.
3321 (create_addrmap_from_index): Likewise.
3322 (create_addrmap_from_aranges): Likewise.
3323 (dwarf2_read_index): Likewise.
3324 (dw2_find_last_source_symtab): Likewise.
3325 (dw2_map_symtabs_matching_filename): Likewise.
3326 (dw2_symtab_iter_next): Likewise.
3327 (dw2_print_stats): Likewise.
3328 (dw2_expand_all_symtabs): Likewise.
3329 (dw2_expand_symtabs_with_fullname): Likewise.
3330 (dw2_expand_marked_cus): Likewise.
3331 (dw2_map_symbol_filenames): Likewise.
3332 (create_cus_from_debug_names): Likewise.
3333 (dwarf2_read_debug_names): Likewise.
3334 (dw2_debug_names_iterator::next): Likewise.
3335 (dwarf2_initialize_objfile): Likewise.
3336 (set_partial_user): Likewise.
3337 (dwarf2_build_psymtabs_hard): Likewise.
3338 (read_comp_units_from_section): Remove arguments, adjust to
3340 (create_all_comp_units): Adjust to std::vector and
3341 read_comp_units_from_section changes.
3342 (dwarf2_find_containing_comp_unit): Adjust to std::vector
3344 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3345 (psyms_seen_size): Likewise.
3346 (write_gdbindex): Likewise.
3347 (write_debug_names): Likewise.
3349 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3351 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
3352 with dwarf2_per_objfile.
3353 (create_cus_from_index): Likewise.
3354 (create_signatured_type_table_from_index): Likewise.
3355 (dwarf2_read_index): Likewise.
3356 (dwarf2_initialize_objfile): Likewise.
3357 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
3358 per_cu rather than get_dwarf2_per_objfile.
3360 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3362 * dwarf2read.h (struct signatured_type): Forward declare.
3363 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
3365 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
3366 (dw2_get_cutu): ...this.
3367 (dwarf2_per_objfile::get_cu): Rename from...
3368 (dw2_get_cu): ...this.
3369 (dwarf2_per_objfile::get_tu): New.
3370 (create_addrmap_from_index): Adjust.
3371 (create_addrmap_from_aranges): Adjust.
3372 (dw2_find_last_source_symtab): Adjust.
3373 (dw2_map_symtabs_matching_filename): Adjust.
3374 (dw2_symtab_iter_next): Adjust.
3375 (dw2_print_stats): Adjust.
3376 (dw2_expand_all_symtabs): Adjust.
3377 (dw2_expand_symtabs_with_fullname): Adjust.
3378 (dw2_expand_marked_cus): Adjust.
3379 (dw_expand_symtabs_matching_file_matcher): Adjust.
3380 (dw2_map_symbol_filenames): Adjust.
3381 (dw2_debug_names_iterator::next): Adjust.
3382 (dwarf2_initialize_objfile): Adjust.
3383 (set_partial_user): Adjust.
3384 (dwarf2_build_psymtabs_hard): Adjust.
3386 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3388 * dwarf2read.c (create_signatured_type_table_from_debug_names):
3389 Remove unused variables.
3390 (dw2_map_symtabs_matching_filename): Likewise.
3391 (dwarf2_record_block_ranges): Likewise.
3392 (dwarf2_read_addr_index): Likewise.
3393 (follow_die_offset): Likewise.
3395 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3397 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
3398 to symbol_file_add_main.
3400 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3403 * mi/mi-console.c (do_fputc_async_safe): New.
3404 (mi_console_file::write_async_safe): New.
3405 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
3406 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
3408 * ui-file.c (ui_file::putstrn): Adjust call to
3409 fputstrn_unfiltered.
3410 * utils.c (printchar): Replace do_fputs and do_fprintf
3411 parameters by do_fputc.
3412 (fputstr_filtered): Adjust call to printchar.
3413 (fputstr_unfiltered): Likewise.
3414 (fputstrn_filtered): Likewise.
3415 (fputstrn_unfiltered): Add do_fputc parameter, pass to
3417 * utils.h (do_fputc_ftype): New typedef.
3418 (fputstrn_unfiltered): Add do_fputc parameter.
3420 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3422 * regformats/i386/i386-avx.dat: Remove.
3424 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3427 * amd64-tdep.c (amd64_none_init_abi): New function.
3428 (amd64_x32_none_init_abi): New function.
3429 (_initialize_amd64_tdep): Register handlers for x86-64 and
3430 x64_32 with GDB_OSABI_NONE.
3431 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
3432 GDB_OSABI_NONE osabi.
3434 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3437 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
3439 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
3440 * osabi.c (gdb_osabi_names): Add "unknown" entry.
3442 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3444 * common/byte-vector.h (char_vector): New type.
3445 * target.h (target_read_alloc): Return
3446 gdb::optional<byte_vector>.
3447 (target_read_stralloc): Return gdb::optional<char_vector>.
3448 (target_get_osdata): Return gdb::optional<char_vector>.
3449 * target.c (target_read_alloc_1): Templatize. Replacement
3450 manual memory management with vector.
3451 (target_read_alloc): Change return type, adjust.
3452 (target_read_stralloc): Change return type, adjust.
3453 (target_get_osdata): Change return type, adjust.
3454 * auxv.c (struct auxv_info) <length>: Remove.
3455 <data>: Change type to gdb::optional<byte_vector>.
3456 (auxv_inferior_data_cleanup): Free auxv_info with delete.
3457 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
3458 (target_auxv_search): Adjust.
3459 (fprint_target_auxv): Adjust.
3460 * avr-tdep.c (avr_io_reg_read_command): Adjust.
3461 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
3462 (linux_make_corefile_notes): Adjust.
3463 * osdata.c (get_osdata): Adjust.
3464 * remote.c (remote_get_threads_with_qxfer): Adjust.
3465 (remote_memory_map): Adjust.
3466 (remote_traceframe_info): Adjust.
3467 (btrace_read_config): Adjust.
3468 (remote_read_btrace): Adjust.
3469 (remote_pid_to_exec_file): Adjust.
3470 * solib-aix.c (solib_aix_get_library_list): Adjust.
3471 * solib-dsbt.c (decode_loadmap): Don't free buf.
3472 (dsbt_get_initial_loadmaps): Adjust.
3473 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
3474 * solib-target.c (solib_target_current_sos): Adjust.
3475 * tracepoint.c (sdata_make_value): Adjust.
3476 * xml-support.c (xinclude_start_include): Adjust.
3477 (xml_fetch_content_from_file): Adjust.
3478 * xml-support.h (xml_fetch_another): Change return type.
3479 (xml_fetch_content_from_file): Change return type.
3480 * xml-syscall.c (xml_init_syscalls_info): Adjust.
3481 * xml-tdesc.c (file_read_description_xml): Adjust.
3482 (fetch_available_features_from_target): Change return type.
3483 (target_fetch_description_xml): Adjust.
3484 (target_read_description_xml): Adjust.
3486 2018-04-06 Tom Tromey <tom@tromey.com>
3488 * value.c (~value): Update.
3489 (struct value) <contents>: Now unique_xmalloc_ptr.
3490 (value_contents_bits_eq, allocate_value_contents)
3491 (value_contents_raw, value_contents_all_raw)
3492 (value_contents_for_printing, value_contents_for_printing_const)
3493 (set_value_enclosing_type): Update.
3495 2018-04-06 Tom Tromey <tom@tromey.com>
3497 * value.c (range_s): Remove typedef, VEC.
3498 (struct range): Add operator<.
3499 (range_lessthan): Remove.
3500 (ranges_contain): Change type.
3502 (struct value) <unavailable, optimized_out>: Now std::vector.
3503 (value_entirely_available)
3504 (value_entirely_covered_by_range_vector)
3505 (value_entirely_unavailable, value_entirely_optimized_out):
3507 (insert_into_bit_range_vector): Change argument type.
3508 (find_first_range_overlap): Likewise.
3509 (struct ranges_and_idx, value_contents_bits_eq)
3510 (require_not_optimized_out, require_available): Update.
3511 (ranges_copy_adjusted): Change argument types.
3512 (value_optimized_out, value_copy, value_fetch_lazy): Update.
3514 2018-04-06 Tom Tromey <tom@tromey.com>
3516 * value.c (~value): Update.
3517 (struct value) <parent>: Now a value_ref_ptr.
3518 (value_parent, set_value_parent, value_address, value_copy):
3521 2018-04-06 Tom Tromey <tom@tromey.com>
3523 * value.c (struct value): Add constructor, destructor, and member
3525 (allocate_value_lazy, value_decref): Update.
3527 2018-04-06 Tom Tromey <tom@tromey.com>
3529 * value.c (struct value) <released, next>: Remove.
3530 (all_values): Now a std::vector.
3531 (allocate_value_lazy): Update.
3532 (value_next): Remove.
3533 (value_mark, value_free_to_mark, release_value)
3534 (value_release_to_mark): Update.
3536 2018-04-06 Tom Tromey <tom@tromey.com>
3538 * value.h (fetch_subexp_value, value_release_to_mark): Update.
3539 (free_value_chain): Remove.
3540 * value.c (free_value_chain): Remove.
3541 (value_release_to_mark): Return a std::vector.
3542 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
3544 (check_condition): Update.
3545 * eval.c (fetch_subexp_value): Change "val_chain" to a
3547 * breakpoint.c (update_watchpoint): Update.
3548 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3550 2018-04-06 Tom Tromey <tom@tromey.com>
3552 * value.h (free_all_values): Remove.
3553 * value.c (free_all_values): Remove.
3555 2018-04-06 Tom Tromey <tom@tromey.com>
3557 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3558 (value_history_chain, value_history_count): Remove.
3559 (value_history): New global.
3560 (record_latest_value, access_value_history, show_values)
3561 (preserve_values): Update.
3563 2018-04-06 Tom Tromey <tom@tromey.com>
3565 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3566 * varobj.c (varobj_set_display_format, varobj_set_value)
3567 (install_default_visualizer, construct_visualizer)
3568 (install_new_value, ~varobj, varobj_get_value_type)
3569 (my_value_of_variable, varobj_editable_p): Update.
3570 * c-varobj.c (c_describe_child, c_value_of_variable)
3571 (cplus_number_of_children, cplus_describe_child): Update.
3572 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3573 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3574 (ada_value_of_variable, ada_value_is_changeable_p): Update.
3576 2018-04-06 Tom Tromey <tom@tromey.com>
3578 * printcmd.c (last_examine_address): Change type to
3580 (do_examine, x_command): Update.
3582 2018-04-06 Tom Tromey <tom@tromey.com>
3584 * value.c (release_value): Update.
3585 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3586 (struct bpstats) <val>: Now a value_ref_ptr.
3587 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3588 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3589 (~watchpoint, print_it_watchpoint, watch_command_1)
3590 (invalidate_bp_value_on_memory_change): Update.
3592 2018-04-06 Tom Tromey <tom@tromey.com>
3594 * varobj.c (varobj_clear_saved_item)
3595 (update_dynamic_varobj_children, install_new_value, ~varobj):
3597 * value.h (value_incref): Move declaration earlier.
3598 (value_decref): Rename from value_free.
3599 (struct value_ref_policy): New.
3600 (value_ref_ptr): New typedef.
3601 (struct value_deleter): Remove.
3602 (gdb_value_up): Remove typedef.
3603 (release_value): Change return type.
3604 (release_value_or_incref): Remove.
3605 * value.c (set_value_parent): Update.
3606 (value_incref): Change return type.
3607 (value_decref): Rename from value_free.
3608 (value_free_to_mark, free_all_values, free_value_chain): Update.
3609 (release_value): Return value_ref_ptr.
3610 (release_value_or_incref): Remove.
3611 (record_latest_value, set_internalvar, clear_internalvar):
3613 * stack.c (info_frame_command): Don't call value_free.
3614 * python/py-value.c (valpy_dealloc, valpy_new)
3615 (value_to_value_object): Update.
3616 * printcmd.c (do_examine): Update.
3617 * opencl-lang.c (lval_func_free_closure): Update.
3618 * mi/mi-main.c (register_changed_p): Don't call value_free.
3619 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3620 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3621 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3623 * guile/scm-value.c (vlscm_free_value_smob)
3624 (vlscm_scm_from_value): Update.
3625 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3626 (frame_unwind_register_unsigned, get_frame_register_bytes)
3627 (put_frame_register_bytes): Don't call value_free.
3628 * findvar.c (address_from_register): Don't call value_free.
3629 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3630 * dwarf2loc.c (entry_data_value_free_closure)
3631 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3632 (dwarf2_evaluate_loc_desc_full): Update.
3633 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3634 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3635 (~watchpoint, watch_command_1)
3636 (invalidate_bp_value_on_memory_change): Update.
3637 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3639 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3642 * warning.m4: Add -Wno-error=deprecated-register.
3643 * configure: Re-generate.
3645 2018-04-05 Tom Tromey <tom@tromey.com>
3647 * linespec.h: Remove include of "vec.h".
3649 2018-04-05 Tom Tromey <tom@tromey.com>
3651 * linespec.c (typep): Remove typedef.
3652 (find_methods, find_superclass_methods): Take a std::vector.
3653 (find_method): Use std::vector.
3655 2018-04-05 Tom Tromey <tom@tromey.com>
3657 * utils.c (compare_strings): Remove.
3658 * utils.h (compare_strings): Remove.
3659 * objc-lang.h (find_imps): Update.
3660 * objc-lang.c (find_methods): Take a std::vector.
3661 (uniquify_strings, find_imps): Likewise.
3662 * linespec.c (find_methods): Take a std::vector.
3663 (decode_objc): Use std::vector.
3664 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3666 (find_method, find_function_symbols): Use std::vector.
3668 2018-04-05 Tom Tromey <tom@tromey.com>
3670 * completer.c (completion_tracker::completion_tracker): Remove
3672 (completion_tracker::discard_completions): Likewise.
3673 * breakpoint.c (ambiguous_names_p): Remove cast.
3674 * ada-lang.c (_initialize_ada_language): Remove cast.
3675 * utils.h (streq): Update.
3676 (streq_hash): Add new declaration.
3677 * utils.c (streq): Return bool.
3678 (streq_hash): New function.
3680 2018-04-05 Tom Tromey <tom@tromey.com>
3682 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3683 Remove a string copy.
3685 2018-04-05 Tom Tromey <tom@tromey.com>
3687 * linespec.c (filter_results): Use std::vector.
3688 (decode_line_2, decode_line_full): Update.
3690 2018-04-05 Tom Tromey <tom@tromey.com>
3692 * linespec.c (canonical_to_fullform): Return std::string.
3693 (filter_results): Update.
3694 (struct decode_line_2_item): Add constructor.
3695 <fullform, displayform>: Now std::string.
3696 (decode_line_2_compare_items): Now a std::sort comparator.
3697 (decode_line_2): Update.
3699 2018-04-05 Tom Tromey <tom@tromey.com>
3701 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3702 (unexpected_linespec_error): Update.
3703 (linespec_parse_basic, parse_linespec): Update.
3705 2018-04-05 Tom Tromey <tom@tromey.com>
3707 * linespec.c (linespec_parse_basic): Reindent.
3709 2018-04-05 Tom Tromey <tom@tromey.com>
3711 * minsyms.h (iterate_over_minimal_symbols): Update.
3712 * minsyms.c (iterate_over_minimal_symbols): Take a
3714 * linespec.c (struct collect_minsyms): Remove.
3715 (compare_msyms): Now a std::sort comparator.
3716 (add_minsym): Add parameters.
3717 (search_minsyms_for_name): Update. Use std::vector.
3719 2018-04-03 Tom Tromey <tom@tromey.com>
3721 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3724 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3726 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3728 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
3731 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3732 printing static type.
3734 2018-04-01 Tom Tromey <tom@tromey.com>
3736 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3737 (rs6000_xfer_shared_libraries): Update.
3739 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3741 * common/gdb_vecs.h (char_ptr): Remove.
3742 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3744 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3746 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3748 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3750 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3752 * tracepoint.h (struct uploaded_tp): Initialize fields.
3753 <actions, step_actions, cmd_strings>: Change type to
3754 std::vector<char *>.
3755 * tracepoint.c (get_uploaded_tp): Allocate with new.
3756 (free_uploaded_tps): Free with delete.
3757 (parse_tracepoint_definition): Adjust to std::vector change.
3758 * breakpoint.c (read_uploaded_action): Likewise.
3759 (create_tracepoint_from_upload): Likewise.
3760 * ctf.c (ctf_write_uploaded_tp): Likewise.
3761 (SET_ARRAY_FIELD): Likewise.
3762 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3764 2018-03-30 Tom Tromey <tom@tromey.com>
3766 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3768 (svr4_keep_data_in_core): Update.
3769 (svr4_read_so_list): Update.
3771 2018-03-30 Tom Tromey <tom@tromey.com>
3773 * windows-nat.c (handle_output_debug_string, handle_exception):
3775 * target.h (target_read_string): Update.
3776 * target.c (target_read_string): Change "string" to
3778 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3780 * solib-frv.c (frv_current_sos): Update.
3781 * solib-dsbt.c (dsbt_current_sos): Update.
3782 * solib-darwin.c (darwin_current_sos): Update.
3783 * linux-thread-db.c (inferior_has_bug): Update.
3784 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3785 Update. Remove alloca.
3786 * ada-lang.c (ada_main_name): Update.
3788 2018-03-30 Tom Tromey <tom@tromey.com>
3790 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3791 (struct dwo_file_deleter): New.
3792 (dwo_file_up): New typedef.
3793 (open_and_init_dwo_file): Use dwo_file_up.
3794 (free_dwo_file_cleanup): Remove.
3796 2018-03-30 Tom Tromey <tom@tromey.com>
3798 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3799 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3801 2018-03-30 Tom Tromey <tom@tromey.com>
3803 * dwarf2read.c (class free_cached_comp_units): New class.
3804 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3805 (free_cached_comp_units): Remove function.
3807 2018-03-30 Tom Tromey <tom@tromey.com>
3809 * utils.h (make_cleanup_unpush_target): Remove.
3810 * inf-ptrace.c (struct target_unpusher): New.
3811 (target_unpush_up) New typedef.
3812 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3814 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3816 2018-03-27 Tom Tromey <tom@tromey.com>
3818 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3820 2018-03-27 Pedro Alves <palves@redhat.com>
3821 Tom Tromey <tom@tromey.com>
3823 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3824 destructor. Now a class.
3825 (gdb_readline_wrapper_cleanup): Remove function.
3826 (gdb_readline_wrapper): Remove cleanups.
3828 2018-03-27 Tom Tromey <tom@tromey.com>
3830 * typeprint.h (struct type_print_options) <local_typedefs,
3831 global_typedefs>: Remove "struct" keyword.
3832 (class typedef_hash_table): New class.
3833 (recursively_update_typedef_hash, add_template_parameters)
3834 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3835 (find_typedef_in_hash): Don't declare.
3836 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3837 (typedef_hash_table::recursively_update): Rename from
3838 recursively_update_typedef_hash. Now a member.
3839 (typedef_hash_table::add_template_parameters): Rename from
3840 add_template_parameters. Now a member.
3841 (typedef_hash_table::typedef_hash_table): Now a constructor;
3842 rename from create_typedef_hash.
3843 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3844 rename from free_typedef_hash.
3845 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3846 (do_free_global_table): Remove.
3847 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3848 from copy_type_recursive.
3849 (create_global_typedef_table): Remove.
3850 (typedef_hash_table::find_global_typedef): Now a member of
3852 (typedef_hash_table::find_typedef): Rename from
3853 find_typedef_in_hash; now a member.
3854 (whatis_exp): Update.
3855 * extension.h (struct ext_lang_type_printers): Add constructor and
3857 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3859 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3860 Now a constructor; rename from start_ext_lang_type_printers.
3861 (ext_lang_type_printers): Now a destructor; rename from
3862 free_ext_lang_type_printers.
3863 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3865 (c_type_print_base_struct_union): Update. Remove cleanups.
3867 2018-03-27 Tom Tromey <tom@tromey.com>
3869 * dwarf-index-write.c: Include <cmath>.
3871 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3873 * NEWS: Add entry describing new "set|show varsize-limit" command.
3874 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3876 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3879 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3881 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3883 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3884 * dwarf-index-common.c: New file.
3885 * dwarf-index-common.h: New file.
3886 * dwarf-index-write.c: New file.
3887 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3888 (struct dwarf2_section_info): Move from here.
3889 (dwarf2_section_info_def): Likewise.
3890 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3891 (offset_type): Likewise.
3892 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3893 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3894 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3895 (byte_swap): Likewise.
3896 (MAYBE_SWAP): Likewise.
3897 (dwarf2_per_cu_ptr): Likewise.
3898 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3899 (struct tu_stats): Likewise.
3900 (struct dwarf2_per_objfile): Likewise.
3901 (struct dwarf2_per_cu_data): Likewise.
3902 (struct signatured_type): Likewise.
3903 (sig_type_ptr): Likewise.
3904 (DEF_VEC_P (sig_type_ptr)): Likewise.
3905 (INDEX4_SUFFIX): Likewise.
3906 (INDEX5_SUFFIX): Likewise.
3907 (DEBUG_STR_SUFFIX): Likewise.
3908 (dwarf2_read_section): Make non-static.
3909 (mapped_index_string_hash): Move from here.
3910 (dwarf5_djb_hash): Likewise.
3911 (file_write): Likewise.
3912 (class data_buf): Likewise.
3913 (struct symtab_index_entry): Likewise.
3914 (struct mapped_symtab): Likewise.
3915 (find_slot): Likewise.
3916 (hash_expand): Likewise.
3917 (add_index_entry): Likewise.
3918 (uniquify_cu_indices): Likewise.
3919 (class c_str_view): Likewise.
3920 (class c_str_view_hasher): Likewise.
3921 (class vector_hasher): Likewise.
3922 (write_hash_table): Likewise.
3923 (psym_index_map): Likewise.
3924 (struct addrmap_index_data): Likewise.
3925 (add_address_entry): Likewise.
3926 (add_address_entry_worker): Likewise.
3927 (write_address_map): Likewise.
3928 (symbol_kind): Likewise.
3929 (write_psymbols): Likewise.
3930 (struct signatured_type_index_data): Likewise.
3931 (write_one_signatured_type): Likewise.
3932 (recursively_count_psymbols): Likewise.
3933 (recursively_write_psymbols): Likewise.
3934 (class debug_names): Likewise.
3935 (check_dwarf64_offsets): Likewise.
3936 (psyms_seen_size): Likewise.
3937 (write_gdbindex): Likewise.
3938 (write_debug_names): Likewise.
3939 (assert_file_size): Likewise.
3940 (write_psymtabs_to_index): Likewise.
3941 (save_gdb_index_command): Likewise.
3942 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3944 * dwarf2read.h: New file.
3946 2018-03-27 Joel Brobecker <brobecker@adacore.com>
3949 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3950 symbol name if the CU's language stores symbol names in linkage
3952 * language.h (struct language_defn)
3953 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3954 all instances of this struct.
3956 2018-03-26 Tom Tromey <tom@tromey.com>
3958 * stack.c (backtrace_command_1): Remove verbose code.
3960 2018-03-26 Tom Tromey <tom@tromey.com>
3962 * python/py-framefilter.c (py_print_type): Don't catch
3963 exceptions. Return void.
3964 (py_print_value): Likewise.
3965 (py_print_single_arg): Likewise.
3966 (enumerate_args): Don't catch exceptions.
3967 (py_print_args): Likewise.
3968 (py_print_frame): Likewise.
3969 (gdbpy_apply_frame_filter): Catch exceptions here.
3971 2018-03-26 Tom Tromey <tom@tromey.com>
3973 * stack.c (_initialize_stack): Remove trailing newlines from help
3974 text. Add "Usage" line to "backtrace" help.
3976 2018-03-26 Tom Tromey <tom@tromey.com>
3979 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3981 2018-03-26 Tom Tromey <tom@tromey.com>
3983 * python/py-framefilter.c (py_print_single_arg): Return
3984 EXT_LANG_BT_ERROR from catch.
3986 2018-03-26 Tom Tromey <tom@tromey.com>
3989 * stack.c (backtrace_command_1): Move some code into no-filters
3992 2018-03-26 Tom Tromey <tom@tromey.com>
3994 * python/py-framefilter.c (throw_quit_or_print_exception): New
3996 (gdbpy_apply_frame_filter): Use it.
3998 2018-03-26 Tom Tromey <tom@tromey.com>
4001 * python/py-framefilter.c (py_print_type, py_print_value)
4002 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4005 2018-03-26 Tom Tromey <tom@tromey.com>
4007 * python/py-framefilter.c (enumerate_args): Use
4008 gdb::unique_xmalloc_ptr.
4010 2018-03-26 Tom Tromey <tom@tromey.com>
4012 * python/py-framefilter.c (py_print_frame): Return
4014 (gdbpy_apply_frame_filter): Update comment.
4015 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
4017 <EXT_LANG_BT_NO_FILTERS>: Change value.
4019 2018-03-26 Tom Tromey <tom@tromey.com>
4022 * stack.c (backtrace_command): Parse "hide" argument.
4023 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
4024 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
4027 2018-03-26 Tom Tromey <tom@tromey.com>
4029 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
4031 (backtrace_command): Remove "fulltrace", add "flags".
4033 2018-03-26 Tom Tromey <tom@tromey.com>
4035 * stack.c (backtrace_command): Rewrite command line parsing.
4037 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4039 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
4041 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4043 * filename-seen-cache.h: Add include guard.
4045 2018-03-26 Keith Seitz <keiths@redhat.com>
4047 * symfile.c (place_section): Remove "struct" from section_addr_info
4049 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
4050 "struct" keyword from section_addr_info.
4052 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4054 * regformats/regdef.h (reg): Add constructors.
4056 2018-03-25 Pedro Alves <palves@redhat.com>
4058 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
4059 if then/else bodies in var_func_name extraction.
4061 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
4063 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4064 lookup_minimal_symbol() to find symbol entry.
4065 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4067 2018-03-23 Keith Seitz <keiths@redhat.com>
4070 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4071 nested type definitions for C++, too.
4073 2018-03-23 Tom Tromey <tom@tromey.com>
4075 * machoread.c (struct oso_el): Add a constructor. Don't define as
4077 (macho_register_oso): Remove.
4078 (macho_symtab_read): Take a std::vector.
4079 (oso_el_compare_name): Now a std::sort comparator.
4080 (macho_symfile_read_all_oso): Take a std::vector.
4081 (macho_symfile_read): Use std::vector. Remove cleanups.
4083 2018-03-22 Tom Tromey <tom@tromey.com>
4085 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4086 (record_full_goto_bookmark): Use std::string.
4088 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4091 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4094 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4096 * rs6000-tdep.c (store_insn_p): New function.
4097 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4098 and cr_reg to their unshifted values. Use store_insn_p to
4099 match LR saves using either R1 or fdata->alloca_reg. Use
4100 store_insn_p to match CR saves. Set alloca_reg_offset
4101 when alloca_reg and framep are set. Remove lr_reg shift
4102 when assigning to fdata->lr_register.
4104 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4106 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4107 command line args instead of emitting a warning.
4109 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4111 * tracepoint.h (struct static_tracepoint_marker): Initialize
4112 fields, define default constructor, move constructor and move
4113 assignment, disable the rest.
4114 <str_id, extra>: Make std::string.
4115 (release_static_tracepoint_marker): Remove.
4116 (free_current_marker): Remove.
4117 * tracepoint.c (free_current_marker): Remove.
4118 (parse_static_tracepoint_marker_definition): Adjust to
4119 std::string, use new hex2str overload.
4120 (release_static_tracepoint_marker): Remove.
4121 (print_one_static_tracepoint_marker): Get marker by reference
4122 and adjust to std::string.
4123 (info_static_tracepoint_markers_command): Adjust to std::vector
4125 * target.h (static_tracepoint_marker_p): Remove typedef.
4126 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4127 (struct target_ops) <to_static_tracepoint_marker_at>: Return
4129 <to_static_tracepoint_markers_by_strid>: Return std::vector.
4131 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4132 (target_debug_print_std_vector_static_tracepoint_marker): New.
4133 (target_debug_print_struct_static_tracepoint_marker_p): Rename
4135 (target_debug_print_static_tracepoint_marker_p): ... this.
4136 * target-delegates.c: Re-generate.
4137 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4139 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4140 (decode_static_tracepoint_spec): Adjust to std::vector.
4141 (tracepoint_print_one_detail): Adjust to std::string.
4142 (strace_marker_decode_location): Adjust to std::string.
4143 (update_static_tracepoint): Adjust to std::string, remove call
4144 to release_static_tracepoint_marker.
4145 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4146 Adjust to std::vector.
4147 * remote.c (remote_static_tracepoint_marker_at): Return bool.
4148 (remote_static_tracepoint_markers_by_strid): Adjust to
4150 * common/rsp-low.h (hex2str): New overload with explicit count
4152 * common/rsp-low.c (hex2str): New overload with explicit count
4154 * unittests/rsp-low-selftests.c (test_hex2str): New function.
4155 (_initialize_rsp_low_selftests): Add test_hex2str test.
4156 * unittests/tracepoint-selftests.c
4157 (test_parse_static_tracepoint_marker_definition): Adjust to
4160 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4162 * tracepoint.c (parse_static_tracepoint_marker_definition):
4163 Consider case where the definition is followed by more
4165 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4166 tracepoint-selftests.c.
4167 * unittests/tracepoint-selftests.c: New.
4169 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4171 * MAINTAINERS (Write After Approval): Add Pedro Franco de
4174 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4176 * symtab.c (find_pc_sect_line): fixed indentation.
4178 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4180 * symtab.c (find_pc_sect_line): now uses binary search.
4182 2018-03-19 Tom Tromey <tom@tromey.com>
4184 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4187 2018-03-19 Pedro Alves <palves@redhat.com>
4188 Tom Tromey <tom@tromey.com>
4190 * unittests/observable-selftests.c: New file.
4191 * common/observable.h: New file.
4192 * observable.h: New file.
4193 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4194 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4195 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4196 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4197 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4198 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4199 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4200 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
4201 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
4202 python/py-breakpoint.c, python/py-finishbreakpoint.c,
4203 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
4204 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
4205 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
4206 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
4207 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
4208 tui/tui-interp.c, valops.c: Update all users.
4209 * tui/tui-hooks.c (tui_bp_created_observer)
4210 (tui_bp_deleted_observer, tui_bp_modified_observer)
4211 (tui_inferior_exit_observer, tui_before_prompt_observer)
4212 (tui_normal_stop_observer, tui_register_changed_observer):
4214 (tui_observers_token): New global.
4215 (attach_or_detach, tui_attach_detach_observers): New functions.
4216 (tui_install_hooks, tui_remove_hooks): Use
4217 tui_attach_detach_observers.
4218 * record-btrace.c (record_btrace_thread_observer): Remove.
4219 (record_btrace_thread_observer_token): New global.
4220 * observer.sh: Remove.
4221 * observer.c: Rename to observable.c.
4222 * observable.c (namespace gdb_observers): Define new objects.
4223 (observer_debug): Move into gdb_observers namespace.
4224 (struct observer, struct observer_list, xalloc_observer_list_node)
4225 (xfree_observer_list_node, generic_observer_attach)
4226 (generic_observer_detach, generic_observer_notify): Remove.
4227 (_initialize_observer): Update.
4228 Don't include observer.inc.
4229 * Makefile.in (generated_files): Remove observer.h, observer.inc.
4230 (clean mostlyclean): Likewise.
4231 (observer.h, observer.inc): Remove targets.
4232 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
4233 (COMMON_SFILES): Use observable.c, not observer.c.
4234 * .gitignore: Remove observer.h.
4236 2018-03-18 Tom Tromey <tom@tromey.com>
4238 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
4240 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
4242 2018-03-17 Tom Tromey <tom@tromey.com>
4244 * auto-load.c (auto_load_objfile_script_1): Use std::string.
4246 2018-03-17 Tom Tromey <tom@tromey.com>
4248 * target.c (class scoped_target_fd): New.
4249 (target_fileio_close_cleanup): Remove.
4250 (target_fileio_read_alloc_1): Use scoped_target_fd.
4252 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4254 * silent-rules.mk: New.
4255 * Makefile.in: Include silent-rules.mk
4256 (srcdir, VPATH, top_srcdir): Move up.
4257 (COMPILE): Add ECHO_CXX.
4258 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
4259 (init.c): Add ECHO_INIT_C.
4260 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4261 (version.c): Add ECHO_GEN.
4262 (printcmd.o): Add ECHO_CXX.
4263 (target-float.o): Add ECHO_CXX.
4264 (ada-exp.o): Add ECHO_CXX.
4265 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
4266 (insight$(EXEEXT)): Add ECHO_CXXLD.
4267 * gnulib/configure.ac: Add AM_SILENT_RULES.
4268 * gnulib/aclocal.m4: Re-generate.
4269 * gnulib/configure: Re-generate.
4270 * gnulib/import/Makefile.in: Re-generate.
4272 2018-03-16 Tom Tromey <tom@tromey.com>
4274 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
4275 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
4276 * utils.c (do_free_section_addr_info)
4277 (make_cleanup_free_section_addr_info): Remove.
4278 * symfile.h (struct other_sections): Add constructor.
4279 (struct section_addr_info): Remove.
4280 (section_addr_info): New typedef.
4281 (struct sym_fns) <sym_offsets>: Change type of parameter.
4282 (build_section_addr_info_from_objfile)
4283 (relative_addr_info_to_section_offsets, addr_info_make_relative)
4284 (default_symfile_offsets, symbol_file_add)
4285 (symbol_file_add_from_bfd)
4286 (build_section_addr_info_from_section_table): Update.
4287 (alloc_section_addr_info, free_section_addr_info): Don't declare.
4288 * symfile.c (alloc_section_addr_info): Remove.
4289 (build_section_addr_info_from_section_table): Change return type.
4291 (build_section_addr_info_from_bfd)
4292 (build_section_addr_info_from_objfile): Likewise.
4293 (free_section_addr_info): Remove.
4294 (relative_addr_info_to_section_offsets): Change type of "addrs".
4295 (addrs_section_compar): Now a std::sort comparator.
4296 (addrs_section_sort): Change return type.
4297 (addr_info_make_relative): Change type of "addrs". Update.
4298 (default_symfile_offsets, syms_from_objfile_1)
4299 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
4300 (symbol_file_add_separate): Update.
4301 (symbol_file_add): Change type of "addrs". Update.
4302 (add_symbol_file_command): Update. Remove cleanups.
4303 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
4305 * symfile-debug.c (debug_sym_offsets): Change type of "info".
4306 * solib.c (solib_read_symbols): Update.
4307 * objfiles.c (objfile_relocate): Update. Remove cleanups.
4308 * machoread.c (macho_symfile_offsets): Update.
4309 * jit.c (jit_bfd_try_read_symtab): Update.
4311 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
4313 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4314 unittests/utils-selftests.c.
4315 * unittests/utils-selftests.c: New file.
4317 2018-03-14 Tom Tromey <tom@tromey.com>
4320 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
4323 2018-03-14 Tom Tromey <tom@tromey.com>
4326 * printcmd.c (printf_pointer): Allow "-" in format.
4328 2018-03-14 Tom Tromey <tom@tromey.com>
4330 * printcmd.c (_initialize_printcmd): Add usage to printf.
4332 2018-03-14 Yao Qi <qiyao@sourceware.org>
4334 * MAINTAINERS: Update my email address.
4336 2018-03-13 Tom Tromey <tom@tromey.com>
4338 * machoread.c (macho_check_dsym): Change filenamep to a
4340 (macho_symfile_read): Update.
4341 * symfile.c (load_command): Use std::string.
4343 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
4345 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
4346 to error message string.
4347 (riscv_register_name): Use xsnprintf instead of sprintf.
4348 (riscv_insn::fetch_instruction): Use gdb_assert instead of
4350 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
4352 (riscv_push_dummy_call): Likewise.
4354 2018-03-12 Tom Tromey <tom@tromey.com>
4356 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
4357 Use gdb::byte_vector.
4358 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
4360 2018-03-12 Yao Qi <yao.qi@linaro.org>
4362 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
4363 parameter type to readable_regcache.
4364 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
4367 2018-03-11 Tom Tromey <tom@tromey.com>
4369 * dwarf2read.c (struct nextfield): Add initializers.
4370 (struct nextfnfield): Remove.
4371 (struct fnfieldlist): Add initializers. Remove "length" and
4372 "head", use std::vector.
4373 (struct decl_field_list): Remove.
4374 (struct field_info): Add initializers.
4375 <fields, baseclasses>: Now std::vector.
4376 <nbaseclasses, nfnfields, typedef_field_list_count,
4377 nested_types_list_count>: Remove.
4378 (dwarf2_add_field, dwarf2_add_type_defn)
4379 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
4380 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
4381 (process_structure_scope): Update.
4383 2018-03-11 Tom Tromey <tom@tromey.com>
4385 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
4386 for use by std::sort.
4387 (build_type_psymtabs_1): Use std::vector.
4389 2018-03-09 Eli Zaretskii <eliz@gnu.org>
4391 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
4392 and LIBMPFR in the printed configuration.
4394 2018-03-08 Tom Tromey <tom@tromey.com>
4396 * source.c (get_filename_and_charpos): Use scoped_fd.
4397 * nto-procfs.c (procfs_open_1): Use scoped_fd.
4398 (procfs_pidlist): Likewise.
4399 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
4400 (iterate_over_mappings): Likewise.
4402 2018-03-08 Tom Tromey <tom@tromey.com>
4404 * infcall.c (struct call_return_meta_info)
4405 <stack_temporaries_enabled>: Remove.
4406 (get_call_return_value, call_function_by_hand_dummy): Update.
4407 * thread.c (disable_thread_stack_temporaries): Remove.
4408 (enable_thread_stack_temporaries): Remove.
4409 (thread_stack_temporaries_enabled_p): Return bool.
4410 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
4411 (get_last_thread_stack_temporary): Update.
4412 * eval.c (evaluate_subexp): Update.
4413 * gdbthread.h (class enable_thread_stack_temporaries): Now a
4414 class, not a function.
4415 (value_ptr, value_vec): Remove typedefs.
4416 (class thread_info) <stack_temporaries_enabled>: Now bool.
4417 <stack_temporaries>: Now a std::vector.
4418 (thread_stack_temporaries_enabled_p)
4419 (value_in_thread_stack_temporaries): Return bool.
4421 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
4423 * remote.c (putpkt_binary): Fix omitted bytes reporting.
4424 (getpkt_or_notif_sane_1): Likewise.
4426 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4428 * build-id.c (build_id_to_debug_bfd): Use std::string.
4430 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4432 * build-id.c (find_separate_debug_file_by_buildid): Return
4434 * build-id.h (find_separate_debug_file_by_buildid): Return
4436 * coffread.c (coff_symfile_read): Adjust to std::string.
4437 * elfread.c (elf_symfile_read): Adjust to std::string.
4438 * symfile.c (separate_debug_file_exists): Change parameter to
4440 (find_separate_debug_file): Return std::string.
4441 (find_separate_debug_file_by_debuglink): Return std::string.
4442 * symfile.h (find_separate_debug_file_by_debuglink): Return
4445 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4447 * common/xml-utils.c (xml_escape_text): Move code to...
4448 (xml_escape_text_append): ... this new function.
4449 * common/xml-utils.h (xml_escape_text_append): New declaration.
4450 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
4452 (_initialize_xml_utils): register test_xml_escape_text_append as
4455 2018-03-07 Alan Hayward <alan.hayward@arm.com>
4457 * defs.h: Remove MAX_REGISTER_SIZE.
4458 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
4460 * python/py-unwind.c (pyuw_sniffer): Likewise.
4462 2018-03-07 Tom Tromey <tom@tromey.com>
4464 * linux-tdep.c (linux_info_proc): Update.
4465 * target.h (struct target_ops) <to_fileio_readlink>: Return
4467 (target_fileio_readlink): Return optional<string>.
4468 * remote.c (remote_hostio_readlink): Return optional<string>.
4469 * inf-child.c (inf_child_fileio_readlink): Return
4471 * target.c (target_fileio_readlink): Return optional<string>.
4473 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
4475 * regcache.c (cooked_read_test): Add riscv to the list of
4476 architectures that have a save_reggroup.
4478 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
4480 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
4481 value is not a dynamic class object.
4483 2018-03-06 Tom Tromey <tom@tromey.com>
4485 * rust-exp.y: Formatting fixes.
4487 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4489 * riscv-tdep.c (riscv_register_name): Remove target description
4491 (riscv_gdbarch_init): Remove target description check.
4493 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4495 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
4497 * riscv-tdep.h: Likewise.
4499 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4501 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
4502 (riscv_pseudo_register_write): Delete.
4503 (riscv_gdbarch_init): Remove all use of pseudo registers.
4505 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4507 * record-btrace.c (btrace_print_lines): Replace cleanup
4508 parameter with RAII equivalents.
4509 (btrace_insn_history): Replace cleanup with RAII equivalents.
4510 * ui-out.h (make_cleanup_ui_out_list_begin_end,
4511 make_cleanup_ui_out_tuple_begin_end): Remove.
4512 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
4513 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
4514 make_cleanup_ui_out_list_begin_end): Remove.
4516 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4518 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
4519 parameter types to std::vector. Use bool.
4520 (record_btrace_wait): Replace VEC(tp_t) with
4521 std::vector<thread_info *>.
4522 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
4524 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4526 * record-btrace.c (record_btrace_disable_callback): Remove.
4527 (struct scoped_btrace_disable): New.
4528 (record_btrace_open): Use scoped_btrace_disable.
4530 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4532 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
4533 reading values from registers.
4535 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4537 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
4540 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4542 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
4543 change parameter type. Use GDB's print functions, and use
4544 core_addr_to_string where appropriate.
4545 (riscv_push_dummy_call): Use core_addr_to_string where
4546 appropriate, update call to riscv_print_arg_location, and reindent
4548 (riscv_return_value): Update call to riscv_print_arg_location.
4550 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4551 Tim Newsome <tim@sifive.com>
4552 Albert Ou <a0u@eecs.berkeley.edu>
4553 Darius Rad <darius@bluespec.com>
4555 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4556 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4557 (ALLDEPFILES): Add riscv-tdep.c
4558 * configure.tgt: Add riscv support.
4559 * riscv-tdep.c: New file.
4560 * riscv-tdep.h: New file.
4561 * NEWS: Mention new target.
4562 * MAINTAINERS: Add entry for riscv.
4564 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4566 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4567 fields within aggregates.
4569 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
4571 * record-btrace.c (btrace_print_lines): Change type of flags to
4572 gdb_disassembly_flags.
4574 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4576 * fbsd-nat.c: Include "inf-ptrace.h".
4577 (USE_SIGTRAP_SIGINFO): Conditionally define.
4578 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4579 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4580 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4582 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4584 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4586 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4587 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4588 "supports_stopped_by_hw_breakpoint" target methods.
4590 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4592 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4593 * fbsd-nat.c (debug_fbsd_nat): New variable.
4594 (show_fbsd_nat_debug): New function.
4595 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4596 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4598 2018-03-04 John Baldwin <jhb@FreeBSD.org>
4600 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4601 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4603 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4604 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4607 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4609 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4610 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4612 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4614 * charset.c (struct charset_vector): New.
4615 (charsets): Change type to charset_vector.
4616 (find_charset_names): Adjust.
4618 (_initialize_charset): Adjust.
4620 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4622 * progspace.h (struct program_space) <deleted_solibs>: Change
4623 type to std::vector<std::string>.
4624 * progspace.c (clear_program_space_solib_cache): Adjust.
4625 * breakpoint.c (print_solib_event): Adjust.
4626 (check_status_catch_solib): Adjust.
4627 * solib.c (update_solib_list): Adjust.
4628 * ui-out.h (class ui_out) <field_string>: New overload.
4629 * ui-out.c (ui_out::field_string): New overload.
4631 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4633 * progspace.h (struct program_space): Add constructor and
4634 destructor, initialize fields.
4635 (add_program_space): Remove.
4636 * progspace.c (add_program_space): Rename to...
4637 (program_space::program_space): ... this.
4638 (release_program_space): Rename to...
4639 (program_space::~program_space): ... this.
4640 (delete_program_space): Use delete to delete program_space.
4641 (initialize_progspace): Use new to allocate program_space.
4642 * inferior.c (add_inferior_with_spaces): Likewise.
4643 (clone_inferior_command): Likewise.
4644 * infrun.c (follow_fork_inferior): Likewise.
4645 (handle_vfork_child_exec_or_exit): Likewise.
4647 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4649 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4650 (delim_string_to_char_ptr_vec): Return std::vector of
4651 gdb::unique_xmalloc_ptr.
4652 (dirnames_to_char_ptr_vec_append): Take std::vector of
4653 gdb::unique_xmalloc_ptr.
4654 (dirnames_to_char_ptr_vec): Return std::vector of
4655 gdb::unique_xmalloc_ptr.
4656 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4657 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4658 (delim_string_to_char_ptr_vec): Return an std::vector of
4659 gdb::unique_xmalloc_ptr, adjust the code.
4660 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4661 gdb::unique_xmalloc_ptr, adjust the code.
4662 (dirnames_to_char_ptr_vec): Return an std::vector of
4663 gdb::unique_xmalloc_ptr, adjust the code.
4664 * auto-load.c (auto_load_safe_path_vec): Change type to
4665 std::vector of gdb::unique_xmalloc_ptr.
4666 (auto_load_expand_dir_vars): Return an std::vector of
4667 gdb::unique_xmalloc_ptr, adjust the code.
4668 (auto_load_safe_path_vec_update): Adjust.
4669 (filename_is_in_auto_load_safe_path_vec): Adjust.
4670 (auto_load_objfile_script_1): Adjust.
4671 * build-id.c (build_id_to_debug_bfd): Adjust.
4672 * linux-thread-db.c (thread_db_load_search): Adjust.
4673 * source.c (add_path): Adjust.
4675 * symfile.c (find_separate_debug_file): Adjust.
4676 * utils.c (do_free_char_ptr_vec): Remove.
4677 (make_cleanup_free_char_ptr_vec): Remove.
4679 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4682 * common/pathstuff.c: Conditionally include "<windows.h>".
4684 2018-03-01 Georg Sauthoff <mail@georg.so>
4687 * gcore.in: Quote variables and switch interpreter to bash.
4689 2018-03-01 Tom Tromey <tom@tromey.com>
4691 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4692 assertion. Add assertion for discriminant_index.
4693 (quirk_rust_enum): Use correct base type name in univariant case.
4695 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4697 * record.c (get_call_history_modifiers): Return a
4699 (cmd_record_call_history): Adjust.
4700 * record-btrace.c (record_btrace_call_history): Adjust.
4701 (record_btrace_call_history_range): Adjust.
4702 (record_btrace_call_history_from): Adjust.
4703 * target-debug.h (target_debug_print_record_print_flags): New.
4704 * target-delegates.c: Re-generate.
4705 * target.c (target_call_history): Change flags type.
4706 (target_call_history_from): Likewise.
4707 (target_call_history_range): Likewise.
4708 * target.h (struct target_ops) <target_call_history>: Likewise.
4709 (target_call_history_from): Likewise.
4710 (target_call_history_range): Likewise.
4712 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4713 Simon Marchi <simon.marchi@polymtl.ca>
4715 * common/common-utils.c: Include "sys/stat.h".
4716 (is_regular_file): Move here from "source.c"; change return
4718 * common/common-utils.h (is_regular_file): New prototype.
4719 * common/pathstuff.c (contains_dir_separator): New function.
4720 * common/pathstuff.h (contains_dir_separator): New prototype.
4721 * source.c: Don't include "sys/stat.h".
4722 (is_regular_file): Move to "common/common-utils.c".
4724 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4726 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4727 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4728 * auto-load.c: Include "common/pathstuff.h".
4729 * common/common-def.h (current_directory): Move here.
4730 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4732 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4734 * common/pathstuff.c: New file.
4735 * common/pathstuff.h: New file.
4736 * compile/compile.c: Include "common/pathstuff.h".
4737 * defs.h (current_directory): Move to "common/common-defs.h".
4738 * dwarf2read.c: Include "common/pathstuff.h".
4740 * guile/scm-safe-call.c: Likewise.
4741 * linux-thread-db.c: Likewise.
4743 * nto-tdep.c: Likewise.
4744 * objfiles.c: Likewise.
4745 * source.c: Likewise.
4746 * symtab.c: Likewise.
4747 * utils.c: Include "common/pathstuff.h".
4748 (gdb_realpath): Move to "common/pathstuff.c".
4749 (gdb_realpath_keepfile): Likewise.
4750 (gdb_abspath): Likewise.
4751 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4752 (gdb_realpath_keepfile): Likewise.
4753 (gdb_abspath): Likewise.
4755 2018-02-28 John Baldwin <jhb@FreeBSD.org>
4757 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4758 wildcard process pid for super_resume for kernels with a
4761 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4763 * compile/compile.c (get_args): Add additional comments
4764 explaining function.
4766 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4767 Tom Tromey <tom@tromey.com>
4769 * target.h (memory_write_request_s): Remove typedef. Don't define
4771 (target_write_memory_blocks): Change argument to std::vector.
4772 (struct memory_write_request): Add constructor.
4773 * target-memory.c (compare_block_starting_address): Return bool.
4774 Change argument types.
4775 (claim_memory): Change arguments to use std::vector.
4776 (split_regular_and_flash_blocks, blocks_to_erase)
4777 (compute_garbled_blocks): Likewise.
4778 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4779 (target_write_memory_blocks): Change argument to std::vector.
4780 * symfile.c (struct load_section_data): Add constructor and
4781 destructor. Use std::vector for "requests".
4782 (struct load_progress_data): Add initializers.
4783 (load_section_callback): Update. Use "new".
4784 (clear_memory_write_data): Remove.
4785 (generic_load): Update.
4787 2018-02-27 Alan Hayward <alan.hayward@arm.com>
4789 * arch/aarch64.h: Use common/tdesc.h.
4791 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4793 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4794 architecture with a 64-bit ABI.
4796 2018-02-26 Maciej W. Rozycki <macro@mips.com>
4798 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4799 ahead of target description loading.
4801 2018-02-26 Tom Tromey <tom@tromey.com>
4803 * stack.c (backtrace_command_1): Update.
4804 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4806 * python/py-framefilter.c (py_print_frame)
4807 (gdbpy_apply_frame_filter): Change type of "flags".
4808 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4810 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4811 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4812 * extension.h (enum frame_filter_flag): Rename from
4814 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4815 (apply_ext_lang_frame_filter): Change type of "flags".
4816 * extension.c (apply_ext_lang_frame_filter): Change type of
4818 * extension-priv.h (struct extension_language_ops)
4819 <apply_frame_filter>: Change type of "flags".
4821 2018-02-26 Tom Tromey <tom@tromey.com>
4824 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4825 off-by-one in py_end computation.
4826 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4828 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4831 2018-02-26 Tom Tromey <tom@tromey.com>
4833 * dwarf2read.c (struct variant_field): New.
4834 (struct nextfield) <variant>: New field.
4835 (dwarf2_add_field): Handle DW_TAG_variant_part.
4836 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4837 discriminated union.
4838 (read_structure_type): Handle DW_TAG_variant_part.
4839 (handle_struct_member_die): New function, extracted from
4840 process_structure_scope. Handle DW_TAG_variant.
4841 (process_structure_scope): Handle discriminated unions. Call
4842 handle_struct_member_die.
4844 2018-02-26 Tom Tromey <tom@tromey.com>
4846 * rust-lang.h (rust_last_path_segment): Declare.
4847 * rust-lang.c (rust_last_path_segment): Now public. Change
4849 (struct disr_info): Remove.
4850 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4851 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4852 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4853 (rust_enum_p, rust_enum_variant): New function.
4854 (rust_underscore_fields): Remove "offset" parameter.
4855 (rust_print_enum): New function.
4856 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4857 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4858 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4860 (rust_internal_print_type): New function, from rust_print_type.
4862 (rust_print_type): Call rust_internal_print_type.
4863 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4864 Update enum handling.
4865 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4866 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4867 (rust_union_quirks): New functions.
4868 (process_full_comp_unit, process_full_type_unit): Call
4870 (process_structure_scope): Update rust_unions if necessary.
4872 2018-02-26 Tom Tromey <tom@tromey.com>
4874 * value.h (value_union_variant): Declare.
4875 * valops.c (value_union_variant): New function.
4876 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4877 (struct discriminant_info): New.
4878 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4880 (struct main_type) <flag_discriminated_union>: New field.
4882 2018-02-26 Tom Tromey <tom@tromey.com>
4884 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4885 unittests/unpack-selftests.c.
4886 * unittests/unpack-selftests.c: New file.
4887 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4889 2018-02-26 Yao Qi <yao.qi@linaro.org>
4891 * dwarf2read.c (struct partial_die_info) <read>: New method.
4892 (read_partial_die): Remove the declaration.
4893 (load_partial_dies): Update.
4894 (partial_die_info::partial_die_info):
4895 (read_partial_die): Change it to partial_die_info::read.
4897 2018-02-26 Yao Qi <yao.qi@linaro.org>
4899 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4900 (fixup_partial_die): Remove declaration.
4901 (scan_partial_symbols): Update.
4902 (partial_die_parent_scope): Likewise.
4903 (partial_die_full_name): Likewise.
4904 (fixup_partial_die): Change it to partial_die_info::fixup.
4906 2018-02-26 Yao Qi <yao.qi@linaro.org>
4908 * dwarf2read.c (read_partial_die): Update the declaration.
4909 (load_partial_dies): Caller update.
4910 (read_partial_die): Remove one argument abbrev_len.
4912 2018-02-26 Yao Qi <yao.qi@linaro.org>
4914 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4915 assignment operator.
4916 (load_partial_dies): Use ctor and copy ctor.
4917 (read_partial_die): Update.
4918 (dwarf2_cu::find_partial_die): Use ctor.
4920 2018-02-26 Yao Qi <yao.qi@linaro.org>
4922 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4923 (find_partial_die_in_comp_unit): Change it to
4924 dwarf2_cu::find_partial_die.
4925 (find_partial_die): Update.
4927 2018-02-26 Yao Qi <yao.qi@linaro.org>
4929 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4932 2018-02-26 Yao Qi <yao.qi@linaro.org>
4934 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4936 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4938 * arch/amd64.h: Use common/tdesc.h.
4939 * arch/i386.c: Likewise.
4940 * arch/i386.h: Likewise.
4941 * arch/tic6x.c: Likewise.
4942 * arch/tdesc.h: Move file from here...
4943 * common/tdesc.h: ...to here.
4944 * features/aarch64-core.c: Regenerate.
4945 * features/aarch64-fpu.c: Regenerate.
4946 * features/i386/32bit-avx.c: Regenerate.
4947 * features/i386/32bit-avx512.c: Regenerate.
4948 * features/i386/32bit-core.c: Regenerate.
4949 * features/i386/32bit-linux.c: Regenerate.
4950 * features/i386/32bit-mpx.c: Regenerate.
4951 * features/i386/32bit-pkeys.c: Regenerate.
4952 * features/i386/32bit-sse.c: Regenerate.
4953 * features/i386/64bit-avx.c: Regenerate.
4954 * features/i386/64bit-avx512.c: Regenerate.
4955 * features/i386/64bit-core.c: Regenerate.
4956 * features/i386/64bit-linux.c: Regenerate.
4957 * features/i386/64bit-mpx.c: Regenerate.
4958 * features/i386/64bit-pkeys.c: Regenerate.
4959 * features/i386/64bit-segments.c: Regenerate.
4960 * features/i386/64bit-sse.c: Regenerate.
4961 * features/i386/x32-core.c: Regenerate.
4962 * features/tic6x-c6xp.c: Regenerate.
4963 * features/tic6x-core.c: Regenerate.
4964 * features/tic6x-gp.c: Regenerate.
4965 * target-descriptions.c: Use common/tdesc.h.
4966 * target-descriptions.h: Likewise.
4968 2018-02-24 Tom Tromey <tom@tromey.com>
4970 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4971 (try_thread_db_load_from_dir, thread_db_load_search): Use
4973 (info_auto_load_libthread_db_compare): Return bool. Change
4975 (info_auto_load_libthread_db): Use std::vector, std::string.
4978 2018-02-24 Tom Tromey <tom@tromey.com>
4980 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4982 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4984 * gdbarch.c: Rebuild.
4985 * gdbarch.h: Rebuild.
4986 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4987 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4988 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4991 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4993 * gdbtypes.h (sect_offset): Change type to uint64_t.
4994 (sect_offset_str): New function.
4995 * dwarf2read.c (create_addrmap_from_aranges): Use
4997 (error_check_comp_unit_head): Likewise.
4998 (create_debug_type_hash_table): Likewise.
4999 (read_cutu_die_from_dwo): Likewise.
5000 (init_cutu_and_read_dies): Likewise.
5001 (init_cutu_and_read_dies_no_follow): Likewise.
5002 (process_psymtab_comp_unit_reader): Likewise.
5003 (partial_die_parent_scope): Likewise.
5004 (peek_die_abbrev): Likewise.
5005 (process_queue): Likewise.
5006 (dwarf2_physname): Likewise.
5007 (read_namespace_alias): Likewise.
5008 (read_import_statement): Likewise.
5009 (create_dwo_cu_reader): Likewise.
5010 (create_cus_hash_table): Likewise.
5011 (lookup_dwo_cutu): Likewise.
5012 (inherit_abstract_dies): Likewise.
5013 (read_func_scope): Likewise.
5014 (read_call_site_scope): Likewise.
5015 (dwarf2_add_member_fn): Likewise.
5016 (read_common_block): Likewise.
5017 (read_module_type): Likewise.
5018 (read_typedef): Likewise.
5019 (read_subrange_type): Likewise.
5020 (load_partial_dies): Likewise.
5021 (read_partial_die): Likewise.
5022 (find_partial_die): Likewise.
5023 (read_str_index): Likewise.
5024 (dwarf2_string_attr): Likewise.
5025 (build_error_marker_type): Likewise.
5026 (lookup_die_type): Likewise.
5027 (dump_die_shallow): Likewise.
5028 (follow_die_ref): Likewise.
5029 (dwarf2_fetch_die_loc_sect_off): Likewise.
5030 (dwarf2_fetch_constant_bytes): Likewise.
5031 (follow_die_sig): Likewise.
5032 (get_signatured_type): Likewise.
5033 (get_DW_AT_signature_type): Likewise.
5034 (dwarf2_find_containing_comp_unit): Likewise.
5035 (set_die_type): Likewise.
5037 2018-02-21 John Baldwin <jhb@FreeBSD.org>
5039 * arch/aarch64.c: Include "common-defs.h".
5040 * arch/amd64.c: Likewise.
5041 * arch/i386.c: Likewise.
5043 2018-02-21 Tom Tromey <tom@tromey.com>
5045 * value.h: (extract_field_op): Update.
5046 * eval.c (extract_field_op): Return a const char *.
5047 * expression.h (parse_expression_for_completion): Update.
5048 * completer.c (complete_expression): Update.
5049 (add_struct_fields): Make fieldname const.
5050 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
5051 (mark_completion_tag, parse_exp_in_context_1): Update.
5052 (parse_expression_for_completion): Change "name" to
5053 unique_xmalloc_ptr*.
5055 2018-02-21 Tom Tromey <tom@tromey.com>
5057 * infcall.c (call_function_by_hand_dummy): Use std::vector.
5059 2018-02-21 Yao Qi <yao.qi@linaro.org>
5061 * avr-tdep.c (avr_read_pc): Change parameter type to
5063 * gdbarch.sh (read_pc): Likewise.
5064 * gdbarch.c: Re-generated.
5065 * gdbarch.h: Re-generated.
5066 * hppa-tdep.c (hppa_read_pc): Change parameter type to
5068 * ia64-tdep.c (ia64_read_pc): Likewise.
5069 * mips-tdep.c (mips_read_pc): Likewise.
5070 * spu-tdep.c (spu_read_pc): Likewise.
5072 2018-02-21 Yao Qi <yao.qi@linaro.org>
5074 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5075 * regcache-dump.c: New file.
5076 * regcache.c: Move register_dump to regcache-dump.c.
5077 (maintenance_print_registers): Likewise.
5078 (maintenance_print_raw_registers): Likewise.
5079 (maintenance_print_cooked_registers): Likewise.
5080 (maintenance_print_register_groups): Likewise.
5081 (maintenance_print_remote_registers): Likewise.
5082 (_initialize_regcache): Likewise.
5083 * regcache.h (register_dump): Moved from regcache.c.
5085 2018-02-21 Yao Qi <yao.qi@linaro.org>
5087 * regcache.c (regcache::regcache): Update.
5088 (regcache::invalidate): Move it to detached_regcache::invalidate.
5089 (get_thread_arch_aspace_regcache): Update.
5090 (regcache::raw_update): Update.
5091 (regcache::cooked_read): Remove some code.
5092 (regcache::cooked_read_value): Likewise.
5093 (regcache::raw_write): Remove assert on m_readonly_p.
5094 (regcache::raw_supply_integer): Move it to
5095 detached_regcache::raw_supply_integer.
5096 (regcache::raw_supply_zeroed): Likewise.
5097 * regcache.h (detached_regcache) <raw_supply_integer>: New
5099 <raw_supply_zeroed, invalidate>: Likewise.
5100 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5101 <invalidate>: Likewise.
5102 <m_readonly_p>: Removed.
5104 2018-02-21 Yao Qi <yao.qi@linaro.org>
5106 * infcmd.c (get_return_value): Let stop_regs point to
5107 get_current_regcache.
5108 * regcache.c (regcache::regcache): Remove.
5109 (register_dump_reg_buffer): New class.
5110 (regcache_print): Adjust.
5111 * regcache.h (regcache): Remove constructors.
5113 2018-02-21 Yao Qi <yao.qi@linaro.org>
5115 * regcache.c (class register_dump): New class.
5116 (register_dump_regcache, register_dump_none): New class.
5117 (register_dump_remote, register_dump_groups): New class.
5118 (regcache_print): Update.
5119 * regcache.h (regcache_dump_what): Move it to regcache.c.
5120 (regcache) <dump>: Remove.
5122 2018-02-21 Yao Qi <yao.qi@linaro.org>
5124 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5126 (jit_unwind_reg_set_impl): Call raw_supply.
5127 (jit_frame_sniffer): Use reg_buffer_rw.
5128 * record-full.c (record_full_core_regbuf): Change its type.
5129 (record_full_core_open_1): Use reg_buffer_rw.
5130 (record_full_close): Likewise.
5131 (record_full_core_fetch_registers): Use regcache->raw_supply.
5132 (record_full_core_store_registers): Likewise.
5133 * regcache.c (regcache::get_register_status): Move it to
5135 (regcache_raw_set_cached_value): Remove.
5136 (regcache::raw_set_cached_value): Remove.
5137 (regcache::raw_write): Call raw_supply.
5138 (regcache::raw_supply): Move it to reg_buffer_rw.
5139 * regcache.h (regcache_raw_set_cached_value): Remove.
5140 (reg_buffer_rw): New class.
5142 2018-02-21 Yao Qi <yao.qi@linaro.org>
5144 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5145 readonly_detached_regcache.
5146 (dummy_frame_prev_register): Use regcache->cooked_read.
5147 * frame.c (frame_save_as_regcache): Change return type.
5148 (frame_pop): Update.
5149 * frame.h (frame_save_as_regcache): Update declaration.
5150 * inferior.h (get_infcall_suspend_state_regcache): Update
5152 * infrun.c (infcall_suspend_state) <registers>: use
5153 readonly_detached_regcache.
5154 (save_infcall_suspend_state): Don't use regcache_dup.
5155 (get_infcall_suspend_state_regcache): Change return type.
5156 * linux-fork.c (struct fork_info) <savedregs>: Change to
5157 readonly_detached_regcache.
5159 (fork_save_infrun_state): Don't use regcache_dup.
5160 (info_checkpoints_command): Adjust.
5161 * mi/mi-main.c (register_changed_p): Update declaration.
5162 (mi_cmd_data_list_changed_registers): Use
5163 readonly_detached_regcache.
5164 (register_changed_p): Change parameter type to
5165 readonly_detached_regcache.
5166 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
5167 readonly_detached_regcache.
5168 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
5169 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
5171 (regcache::save): Move it to reg_buffer.
5172 (regcache::restore): Change parameter type.
5173 (regcache_dup): Remove.
5174 * regcache.h (reg_buffer) <save>: New method.
5175 (readonly_detached_regcache): New class.
5176 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
5177 readonly_detached_regcache.
5178 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
5180 2018-02-21 Yao Qi <yao.qi@linaro.org>
5182 * frame.c (frame_save_as_regcache): Use regcache method save.
5183 (frame_pop): Use regcache method restore.
5184 * infrun.c (restore_infcall_suspend_state): Likewise.
5185 * linux-fork.c (fork_load_infrun_state): Likewise.
5186 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5188 * regcache.c (regcache_save): Remove.
5189 (regcache::restore): More asserts.
5190 (regcache_cpy): Remove.
5191 * regcache.h (regcache_save): Remove the declaration.
5192 (regcache::restore): Move from private to public.
5193 Remove the friend declaration of regcache_cpy.
5194 (regcache_cpy): Remove declaration.
5196 2018-02-21 Yao Qi <yao.qi@linaro.org>
5198 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5199 parameter type to 'readable_regcache *'.
5200 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5201 * arm-tdep.c (arm_neon_quad_read): Likewise.
5202 (arm_pseudo_read): Likewise.
5203 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5204 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5205 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5206 * gdbarch.c: Re-generated.
5207 * gdbarch.h: Re-generated.
5208 * gdbarch.sh (pseudo_register_read): Change parameter type to
5209 'readable_regcache *'.
5210 (pseudo_register_read_value): Likewise.
5211 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
5212 (h8300_pseudo_register_read): Likewise.
5213 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
5214 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5215 (i386_pseudo_register_read_into_value): Likewise.
5216 (i386_pseudo_register_read_value): Likewise.
5217 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
5219 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
5220 * m32c-tdep.c (m32c_raw_read): Likewise.
5221 (m32c_read_flg): Likewise.
5222 (m32c_banked_register): Likewise.
5223 (m32c_banked_read): Likewise.
5224 (m32c_sb_read): Likewise.
5225 (m32c_part_read): Likewise.
5226 (m32c_cat_read): Likewise.
5227 (m32c_r3r2r1r0_read): Likewise.
5228 (m32c_pseudo_register_read): Likewise.
5229 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5230 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5231 (mep_pseudo_cr64_read): Likewise.
5232 (mep_pseudo_register_read): Likewise.
5233 * mips-tdep.c (mips_pseudo_register_read): Likewise.
5234 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5235 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5236 * regcache.c (regcache::raw_read): Move it to readable_regcache.
5237 (regcache::cooked_read): Likewise.
5238 (regcache::cooked_read_value): Likewise.
5239 (regcache_cooked_read_signed):
5240 (regcache::cooked_read): Likewise.
5241 * regcache.h (readable_regcache): New class.
5242 (regcache): Inherit readable_regcache. Move some methods to
5244 * rl78-tdep.c (rl78_pseudo_register_read): Change
5245 parameter type to 'readable_regcache *'.
5246 * rs6000-tdep.c (do_regcache_raw_read): Remove.
5247 (e500_pseudo_register_read): Change parameter type to
5248 'readable_regcache *'.
5249 (dfp_pseudo_register_read): Likewise.
5250 (vsx_pseudo_register_read): Likewise.
5251 (efpr_pseudo_register_read): Likewise.
5252 * s390-tdep.c (s390_pseudo_register_read): Likewise.
5253 * sh-tdep.c (sh_pseudo_register_read): Likewise.
5254 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
5255 (sh64_pseudo_register_read): Likewise.
5256 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5257 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5258 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5259 (spu_pseudo_register_read): Likewise.
5260 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5261 (xtensa_pseudo_register_read): Likewise.
5263 2018-02-21 Yao Qi <yao.qi@linaro.org>
5265 * regcache.c (regcache::regcache): Call reg_buffer ctor.
5266 (regcache::arch): Move it to reg_buffer::arch.
5267 (regcache::register_buffer): Likewise.
5268 (regcache::assert_regnum): Likewise.
5269 (regcache::num_raw_registers): Likewise.
5270 * regcache.h (reg_buffer): New class.
5271 (regcache): Inherit reg_buffer.
5273 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
5275 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
5276 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
5278 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
5280 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
5282 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5284 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
5285 (SFILES): Remove common/*.c files.
5286 (COMMON_OBS): Remove some *.o files built from common/*.c files.
5287 * common/common.host: Add common reference.
5288 * configure.ac: Likewise.
5289 * configure: Regenerate.
5291 2018-02-16 Yao Qi <yao.qi@linaro.org>
5293 * block.c (block_namespace_info): Inherit allocate_on_obstack.
5294 (block_initialize_namespace): Use new.
5295 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
5296 (dwarf2_free_objfile): Use delete.
5297 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
5298 (copy_type_recursive): Use new.
5299 * gdb_obstack.h (allocate_on_obstack): New.
5301 2018-02-15 Yao Qi <yao.qi@linaro.org>
5304 * inferior.c (exit_inferior_1): Reset inf->control.
5306 2018-02-15 Joel Brobecker <brobecker@adacore.com>
5308 * ada-lang.c (ada_to_fixed_value_create): Delete advance
5311 2018-02-14 Pedro Alves <palves@redhat.com>
5313 * frame-unwind.c (frame_unwind_try_unwinder): Always call
5314 frame_cleanup_after_sniffer on exception.
5316 2018-02-14 Tom Tromey <tom@tromey.com>
5318 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
5320 (solib_bfd_open): Make pathname const.
5321 * solib.c (solib_bfd_open): Make pathname const.
5322 * solib-spu.c (spu_bfd_fopen): Make name const.
5323 (spu_bfd_open): Make pathname const.
5324 * solib-darwin.c (darwin_bfd_open): Make pathname const.
5325 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
5327 2018-02-14 Tom Tromey <tom@tromey.com>
5329 * symfile.c (symfile_bfd_open): Update.
5330 * source.h (openp, source_full_path_of, find_and_open_source):
5331 Change argument type to unique_xmalloc_ptr.
5332 * source.c (openp): Take a unique_xmalloc_ptr.
5333 (source_full_path_of, find_and_open_source): Likewise.
5334 (open_source_file, symtab_to_fullname): Update.
5335 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
5337 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
5338 (exec_file_find): Update.
5339 * psymtab.c (psymtab_to_fullname): Update.
5340 * nto-tdep.h (nto_find_and_open_solib): Update.
5341 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
5343 * exec.c (exec_file_attach): Update.
5344 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
5345 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
5347 2018-02-14 Tom Tromey <tom@tromey.com>
5349 * solib.c: Include source.h.
5350 * nto-tdep.c: Include source.h.
5351 * mi/mi-cmd-env.c: Include source.h.
5352 * infcmd.c: Include source.h.
5353 * exec.c: Include source.h.
5354 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
5355 (add_path, directory_switch, source_path, init_source_path): Move
5357 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
5358 (add_path, directory_switch, source_path, init_source_path):
5361 2018-02-14 Tom Tromey <tom@tromey.com>
5363 * solist.h (exec_file_find, solib_find): Return
5365 (solib_bfd_fopen): Take a const char *.
5366 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
5367 (exec_file_find, solib_find): Likewise.
5368 (solib_bfd_fopen): Do not take ownership of "pathname".
5369 (solib_bfd_open): Use unique_xmalloc_ptr.
5370 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
5371 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
5372 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
5373 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
5375 2018-02-14 Joel Brobecker <brobecker@adacore.com>
5377 * ada-lang.c (name_match_type_from_name): Remove reference to
5378 ada_name_for_lookup in function's documentation.
5379 * ada-lang.h (ada_name_for_lookup): Delete declaration.
5381 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5383 * defs.h (enum openp_flags): New enum.
5384 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
5385 Move to enum openp_flags.
5386 (openp_flags): New enum flags.
5387 (openp): Change parameter type to openp_flags.
5388 * source.c (openp): Change parameter type to openp_flags.
5389 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
5390 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
5392 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5394 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
5397 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
5399 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
5401 (class dwarf2_queue_guard): ...the destructor of this new class.
5402 (dw2_do_instantiate_symtab): Create instance of the new class
5403 dwarf2_queue_guard, remove cleanup.
5405 2018-02-09 Tom Tromey <tom@tromey.com>
5407 * source.c (find_source_lines): Don't reference past the end of
5410 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5412 * remote.c (remote_btrace_maybe_reopen): Change error message.
5413 * btrace.c (btrace_enable): Likewise.
5414 (parse_xml_btrace): Likewise.
5415 (parse_xml_btrace_conf): Likewise.
5417 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5419 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
5420 (linux_enable_pt, linux_enable_bts): Call
5421 diagnose_perf_event_open_fail.
5423 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5425 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
5426 Remove parameter and change return type. Update callers. Move it.
5427 (linux_enable_bts, linux_enable_pt): Improve error message.
5428 (linux_enable_pt): Remove zero buffer size check.
5429 (linux_enable_btrace): Improve error messages. Remove NULL return
5432 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5434 * btrace.c (btrace_enable): Remove target_supports_btrace call.
5435 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
5436 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
5437 (linux_supports_pt, linux_supports_btrace): Remove.
5438 (linux_enable_bts): Call cpu_supports_bts.
5439 * nat/linux-btrace.h (linux_supports_btrace): Remove.
5440 * remote.c (remote_supports_btrace): Remove.
5441 (init_remote_ops): Remove remote_supports_btrace.
5442 * target-delegates.c: Regenerated.
5443 * target.c (target_supports_btrace): Remove.
5444 * target.h (target_ops) <to_supports_btrace>: Remove
5445 (target_supports_btrace): Remove.
5446 * x86-linux-nat.c (x86_linux_create_target): Remove
5447 linux_supports_btrace.
5449 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5451 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
5453 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
5454 exception and use message in own exception.
5456 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5458 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
5459 (perf_event_pt_event_type): Use gdb_file_up.
5460 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
5461 scoped_fd, and scoped_mmap.
5463 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5465 * common/scoped_mmap.h: New.
5466 * unittests/scoped_mmap-selftest.c: New.
5467 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5468 unittests/scoped_mmap-selftest.c.
5470 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5472 * common/scoped_fd.h: New.
5473 * unittests/scoped_fd-selftest.c: New.
5474 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5475 unittests/scoped_fd-selftest.c.
5477 2018-02-09 Tom Tromey <tom@tromey.com>
5479 * auto-load.c (auto_load_section_scripts): Use
5480 gdb::unique_xmalloc_ptr.
5482 2018-02-09 Tom Tromey <tom@tromey.com>
5484 * auto-load.c (execute_script_contents): Use std::string.
5486 2018-02-09 Joel Brobecker <brobecker@adacore.com>
5488 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
5489 Python function, rather than a new command.
5491 2018-02-08 Tom Tromey <tom@tromey.com>
5493 * solib.c (solib_find_1): Use std::string.
5494 (solib_bfd_fopen): Use unique_xmalloc_ptr.
5496 2018-02-08 Tom Tromey <tom@tromey.com>
5498 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
5500 2018-02-08 Tom Tromey <tom@tromey.com>
5502 * source.c (find_source_lines): Use gdb::def_vector.
5504 2018-02-08 Tom Tromey <tom@tromey.com>
5506 * macrocmd.c (struct temporary_macro_definition): New.
5507 (macro_define_command): Use temporary_macro_definition. Remove
5509 (free_macro_definition_ptr): Remove.
5511 2018-02-08 Tom Tromey <tom@tromey.com>
5513 * macroexp.c (maybe_expand): Use std::string.
5515 2018-02-08 Tom Tromey <tom@tromey.com>
5517 * macroexp.c (struct macro_buffer): Add initializers for some
5519 (init_buffer, init_shared_buffer, free_buffer)
5520 (free_buffer_return_text): Remove.
5521 (macro_buffer): New constructors.
5522 (~macro_buffer): New destructor.
5523 (macro_buffer::set_shared): New method.
5524 (macro_buffer::resize_buffer, macro_buffer::appendc)
5525 (macro_buffer::appendmem): Now methods, not free functions.
5526 (set_token, append_tokens_without_splicing, stringify)
5527 (macro_stringify): Update.
5528 (gather_arguments): Change return type. Remove argc_p argument,
5529 add args_ptr argument. Use std::vector.
5530 (substitute_args): Remove argc argument. Accept std::vector.
5531 (expand): Update. Use std::vector.
5532 (scan, macro_expand, macro_expand_next): Update.
5534 2018-02-08 Tom Tromey <tom@tromey.com>
5536 * symtab.c (default_collect_symbol_completion_matches_break_on):
5537 Use unique_xmalloc_ptr.
5538 * macroscope.h: (sal_macro_scope, user_macro_scope)
5539 (default_macro_scope): Return unique_xmalloc_ptr.
5540 * macroscope.c (sal_macro_scope, user_macro_scope)
5541 (default_macro_scope): Return unique_xmalloc_ptr.
5542 * macroexp.h (macro_expand, macro_expand_once): Return
5544 * macroexp.c (macro_expand, macro_expand_once): Return
5546 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5547 (info_macro_command, info_macros_command): Use
5549 * compile/compile-c-support.c (write_macro_definitions): Use
5551 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5553 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
5555 * value.c (value_static_field): Assign field type instead of
5556 containing type when returning an optimized out value.
5558 2018-02-06 Yao Qi <yao.qi@linaro.org>
5560 * ft32-tdep.c (ft32_read_pc): Remove.
5561 (ft32_write_pc): Remove.
5562 (ft32_gdbarch_init): Update.
5563 * m32r-tdep.c (m32r_read_pc): Remove.
5564 (m32r_gdbarch_init): Update.
5565 * mep-tdep.c (mep_read_pc): Remove.
5566 (mep_gdbarch_init): Update.
5567 * microblaze-tdep.c (microblaze_write_pc): Remove.
5568 (microblaze_gdbarch_init): Update.
5569 * mn10300-tdep.c (mn10300_read_pc): Remove.
5570 (mn10300_write_pc): Remove.
5571 (mn10300_gdbarch_init): Update.
5572 * moxie-tdep.c (moxie_read_pc): Remove.
5573 (moxie_write_pc): Remove.
5574 (moxie_gdbarch_init): Update.
5576 2018-02-06 Yao Qi <yao.qi@linaro.org>
5578 * expprint.c (print_subexp_standard): Handle
5579 OP_F77_UNDETERMINED_ARGLIST.
5580 (dump_subexp_body_standard): Likewise.
5582 2018-02-05 Alan Hayward <alan.hayward@arm.com>
5584 * target-descriptions.c (tdesc_element_visitor) Add empty
5586 (tdesc_type): Move make_gdb_type from here.
5587 (tdesc_type_builtin): Likewise.
5588 (tdesc_type_vector): Likewise.
5589 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5590 (make_gdb_type_struct): Move from tdesc_type_with_fields.
5591 (make_gdb_type_union): Likewise.
5592 (make_gdb_type_flags): Likewise.
5593 (make_gdb_type_enum): Likewise.
5594 (make_gdb_type): New function.
5595 (tdesc_register_type): Use static make_gdb_type.
5597 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
5599 * infcmd.c (default_print_one_register_info): Align natural-format
5600 column values consistently one under another.
5601 (pad_to_column): New function.
5603 2018-02-05 Joel Brobecker <brobecker@adacore.com>
5605 * dwarf2read.c (dwarf2_physname): Move commment.
5607 2018-02-01 Leszek Swirski <leszeks@google.com>
5609 * varobj.c (varobj_formatted_print_options): Allow recursive
5610 pretty printing if pretty printing is enabled.
5612 2018-02-01 Leszek Swirski <leszeks@google.com>
5614 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5615 names after a structop as a filename.
5617 2018-02-01 Yao Qi <yao.qi@linaro.org>
5619 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5620 (arm_record_coproc_data_proc): Likewise.
5622 2018-02-01 Yao Qi <yao.qi@linaro.org>
5624 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5626 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5628 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5629 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5631 2018-01-31 Pedro Alves <palves@redhat.com>
5633 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5634 * inflow.c (child_terminal_save_inferior): Wrap reference to
5635 tcgetpgrp in HAVE_TERMIOS_H.
5636 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5638 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5639 always iterate over all inferiors.
5640 (gdbsim_cntrl_c): Adjust.
5641 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5643 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5645 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5646 index type is objfile-owned if the element type is as well.
5648 2018-01-31 Joel Brobecker <brobecker@adacore.com>
5652 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5654 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5655 "features/s390x-linux64.c".
5656 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5657 s390_linux32 and s390x_linux64.
5658 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5660 * s390-tdep.c: Include "features/s390-linux32.c" and
5661 "features/s390x-linux64.c".
5662 (s390_tdesc_valid): Add check for tdesc_has_registers.
5663 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5664 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5665 tdesc_s390x_linux64.
5666 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5667 tdesc_s390x_linux64 to...
5668 * s390-tdep.h: ...here.
5670 2018-01-30 Pedro Alves <palves@redhat.com>
5673 * config.in, configure: Regenerate.
5674 * configure.ac: Check for getpgid.
5675 * go32-nat.c (go32_pass_ctrlc): New.
5676 (go32_target): Install it.
5677 * inf-child.c (inf_child_target): Install
5678 child_terminal_save_inferior, child_pass_ctrlc and
5680 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5681 (inf_ptrace_target): No longer install it.
5682 * infcmd.c (interrupt_target_1): Adjust.
5683 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5684 (child_interrupt): Declare.
5685 (inferior::terminal_state): New.
5686 * inflow.c (struct terminal_info): Update comments.
5687 (inferior_process_group): Delete.
5688 (terminal_is_ours): Delete.
5689 (gdb_tty_state): New.
5690 (child_terminal_init): Adjust.
5691 (is_gdb_terminal, sharing_input_terminal_1)
5692 (sharing_input_terminal): New functions.
5693 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5694 Set the process's actual process group in the foreground if
5695 possible. Handle is_ours_for_output/is_ours distinction. Don't
5696 mark terminal as the inferior's if not sharing GDB's terminal.
5697 Don't check attach_flag.
5698 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5699 pass down a target_terminal_state.
5700 (child_terminal_save_inferior): New, factored out from ...
5701 (child_terminal_ours_1): ... this. Handle
5702 target_terminal_state::is_ours_for_output.
5703 (child_interrupt, child_pass_ctrlc): New.
5704 (inflow_inferior_exit): Clear the inferior's terminal_state.
5705 (copy_terminal_info): Copy the inferior's terminal state.
5706 (_initialize_inflow): Remove reference to terminal_is_ours.
5707 * inflow.h (inferior_process_group): Delete.
5708 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5709 * procfs.c (procfs_target): Don't install procfs_interrupt.
5710 (procfs_interrupt): Delete.
5711 * remote.c (remote_serial_quit_handler): Adjust.
5712 (remote_interrupt): Remove ptid parameter. Adjust.
5713 * target-delegates.c: Regenerate.
5714 * target.c: Include "terminal.h".
5715 (target_terminal::terminal_state): Rename to ...
5716 (target_terminal::m_terminal_state): ... this.
5717 (target_terminal::init): Adjust.
5718 (target_terminal::inferior): Adjust to per-inferior
5720 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5721 (target_terminal::ours, target_terminal::ours_for_output): Use
5722 target_terminal_is_ours_kind.
5723 (target_interrupt): Remove ptid parameter. Adjust.
5724 (default_target_pass_ctrlc): Adjust.
5725 * target.h (target_ops::to_terminal_save_inferior): New field.
5726 (target_ops::to_interrupt): Remove ptid_t parameter.
5727 (target_interrupt): Remove ptid_t parameter. Update comment.
5728 (target_pass_ctrlc): Update comment.
5729 * target/target.h (target_terminal_state): New scoped enum,
5731 (target_terminal::terminal_state): ... here.
5732 (target_terminal::inferior): Update comments.
5733 (target_terminal::restore_inferior): New.
5734 (target_terminal::is_inferior, target_terminal::is_ours)
5735 (target_terminal::is_ours_for_output): Adjust.
5736 (target_terminal::scoped_restore_terminal_state): Adjust to
5737 rename, and call restore_inferior() instead of inferior().
5738 (target_terminal::scoped_restore_terminal_state::m_state): Change
5740 (target_terminal::terminal_state): Rename to ...
5741 (target_terminal::m_terminal_state): ... this and change type.
5743 2018-01-30 Pedro Alves <palves@redhat.com>
5745 * linux-nat.c (wait_for_signal): New function.
5746 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5748 (async_terminal_is_ours)
5749 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5750 (linux_nat_add_target): Don't override
5751 to_terminal_inferior/to_terminal_ours.
5753 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5755 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5757 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5759 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5760 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5761 dwarf2_per_objfile_free here.
5762 (dwarf2_per_objfile_free): Remove.
5763 (_initialize_dwarf2_read): Don't register
5764 dwarf2_per_objfile_free as a registry cleanup.
5766 2018-01-27 Eli Zaretskii <eliz@gnu.org>
5768 Avoid compilation errors in MinGW native builds
5770 The error is triggered by including python-internal.h, and the
5773 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5774 from build-gnulib/import/math.h:27,
5775 from d:/usr/Python26/include/pyport.h:235,
5776 from d:/usr/Python26/include/Python.h:58,
5777 from python/python-internal.h:94,
5778 from python/py-arch.c:24:
5779 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5783 This happens because Python headers define 'hypot' to expand t
5784 '_hypot' in the Windows builds.
5785 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5786 'hypoth'. This avoids a compilation error.
5788 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5790 * MAINTAINERS (Write After Approval): Fix ordering.
5792 2018-01-26 Alan Hayward <alan.hayward@arm.com>
5794 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5796 2018-01-26 Alan Modra <amodra@gmail.com>
5798 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5799 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5800 Remove nop. Make const. Comment.
5801 (powerpc32_plt_stub_so_2): New.
5802 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5803 Correct count. Update uses.
5804 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5805 Move common code reading PLT entry word. Correct
5806 powerpc32_plt_stub PLT address calculation.
5807 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5808 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5809 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5810 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5811 (ppc64_standard_linkage8): Likewise.
5812 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5813 Correct insns description.
5814 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5816 2018-01-24 Pedro Alves <palves@redhat.com>
5818 GCC PR libstdc++/83906
5819 * gdbtypes.c (operator==(const dynamic_prop &,
5820 const dynamic_prop &)): New.
5821 (operator==(const range_bounds &, const range_bounds &)): New.
5822 (check_types_equal): Use them instead of memcmp.
5823 * gdbtypes.h (operator==(const dynamic_prop &,
5824 const dynamic_prop &)): Declare.
5825 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5826 (operator==(const range_bounds &, const range_bounds &)): Declare.
5827 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5829 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5831 * s390-linux-tdep.c (s390_record_address_mask)
5832 (s390_record_calc_disp_common, s390_record_calc_disp)
5833 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5834 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5835 (s390_process_record): Move to s390-tdep.c.
5836 (s390_linux_init_abi_any): Adjust.
5837 * s390-tdep.c (s390_record_address_mask)
5838 (s390_record_calc_disp_common, s390_record_calc_disp)
5839 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5840 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5841 (s390_process_record): Moved from s390-linux-tdep.c
5842 (s390_gdbarch_init): Adjust.
5844 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5846 * s390-linux-nat.c (s390-tdep.h): New include.
5847 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5848 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5849 (ALLDEPFILES): Add s390-tdep.c.
5850 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5851 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5852 * s390-tdep.h: ...this. New file.
5853 * s390-linux-tdep.c (s390-tdep.h): New include.
5854 (_initialize_s390_tdep): Rename to...
5855 (_initialize_s390_linux_tdep): ...this and adjust.
5856 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5857 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5859 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5860 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5861 (s390_is_partial_instruction, s390_software_single_step)
5862 (is_non_branch_ril, s390_displaced_step_copy_insn)
5863 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5864 (s390_prologue_data, s390_addr, s390_store, s390_load)
5865 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5866 (s390_register_call_saved, s390_guess_tracepoint_registers)
5867 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5868 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5869 (s390_pseudo_register_name, s390_pseudo_register_type)
5870 (s390_pseudo_register_read, s390_pseudo_register_write)
5871 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5872 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5873 (s390_addr_bits_remove, s390_address_class_type_flags)
5874 (s390_address_class_type_flags_to_name)
5875 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5876 (s390_function_arg_float, s390_function_arg_vector)
5877 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5878 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5879 (s390_frame_align, s390_register_return_value, s390_return_value)
5880 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5881 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5882 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5883 (s390_trad_frame_prev_register, s390_unwind_cache)
5884 (s390_prologue_frame_unwind_cache)
5885 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5886 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5887 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5888 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5889 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5890 (s390_frame_base_address, s390_local_base_address)
5891 (s390_frame_base, s390_gcc_target_options)
5892 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5893 (s390_validate_reg_range, s390_tdesc_valid)
5894 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5895 * s390-tdep.c: ...this. New file.
5897 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5899 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5900 (s390_process_record, s390_gdbarch_tdep_alloc)
5901 (s390_linux_init_abi_any): Use/set new hook.
5903 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5905 * s390-linux-tdep.c (osabi.h): New include.
5906 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5907 (s390_linux_init_abi_any): New functions.
5908 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5910 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5912 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5913 tdesc_has_registers check
5915 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5917 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5918 (s390_validate_reg_range): New macro.
5919 (s390_gdbarch_init): Adjust.
5921 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5923 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5924 (s390_gdbarch_tdep_alloc): Adjust.
5925 (s390_gdbarch_init): Adjust.
5927 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5929 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5930 <have_tdb>: Change type to bool.
5931 (s390_gdbarch_tdep_alloc): Adjust.
5932 (s390_gdbarch_init): Adjust.
5934 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5936 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5937 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5938 (s390_gdbarch_tdep_alloc): New function.
5939 (s390_gdbarch_init): Allocate tdep at start and use its fields
5940 instead of separate variables.
5942 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5944 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5945 when looking for cached gdbarch and add comment for remaining.
5947 2018-01-22 Pedro Alves <palves@redhat.com>
5948 Sergio Durigan Junior <sergiodj@redhat.com>
5950 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5953 2018-01-22 Maciej W. Rozycki <macro@mips.com>
5955 * MAINTAINERS: Update my company e-mail address.
5957 2018-01-22 Yao Qi <yao.qi@linaro.org>
5959 * regcache.c (cooked_write_test): New function.
5960 (_initialize_regcache): Register the test.
5962 2018-01-22 Yao Qi <yao.qi@linaro.org>
5964 * ia64-tdep.c (ia64_pseudo_register_read): Call
5965 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5966 * m32c-tdep.c (m32c_cat_read): Likewise.
5967 (m32c_r3r2r1r0_read): Likewise.
5968 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5969 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5971 2018-01-22 Yao Qi <yao.qi@linaro.org>
5973 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5974 method raw_read instead of regcache_raw_read.
5975 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5976 * arm-tdep.c (arm_neon_quad_read): Likewise.
5977 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5978 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5979 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5980 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5981 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5982 (i386_pseudo_register_read_into_value): Likewise.
5983 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5984 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5985 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5986 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5987 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5988 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5989 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5990 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5991 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5993 2018-01-22 Yao Qi <yao.qi@linaro.org>
5995 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5996 * configure.tgt: Remove target mt.
5997 * mt-tdep.c: Remove.
5998 * regcache.c (cooked_read_test): Remove the check for mt.
6000 2018-01-22 Yao Qi <yao.qi@linaro.org>
6002 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6003 instead of gdbarch_pseudo_register_read_value.
6005 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6007 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
6010 2018-01-22 Joel Brobecker <brobecker@adacore.com>
6012 * linespec.c (create_sals_line_offset): Remove code that preserved
6013 the symtab_and_line's line number.
6015 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6017 * varobj.c (varobj_create): Don't set valid_block when creating a
6020 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6022 * varobj.c (varobj_create): Remove out of date comment.
6024 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6027 * ada-exp.y (write_var_from_sym): Pass extra parameter when
6028 updating innermost block.
6029 * parse.c (innermost_block_tracker::update): Take extra type
6030 parameter, and check types match before updating innermost block.
6031 (write_dollar_variable): Update innermost block for registers.
6032 * parser-defs.h (enum innermost_block_tracker_type): New enum.
6033 (innermost_block_tracker::innermost_block_tracker): Initialise
6035 (innermost_block_tracker::reset): Take type parameter.
6036 (innermost_block_tracker::update): Take type parameter, and pass
6037 type through as needed.
6038 (innermost_block_tracker::m_types): New member.
6039 * varobj.c (varobj_create): Pass type when reseting innermost
6042 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6044 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
6045 * ada-lang.c (resolve_subexp): Likewise.
6046 * breakpoint.c (set_breakpoint_condition) Likewise.
6047 (watch_command_1) Likewise.
6048 * c-exp.y (variable): Likewise.
6049 * d-exp.y (PrimaryExpression): Likewise.
6050 * f-exp.y (variable): Likewise.
6051 * go-exp.y (variable): Likewise.
6052 * m2-exp.y (variable): Likewise.
6053 * objfiles.c (objfile::~objfile): Likewise.
6054 * p-exp.y (variable): Likewise.
6055 * parse.c (innermost_block): Change type.
6056 * parser-defs.h (class innermost_block_tracker): New.
6057 (innermost_block): Change to innermost_block_tracker.
6058 * printcmd.c (display_command): Switch to innermost_block API.
6059 (do_one_display): Likewise.
6060 * rust-exp.y (do_one_display): Likewise.
6061 * symfile.c (clear_symtab_users): Likewise.
6062 * varobj.c (varobj_create): Switch to innermost_block API, replace
6063 use of innermost_block with block stored on varobj object.
6065 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6067 * expression.h (innermost_block): Remove declaration.
6068 * varobj.c: Add 'parser-defs.h' include.
6070 2018-01-19 Tom Tromey <tom@tromey.com>
6072 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6073 symbols in the static and global blocks.
6075 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6077 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6078 gdb_ptrace.h, and move including gdb_wait.h ...
6079 * nat/linux-ptrace.h: ... to here.
6081 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6083 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6084 inf_ptrace_detach_success.
6085 (inf_ptrace_detach_success): Add inferior parameter, use it
6086 instead of inferior_ptid, pass it to detach_inferior.
6087 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6089 * inferior.c (detach_inferior): Add overload that takes an
6091 * inferior.h (detach_inferior): Likewise.
6092 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6093 use inferior_ptid, adjust call to inf_ptrace_detach_success.
6094 * linux-thread-db.c (thread_db_detach): Use inf parameter.
6096 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6098 * target.h (struct target_ops) <to_detach>: Add inferior
6100 (target_detach): Likewise.
6101 * target.c (dispose_inferior): Pass inferior down.
6102 (target_detach): Pass inferior down. Assert that it is equal to
6103 the current inferior.
6104 * aix-thread.c (aix_thread_detach): Pass inferior down.
6105 * corefile.c (core_file_command): Pass current_inferior() down.
6106 * corelow.c (core_detach): Add inferior parameter.
6107 * darwin-nat.c (darwin_detach): Likewise.
6108 * gnu-nat.c (gnu_detach): Likewise.
6109 * inf-ptrace.c (inf_ptrace_detach): Likewise.
6110 * infcmd.c (detach_command): Pass current_inferior() down to
6112 * infrun.c (follow_fork_inferior): Pass parent_inf to
6114 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6116 * linux-nat.c (linux_nat_detach): Add inferior parameter.
6117 * linux-thread-db.c (thread_db_detach): Likewise.
6118 * nto-procfs.c (procfs_detach): Likewise.
6119 * procfs.c (procfs_detach): Likewise.
6120 * record.c (record_detach): Likewise.
6121 * record.h (struct inferior): Forward-declare.
6122 (record_detach): Add inferior parameter.
6123 * remote-sim.c (gdbsim_detach): Likewise.
6124 * remote.c (remote_detach_1): Likewise.
6125 (remote_detach): Likewise.
6126 (extended_remote_detach): Likewise.
6127 * sol-thread.c (sol_thread_detach): Likewise.
6128 * target-debug.h (target_debug_print_inferior_p): New macro.
6129 * target-delegates.c: Re-generate.
6130 * top.c (kill_or_detach): Pass inferior down to target_detach.
6131 * windows-nat.c (windows_detach): Add inferior parameter.
6133 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6135 * target.h (struct target_ops) <to_detach>: Remove args
6137 (target_detach): Likewise.
6138 * target.c (dispose_inferior): Adjust.
6139 (target_detach): Remove args parameter, adjust.
6140 * aix-thread.c (aix_thread_detach): Adjust.
6141 * corefile.c (core_file_command): Adjust.
6142 * corelow.c (core_detach): Adjust.
6143 * darwin-nat.c (darwin_detach): Adjust.
6144 * gnu-nat.c (gnu_detach): Adjust.
6145 * inf-ptrace.c (inf_ptrace_detach): Adjust.
6146 * infcmd.c (detach_command): Adjust
6147 * infrun.c (follow_fork_inferior): Adjust.
6148 (handle_vfork_child_exec_or_exit): Adjust.
6149 * linux-fork.c (linux_fork_detach): Remove args parameter.
6150 * linux-fork.h (linux_fork_detach): Likewise.
6151 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6152 * linux-thread-db.c (thread_db_detach): Likewise.
6153 * nto-procfs.c (procfs_detach): Likewise.
6154 * procfs.c (procfs_detach): Likewise.
6155 (do_detach): Remove signo parameter.
6156 * record.c (record_detach): Remove args parameter.
6157 * record.h (record_detach): Likewise.
6158 * remote-sim.c (gdbsim_detach): Likewise.
6159 * remote.c (remote_detach_1): Likewise.
6160 (remote_detach): Likewise.
6161 (extended_remote_detach): Likewise.
6162 * sol-thread.c (sol_thread_detach): Likewise.
6163 * target-delegates.c: Re-generate.
6164 * top.c (struct qt_args) <args>: Remove field.
6165 (kill_or_detach): Don't pass args.
6166 (quit_force): Don't set args.
6167 * windows-nat.c (windows_detach): Remove args parameter.
6169 2018-01-19 Yao Qi <yao.qi@linaro.org>
6171 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
6172 (arm_linux_init_abi): Install it.
6174 2018-01-19 Yao Qi <yao.qi@linaro.org>
6176 * osabi.c (gdb_osabi_names): Extend the regexp for
6177 arm-linux-gnueabihf.
6179 2018-01-18 Yao Qi <yao.qi@linaro.org>
6181 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
6183 (abbrev_table::add_abbrev): Update.
6184 (abbrev_table::lookup_abbrev): Update.
6186 2018-01-18 Yao Qi <yao.qi@linaro.org>
6188 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6190 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
6192 * compile/compile.c (compile_to_object): Convert "triplet_rx"
6195 2018-01-17 Tom Tromey <tom@tromey.com>
6197 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
6199 2018-01-17 Tom Tromey <tom@tromey.com>
6201 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
6202 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
6203 (create_array_type_with_stride): Update.
6204 * dwarf2read.c (set_die_type): Update.
6206 2018-01-17 Tom Tromey <tom@tromey.com>
6208 * dwarf2read.c (delayed_method_info): Remove typedef.
6209 (dwarf2_cu::method_info): Now a std::vector.
6210 (add_to_method_list): Update.
6211 (free_delayed_list): Remove.
6212 (compute_delayed_physnames): Update.
6213 (process_full_comp_unit, process_full_type_unit): Clear the method
6214 list. Remove cleanups.
6215 (psymtab_include_file_name): Add name_holder parameter. Use
6217 (dwarf_decode_lines): Update.
6219 2018-01-17 Tom Tromey <tom@tromey.com>
6220 Simon Marchi <simon.marchi@ericsson.com>
6222 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
6223 (dwarf2_per_objfile::free_cached_comp_units)
6224 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6225 (init_cutu_and_read_dies_no_follow): Update.
6226 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
6227 (dwarf2_cu::~dwarf2_cu): New.
6228 (free_heap_comp_unit, free_stack_comp_unit): Remove.
6229 (age_cached_comp_units, free_one_cached_comp_unit): Update.
6231 2018-01-17 Tom Tromey <tom@tromey.com>
6232 Simon Marchi <simon.marchi@ericsson.com>
6234 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
6235 (struct die_reader_specs) <abbrev_table>: New member.
6236 (struct abbrev_table): Add constructor.
6237 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
6238 <abbrev_obstack>: Now an auto_obstack.
6239 (abbrev_table_up): New typedef.
6240 (init_cu_die_reader): Add abbrev_table parameter.
6241 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
6242 Add result_dwo_abbrev_table.
6243 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6244 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
6246 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
6248 (skip_children): Update.
6249 (abbrev_table::alloc_abbrev): Rename from
6250 abbrev_table_alloc_abbrev.
6251 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
6252 (abbrev_table::lookup_abbrev): Rename from
6253 abbrev_table_lookup_abbrev.
6254 (abbrev_table_read_table): Return abbrev_table_up.
6255 (abbrev_table_free, abbrev_table_free_cleanup)
6256 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
6257 (load_partial_dies): Update.
6259 2018-01-17 Tom Tromey <tom@tromey.com>
6261 * dwarf2read.c (dwarf2_compute_name): Update comment.
6262 (read_func_scope, read_variable): Update.
6263 (new_symbol): Remove.
6264 (new_symbol_full): Rename to new_symbol.
6266 2018-01-17 Mike Gulick <mgulick@mathworks.com>
6269 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
6270 a warning instead of throwing an error, set section size to 0 and return
6272 * gdb_bfd.h (gdb_bfd_map_section): Update description.
6274 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6276 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
6278 (linux_ptrace_attach_fail_reason_string): Likewise.
6279 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
6281 (linux_ptrace_attach_fail_reason_string): Likewise.
6282 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
6284 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6286 * linux-nat.c (linux_nat_attach): Remove xstrdup.
6288 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6291 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6292 checking for fs_base/gs_base fields in struct user_regs_struct.
6293 * configure: Regenerate.
6295 2018-01-17 Yao Qi <yao.qi@linaro.org>
6297 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
6299 (aarch64_linux_init_abi): Install it to gdbarch hook
6302 2018-01-15 Pedro Alves <palves@redhat.com>
6304 * common/signals-state-save-restore.c
6305 (save_original_signals_state): Fix typos.
6307 2017-01-12 Tom Tromey <tom@tromey.com>
6308 Sergio Durigan Junior <sergiodj@redhat.com>
6310 * Makefile.in (install-only): Install gdb-add-index.
6312 2018-01-12 John Baldwin <jhb@FreeBSD.org>
6314 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
6316 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6318 * infrun.c (keep_going_pass_signal): Clear step-over info when
6319 insert_breakpoints fails.
6321 2018-01-11 Pedro Alves <palves@redhat.com>
6324 * infrun.c (resume): Rename to ...
6325 (resume_1): ... this.
6326 (resume): Reimplement as wrapper around resume_1.
6328 2018-01-11 Pedro Alves <palves@redhat.com>
6331 * remote.c (remote_parse_stop_reply): Default to the last-set
6332 general thread instead of to 'magic_null_ptid'.
6334 2018-01-10 Pedro Alves <palves@redhat.com>
6336 * language.h (language_get_symbol_name_matcher): Rename ...
6337 (get_symbol_name_matcher): ... this.
6338 * language.c (language_get_symbol_name_matcher): Ditto.
6339 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
6342 2018-01-10 Pedro Alves <palves@redhat.com>
6346 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
6347 Adjust to use language_get_symbol_name_matcher instead of
6348 language_defn::la_get_symbol_name_matcher.
6349 * language.c (language_get_symbol_name_matcher): If in Ada mode
6350 and the lookup name is a verbatim match, return Ada's matcher.
6351 * language.h (language_get_symbol_name_matcher): Adjust comment.
6352 (ada_lookup_name_info::verbatim_p):: New method.
6354 2018-01-10 Pedro Alves <palves@redhat.com>
6357 * ada-lang.c (ada_collect_symbol_completion_matches): If the
6358 minsym's language is language_auto or language_cplus, pass down
6359 language_ada instead.
6360 * symtab.c (compare_symbol_name): Don't frob symbol language here.
6362 2018-01-10 Pedro Alves <palves@redhat.com>
6365 * minsyms.c (linkage_name_str): New function.
6366 (iterate_over_minimal_symbols): Use it.
6368 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6370 * NEWS: Document that 'info proc' now works on FreeBSD.
6372 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6374 * configure.ac: Check for kinfo_getfile in libutil.
6375 * configure: Regenerate.
6376 * config.in: Regenerate.
6377 * fbsd-nat.c: Include "fbsd-tdep.h".
6378 (fbsd_fetch_cmdline): New.
6379 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
6380 rather than calling error.
6381 (fbsd_info_proc): New.
6382 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
6383 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
6384 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
6386 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6388 * fbsd-nat.c (struct free_deleter): Remove.
6389 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
6391 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6393 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
6394 NULL for an empty pathname.
6396 2018-01-09 John Baldwin <jhb@FreeBSD.org>
6398 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
6399 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
6400 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6401 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6402 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
6403 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
6404 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
6405 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
6406 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
6407 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
6408 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
6409 (fbsd_core_fetch_timeval, fbsd_print_sigset)
6410 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
6411 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
6412 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
6414 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
6416 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
6417 (gnu_xfer_auxv): New function.
6418 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
6421 2018-01-08 Yao Qi <yao.qi@linaro.org>
6422 Simon Marchi <simon.marchi@ericsson.com>
6424 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
6426 (COMMON_OBS): Remove selftest.o.
6427 * configure.ac: Append selftest-arch.c and common/selftest.c to
6428 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
6429 * configure: Re-generated.
6430 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
6432 (maintenance_info_selftests): Likewise.
6434 2018-01-08 Xavier Roirand <roirand@adacore.com>
6436 * ada-valprint.c (val_print_packed_array_elements): Use
6437 proper number of elements when printing an array indexed
6438 by an enumeration type.
6440 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6442 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
6443 (dw2_get_file_names_reader): Adjust.
6444 (lookup_dwo_signatured_type): Adjust.
6445 (lookup_dwp_signatured_type): Adjust.
6446 (lookup_signatured_type): Adjust.
6447 (create_type_unit_group): Adjust.
6448 (get_type_unit_group): Adjust.
6449 (process_psymtab_comp_unit_reader): Adjust.
6450 (build_type_psymtabs_reader): Adjust.
6451 (scan_partial_symbols): Adjust.
6452 (add_partial_symbol): Adjust.
6453 (add_partial_subprogram): Adjust.
6454 (peek_die_abbrev): Adjust.
6455 (fixup_go_packaging): Adjust.
6456 (process_imported_unit_die): Adjust.
6457 (dwarf2_compute_name): Adjust.
6458 (dwarf2_physname): Adjust.
6459 (read_import_statement): Adjust.
6460 (handle_DW_AT_stmt_list): Adjust.
6461 (read_file_scope): Adjust.
6462 (read_func_scope): Adjust.
6463 (read_lexical_block_scope): Adjust.
6464 (read_call_site_scope): Adjust.
6465 (read_variable): Adjust.
6466 (dwarf2_rnglists_process): Adjust.
6467 (dwarf2_ranges_process): Adjust.
6468 (dwarf2_ranges_read): Adjust.
6469 (dwarf2_get_pc_bounds): Adjust.
6470 (dwarf2_record_block_ranges): Adjust.
6471 (dwarf2_add_field): Adjust.
6472 (dwarf2_add_member_fn): Adjust.
6473 (read_structure_type): Adjust.
6474 (process_structure_scope): Adjust.
6475 (read_enumeration_type): Adjust.
6476 (read_array_type): Adjust.
6477 (mark_common_block_symbol_computed): Adjust.
6478 (read_common_block): Adjust.
6479 (read_namespace_type): Adjust.
6480 (read_namespace): Adjust.
6481 (read_module_type): Adjust.
6482 (read_tag_pointer_type): Adjust.
6483 (read_tag_ptr_to_member_type): Adjust.
6484 (read_tag_string_type): Adjust.
6485 (read_subroutine_type): Adjust.
6486 (read_typedef): Adjust.
6487 (read_base_type): Adjust.
6488 (attr_to_dynamic_prop): Adjust.
6489 (read_subrange_type): Adjust.
6490 (read_unspecified_type): Adjust.
6491 (dwarf2_read_abbrevs): Adjust.
6492 (load_partial_dies): Adjust.
6493 (read_partial_die): Adjust.
6494 (find_partial_die): Adjust.
6495 (guess_partial_die_structure_name): Adjust.
6496 (fixup_partial_die): Adjust.
6497 (read_attribute_value): Adjust.
6498 (read_addr_index): Adjust.
6499 (read_addr_index_from_leb128): Adjust.
6500 (read_str_index): Adjust.
6501 (dwarf2_string_attr): Adjust.
6502 (get_debug_line_section): Adjust.
6503 (dwarf_decode_line_header): Adjust.
6504 (lnp_state_machine::check_line_address): Adjust.
6505 (dwarf_decode_lines_1): Adjust.
6506 (dwarf_decode_lines): Adjust.
6507 (dwarf2_start_symtab): Adjust.
6508 (var_decode_location): Adjust.
6509 (new_symbol_full): Adjust.
6510 (dwarf2_const_value_data): Adjust.
6511 (dwarf2_const_value_attr): Adjust.
6512 (dwarf2_const_value): Adjust.
6514 (die_containing_type): Adjust.
6515 (build_error_marker_type): Adjust.
6516 (lookup_die_type): Adjust.
6517 (guess_full_die_structure_name): Adjust.
6518 (anonymous_struct_prefix): Adjust.
6519 (determine_prefix): Adjust.
6520 (dwarf2_name): Adjust.
6521 (follow_die_ref_or_sig): Adjust.
6522 (follow_die_offset): Adjust.
6523 (follow_die_ref): Adjust.
6524 (follow_die_sig_1): Adjust.
6525 (follow_die_sig): Adjust.
6526 (get_signatured_type): Adjust.
6527 (get_DW_AT_signature_type): Adjust.
6528 (decode_locdesc): Adjust.
6529 (dwarf_decode_macros): Adjust.
6530 (cu_debug_loc_section): Adjust.
6531 (fill_in_loclist_baton): Adjust.
6532 (dwarf2_symbol_mark_computed): Adjust.
6533 (init_one_comp_unit): Don't assign
6534 dwarf2_cu::dwarf2_per_objfile.
6535 (set_die_type): Adjust.
6537 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6539 * dwarf2read.c (struct mapped_debug_names): Add constructor.
6540 <dwarf2_per_objfile>: New field.
6541 (dwarf2_per_objfile): Remove global.
6542 (get_dwarf2_per_objfile): New function.
6543 (set_dwarf2_per_objfile): New function.
6544 (dwarf2_build_psymtabs_hard): Change objfile parameter to
6546 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6547 (read_abbrev_offset): Likewise.
6548 (read_indirect_string): Likewise.
6549 (read_indirect_line_string): Likewise.
6550 (read_indirect_string_at_offset): Likewise.
6551 (read_indirect_string_from_dwz): Likewise.
6552 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6554 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6555 (create_all_comp_units): Change objfile parameter to
6557 (create_all_type_units): Likewise.
6558 (process_queue): Add dwarf2_per_objfile parameter.
6559 (read_and_check_comp_unit_head): Likewise.
6560 (lookup_dwo_unit_in_dwp): Likewise.
6561 (get_dwp_file): Likewise.
6562 (process_cu_includes): Likewise.
6563 (struct free_dwo_file_cleanup_data): New struct.
6564 (dwarf2_has_info): Use get_dwarf2_per_objfile and
6565 set_dwarf2_per_objfile.
6566 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6567 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6568 context, adjust calls.
6569 (dw2_instantiate_symtab): Likewise.
6570 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6571 (dw2_get_cu): Likewise.
6572 (create_cu_from_index_list): Change objfile parameter to
6574 (create_cus_from_index_list): Get dwarf2_per_objfile from
6575 context, adjust calls.
6576 (create_cus_from_index): Likewise.
6577 (create_signatured_type_table_from_index): Change objfile
6578 parameter to dwarf2_per_objfile.
6579 (create_signatured_type_table_from_debug_names): Change objfile
6580 parameter to dwarf2_per_objfile.
6581 (create_addrmap_from_index): Likewise.
6582 (create_addrmap_from_aranges): Likewise.
6583 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6584 (dw2_setup): Remove.
6585 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6587 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6588 get_dwarf2_per_objfile.
6589 (dw2_forget_cached_source_info): Likewise.
6590 (dw2_map_symtabs_matching_filename): Likewise.
6591 (struct dw2_symtab_iterator) <index>: Remove.
6592 <dwarf2_per_objfile>: New field.
6593 (dw2_symtab_iter_init): Replace index parameter with
6595 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6596 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6597 (dw2_print_stats): Likewise.
6598 (dw2_dump): Likewise.
6599 (dw2_expand_symtabs_for_function): Likewise.
6600 (dw2_expand_all_symtabs): Likewise.
6601 (dw2_expand_symtabs_with_fullname): Likewise.
6602 (dw2_expand_marked_cus): Replace index and objfile parameters
6603 with dwarf2_per_objfile.
6604 (dw_expand_symtabs_matching_file_matcher): Add
6605 dwarf2_per_objfile parameter and adjust calls.
6606 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6608 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6609 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6611 (create_cus_from_debug_names_list): Replace objfile parameter
6612 with dwarf2_per_objfile and adjust calls.
6613 (create_cus_from_debug_names): Likewise.
6614 (dwarf2_read_debug_names): Likewise.
6615 (mapped_debug_names::namei_to_name): Adjust call.
6616 (dw2_debug_names_iterator::next): Likewise.
6617 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6618 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6619 (dw2_debug_names_dump): Likewise.
6620 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6621 (dw2_debug_names_expand_symtabs_matching): Likewise.
6622 (dwarf2_initialize_objfile): Likewise.
6623 (dwarf2_build_psymtabs): Likewise.
6624 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6626 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6627 (read_and_check_comp_unit_head): Likewise.
6628 (read_abbrev_offset): Likewise.
6629 (create_debug_type_hash_table): Likewise.
6630 (create_debug_types_hash_table): Likewise.
6631 (create_all_type_units): Replace objfile parameter with
6633 (add_type_unit): Add dwarf2_per_objfile parameter.
6634 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6635 with dwarf2_per_objfile.
6636 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6637 (lookup_dwp_signatured_type): Likewise.
6638 (lookup_signatured_type): Likewise.
6639 (read_cutu_die_from_dwo): Likewise.
6640 (init_tu_and_read_dwo_dies): Likewise.
6641 (init_cutu_and_read_dies): Likewise.
6642 (init_cutu_and_read_dies_no_follow): Likewise.
6643 (allocate_type_unit_groups_table): Add objfile parameter.
6644 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6645 (get_type_unit_group): Likewise.
6646 (process_psymtab_comp_unit): Update call.
6647 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6648 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6649 (print_tu_stats): Likewise.
6650 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6652 (build_type_psymtabs): Change objfile parameter to
6654 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6655 passed in void* parameter.
6656 (process_skeletonless_type_units): Change objfile parameter to
6658 (set_partial_user): Likewise.
6659 (dwarf2_build_psymtabs_hard): Likewise.
6660 (read_comp_units_from_section): Likewise.
6661 (create_all_comp_units): Likewise.
6662 (scan_partial_symbols): Update calls.
6663 (add_partial_symbol): Likewise.
6664 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6665 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6666 (process_queue): Add dwarf2_per_objfile parameter.
6667 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6668 (compute_compunit_symtab_includes): Likewise.
6669 (process_cu_includes): Add dwarf2_per_objfile parameter.
6670 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6671 (process_full_type_unit): Likewise.
6672 (process_imported_unit_die): Update call.
6673 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6674 (read_file_scope): Likewise.
6675 (allocate_dwo_file_hash_table): Add objfile parameter.
6676 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6677 (create_cus_hash_table): Likewise.
6678 (create_dwp_hash_table): Likewise.
6679 (create_dwo_unit_in_dwp_v1): Likewise.
6680 (create_dwp_v2_section): Likewise.
6681 (create_dwo_unit_in_dwp_v2): Likewise.
6682 (lookup_dwo_unit_in_dwp): Likewise.
6683 (try_open_dwop_file): Likewise.
6684 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6685 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6686 cleanup to include a reference to dwarf2_per_objfile.
6687 (open_dwp_file): Add dwarf2_per_objfile parameter.
6688 (open_and_init_dwp_file): Likewise.
6689 (get_dwp_file): Likewise.
6690 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6691 (queue_and_load_all_dwo_tus): Update call.
6692 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6694 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6695 (dwarf2_ranges_process): Likewise.
6696 (dwarf2_get_pc_bounds): Likewise.
6697 (mark_common_block_symbol_computed): Likewise.
6698 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6699 (dwarf2_read_abbrevs): Update call.
6700 (read_partial_die): Use dwarf2_per_objfile from cu.
6701 (find_partial_die): Likewise.
6702 (fixup_partial_die): Likewise.
6703 (read_attribute_value): Likewise.
6704 (read_indirect_string_at_offset_from): Add objfile parameter.
6705 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6707 (read_indirect_string_from_dwz): Add objfile parameter.
6708 (read_indirect_string): Add objfile parameter.
6709 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6710 (read_addr_index): Use dwarf2_per_objfile from cu.
6711 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6713 (read_str_index): Use dwarf2_per_objfile from cu.
6714 (get_debug_line_section): Likewise.
6715 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6716 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6717 (new_symbol_full): Use dwarf2_per_objfile from cu.
6718 (build_error_marker_type): Likewise.
6719 (lookup_die_type): Likewise.
6720 (determine_prefix): Likewise.
6721 (follow_die_offset): Likewise.
6722 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6723 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6724 (dwarf2_fetch_die_type_sect_off): Likewise.
6725 (dwarf2_get_die_type): Likewise.
6726 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6727 (get_signatured_type): Likewise.
6728 (get_DW_AT_signature_type): Likewise.
6729 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6730 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6731 (cu_debug_loc_section): Likewise.
6732 (fill_in_loclist_baton): Likewise.
6733 (dwarf2_symbol_mark_computed): Likewise.
6734 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6736 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6738 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6739 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6740 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6741 (set_die_type): Use dwarf2_free_objfile from cu.
6742 (get_die_type_at_offset): Likewise.
6743 (dwarf2_per_objfile_free): Don't assign global variable.
6744 (debug_names) <constructor>: Add dwarf2_per_objfile
6745 parameter, update m_debugstrlookup construction.
6746 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6748 <m_dwarf2_per_objfile>: New field.
6749 <lookup>: Use m_dwarf2_per_objfile.
6750 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6751 (psyms_seen_size): Likewise.
6752 (write_gdbindex): Replace objfile parameter with
6754 (write_debug_names): Likewise.
6755 (write_psymtabs_to_index): Likewise.
6756 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6759 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6761 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6762 <dwarf2_per_objfile>: New field.
6763 (struct dwarf2_per_cu_data) <objfile>: Remove.
6764 <dwarf2_per_objfile>: New field.
6765 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6767 (create_signatured_type_table_from_index): Likewise.
6768 (create_debug_type_hash_table): Likewise.
6769 (fill_in_sig_entry_from_dwo_entry): Likewise.
6770 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6771 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6773 (create_partial_symtab): Access objfile through
6775 (process_psymtab_comp_unit_reader): Likewise.
6776 (read_comp_units_from_section): Likewise.
6777 (scan_partial_symbols): Likewise.
6778 (add_partial_symbol): Likewise.
6779 (add_partial_subprogram): Likewise.
6780 (peek_die_abbrev): Likewise.
6781 (fixup_go_packaging): Likewise.
6782 (process_full_comp_unit): Likewise.
6783 (process_full_type_unit): Likewise.
6784 (process_imported_unit_die): Likewise.
6785 (dwarf2_compute_name): Likewise.
6786 (dwarf2_physname): Likewise.
6787 (read_import_statement): Likewise.
6788 (create_cus_hash_table): Assign dwarf2_physname instead of
6790 (read_func_scope): Access objfile through dwarf2_per_objfile.
6791 (read_lexical_block_scope): Likewise.
6792 (read_call_site_scope): Likewise.
6793 (read_variable): Likewise.
6794 (dwarf2_rnglists_process): Likewise.
6795 (dwarf2_ranges_process): Likewise.
6796 (dwarf2_ranges_read): Likewise.
6797 (dwarf2_record_block_ranges): Likewise.
6798 (dwarf2_add_field): Likewise.
6799 (dwarf2_add_member_fn): Likewise.
6800 (read_structure_type): Likewise.
6801 (process_structure_scope): Likewise.
6802 (read_enumeration_type): Likewise.
6803 (read_array_type): Likewise.
6804 (read_common_block): Likewise.
6805 (read_namespace_type): Likewise.
6806 (read_namespace): Likewise.
6807 (read_module_type): Likewise.
6808 (read_tag_pointer_type): Likewise.
6809 (read_tag_ptr_to_member_type): Likewise.
6810 (read_tag_string_type): Likewise.
6811 (read_subroutine_type): Likewise.
6812 (read_typedef): Likewise.
6813 (read_base_type): Likewise.
6814 (attr_to_dynamic_prop): Likewise.
6815 (read_subrange_type): Likewise.
6816 (read_unspecified_type): Likewise.
6817 (load_partial_dies): Likewise.
6818 (read_partial_die): Likewise.
6819 (find_partial_die): Likewise.
6820 (guess_partial_die_structure_name): Likewise.
6821 (fixup_partial_die): Likewise.
6822 (read_attribute_value): Likewise.
6823 (read_addr_index_from_leb128): Likewise.
6824 (dwarf2_read_addr_index): Likewise.
6825 (dwarf2_string_attr): Likewise.
6826 (lnp_state_machine::check_line_address): Likewise.
6827 (dwarf_decode_lines_1): Likewise.
6828 (dwarf_decode_lines): Likewise.
6829 (dwarf2_start_symtab): Likewise.
6830 (var_decode_location): Likewise.
6831 (new_symbol_full): Likewise.
6832 (dwarf2_const_value_data): Likewise.
6833 (dwarf2_const_value_attr): Likewise.
6834 (dwarf2_const_value): Likewise.
6835 (die_type): Likewise.
6836 (die_containing_type): Likewise.
6837 (lookup_die_type): Likewise.
6838 (guess_full_die_structure_name): Likewise.
6839 (anonymous_struct_prefix): Likewise.
6840 (dwarf2_name): Likewise.
6841 (follow_die_ref_or_sig): Likewise.
6842 (follow_die_offset): Likewise.
6843 (follow_die_ref): Likewise.
6844 (dwarf2_fetch_die_loc_sect_off): Likewise.
6845 (dwarf2_fetch_constant_bytes): Likewise.
6846 (dwarf2_fetch_die_type_sect_off): Likewise.
6847 (dwarf2_get_die_type): Likewise.
6848 (follow_die_sig): Likewise.
6849 (decode_locdesc): Likewise.
6850 (dwarf2_per_cu_objfile): Likewise.
6851 (dwarf2_per_cu_text_offset): Likewise.
6852 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6854 (set_die_type): Access objfile through
6857 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6859 * valprint.c (converted_character_d): Remove typedef.
6860 (DEF_VEC_O (converted_character_d)): Remove.
6861 (count_next_character): Use std::vector.
6862 (print_converted_chars_to_obstack): Likewise.
6863 (generic_printstr): Likewise.
6865 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6867 * xml-support.h (struct gdb_xml_value): Add constructor.
6868 <value>: Change type to unique_xmalloc_ptr.
6869 (gdb_xml_value_s): Remove typedef.
6870 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6871 (gdb_xml_element_start_handler): Change parameter type to
6873 (xml_find_attribute): Likewise.
6874 * xml-support.c (xml_find_attribute): Change parameter type to
6875 std::vector and adjust.
6876 (gdb_xml_values_cleanup): Remove.
6877 (gdb_xml_parser::start_element): Adjust to std::vector.
6878 (xinclude_start_include): Change paraeter type to std::vector
6880 * btrace.c (check_xml_btrace_version): Likewise.
6881 (parse_xml_btrace_block): Likewise.
6882 (parse_xml_btrace_pt_config_cpu): Likewise.
6883 (parse_xml_btrace_pt): Likewise.
6884 (parse_xml_btrace_conf_bts): Likewise.
6885 (parse_xml_btrace_conf_pt): Likewise.
6886 * memory-map.c (memory_map_start_memory): Likewise.
6887 (memory_map_start_property): Likewise.
6888 * osdata.c (osdata_start_osdata): Likewise.
6889 (osdata_start_item): Likewise.
6890 (osdata_start_column): Likewise.
6891 * remote.c (start_thread): Likewise.
6892 * solib-aix.c (library_list_start_library): Likewise.
6893 (library_list_start_list): Likewise.
6894 * solib-svr4.c (library_list_start_library): Likewise.
6895 (svr4_library_list_start_list): Likewise.
6896 * solib-target.c (library_list_start_segment): Likewise.
6897 (library_list_start_section): Likewise.
6898 (library_list_start_library): Likewise.
6899 (library_list_start_list): Likewise.
6900 * tracepoint.c (traceframe_info_start_memory): Likewise.
6901 (traceframe_info_start_tvar): Likewise.
6902 * xml-syscall.c (syscall_start_syscall): Likewise.
6903 * xml-tdesc.c (tdesc_start_target): Likewise.
6904 (tdesc_start_feature): Likewise.
6905 (tdesc_start_reg): Likewise.
6906 (tdesc_start_union): Likewise.
6907 (tdesc_start_struct): Likewise.
6908 (tdesc_start_flags): Likewise.
6909 (tdesc_start_enum): Likewise.
6910 (tdesc_start_field): Likewise.
6911 (tdesc_start_enum_value): Likewise.
6912 (tdesc_start_vector): Likewise.
6914 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6916 * extension.h (struct xmethod_worker) <clone>: Remove.
6917 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6919 (python_xmethod_worker::clone): Remove.
6920 * valops.c (find_overload_match): Use std::move instead of
6923 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6925 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6926 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6927 <free_xmethod_worker_data>: Remove.
6928 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6929 <get_xmethod_arg_types>: Remove.
6930 <get_xmethod_result_type>: Remove.
6931 <invoke_xmethod>: Remove.
6932 * extension.c (new_xmethod_worker): Remove.
6933 (clone_xmethod_worker): Remove.
6934 (get_matching_xmethod_workers): Return void, pass std::vector by
6936 (get_xmethod_arg_types): Rename to...
6937 (xmethod_worker::get_arg_types): ... this, and adjust.
6938 (get_xmethod_result_type): Rename to...
6939 (xmethod_worker::get_result_type): ... this, and adjust.
6940 (invoke_xmethod): Remove.
6941 (free_xmethod_worker): Remove.
6942 (free_xmethod_worker_vec): Remove.
6943 * extension.h (enum ext_lang_rc): Move here from
6945 (struct xmethod_worker): Add constructor and destructor.
6948 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6949 virtual pure methods.
6950 <get_arg_types, get_result_type>: New methods.
6951 (xmethod_worker_ptr): Remove typedef.
6952 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6953 (xmethod_worker_vec): Remove typedef.
6954 (xmethod_worker_up): New typedef.
6955 (invoke_xmethod): Remove.
6956 (clone_xmethod_worker): Remove.
6957 (free_xmethod_worker): Remove.
6958 (free_xmethod_worker_vec): Remove.
6959 (get_xmethod_arg_types): Remove.
6960 (get_xmethod_result_type): Remove.
6961 * valops.c (find_method_list): Use std::vector, don't use
6962 intermediate vector.
6963 (value_find_oload_method_list): Use std::vector.
6964 (find_overload_match): Use std::vector.
6965 (find_oload_champ): Use std::vector.
6966 * value.c (value_free): Use operator delete.
6967 (value_of_xmethod): Rename to...
6968 (value_from_xmethod): ... this. Don't assign
6969 xmethod_worker::value, take rvalue-reference.
6970 (result_type_of_xmethod): Adjust.
6971 (call_xmethod): Adjust.
6972 * value.h: Include extension.h.
6973 (struct xmethod_worker): Don't forward-declare.
6974 (value_of_xmethod): Rename to...
6975 (value_from_xmethod): ... this, take rvalue-reference.
6976 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6977 (struct python_xmethod_worker): ... this, add constructor and
6979 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6980 (gdbpy_free_xmethod_worker_data): Rename to...
6981 (python_xmethod_worker::~python_xmethod_worker): ... this and
6983 (gdbpy_clone_xmethod_worker_data): Rename to...
6984 (python_xmethod_worker::clone): ... this and adjust.
6985 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6987 (gdbpy_get_xmethod_arg_types): Rename to...
6988 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6989 (gdbpy_get_xmethod_result_type): Rename to...
6990 (python_xmethod_worker::do_get_result_type): ... this and
6992 (gdbpy_invoke_xmethod): Rename to...
6993 (python_xmethod_worker::invoke): ... this and adjust.
6994 (new_python_xmethod_worker): Rename to...
6995 (python_xmethod_worker::python_xmethod_worker): ... this and
6997 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6999 (gdbpy_free_xmethod_worker_data): Remove.
7000 (gdbpy_get_matching_xmethod_workers): Use std::vector.
7001 (gdbpy_get_xmethod_arg_types): Remove.
7002 (gdbpy_get_xmethod_result_type): Remove.
7003 (gdbpy_invoke_xmethod): Remove.
7004 * python/python.c (python_extension_ops): Remove obsolete
7007 2018-01-05 Pedro Alves <palves@redhat.com>
7010 * common/signals-state-save-restore.c
7011 (save_original_signals_state): New parameter 'quiet'. Warn if we
7012 find a custom handler preinstalled, instead of internal erroring.
7013 But only warn if !quiet.
7014 * common/signals-state-save-restore.h
7015 (save_original_signals_state): New parameter 'quiet'.
7016 * main.c (captured_main_1): Move save_original_signals_state call
7017 after option handling, and pass QUIET.
7019 2018-01-05 Pedro Alves <palves@redhat.com>
7021 * spu-tdep.c (spu_catch_start): Pass
7022 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
7024 2018-01-05 Pedro Alves <palves@redhat.com>
7027 * ada-lang.c (literal_symbol_name_matcher): New function.
7028 (ada_get_symbol_name_matcher): Use it for
7029 symbol_name_match_type::SEARCH_NAME.
7030 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
7031 it down instead of assuming symbol_name_match_type::FULL.
7032 * block.h (block_lookup_symbol): New parameter 'match_type'.
7033 * c-valprint.c (print_unpacked_pointer): Use
7034 lookup_symbol_search_name instead of lookup_symbol.
7035 * compile/compile-object-load.c (get_out_value_type): Pass down
7036 symbol_name_match_type::SEARCH_NAME.
7037 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
7038 symbol_name_match_type::FULL.
7039 * cp-support.c (cp_get_symbol_name_matcher): Handle
7040 symbol_name_match_type::SEARCH_NAME.
7041 * infrun.c (insert_exception_resume_breakpoint): Use
7042 lookup_symbol_search_name.
7043 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
7044 * psymtab.c (maintenance_check_psymtabs): Use
7045 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
7046 * stack.c (print_frame_args): Use lookup_symbol_search_name and
7048 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
7049 if symbol_name_match_type::SEARCH_NAME.
7050 (lookup_symbol_in_language): Pass down
7051 symbol_name_match_type::FULL.
7052 (lookup_symbol_search_name): New.
7053 (lookup_language_this): Pass down
7054 symbol_name_match_type::SEARCH_NAME.
7055 (lookup_symbol_aux, lookup_local_symbol): New parameter
7056 'match_type'. Pass it down.
7057 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
7058 (lookup_symbol_search_name): New declaration.
7059 (lookup_symbol_in_block): New 'match_type' parameter.
7061 2018-01-05 Pedro Alves <palves@redhat.com>
7064 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7066 (ada_lookup_symbol): Reimplement in terms of
7067 ada_lookup_symbol_list, bits factored out from
7068 ada_lookup_encoded_symbol.
7070 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7072 * ada-exp.y (write_object_renaming): When subscripting an array
7073 using a symbol as the index, pass the block in call to
7074 ada_lookup_encoded_symbol when looking that symbol up.
7076 2018-01-05 Jerome Guitton <guitton@adacore.com>
7078 * ada-lang.c (ada_array_length): Use ada_index_type instead of
7081 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7083 * ada-lang.c (ada_to_fixed_value_create): Add handling of
7084 the case where VALUE_LVAL (val0) is not lval_memory.
7086 2018-01-05 Xavier Roirand <roirand@adacore.com>
7088 * ada-valprint.c (print_optional_low_bound): Handle
7089 character-indexed array printing like boolean-indexed array
7092 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7094 * NEWS: Create a new section for the next release branch.
7095 Rename the section of the current branch, now that it has
7098 2018-01-05 Joel Brobecker <brobecker@adacore.com>
7100 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7101 * version.in: Bump version to 8.1.50.DATE-git.
7103 2018-01-03 Xavier Roirand <roirand@adacore.com>
7105 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7107 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7109 (default_exception_support_info) <catch_handlers_sym>: Add field.
7110 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7111 (ada_exception_name_addr_1): Add "catch handlers" handling.
7112 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7114 (create_excep_cond_exprs) <ex>: Add parameter.
7115 (re_set_exception): Update create_excep_cond_exprs call.
7116 (print_it_exception, print_one_exception, print_mention_exception)
7117 (print_recreate_exception): Add "catch handler" handling.
7118 (allocate_location_catch_handlers, re_set_catch_handlers)
7119 (check_status_catch_handlers, print_it_catch_handlers)
7120 (print_one_catch_handlers, print_mention_catch_handlers)
7121 (print_recreate_catch_handlers): New function.
7122 (catch_handlers_breakpoint_ops): New variable.
7123 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7124 Add parameter. Add "catch handler" handling.
7125 (ada_exception_sym_name, ada_exception_breakpoint_ops):
7126 Add "catch handler" handling.
7127 (ada_exception_catchpoint_cond_string): Add "catch handler"
7129 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7131 (catch_ada_handlers_command): New function.
7132 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7133 operations structure.
7134 (_initialize_ada_language): Add "catch handlers" command entry.
7135 * NEWS: Document "catch handlers" feature.
7137 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7139 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7140 account when creating the array type of the slice.
7141 (ada_value_slice): Likewise.
7143 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7145 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7147 (create_array_type_with_stride): Add byte_stride_prop parameter.
7148 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7149 New parameter. Update all callers in this file.
7150 (array_type_has_dynamic_stride): New function.
7151 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7152 of arrays with dynamic byte strides.
7153 * dwarf2read.c (read_array_type): Add support for dynamic
7154 DW_AT_byte_stride attributes.
7156 2018-01-02 Joel Brobecker <brobecker@adacore.com>
7158 * dwarf2read.c (read_unspecified_type): Treat
7159 DW_TAG_enumeration_type DIEs from Ada units as stubs.
7161 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7163 Update copyright year range in all GDB files.
7165 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7167 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
7168 and gdb/testsuite/gdb.base/step-line.c.
7170 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7172 * copyright.py (main): Dump the contents of
7173 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
7174 even if BY_HAND is empty.
7176 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7178 * top.c (print_gdb_version): Update Copyright year in version
7181 2018-01-01 Joel Brobecker <brobecker@adacore.com>
7183 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
7185 For older changes see ChangeLog-2017.
7191 version-control: never