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