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