remote: Move discard_pending_stop_replies call
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
9607784a
PA
12018-05-22 Pedro Alves <palves@redhat.com>
2
3 * remote.c (remote_target::mourn_inferior): Move
4 discard_pending_stop_replies call here from ...
5 (_initialize_remote): ... here.
6
0e9a6b2f
PA
72018-05-22 Pedro Alves <palves@redhat.com>
8
9 * remote.c (compare_section_command): Remove set_general_process
10 call.
11
43c3a0e4
PA
122018-05-22 Pedro Alves <palves@redhat.com>
13
14 * remote.c (struct packet_reg, struct remote_arch_state):
15 Move higher up in the file.
16 (remote_state) <m_arch_states>: Store remote_arch_state values
17 instead of remote_arch_state pointers.
18 (remote_state::get_remote_arch_state): Adjust.
19
9d6eea31
PA
202018-05-22 Pedro Alves <palves@redhat.com>
21
22 * remote.c: Include <unordered_map>.
23 (remote_state): Now a class.
24 (remote_state) <get_remote_arch_state>: Declare method.
25 <get_remote_arch_state>: New field.
26 (remote_arch_state) <remote_arch_state>: Declare ctor.
27 <regs>: Now a unique_ptr.
28 (remote_gdbarch_data_handle): Delete.
29 (get_remote_arch_state): Delete.
30 (remote_state::get_remote_arch_state): New.
31 (get_remote_state): Adjust to call remote_state's
32 get_remote_arch_state method.
33 (init_remote_state): Delete, bits factored out to ...
34 (remote_arch_state::remote_arch_state): ... this new method.
35 (get_remote_packet_size, get_memory_packet_size)
36 (process_g_packet, remote_target::fetch_registers)
37 (remote_target::prepare_to_store, store_registers_using_G)
38 (remote_target::store_registers, remote_target::get_trace_status):
39 Adjust to call remote_state's method.
40 (_initialize_remote): Remove reference to
41 remote_gdbarch_data_handle.
42
dd194f6b
PA
432018-05-22 Pedro Alves <palves@redhat.com>
44
45 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
46 pread>: New method declarations.
47 (remote_target::open_1): Adjust.
48 (readahead_cache_invalidate): Rename to ...
49 (readahead_cache::invalidate): ... this, and adjust to be a class
50 method.
51 (readahead_cache_invalidate_fd): Rename to ...
52 (readahead_cache::invalidate_fd): ... this, and adjust to be a
53 class method.
54 (remote_hostio_pwrite): Adjust.
55 (remote_hostio_pread_from_cache): Rename to ...
56 (readahead_cache::pread): ... this, and adjust to be a class
57 method.
58 (remote_hostio_close): Adjust.
59
440b7aec
PA
602018-05-22 Pedro Alves <palves@redhat.com>
61
62 * remote.c (remote_hostio_close_cleanup): Delete.
63 (class scoped_remote_fd): New.
64 (remote_file_put, remote_file_get): Use it.
65
de44f5a7
PA
662018-05-22 Pedro Alves <palves@redhat.com>
67
68 (struct vCont_action_support): Use bool and initialize all fields.
69 (struct readahead_cache): Initialize all fields.
70 (remote_state): Use bool and initialize all fields.
71 (remote_state::remote_state, remote_state::~remote_state): New.
72 (new_remote_state): Delete.
73 (_initialize_remote): Use new to allocate remote_state.
74
b1b60145
PA
752018-05-22 Pedro Alves <palves@redhat.com>
76 張俊芝 <zjz@zjz.name>
77
78 PR gdb/22973
79 * c-exp.y: Include "c-support.h".
80 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
81 of tolower. Use c_ident_is_alpha to scan names.
82 * c-lang.c: Include "c-support.h".
83 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
84 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
85 * c-support.h: New file, with bits factored out from ...
86 * cp-name-parser.y: ... this file.
87 Include "c-support.h".
88 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
89 c-support.h and renamed.
90 (symbol_end, yylex): Adjust.
91
0ec848ad
PFC
922018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
93
94 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
95 parameter type to CORE_ADDR.
96 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
97 parameter type in declaration to CORE_ADDR.
98 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
99 target_auxv_search to get AT_HWCAP and use the result to get the
100 target description.
101 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
102 to CORE_ADDR. Remove the cast of the return value to unsigned
103 long. Fix error predicate of target_auxv_search.
104 (ppc_linux_nat_target::read_description): Change the type of the
105 hwcap variable to CORE_ADDR.
106
0fb2aaa1
PFC
1072018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
108
109 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
110 if the size of fpscr is larger than 32 bits.
111
2c3305f6
PFC
1122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
113
114 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
115 (ppc32_linux_vsxregmap): New global.
116 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
117 regcache_supply_regset, and regcache_collect_regset.
118 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
119 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
120 (fetch_vsx_register, store_vsx_register): Remove.
121 (fetch_vsx_registers): Add regno parameter. Get regset using
122 ppc_linux_vsxregset. Use regset to supply registers.
123 (store_vsx_registers): Add regno parameter. Get regset using
124 ppc_linux_vsxregset. Use regset to collect registers.
125 (fetch_register): Call fetch_vsx_registers instead of
126 fetch_vsx_register.
127 (store_register): Call store_vsx_registers instead of
128 store_vsx_register.
129 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
130 new regno parameter.
131 (store_ppc_registers): Call store_vsx_registers with -1 for the
132 new regno parameter.
133 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
134 (ppc_collect_vsxregset): Remove.
135
1d75a658
PFC
1362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
137
138 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
139 offset fields.
140 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
141 for vector register offset fields.
142 (ppc64_fbsd_reg_offsets): Likewise.
143 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
144 to vector register offset fields.
145 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
146 to vector register offset fields.
147 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
148 vector register offset fields.
149 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
150 initializers for vector register offset fields.
151 (rs6000_aix64_reg_offsets): Likewise.
152 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
153 (ppc_supply_vrregset): Remove.
154 (ppc_collect_vrregset): Remove.
155 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
156 (ppc_linux_vrregset) : New function.
157 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
158 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
159 (ppc32_linux_vrregset): Remove.
160 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
161 and use result instead of ppc32_linux_vrregset.
162 (ppc32_linux_reg_offsets): Remove initializers for vector register
163 offset fields.
164 (ppc64_linux_reg_offsets): Likewise.
165 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
166 * ppc-linux-nat.c: Include regset.h.
167 (gdb_vrregset_t): Adjust comment to account for little-endian
168 mode.
169 (supply_vrregset, fill_vrregset): Remove.
170 (fetch_altivec_register, store_altivec_register): Remove.
171 (fetch_altivec_registers): Add regno parameter. Get regset using
172 ppc_linux_vrregset. Use regset to supply registers.
173 (store_altivec_registers): Add regno parameter. Get regset using
174 ppc_linux_vrregset. Use regset to collect registers.
175 (fetch_register): Call fetch_altivec_registers instead of
176 fetch_altivec_register.
177 (store_register): Call store_altivec_registers instead of
178 store_altivec_register.
179 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
180 the new regno parameter.
181 (store_ppc_registers): Call store_altivec_registers with -1 for
182 the new regno parameter.
183
d078308a
PFC
1842018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
185
186 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
187 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
188 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
189 (gdb_vrregset_t): Change array type size to
190 PPC_LINUX_SIZEOF_VRREGSET.
191 (gdb_vsxregset_t): Change array type size to
192 PPC_LINUX_SIZEOF_VSXREGSET.
193 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
194 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
195 PPC_LINUX_SIZEOF_VSXREGSET.
196
2e077f5e
PFC
1972018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
198
199 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
200 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
201 nat/ppc-linux.c.
202 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
203 ppc_linux_target_wordsize with tid.
204 (ppc_linux_nat_target::read_description): Call ppc_linux_target
205 wordsize with tid.
206 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
207 (ppc64_64bit_inferior_p): Add static and inline specifiers.
208 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
209 tid parameter. Remove static specifier.
210 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
211 (ppc_linux_target_wordsize): New declaration.
212
bd64614e
PFC
2132018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
214
215 * arch/ppc-linux-common.c: New file.
216 * arch/ppc-linux-common.h: New file.
217 * arch/ppc-linux-tdesc.h: New file.
218 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
219 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
220 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
221 arch/ppc-linux-tdesc.h.
222 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
223 arch/ppc-linux-tdesc.h.
224 (ppc_linux_nat_target::read_description): Remove target
225 description matching code. Fill a ppc_linux_features struct and
226 call ppc_linux_match_description with it. Move comment about ISA
227 2.05 to ppc-linux-common.c.
228 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
229 arch/ppc-linux-tdesc.h.
230 (ppc_linux_core_read_description): Remove target description
231 matching code. Fill a ppc_linux_features struct and call
232 ppc_linux_match_description with it.
233 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
234 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
235 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
236 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
237 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
238 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
239 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
240 (tdesc_powerpc_e500l): Remove.
241
241db429
JB
2422018-05-22 Joel Brobecker <brobecker@adacore.com>
243
244 * ada-lang.c (catch_assert_command): Pass empty string instead
245 of NULL for excep_string argument.
246
75d74cca
MR
2472018-05-22 Maciej W. Rozycki <macro@mips.com>
248
249 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
250 the width of the requested register exceeds the width of the
251 `ptrace' data type.
252
122b53ea
TT
2532018-05-21 Tom Tromey <tom@tromey.com>
254
255 * printcmd.c (output_command): Remove.
256 (output_command_const): Rename to output_command.
257 * valprint.h (output_command): Rename from output_command_const.
258 * tracepoint.c (trace_dump_actions): Call output_command.
259
bc18fbb5
TT
2602018-05-21 Tom Tromey <tom@tromey.com>
261
262 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
263 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
264 * ada-lang.h (create_ada_exception_catchpoint): Update.
265 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
266 std::string.
267 (create_excep_cond_exprs, ~ada_catchpoint)
268 (should_stop_exception, print_one_exception)
269 (print_mention_exception, print_recreate_exception): Update.
270 (ada_get_next_arg): Remove.
271 (catch_ada_exception_command_split): Use std::string. Change type
272 of "excep_string", "cond_string".
273 (catch_ada_exception_command): Update.
274 (create_ada_exception_catchpoint): Change type of excep_string.
275 (ada_exception_sal): Remove excep_string parameter.
276 (~ada_catchpoint): Remove.
277
790217f6
TT
2782018-05-21 Tom Tromey <tom@tromey.com>
279
280 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
281 cleanup.
282
6f46ac85
TT
2832018-05-21 Tom Tromey <tom@tromey.com>
284
285 * ada-lang.c (ada_exception_message_1, ada_exception_message):
286 Return unique_xmalloc_ptr.
287 (print_it_exception): Update.
288
15b6611c
TT
2892018-05-21 Tom Tromey <tom@tromey.com>
290
291 * tracepoint.c (trace_dump_actions): Use std::string.
292
c0c9f665
TT
2932018-05-21 Tom Tromey <tom@tromey.com>
294
295 * symfile.c (reread_symbols): Use std::string for original_name.
296
22ca247e
TT
2972018-05-21 Tom Tromey <tom@tromey.com>
298
299 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
300 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
301 constructor.
302
184cde75
SM
3032018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
304
305 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
306 instance to...
307 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
308 * objfiles.c (get_objfile_bfd_data): Allocate
309 objfile_per_bfd_storage with obstack_new when allocating on
310 obstack.
311
e39db4db
SM
3122018-05-20 Simon Marchi <simon.marchi@ericsson.com>
313
314 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
315 OBSTACK_ZALLOC.
316 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
317 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
318 * mdebugread.c (mdebug_build_psymtabs): Likewise.
319 (add_pending): Likewise.
320 (parse_symbol): Likewise.
321 (parse_partial_symbols): Likewise.
322 (psymtab_to_symtab_1): Likewise.
323 (new_psymtab): Likewise.
324 (elfmdebug_build_psymtabs): Likewise.
325 * minsyms.c (terminate_minimal_symbol_table): Likewise.
326 * objfiles.c (get_objfile_bfd_data): Likewise.
327 (objfile_register_static_link): Likewise.
328 * psymtab.c (allocate_psymtab): Likewise.
329 * stabsread.c (read_member_functions): Likewise.
330 * xcoffread.c (xcoff_end_psymtab): Likewise.
331
284a0e3c
SM
3322018-05-20 Simon Marchi <simon.marchi@ericsson.com>
333
334 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
335 compiler supports std::is_trivially_constructible.
336 * common/poison.h: Include obstack.h.
337 (IsMallocable): Define to is_trivially_constructible if the
338 compiler supports it, define to true_type otherwise.
339 (xobnew): New.
340 (XOBNEW): Redefine.
341 (xobnewvec): New.
342 (XOBNEWVEC): Redefine.
343 * gdb_obstack.h (obstack_zalloc): New.
344 (OBSTACK_ZALLOC): Redefine.
345 (obstack_calloc): New.
346 (OBSTACK_CALLOC): Redefine.
347 (obstack_new): New.
348 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
349 (gdbarch_obstack): New declaration in gdbarch.h, definition in
350 gdbarch.c.
351 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
352 obstack_calloc/obstack_zalloc.
353 (gdbarch_obstack_zalloc): Remove.
354 * target-descriptions.c (tdesc_data_init): Use obstack_new.
355
59f66be3
PW
3562018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
357
358 * stack.c (backtrace_command_1): Remove useless variable int i.
359
50c65c2d
PW
3602018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
361
362 * stack.c (print_frame_info): Fix comment.
363
7ff8cb8c
TT
3642018-05-18 Tom Tromey <tom@tromey.com>
365
366 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
367 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
368 (~dwarf2_per_objfile): Update
369 (dwarf2_get_dwz_file): Use new.
370 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
371 unique_ptr.
372
400174b1
TT
3732018-05-18 Tom Tromey <tom@tromey.com>
374
375 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
376 unique_ptr.
377 * dwarf2read.c (struct dwp_file): Add constructor and
378 initializers.
379 (open_and_init_dwp_file): Return a unique_ptr.
380 (dwarf2_per_objfile, create_dwp_hash_table)
381 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
382 (lookup_dwo_unit_in_dwp): Update.
383 (open_and_init_dwp_file, get_dwp_file): Update.
384
3063847f
TT
3852018-05-18 Tom Tromey <tom@tromey.com>
386
387 * dwarf2read.c (dwarf2_per_objfile): Update.
388 (struct mapped_index): Add initializers.
389 (dwarf2_read_index): Use new.
390 (dw2_symtab_iter_init): Update.
391 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
392 unique_ptr.
393
d3d02dee
SM
3942018-05-18 Simon Marchi <simon.marchi@ericsson.com>
395
396 * dwarf2read.c (mapped_index) <total_size>: Remove.
397
1d143c36
SM
3982018-05-18 Simon Marchi <simon.marchi@ericsson.com>
399
400 * unittests/format_pieces-selftests.c (test_format_specifier):
401 Add ARI comments.
402
ce1e8424
TT
4032018-05-18 Tom Tromey <tom@tromey.com>
404
405 * c-typeprint.c (maybe_print_hole): New function.
406 (c_print_type_struct_field_offset): Update.
407 (c_type_print_base_struct_union): Call maybe_print_hole.
408
ddfe970e
KS
4092018-05-17 Keith Seitz <keiths@redhat.com>
410
411 * breakpoint.c (build_bpstat_chain): New function, moved from
412 bpstat_stop_status.
413 (bpstat_stop_status): Add optional parameter, `stop_chain'.
414 If no stop chain is passed, call build_bpstat_chain to build it.
415 * breakpoint.h (build_bpstat_chain): Declare.
416 (bpstat_stop_status): Move documentation here from breakpoint.c.
417 * infrun.c (handle_signal_stop): Before eliding inlined frames,
418 build the stop chain and pass it to skip_inline_frames.
419 Pass this stop chain to bpstat_stop_status.
420 * inline-frame.c: Include breakpoint.h.
421 (stopped_by_user_bp_inline_frame): New function.
422 (skip_inline_frames): Add parameter `stop_chain'.
423 Move documention to inline-frame.h.
424 If non-NULL, use stopped_by_user_bp_inline_frame to determine
425 whether the frame should be elided.
426 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
427 Add moved documentation and update for new parameter.
428
b17992c1
SM
4292018-05-17 Simon Marchi <simon.marchi@ericsson.com>
430
431 PR cli/14975
432 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
433 unittests/format_pieces-selftests.c.
434 * common/format.h (format_piece) <operator==>: New.
435 (format_pieces) <operator[]>: Remove.
436 * common/format.c (format_pieces::format_pieces): Handle \e.
437 * unittests/format_pieces-selftests.c: New.
438
58f0c718
TT
4392018-05-17 Tom Tromey <tom@tromey.com>
440
441 PR symtab/23010:
442 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
443 (dw2_instantiate_symtab): Add skip_partial parameter.
444 (dw2_find_last_source_symtab, dw2_map_expand_apply)
445 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
446 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
447 (dw2_expand_symtabs_matching_one)
448 (dw2_find_pc_sect_compunit_symtab)
449 (dw2_debug_names_lookup_symbol)
450 (dw2_debug_names_expand_symtabs_for_function): Update.
451 (init_cutu_and_read_dies): Add skip_partial parameter.
452 (process_psymtab_comp_unit, build_type_psymtabs_1)
453 (process_skeletonless_type_unit, load_partial_comp_unit)
454 (psymtab_to_symtab_1): Update.
455 (load_full_comp_unit): Add skip_partial parameter.
456 (process_imported_unit_die, dwarf2_read_addr_index)
457 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
458 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
459 (read_signatured_type): Update.
460
3e618834
SM
4612018-05-17 Simon Marchi <simon.marchi@ericsson.com>
462
463 * value.c (release_value): Remove unused variable.
464 (record_latest_value): Likewise.
465 (access_value_history): Likewise.
466 (preserve_values): Likewise.
467
fe10fe31
TT
4682018-05-17 Tom Tromey <tom@tromey.com>
469
470 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
471 Initialize.
472
1d761124
MR
4732018-05-16 Maciej W. Rozycki <macro@mips.com>
474
475 PR gdb/22286
476 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
477 Also handle registers whose width is not a multiple of
478 PTRACE_TYPE_RET.
479 (linux_nat_trad_target::store_register): Likewise.
480
06333fea
TT
4812018-05-16 Tom Tromey <tom@tromey.com>
482
483 * gdbcore.h (core_bfd): Redefine.
484 * corelow.c (core_target::close): Update.
485 (core_target_open): Update.
486 * progspace.h (struct program_space) <cbfd>: Now a
487 gdb_bfd_ref_ptr.
488
921222e2
TT
4892018-05-16 Tom Tromey <tom@tromey.com>
490
491 PR cli/19551:
492 * symfile-add-flags.h (enum symfile_add_flags)
493 <SYMFILE_NOT_FILENAME>: New constant.
494 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
495 objfile name from BFD.
496 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
497 * minidebug.c (find_separate_debug_file_in_section): Put
498 ".gnu_debugdata" into BFD's file name.
499
3acb7083
SM
5002018-05-16 Simon Marchi <simon.marchi@ericsson.com>
501
502 * regcache.c (regcache_read_ftype, regcache_write_ftype):
503 Remove.
504
561a72d4
TC
5052018-05-15 Tamar Christina <tamar.christina@arm.com>
506
507 PR binutils/21446
508 * aarch64-tdep.c (aarch64_analyze_prologue,
509 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
510 Indicate not interested in errors.
511
4e6ff0e1
MR
5122018-05-15 Maciej W. Rozycki <macro@mips.com>
513
514 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
515 Supply the MIPS_ZERO_REGNUM register.
516
ea33cd92
MR
5172018-05-15 Maciej W. Rozycki <macro@mips.com>
518
519 * mips-tdep.c (mask_address_var): Make variable static.
520
2d79090e
TT
5212018-05-14 Tom Tromey <tom@tromey.com>
522
523 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
524
cf4912ae
AB
5252018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
526
527 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
528 FXSAVE_ADDR for the mxcsr register.
529
67e6f569
MF
5302018-05-11 Max Filippov <jcmvbkbc@gmail.com>
531
532 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
533
15244507
PA
5342018-05-11 Pedro Alves <palves@redhat.com>
535
536 * corelow.c (core_target) <core_target>: No longer inline.
537 Initialize m_core_gdbarch, m_core_vec and build the section table
538 here.
539 <~core_target>: New.
540 <core_gdbarch, get_core_register_section>: New methods.
541 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
542 factored out from ...
543 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
544 (core_ops): Delete.
545 (sniff_core_bfd): Add gdbarch parameter.
546 (core_close): Delete, merged into ...
547 (core_target::close): ... here. Delete self.
548 (core_close_cleanup): Delete.
549 (core_target_open): Allocate a core_target on the heap. Use a
550 unique_ptr instead of a cleanup. Bits moved into the core_target
551 ctor. Adjust to use core_target methods instead of globals.
552 (get_core_register_section): Rename to ...
553 (core_target::get_core_register_section): ... this and adjust.
554 (struct get_core_registers_cb_data): New.
555 (get_core_registers_cb): Use it. Use bool.
556 (core_target::fetch_registers, core_target::files_info)
557 (core_target::xfer_partial, core_target::read_description)
558 (core_target::pid_to, core_target::thread_name): Adjust to
559 reference class fields instead of globals.
560 * target.h (struct target_ops_deleter, target_ops_up): New.
561
451953fa
PA
5622018-05-11 Pedro Alves <palves@redhat.com>
563
564 * corefile.c (core_file_command): Move to corelow.c.
565 * corelow.c (the_core_target): Delete.
566 (core_file_command): Moved from corefile.c. Check exec_bfd
567 instead of the_core_target. Use target_detach instead of calling
568 into the_core_target directly.
569 (maybe_say_no_core_file_now): New.
570 (core_target::detach): Use it.
571 (_initialize_corelow): Remove references to the_core_target.
572 * gdbcore.h (the_core_target): Delete.
573
e540a5a2 5742018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 575 Pedro Alves <palves@redhat.com>
e540a5a2
TT
576
577 * corefile.c (core_bfd): Remove.
578 * gdbcore.h (core_bfd): Now a macro.
579 * progspace.h (struct program_space) <cbfd>: New field.
580
633cf254
TT
5812018-05-11 Tom Tromey <tom@tromey.com>
582
583 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
584 gdb::def_vector.
585
1a34f210
TT
5862018-05-10 Tom Tromey <tom@tromey.com>
587
588 * configure: Rebuild.
589 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
590
190852c8
JB
5912018-05-10 Joel Brobecker <brobecker@adacore.com>
592
593 PR server/23158:
594 * regformats/regdat.sh: Adjust script, following the addition
595 of the new expedite_regs parameter to init_target_desc.
596
8727de56
OJ
5972018-05-10 Omair Javaid <omair.javaid@linaro.org>
598
599 PR gdb/23127
600 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
601 set_gdbarch_significant_addr_bit.
602 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
603 set_gdbarch_significant_addr_bit.
604 * utils.c (address_significant): Update to sign extend addr.
605
37d9e062
MF
6062018-05-09 Max Filippov <jcmvbkbc@gmail.com>
607
608 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
609 (xtensa_linux_init_abi): Limit tdep->num_regs by
610 tdep->num_nopriv_regs.
611 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
612 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
613 not initialized.
614
7402fbca
SM
6152018-05-08 Simon Marchi <simon.marchi@ericsson.com>
616
617 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
618
8ee22052
AB
6192018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
620
621 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
622 (I387_MXCSR_INIT_VAL): New constant.
623 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
624 buffer if it was supplied by the inferior.
625 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
626 (i387_xsave_get_clear_bv): New function.
627 (i387_supply_xsave): Only read x87 control registers from the
628 xsave buffer if the feature is enabled, and the state will have
629 been written, otherwise, provide a suitable default.
630 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
631 including x87 control registers. Update control registers if they
632 have changed from the default value, and mark features as enabled
633 as required.
634 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
635
968ae51b
UW
6362018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
637
638 * spu-tdep.c (info_spu_event_command): Fix output formatting.
639
aff689d3
TT
6402018-05-07 Tom Tromey <tom@tromey.com>
641
642 * configure: Rebuild.
643 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
644
ce887586
TT
6452018-05-07 Tom Tromey <tom@tromey.com>
646
647 PR tdep/20362:
648 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
649 bit. Use correct value for VDIV.
650
85e26832
TT
6512018-05-04 Tom Tromey <tom@tromey.com>
652
653 * configure: Rebuild.
654 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
655
449b1ac7
TT
6562018-05-04 Tom Tromey <tom@tromey.com>
657
658 * linux-record.c (record_linux_system_call) <case
659 RECORD_SYS_RECVFROM>: Add "break".
660
15c9ffd6
TT
6612018-05-04 Tom Tromey <tom@tromey.com>
662
663 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
664 Add missing "break".
665 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
666 Add missing "break".
667
e3829d13
TT
6682018-05-04 Tom Tromey <tom@tromey.com>
669
670 * rs6000-tdep.c (ppc_process_record_op4)
671 (ppc_process_record_op63): Add fall-through comment.
672
da0e1563
TT
6732018-05-04 Tom Tromey <tom@tromey.com>
674
675 * i386-tdep.c (i386_process_record): Add fall-through comment.
676
0019cd49
TT
6772018-05-04 Tom Tromey <tom@tromey.com>
678
679 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
680 comment.
681
565e0eda
TT
6822018-05-04 Tom Tromey <tom@tromey.com>
683
684 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
685 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
686 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
687 comment.
688 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
689 comment.
690 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
691 comment.
692
621846f4
TT
6932018-05-04 Tom Tromey <tom@tromey.com>
694
695 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
696
86a73007
TT
6972018-05-04 Tom Tromey <tom@tromey.com>
698
699 * s390-tdep.c (s390_process_record): Fix fall-through comments.
700 * xcoffread.c (scan_xcoff_symtab): Move comment later.
701 * symfile.c (section_is_mapped): Fix fall-through comment.
702 * stabsread.c (define_symbol, read_member_functions): Fix
703 fall-through comment.
704 * s390-linux-tdep.c (s390_process_record): Fix fall-through
705 comment.
706 * remote.c (remote_wait_as): Fix fall-through comment.
707 * p-exp.y (yylex): Fix fall-through comment.
708 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
709 comment.
710 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
711 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
712 * jv-exp.y (yylex): Fix fall-through comment.
713 * go-exp.y (lex_one_token): Fix fall-through comment.
714 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
715 fall-through comment.
716 * f-exp.y (yylex): Fix fall-through comment.
717 * dwarf2read.c (process_die): Fix fall-through comments.
718 * dbxread.c (process_one_symbol): Fix fall-through comment.
719 * d-exp.y (lex_one_token): Fix fall-through comment.
720 * cp-name-parser.y (yylex): Fix fall-through comment.
721 * coffread.c (coff_symtab_read): Fix fall-through comment.
722 * c-exp.y (lex_one_token): Fix fall-through comment.
723 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
724 comment.
725 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
726 comment.
727
56bcdbea
TT
7282018-05-04 Tom Tromey <tom@tromey.com>
729
730 PR python/22730:
731 * NEWS: Mention gdb.execute change.
732 * gdbcmd.h (execute_control_command): Don't declare.
733 * python/python.c (execute_gdb_command): Use read_command_lines_1,
734 execute_control_commands, execute_control_commands_to_string.
735 * cli/cli-script.h (execute_control_commands)
736 (execute_control_commands_to_string): Declare.
737 (execute_control_command): Add from_tty parameter.
738 * cli/cli-script.c (execute_control_commands)
739 (execute_control_commands_to_string): New functions.
740 (execute_user_command): Use execute_control_commands.
741 (execute_control_command_1): Add "from_tty" parameter. Update.
742 (execute_control_command): Likewise.
743
a913fffb
TT
7442018-05-04 Tom Tromey <tom@tromey.com>
745
746 PR python/22731:
747 * NEWS: Mention that breakpoint commands are writable.
748 * python/py-breakpoint.c (bppy_set_commands): New function.
749 (breakpoint_object_getset) <"commands">: Use it.
750
60b3cef2
TT
7512018-05-04 Tom Tromey <tom@tromey.com>
752
753 * tracepoint.c (actions_command): Update.
754 * mi/mi-cmd-break.c (mi_command_line_array)
755 (mi_command_line_array_cnt, mi_command_line_array_ptr)
756 (mi_read_next_line): Remove.
757 (mi_cmd_break_commands): Update.
758 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
759 function_view.
760 * cli/cli-script.c (get_command_line): Update.
761 (process_next_line): Use function_view. Constify.
762 (recurse_read_control_structure, read_command_lines)
763 (read_command_lines_1): Change argument types to function_view.
764 (do_define_command, document_command): Update.
765 * breakpoint.h (check_tracepoint_command): Don't declare.
766 * breakpoint.c (check_tracepoint_command): Remove.
767 (commands_command_1, create_tracepoint_from_upload): Update.
768
7a2c85f2
TT
7692018-05-04 Tom Tromey <tom@tromey.com>
770
771 PR gdb/11750:
772 * cli/cli-script.h (enum command_control_type) <define_control>:
773 New constant.
774 * cli/cli-script.c (multi_line_command_p): Handle define_control.
775 (build_command_line, execute_control_command_1)
776 (process_next_line): Likewise.
777 (do_define_command): New function, extracted from define_command.
778 (define_command): Use it.
779
295dc222
TT
7802018-05-04 Tom Tromey <tom@tromey.com>
781
782 * tracepoint.c (actions_command): Update.
783 * cli/cli-script.h (read_command_lines): Update.
784 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
785 (MAX_TMPBUF): Remove define.
786 (define_command): Use string_printf.
787 (document_command): Likewise.
788 * breakpoint.c (commands_command_1): Update.
789
1263a9d5
TT
7902018-05-04 Tom Tromey <tom@tromey.com>
791
792 * top.c (execute_command): Update.
793 * cli/cli-script.h (print_command_lines): Now varargs.
794 * cli/cli-script.c (print_command_lines): Now varargs.
795 (execute_control_command_1) <case while_control, case if_control>:
796 Update.
797
12973681
TT
7982018-05-04 Tom Tromey <tom@tromey.com>
799
800 * tracepoint.c (all_tracepoint_actions): Rename from
801 all_tracepoint_actions_and_cleanup. Change return type.
802 (actions_command, encode_actions_1, encode_actions)
803 (trace_dump_actions, tdump_command): Update.
804 * remote.c (remote_download_command_source): Update.
805 * python/python.c (gdbpy_eval_from_control_command)
806 (python_command, python_interactive_command): Update.
807 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
808 * guile/guile.c (guile_command)
809 (gdbscm_eval_from_control_command, guile_command): Update.
810 * compile/compile.c (compile_code_command)
811 (compile_print_command, compile_to_object): Update.
812 * cli/cli-script.h (struct command_lines_deleter): New.
813 (counted_command_line): New typedef.
814 (struct command_line): Add constructor, destructor.
815 <body_list>: Remove.
816 <body_list_0, body_list_1>: New members.
817 (command_line_up): Remove typedef.
818 (read_command_lines, read_command_lines_1, get_command_line):
819 Update.
820 (copy_command_lines): Don't declare.
821 * cli/cli-script.c (build_command_line): Use "new".
822 (get_command_line): Return counted_command_line.
823 (print_command_lines, execute_user_command)
824 (execute_control_command_1, while_command, if_command): Update.
825 (realloc_body_list): Remove.
826 (process_next_line, recurse_read_control_structure): Update.
827 (read_command_lines, read_command_lines_1): Return counted_command_line.
828 (free_command_lines): Use "delete".
829 (copy_command_lines): Remove.
830 (define_command, document_command, show_user_1): Update.
831 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
832 a counted_command_line.
833 * breakpoint.h (counted_command_line): Remove typedef.
834 (breakpoint_set_commands): Update.
835 * breakpoint.c (check_no_tracepoint_commands)
836 (validate_commands_for_breakpoint): Update.
837 (breakpoint_set_commands): Change commands to be a
838 counted_command_line.
839 (commands_command_1, update_dprintf_command_list)
840 (create_tracepoint_from_upload): Update.
841
e2fc72e2
TT
8422018-05-04 Tom Tromey <tom@tromey.com>
843
844 * cli/cli-decode.h (cmd_list_element): New constructor.
845 (~cmd_list_element): New destructor.
846 (struct cmd_list_element): Add initializers.
847 * cli/cli-decode.c (do_add_cmd): Use "new".
848 (delete_cmd): Use "delete".
849
a3b60e45
JK
8502018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
851 Pedro Alves <palves@redhat.com>
852
853 PR breakpoints/19806 and support for PR external/20207.
854 * NEWS: Mention Aarch64 watchpoint improvements.
855 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
856 watchpoints and PR external/20207 watchpoints.
857 * nat/aarch64-linux-hw-point.c
858 (kernel_supports_any_contiguous_range): New.
859 (aarch64_watchpoint_offset): New.
860 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
861 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
862 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
863 (aarch64_align_watchpoint): New parameters aligned_offset_p and
864 next_addr_orig_p. Support PR external/20207 watchpoints.
865 (aarch64_downgrade_regs): New.
866 (aarch64_dr_state_insert_one_point): New parameters offset and
867 addr_orig.
868 (aarch64_dr_state_remove_one_point): Likewise.
869 (aarch64_handle_breakpoint): Update caller.
870 (aarch64_handle_aligned_watchpoint): Likewise.
871 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
872 aligned_offset.
873 (aarch64_linux_set_debug_regs): Remove const from state. Call
874 aarch64_downgrade_regs.
875 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
876 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
877 (DR_CONTROL_MASK): ... this.
878 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
879 (unsigned int aarch64_watchpoint_offset): New prototype.
880 (aarch64_linux_set_debug_regs): Remove const from state.
881 * utils.c (align_up, align_down): Move to ...
882 * common/common-utils.c (align_up, align_down): ... here.
883 * utils.h (align_up, align_down): Move to ...
884 * common/common-utils.h (align_up, align_down): ... here.
885
05bc7456
JB
8862018-05-04 Joel Brobecker <brobecker@adacore.com>
887
888 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
889 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
890 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
891 Re-implement to match the ABI as summarized in GCC's
892 gcc/config/sparc/sparc.c. All callers updated.
893 (sparc32_store_arguments): Remove assertion.
894
2f433492
TT
8952018-05-04 Tom Tromey <tom@tromey.com>
896
897 * printcmd.c: Don't include tui.h.
898 (decode_format): Use skip_spaces.
899
9be2ae8f
TT
9002018-05-04 Tom Tromey <tom@tromey.com>
901
902 PR gdb/22619:
903 * printcmd.c (last_count): New global.
904 (x_command): Use saved count when repeating.
905
f0b3976b
TT
9062018-05-04 Tom Tromey <tom@tromey.com>
907
908 * nto-procfs.c (do_closedir_cleanup): Remove.
909 (procfs_pidlist): Use gdb_dir_up.
910 * procfs.c (do_closedir_cleanup): Remove.
911 (proc_update_threads): Use gdb_dir_up.
912 * common/filestuff.h (struct gdb_dir_deleter): New.
913 (gdb_dir_up): New typedef.
914
862d101a
TT
9152018-05-04 Tom Tromey <tom@tromey.com>
916
917 * ada-lang.c (print_mention_exception): Use std::string.
918
cb7de75e
TT
9192018-05-04 Tom Tromey <tom@tromey.com>
920
921 * ada-lang.c (create_excep_cond_exprs): Update.
922 (ada_exception_catchpoint_cond_string): Use std::string.
923
49d83361
TT
9242018-05-04 Tom Tromey <tom@tromey.com>
925
926 * ada-lang.c (xget_renaming_scope): Return std::string.
927 (old_renaming_is_invisible): Update.
928
ade72a34
TT
9292018-05-04 Tom Tromey <tom@tromey.com>
930
931 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
932 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
933
2be4d7f0
UW
9342018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
935
936 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
937
69b6ecb0
TT
9382018-05-04 Tom Tromey <tom@tromey.com>
939
940 * remote.c (remote_query_supported_append): Change type.
941 (remote_check_symbols): Update.
942
bf27f0e2
PP
9432018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
944
945 PR gdb/11420
946 * configure.ac: Prepend libpython.
947 * python/python-config.py: Likewise.
948 * configure: Regenerate.
949
4ea17de8
SM
9502018-05-03 Simon Marchi <simon.marchi@ericsson.com>
951
952 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
953
bd732259
PA
9542018-05-03 Pedro Alves <palves@redhat.com>
955
956 * s390-linux-nat.c
957 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
958 override. Write 'true' instead of '1'.
959 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
960 declaration.
961
d9f719f1
PA
9622018-05-02 Pedro Alves <palves@redhat.com>
963
964 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
965 add_inf_child_target.
966 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
967 add_inf_child_target.
968 * aix-thread.c (aix_thread_target_info): New.
969 (aix_thread_target) <shortname, longname, doc>: Delete.
970 <info>: New.
971 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
972 add_inf_child_target.
973 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
974 add_inf_child_target.
975 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
976 add_inf_child_target.
977 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
978 add_inf_child_target.
979 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
980 add_inf_child_target.
981 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
982 add_inf_child_target.
983 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
984 add_inf_child_target.
985 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
986 add_inf_child_target.
987 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
988 add_inf_child_target.
989 * bfd-target.c (target_bfd_target_info): New.
990 (target_bfd) <shortname, longname, doc>: Delete.
991 <info>: New.
992 * bsd-kvm.c (bsd_kvm_target_info): New.
993 (bsd_kvm_target) <shortname, longname, doc>: Delete.
994 <info>: New.
995 (bsd_kvm_target::open): Rename to ...
996 (bsd_kvm_target_open): ... this. Adjust.
997 * bsd-uthread.c (bsd_uthread_target_info): New.
998 (bsd_uthread_target) <shortname, longname, doc>: Delete.
999 <info>: New.
1000 * corefile.c (core_file_command): Adjust.
1001 * corelow.c (core_target_info): New.
1002 (core_target) <shortname, longname, doc>: Delete.
1003 <info>: New.
1004 (core_target::open): Rename to ...
1005 (core_target_open): ... this. Adjust.
1006 * ctf.c (ctf_target_info): New.
1007 (ctf_target) <shortname, longname, doc>: Delete.
1008 <info>: New.
1009 (ctf_target::open): Rename to ...
1010 (ctf_target_open): ... this.
1011 (_initialize_ctf): Adjust.
1012 * exec.c (exec_target_info): New.
1013 (exec_target) <shortname, longname, doc>: Delete.
1014 <info>: New.
1015 (exec_target::open): Rename to ...
1016 (exec_target_open): ... this.
1017 * gdbcore.h (core_target_open): Declare.
1018 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1019 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1020 add_inf_child_target.
1021 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1022 add_inf_child_target.
1023 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1024 add_inf_child_target.
1025 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1026 add_inf_child_target.
1027 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1028 add_inf_child_target.
1029 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1030 add_inf_child_target.
1031 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1032 add_inf_child_target.
1033 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1034 add_inf_child_target.
1035 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1036 add_inf_child_target.
1037 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1038 add_inf_child_target.
1039 * inf-child.c (inf_child_target_info): New.
1040 (inf_child_target::info): New.
1041 (inf_child_open_target): Remove 'target' parameter. Use
1042 get_native_target instead.
1043 (inf_child_target::open): Delete.
1044 (add_inf_child_target): New.
1045 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1046 Delete.
1047 <info>: New.
1048 (add_inf_child_target): Declare.
1049 (inf_child_open_target): Declare.
1050 * linux-thread-db.c (thread_db_target_info): New.
1051 (thread_db_target) <shortname, longname, doc>: Delete.
1052 <info>: New.
1053 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1054 add_inf_child_target.
1055 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1056 add_inf_child_target.
1057 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1058 add_inf_child_target.
1059 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1060 add_inf_child_target.
1061 * make-target-delegates (print_class): Adjust.
1062 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1063 add_inf_child_target.
1064 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1065 add_inf_child_target.
1066 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1067 add_inf_child_target.
1068 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1069 add_inf_child_target.
1070 * nto-procfs.c (nto_native_target_info): New.
1071 (nto_procfs_target_native) <shortname, longname, doc>:
1072 Delete.
1073 <info>: New.
1074 (nto_procfs_target_info): New.
1075 (nto_procfs_target_procfs) <shortname, longname, doc>:
1076 Delete.
1077 <info>: New.
1078 (init_procfs_targets): Adjust.
1079 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1080 add_inf_child_target.
1081 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
1082 add_inf_child_target.
1083 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
1084 add_inf_child_target.
1085 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
1086 add_inf_child_target.
1087 * ravenscar-thread.c (ravenscar_target_info): New.
1088 (ravenscar_thread_target) <shortname, longname, doc>:
1089 Delete.
1090 <info>: New.
1091 * record-btrace.c (record_btrace_target_info):
1092 (record_btrace_target) <shortname, longname, doc>: Delete.
1093 <info>: New.
1094 (record_btrace_target::open): Rename to ...
1095 (record_btrace_target_open): ... this. Adjust.
1096 * record-full.c (record_longname, record_doc): New.
1097 (record_full_base_target) <shortname, longname, doc>: Delete.
1098 <info>: New.
1099 (record_full_target_info): New.
1100 (record_full_target): <shortname>: Delete.
1101 <info>: New.
1102 (record_full_core_open_1, record_full_open_1): Update comments.
1103 (record_full_base_target::open): Rename to ...
1104 (record_full_open): ... this.
1105 (cmd_record_full_restore): Update.
1106 (_initialize_record_full): Update.
1107 * remote-sim.c (remote_sim_target_info): New.
1108 (gdbsim_target) <shortname, longname, doc>: Delete.
1109 <info>: New.
1110 (gdbsim_target::open): Rename to ...
1111 (gdbsim_target_open): ... this.
1112 (_initialize_remote_sim): Adjust.
1113 * remote.c (remote_doc): New.
1114 (remote_target_info): New.
1115 (remote_target) <shortname, longname, doc>: Delete.
1116 <info>: New.
1117 (extended_remote_target_info): New.
1118 (extended_remote_target) <shortname, longname, doc>: Delete.
1119 <info>: New.
1120 (remote_target::open_1): Make static. Adjust.
1121 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
1122 * s390-linux-nat.c (_initialize_s390_nat): Use
1123 add_inf_child_target.
1124 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
1125 add_inf_child_target.
1126 * sol-thread.c (thread_db_target_info): New.
1127 (sol_thread_target) <shortname, longname, doc>: Delete.
1128 <info>: New.
1129 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
1130 add_inf_child_target.
1131 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
1132 add_inf_child_target.
1133 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
1134 add_inf_child_target.
1135 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1136 add_inf_child_target.
1137 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1138 add_inf_child_target.
1139 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1140 add_inf_child_target.
1141 * spu-linux-nat.c (_initialize_spu_nat): Use
1142 add_inf_child_target.
1143 * spu-multiarch.c (spu_multiarch_target_info): New.
1144 (spu_multiarch_target) <shortname, longname, doc>: Delete.
1145 <info>: New.
1146 * target-delegates.c: Regenerate.
1147 * target.c: Include <unordered_map>.
1148 (target_ops_p): Delete.
1149 (DEF_VEC_P(target_ops_p)): Delete.
1150 (target_factories): New.
1151 (test_target_info): New.
1152 (test_target_ops::info): New.
1153 (open_target): Adjust to use target_factories.
1154 (add_target_with_completer): Rename to ...
1155 (add_target): ... this. Change prototype. Register target_info
1156 and open callback in target_factories. Register target_info in
1157 command context instead of target_ops.
1158 (add_target): Delete old implementation.
1159 (add_deprecated_target_alias): Change prototype. Adjust.
1160 (the_native_target): New.
1161 (set_native_target, get_native_target): New.
1162 (find_default_run_target): Use the_native_target.
1163 (find_attach_target, find_run_target): Simplify.
1164 (target_ops::open): Delete.
1165 (dummy_target_info): New.
1166 (dummy_target::shortname, dummy_target::longname)
1167 (dummy_target::doc): Delete.
1168 (dummy_target::info): New.
1169 (debug_target::shortname, debug_target::longname)
1170 (debug_target::doc): Delete.
1171 (debug_target::info): New.
1172 * target.h (struct target_info): New.
1173 (target_ops::~target_ops): Add comment.
1174 (target_ops::info): New.
1175 (target_ops::shortname, target_ops::longname, target_ops::doc): No
1176 longer virtual. Implement in terms of target_info.
1177 (set_native_target, get_native_target): Declare.
1178 (target_open_ftype): New.
1179 (add_target, add_target_with_completer)
1180 (add_deprecated_target_alias): Change prototype.
1181 (test_target) <shortname, longname, doc>: Delete.
1182 <info>: New.
1183 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1184 add_inf_child_target.
1185 * tracefile-tfile.c (tfile_target_info): New.
1186 (tfile_target) <shortname, longname, doc>: Delete.
1187 <info>: New.
1188 (tfile_target::open): Rename to ...
1189 (tfile_target_open): ... this.
1190 (_initialize_tracefile_tfile): Adjust.
1191 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1192 add_inf_child_target.
1193 * windows-nat.c (_initialize_windows_nat): Use
1194 add_inf_child_target.
1195 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1196 add_inf_child_target.
1197
135340af
PA
11982018-05-02 Pedro Alves <palves@redhat.com>
1199
1200 * linux-nat.h (linux_nat_target) <low_new_thread,
1201 low_delete_thread, low_new_fork, low_forget_process,
1202 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1203 New virtual methods.
1204 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1205 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1206 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1207 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1208 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1209 Delete.
1210 * linux-fork.c (delete_fork): Adjust to call low method.
1211 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1212 (linux_nat_new_fork, linux_nat_forget_process_hook)
1213 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1214 (linux_nat_status_is_event):
1215 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1216 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1217 to call low method.
1218 (sigtrap_is_event): Rename to ...
1219 (linux_nat_target::low_status_is_event): ... this.
1220 (linux_nat_set_status_is_event): Delete.
1221 (save_stop_reason, linux_nat_wait_1)
1222 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1223 low methods.
1224 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1225 (linux_nat_set_new_fork, linux_nat_set_forget_process)
1226 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1227 (linux_nat_set_prepare_to_resume): Delete.
1228 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
1229 low virtual methods.
1230 * amd64-linux-nat.c: Likewise.
1231 * arm-linux-nat.c: Likewise.
1232 * i386-linux-nat.c: Likewise.
1233 * ia64-linux-nat.c: Likewise.
1234 * mips-linux-nat.c: Likewise.
1235 * ppc-linux-nat.c: Likewise.
1236 * s390-linux-nat.c: Likewise.
1237 * sparc64-linux-nat.c: Likewise.
1238 * x86-linux-nat.c: Likewise.
1239 * x86-linux-nat.h: Include "nat/x86-linux.h".
1240 (x86_linux_nat_target) <low_new_fork, low_forget_process,
1241 low_prepare_to_resume, low_new_thread, low_delete_thread>:
1242 Override methods.
1243
57810aa7
PA
12442018-05-02 Pedro Alves <palves@redhat.com>
1245
1246 * target.h (target_ops)
1247 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1248 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
1249 stopped_by_watchpoint, have_continuable_watchpoint,
1250 stopped_data_address, watchpoint_addr_within_range,
1251 can_accel_watchpoint_condition, can_run, thread_alive,
1252 has_all_memory, has_memory, has_stack, has_registers,
1253 has_execution, can_async_p, is_async_p, supports_non_stop,
1254 always_non_stop_p, can_execute_reverse, supports_multi_process,
1255 supports_enable_disable_tracepoint,
1256 supports_disable_randomization, supports_string_tracing,
1257 supports_evaluation_of_breakpoint_conditions,
1258 can_run_breakpoint_commands, filesystem_is_local,
1259 can_download_tracepoint, get_trace_state_variable_value,
1260 set_trace_notes, get_tib_address, use_agent, can_use_agent,
1261 record_is_replaying, record_will_replay,
1262 augmented_libraries_svr4_read>: Adjust to return bool.
1263 * aarch64-linux-nat.c: All implementations adjusted.
1264 * aix-thread.c: All implementations adjusted.
1265 * arm-linux-nat.c: All implementations adjusted.
1266 * breakpoint.c: All implementations adjusted.
1267 * bsd-kvm.c: All implementations adjusted.
1268 * bsd-uthread.c: All implementations adjusted.
1269 * corelow.c: All implementations adjusted.
1270 * ctf.c: All implementations adjusted.
1271 * darwin-nat.c: All implementations adjusted.
1272 * darwin-nat.h: All implementations adjusted.
1273 * exec.c: All implementations adjusted.
1274 * fbsd-nat.c: All implementations adjusted.
1275 * fbsd-nat.h: All implementations adjusted.
1276 * gnu-nat.c: All implementations adjusted.
1277 * gnu-nat.h: All implementations adjusted.
1278 * go32-nat.c: All implementations adjusted.
1279 * ia64-linux-nat.c: All implementations adjusted.
1280 * inf-child.c: All implementations adjusted.
1281 * inf-child.h: All implementations adjusted.
1282 * inf-ptrace.c: All implementations adjusted.
1283 * inf-ptrace.h: All implementations adjusted.
1284 * linux-nat.c: All implementations adjusted.
1285 * linux-nat.h: All implementations adjusted.
1286 * mips-linux-nat.c: All implementations adjusted.
1287 * nto-procfs.c: All implementations adjusted.
1288 * ppc-linux-nat.c: All implementations adjusted.
1289 * procfs.c: All implementations adjusted.
1290 * ravenscar-thread.c: All implementations adjusted.
1291 * record-btrace.c: All implementations adjusted.
1292 * record-full.c: All implementations adjusted.
1293 * remote-sim.c: All implementations adjusted.
1294 * remote.c: All implementations adjusted.
1295 * s390-linux-nat.c: All implementations adjusted.
1296 * sol-thread.c: All implementations adjusted.
1297 * spu-multiarch.c: All implementations adjusted.
1298 * target-delegates.c: All implementations adjusted.
1299 * target.c: All implementations adjusted.
1300 * target.h: All implementations adjusted.
1301 * tracefile-tfile.c: All implementations adjusted.
1302 * tracefile.c: All implementations adjusted.
1303 * tracefile.h: All implementations adjusted.
1304 * windows-nat.c: All implementations adjusted.
1305 * x86-linux-nat.h: All implementations adjusted.
1306 * x86-nat.h: All implementations adjusted.
1307
ad6a4e2d
PA
13082018-05-02 Pedro Alves <palves@redhat.com>
1309
1310 * make-target-delegates (scan_target_h): Don't trim lines here.
1311 Replace sequences of tabs and/or whitespace with a single
1312 whitespace.
1313 (top level, parsing methods): Trim each line before processing it
1314 here.
1315
f6ac5f3d
PA
13162018-05-02 Pedro Alves <palves@redhat.com>
1317 John Baldwin <jhb@freebsd.org>
1318
1319 * target.h (enum strata) <debug_stratum>: New.
1320 (struct target_ops) <all delegation methods>: Replace by C++
1321 virtual methods, and drop "to_" prefix. All references updated
1322 throughout.
1323 <to_shortname, to_longname, to_doc, to_data,
1324 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
1325 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
1326 virtual methods. All references updated throughout.
1327 <can_attach, supports_terminal_ours, can_create_inferior,
1328 get_thread_control_capabilities, attach_no_wait>: New
1329 virtual methods.
1330 <insert_breakpoint, remove_breakpoint>: Now
1331 TARGET_DEFAULT_NORETURN methods.
1332 <info_proc>: Now returns bool.
1333 <to_magic>: Delete.
1334 (OPS_MAGIC): Delete.
1335 (current_target): Delete. All references replaced by references
1336 to ...
1337 (target_stack): ... this. New.
1338 (target_shortname, target_longname): Adjust.
1339 (target_can_run): Now a function declaration.
1340 (default_child_has_all_memory, default_child_has_memory)
1341 (default_child_has_stack, default_child_has_registers)
1342 (default_child_has_execution): Remove target_ops parameter.
1343 (complete_target_initialization): Delete.
1344 (memory_breakpoint_target): New template class.
1345 (test_target_ops): Refactor as a C++ class with virtual methods.
1346 * make-target-delegates (NAME_PART): Tighten.
1347 (POINTER_PART, CP_SYMBOL): New.
1348 (SIMPLE_RETURN_PART): Reimplement.
1349 (VEC_RETURN_PART): Expect less.
1350 (RETURN_PART, VIRTUAL_PART): New.
1351 (METHOD): Adjust to C++ virtual methods.
1352 (scan_target_h): Remove reference to C99.
1353 (dname): Output "target_ops::" prefix.
1354 (write_function_header): Adjust to output a C++ class method.
1355 (write_declaration): New.
1356 (write_delegator): Adjust to output a C++ class method.
1357 (tdname): Output "dummy_target::" prefix.
1358 (write_tdefault, write_debugmethod): Adjust to output a C++ class
1359 method.
1360 (tdefault_names, debug_names): Delete.
1361 (return_types, tdefaults, styles, argtypes_array): New.
1362 (top level): All methods are delegators.
1363 (print_class): New.
1364 (top level): Print dummy_target and debug_target classes.
1365 * target-delegates.c: Regenerate.
1366 * target-debug.h (target_debug_print_enum_info_proc_what)
1367 (target_debug_print_thread_control_capabilities)
1368 (target_debug_print_thread_info_p): New.
1369 * target.c (dummy_target): Delete.
1370 (the_dummy_target, the_debug_target): New.
1371 (target_stack): Now extern.
1372 (set_targetdebug): Push/unpush debug target.
1373 (default_child_has_all_memory, default_child_has_memory)
1374 (default_child_has_stack, default_child_has_registers)
1375 (default_child_has_execution): Remove target_ops parameter.
1376 (complete_target_initialization): Delete.
1377 (add_target_with_completer): No longer call
1378 complete_target_initialization.
1379 (target_supports_terminal_ours): Use regular delegation.
1380 (update_current_target): Delete.
1381 (push_target): No longer check magic number. Don't call
1382 update_current_target.
1383 (unpush_target): Don't call update_current_target.
1384 (target_is_pushed): No longer check magic number.
1385 (target_require_runnable): Skip for all stratums over
1386 process_stratum.
1387 (target_ops::info_proc): New.
1388 (target_info_proc): Use find_target_at and
1389 find_default_run_target.
1390 (target_supports_disable_randomization): Use regular delegation.
1391 (target_get_osdata): Use find_target_at.
1392 (target_ops::open, target_ops::close, target_ops::can_attach)
1393 (target_ops::attach, target_ops::can_create_inferior)
1394 (target_ops::create_inferior, target_ops::can_run)
1395 (target_can_run): New.
1396 (default_fileio_target): Use regular delegation.
1397 (target_ops::fileio_open, target_ops::fileio_pwrite)
1398 (target_ops::fileio_pread, target_ops::fileio_fstat)
1399 (target_ops::fileio_close, target_ops::fileio_unlink)
1400 (target_ops::fileio_readlink): New.
1401 (target_fileio_open_1, target_fileio_unlink)
1402 (target_fileio_readlink): Always call the target method. Handle
1403 FILEIO_ENOSYS.
1404 (return_zero, return_zero_has_execution): Delete.
1405 (init_dummy_target): Delete.
1406 (dummy_target::dummy_target, dummy_target::shortname)
1407 (dummy_target::longname, dummy_target::doc)
1408 (debug_target::debug_target, debug_target::shortname)
1409 (debug_target::longname, debug_target::doc): New.
1410 (target_supports_delete_record): Use regular delegation.
1411 (setup_target_debug): Delete.
1412 (maintenance_print_target_stack): Skip debug_stratum.
1413 (initialize_targets): Instantiate the_dummy_target and
1414 the_debug_target.
1415 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
1416 use target_stack.
1417 (target_auxv_search, fprint_target_auxv): Adjust.
1418 (info_auxv_command): Adjust to use target_stack.
1419 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
1420 * exceptions.c (print_flush): Handle a NULL target_stack.
1421 * regcache.c (target_ops_no_register): Refactor as class with
1422 virtual methods.
1423
1424 * exec.c (exec_target): New class.
1425 (exec_ops): Now an exec_target.
1426 (exec_open, exec_close_1, exec_get_section_table)
1427 (exec_xfer_partial, exec_files_info, exec_has_memory)
1428 (exec_make_note_section): Refactor as exec_target methods.
1429 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
1430 Delete.
1431 (exec_target::find_memory_regions): New.
1432 (_initialize_exec): Don't call init_exec_ops.
1433 * gdbcore.h (exec_file_clear): Delete.
1434
1435 * corefile.c (core_target): Delete.
1436 (core_file_command): Adjust.
1437 * corelow.c (core_target): New class.
1438 (the_core_target): New.
1439 (core_close): Remove target_ops parameter.
1440 (core_close_cleanup): Adjust.
1441 (core_target::close): New.
1442 (core_open, core_detach, get_core_registers, core_files_info)
1443 (core_xfer_partial, core_thread_alive, core_read_description)
1444 (core_pid_to_str, core_thread_name, core_has_memory)
1445 (core_has_stack, core_has_registers, core_info_proc): Rework as
1446 core_target methods.
1447 (ignore, core_remove_breakpoint, init_core_ops): Delete.
1448 (_initialize_corelow): Initialize the_core_target.
1449 * gdbcore.h (core_target): Delete.
1450 (the_core_target): New.
1451
1452 * ctf.c: (ctf_target): New class.
1453 (ctf_ops): Now a ctf_target.
1454 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
1455 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
1456 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
1457 methods.
1458 (init_ctf_ops): Delete.
1459 (_initialize_ctf): Don't call it.
1460 * tracefile-tfile.c (tfile_target): New class.
1461 (tfile_ops): Now a tfile_target.
1462 (tfile_open, tfile_close, tfile_files_info)
1463 (tfile_get_tracepoint_status, tfile_trace_find)
1464 (tfile_fetch_registers, tfile_xfer_partial)
1465 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
1466 Refactor as tfile_target methods.
1467 (tfile_xfer_partial_features): Remove target_ops parameter.
1468 (init_tfile_ops): Delete.
1469 (_initialize_tracefile_tfile): Don't call it.
1470 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
1471 (tracefile_has_stack, tracefile_has_registers)
1472 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
1473 tracefile_target methods.
1474 (init_tracefile_ops): Delete.
1475 (tracefile_target::tracefile_target): New.
1476 * tracefile.h: Include "target.h".
1477 (tracefile_target): New class.
1478 (init_tracefile_ops): Delete.
1479
1480 * spu-multiarch.c (spu_multiarch_target): New class.
1481 (spu_ops): Now a spu_multiarch_target.
1482 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
1483 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
1484 (spu_search_memory, spu_mourn_inferior): Refactor as
1485 spu_multiarch_target methods.
1486 (init_spu_ops): Delete.
1487 (_initialize_spu_multiarch): Remove references to init_spu_ops,
1488 complete_target_initialization.
1489
1490 * ravenscar-thread.c (ravenscar_thread_target): New class.
1491 (ravenscar_ops): Now a ravenscar_thread_target.
1492 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
1493 (ravenscar_thread_alive, ravenscar_pid_to_str)
1494 (ravenscar_fetch_registers, ravenscar_store_registers)
1495 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
1496 (ravenscar_stopped_by_hw_breakpoint)
1497 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
1498 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
1499 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
1500 methods.
1501 (init_ravenscar_thread_ops): Delete.
1502 (_initialize_ravenscar): Remove references to
1503 init_ravenscar_thread_ops and complete_target_initialization.
1504
1505 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
1506 (bsd_uthread_target): New class.
1507 (bsd_uthread_ops): Now a bsd_uthread_target.
1508 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
1509 (bsd_uthread_close, bsd_uthread_mourn_inferior)
1510 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
1511 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
1512 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
1513 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
1514 (bsd_uthread_target): Delete function.
1515 (_initialize_bsd_uthread): Remove reference to
1516 complete_target_initialization.
1517
1518 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
1519 (target_bfd): ... this new class.
1520 (target_bfd_xfer_partial, target_bfd_get_section_table)
1521 (target_bfd_close): Refactor as target_bfd methods.
1522 (target_bfd::~target_bfd): New.
1523 (target_bfd_reopen): Adjust.
1524 (target_bfd::close): New.
1525
1526 * record-btrace.c (record_btrace_target): New class.
1527 (record_btrace_ops): Now a record_btrace_target.
1528 (record_btrace_open, record_btrace_stop_recording)
1529 (record_btrace_disconnect, record_btrace_close)
1530 (record_btrace_async, record_btrace_info)
1531 (record_btrace_insn_history, record_btrace_insn_history_range)
1532 (record_btrace_insn_history_from, record_btrace_call_history)
1533 (record_btrace_call_history_range)
1534 (record_btrace_call_history_from, record_btrace_record_method)
1535 (record_btrace_is_replaying, record_btrace_will_replay)
1536 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
1537 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
1538 (record_btrace_store_registers, record_btrace_prepare_to_store)
1539 (record_btrace_to_get_unwinder)
1540 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
1541 (record_btrace_commit_resume, record_btrace_wait)
1542 (record_btrace_stop, record_btrace_can_execute_reverse)
1543 (record_btrace_stopped_by_sw_breakpoint)
1544 (record_btrace_supports_stopped_by_sw_breakpoint)
1545 (record_btrace_stopped_by_hw_breakpoint)
1546 (record_btrace_supports_stopped_by_hw_breakpoint)
1547 (record_btrace_update_thread_list, record_btrace_thread_alive)
1548 (record_btrace_goto_begin, record_btrace_goto_end)
1549 (record_btrace_goto, record_btrace_stop_replaying_all)
1550 (record_btrace_execution_direction)
1551 (record_btrace_prepare_to_generate_core)
1552 (record_btrace_done_generating_core): Refactor as
1553 record_btrace_target methods.
1554 (init_record_btrace_ops): Delete.
1555 (_initialize_record_btrace): Remove reference to
1556 init_record_btrace_ops.
1557 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
1558 the execution_direction global.
1559 (record_full_base_target, record_full_target)
1560 (record_full_core_target): New classes.
1561 (record_full_ops): Now a record_full_target.
1562 (record_full_core_ops): Now a record_full_core_target.
1563 (record_full_target::detach, record_full_target::disconnect)
1564 (record_full_core_target::disconnect)
1565 (record_full_target::mourn_inferior, record_full_target::kill):
1566 New.
1567 (record_full_open, record_full_close, record_full_async): Refactor
1568 as methods of the record_full_base_target class.
1569 (record_full_resume, record_full_commit_resume): Refactor
1570 as methods of the record_full_target class.
1571 (record_full_wait, record_full_stopped_by_watchpoint)
1572 (record_full_stopped_data_address)
1573 (record_full_stopped_by_sw_breakpoint)
1574 (record_full_supports_stopped_by_sw_breakpoint)
1575 (record_full_stopped_by_hw_breakpoint)
1576 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
1577 methods of the record_full_base_target class.
1578 (record_full_store_registers, record_full_xfer_partial)
1579 (record_full_insert_breakpoint, record_full_remove_breakpoint):
1580 Refactor as methods of the record_full_target class.
1581 (record_full_can_execute_reverse, record_full_get_bookmark)
1582 (record_full_goto_bookmark, record_full_execution_direction)
1583 (record_full_record_method, record_full_info, record_full_delete)
1584 (record_full_is_replaying, record_full_will_replay)
1585 (record_full_goto_begin, record_full_goto_end, record_full_goto)
1586 (record_full_stop_replaying): Refactor as methods of the
1587 record_full_base_target class.
1588 (record_full_core_resume, record_full_core_kill)
1589 (record_full_core_fetch_registers)
1590 (record_full_core_prepare_to_store)
1591 (record_full_core_store_registers, record_full_core_xfer_partial)
1592 (record_full_core_insert_breakpoint)
1593 (record_full_core_remove_breakpoint)
1594 (record_full_core_has_execution): Refactor
1595 as methods of the record_full_core_target class.
1596 (record_full_base_target::supports_delete_record): New.
1597 (init_record_full_ops): Delete.
1598 (init_record_full_core_ops): Delete.
1599 (record_full_save): Refactor as method of the
1600 record_full_base_target class.
1601 (_initialize_record_full): Remove references to
1602 init_record_full_ops and init_record_full_core_ops.
1603
1604 * remote.c (remote_target, extended_remote_target): New classes.
1605 (remote_ops): Now a remote_target.
1606 (extended_remote_ops): Now an extended_remote_target.
1607 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
1608 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
1609 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
1610 (remote_pass_signals, remote_set_syscall_catchpoint)
1611 (remote_program_signals, )
1612 (remote_thread_always_alive): Remove target_ops parameter.
1613 (remote_thread_alive, remote_thread_name)
1614 (remote_update_thread_list, remote_threads_extra_info)
1615 (remote_static_tracepoint_marker_at)
1616 (remote_static_tracepoint_markers_by_strid)
1617 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1618 (remote_open): Refactor as methods of remote_target.
1619 (extended_remote_open, extended_remote_detach)
1620 (extended_remote_attach, extended_remote_post_attach):
1621 (extended_remote_supports_disable_randomization)
1622 (extended_remote_create_inferior): : Refactor as method of
1623 extended_remote_target.
1624 (remote_set_permissions, remote_open_1, remote_detach)
1625 (remote_follow_fork, remote_follow_exec, remote_disconnect)
1626 (remote_resume, remote_commit_resume, remote_stop)
1627 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1628 (remote_terminal_ours, remote_wait, remote_fetch_registers)
1629 (remote_prepare_to_store, remote_store_registers)
1630 (remote_flash_erase, remote_flash_done, remote_files_info)
1631 (remote_kill, remote_mourn, remote_insert_breakpoint)
1632 (remote_remove_breakpoint, remote_insert_watchpoint)
1633 (remote_watchpoint_addr_within_range)
1634 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1635 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1636 (remote_supports_stopped_by_sw_breakpoint)
1637 (remote_stopped_by_hw_breakpoint)
1638 (remote_supports_stopped_by_hw_breakpoint)
1639 (remote_stopped_by_watchpoint, remote_stopped_data_address)
1640 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1641 (remote_verify_memory): Refactor as methods of remote_target.
1642 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1643 parameter.
1644 (remote_xfer_partial, remote_get_memory_xfer_limit)
1645 (remote_search_memory, remote_rcmd, remote_memory_map)
1646 (remote_pid_to_str, remote_get_thread_local_address)
1647 (remote_get_tib_address, remote_read_description): Refactor as
1648 methods of remote_target.
1649 (remote_target::fileio_open, remote_target::fileio_pwrite)
1650 (remote_target::fileio_pread, remote_target::fileio_close): New.
1651 (remote_hostio_readlink, remote_hostio_fstat)
1652 (remote_filesystem_is_local, remote_can_execute_reverse)
1653 (remote_supports_non_stop, remote_supports_disable_randomization)
1654 (remote_supports_multi_process, remote_supports_cond_breakpoints)
1655 (remote_supports_enable_disable_tracepoint)
1656 (remote_supports_string_tracing)
1657 (remote_can_run_breakpoint_commands, remote_trace_init)
1658 (remote_download_tracepoint, remote_can_download_tracepoint)
1659 (remote_download_trace_state_variable, remote_enable_tracepoint)
1660 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1661 (remote_trace_start, remote_get_trace_status)
1662 (remote_get_tracepoint_status, remote_trace_stop)
1663 (remote_trace_find, remote_get_trace_state_variable_value)
1664 (remote_save_trace_data, remote_get_raw_trace_data)
1665 (remote_set_disconnected_tracing, remote_core_of_thread)
1666 (remote_set_circular_trace_buffer, remote_traceframe_info)
1667 (remote_get_min_fast_tracepoint_insn_len)
1668 (remote_set_trace_buffer_size, remote_set_trace_notes)
1669 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1670 (remote_disable_btrace, remote_teardown_btrace)
1671 (remote_read_btrace, remote_btrace_conf)
1672 (remote_augmented_libraries_svr4_read, remote_load)
1673 (remote_pid_to_exec_file, remote_can_do_single_step)
1674 (remote_execution_direction, remote_thread_handle_to_thread_info):
1675 Refactor as methods of remote_target.
1676 (init_remote_ops, init_extended_remote_ops): Delete.
1677 (remote_can_async_p, remote_is_async_p, remote_async)
1678 (remote_thread_events, remote_upload_tracepoints)
1679 (remote_upload_trace_state_variables): Refactor as methods of
1680 remote_target.
1681 (_initialize_remote): Remove references to init_remote_ops and
1682 init_extended_remote_ops.
1683
1684 * remote-sim.c (gdbsim_target): New class.
1685 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1686 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1687 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1688 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1689 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1690 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1691 Refactor as methods of gdbsim_target.
1692 (gdbsim_ops): Now a gdbsim_target.
1693 (init_gdbsim_ops): Delete.
1694 (gdbsim_cntrl_c): Adjust.
1695 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1696
1697 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1698 (the_amd64_linux_nat_target): New.
1699 (amd64_linux_fetch_inferior_registers)
1700 (amd64_linux_store_inferior_registers): Refactor as methods of
1701 amd64_linux_nat_target.
1702 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1703 * i386-linux-nat.c: Don't include "linux-nat.h".
1704 (i386_linux_nat_target): New class.
1705 (the_i386_linux_nat_target): New.
1706 (i386_linux_fetch_inferior_registers)
1707 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1708 as methods of i386_linux_nat_target.
1709 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1710 * inf-child.c (inf_child_ops): Delete.
1711 (inf_child_fetch_inferior_registers)
1712 (inf_child_store_inferior_registers): Delete.
1713 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1714 methods of inf_child_target.
1715 (inf_child_target::supports_terminal_ours)
1716 (inf_child_target::terminal_init)
1717 (inf_child_target::terminal_inferior)
1718 (inf_child_target::terminal_ours_for_output)
1719 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1720 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1721 New.
1722 (inf_child_open, inf_child_disconnect, inf_child_close)
1723 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1724 (inf_child_post_startup_inferior, inf_child_can_run)
1725 (inf_child_pid_to_exec_file): Refactor as methods of
1726 inf_child_target.
1727 (inf_child_follow_fork): Delete.
1728 (inf_child_target::can_create_inferior)
1729 (inf_child_target::can_attach): New.
1730 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1731 (inf_child_target::has_stack, inf_child_target::has_registers)
1732 (inf_child_target::has_execution): New.
1733 (inf_child_fileio_open, inf_child_fileio_pwrite)
1734 (inf_child_fileio_pread, inf_child_fileio_fstat)
1735 (inf_child_fileio_close, inf_child_fileio_unlink)
1736 (inf_child_fileio_readlink, inf_child_use_agent)
1737 (inf_child_can_use_agent): Refactor as methods of
1738 inf_child_target.
1739 (return_zero, inf_child_target): Delete.
1740 (inf_child_target::inf_child_target): New.
1741 * inf-child.h: Include "target.h".
1742 (inf_child_target): Delete function prototype.
1743 (inf_child_target): New class.
1744 (inf_child_open_target, inf_child_mourn_inferior)
1745 (inf_child_maybe_unpush_target): Delete.
1746 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1747 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1748 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1749 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1750 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1751 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1752 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1753 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1754 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1755 methods of inf_ptrace_target.
1756 (inf_ptrace_target): Delete function.
1757 * inf-ptrace.h: Include "inf-child.h".
1758 (inf_ptrace_target): Delete function declaration.
1759 (inf_ptrace_target): New class.
1760 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1761 * linux-nat.c (linux_target): New.
1762 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1763 (linux_nat_target::~linux_nat_target): New.
1764 (linux_child_post_attach, linux_child_post_startup_inferior)
1765 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1766 (linux_child_remove_fork_catchpoint)
1767 (linux_child_insert_vfork_catchpoint)
1768 (linux_child_remove_vfork_catchpoint)
1769 (linux_child_insert_exec_catchpoint)
1770 (linux_child_remove_exec_catchpoint)
1771 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1772 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1773 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1774 (linux_nat_stopped_data_address)
1775 (linux_nat_stopped_by_sw_breakpoint)
1776 (linux_nat_supports_stopped_by_sw_breakpoint)
1777 (linux_nat_stopped_by_hw_breakpoint)
1778 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1779 (linux_nat_kill, linux_nat_mourn_inferior)
1780 (linux_nat_xfer_partial, linux_nat_thread_alive)
1781 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1782 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1783 (linux_child_static_tracepoint_markers_by_strid)
1784 (linux_nat_is_async_p, linux_nat_can_async_p)
1785 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1786 (linux_nat_supports_multi_process)
1787 (linux_nat_supports_disable_randomization, linux_nat_async)
1788 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1789 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1790 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1791 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1792 methods of linux_nat_target.
1793 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1794 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1795 parameter.
1796 (check_stopped_by_watchpoint): Adjust.
1797 (linux_xfer_partial): Delete.
1798 (linux_target_install_ops, linux_target, linux_nat_add_target):
1799 Delete.
1800 (linux_nat_target::linux_nat_target): New.
1801 * linux-nat.h: Include "inf-ptrace.h".
1802 (linux_nat_target): New.
1803 (linux_target, linux_target_install_ops, linux_nat_add_target):
1804 Delete function declarations.
1805 (linux_target): Declare global.
1806 * linux-thread-db.c (thread_db_target): New.
1807 (thread_db_target::thread_db_target): New.
1808 (thread_db_ops): Delete.
1809 (the_thread_db_target): New.
1810 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1811 (thread_db_update_thread_list, thread_db_pid_to_str)
1812 (thread_db_extra_thread_info)
1813 (thread_db_thread_handle_to_thread_info)
1814 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1815 (thread_db_resume): Refactor as methods of thread_db_target.
1816 (init_thread_db_ops): Delete.
1817 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1818 * x86-linux-nat.c: Don't include "linux-nat.h".
1819 (super_post_startup_inferior): Delete.
1820 (x86_linux_nat_target::~x86_linux_nat_target): New.
1821 (x86_linux_child_post_startup_inferior)
1822 (x86_linux_read_description, x86_linux_enable_btrace)
1823 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1824 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1825 methods of x86_linux_nat_target.
1826 (x86_linux_create_target): Delete. Bits folded ...
1827 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1828 pointer.
1829 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1830 (x86_linux_nat_target): New class.
1831 (x86_linux_create_target): Delete.
1832 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1833 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1834 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1835 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1836 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1837 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1838 make extern.
1839 (x86_use_watchpoints): Delete.
1840 * x86-nat.h: Include "breakpoint.h" and "target.h".
1841 (x86_use_watchpoints): Delete.
1842 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1843 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1844 (x86_insert_watchpoint, x86_remove_watchpoint)
1845 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1846 (x86_stopped_by_hw_breakpoint): New declarations.
1847 (x86_nat_target): New template class.
1848
1849 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1850 (the_ppc_linux_nat_target): New.
1851 (ppc_linux_fetch_inferior_registers)
1852 (ppc_linux_can_use_hw_breakpoint)
1853 (ppc_linux_region_ok_for_hw_watchpoint)
1854 (ppc_linux_ranged_break_num_registers)
1855 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1856 (ppc_linux_insert_mask_watchpoint)
1857 (ppc_linux_remove_mask_watchpoint)
1858 (ppc_linux_can_accel_watchpoint_condition)
1859 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1860 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1861 (ppc_linux_watchpoint_addr_within_range)
1862 (ppc_linux_masked_watch_num_registers)
1863 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1864 (ppc_linux_read_description): Refactor as methods of
1865 ppc_linux_nat_target.
1866 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1867
1868 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1869 (procfs_target): New class.
1870 (the_procfs_target): New.
1871 (procfs_target): Delete function.
1872 (procfs_auxv_parse, procfs_attach, procfs_detach)
1873 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1874 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1875 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1876 (procfs_create_inferior, procfs_update_thread_list)
1877 (procfs_thread_alive, procfs_pid_to_str)
1878 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1879 (procfs_stopped_data_address, procfs_insert_watchpoint)
1880 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1881 (proc_find_memory_regions, procfs_info_proc)
1882 (procfs_make_note_section): Refactor as methods of procfs_target.
1883 (_initialize_procfs): Adjust.
1884 * sol-thread.c (sol_thread_target): New class.
1885 (sol_thread_ops): Now a sol_thread_target.
1886 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1887 (sol_thread_fetch_registers, sol_thread_store_registers)
1888 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1889 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1890 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1891 (init_sol_thread_ops): Delete.
1892 (_initialize_sol_thread): Adjust. Remove references to
1893 init_sol_thread_ops and complete_target_initialization.
1894
1895 * windows-nat.c (windows_nat_target): New class.
1896 (windows_fetch_inferior_registers)
1897 (windows_store_inferior_registers, windows_resume, windows_wait)
1898 (windows_attach, windows_detach, windows_pid_to_exec_file)
1899 (windows_files_info, windows_create_inferior)
1900 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1901 (windows_close, windows_pid_to_str, windows_xfer_partial)
1902 (windows_get_tib_address, windows_get_ada_task_ptid)
1903 (windows_thread_name, windows_thread_alive): Refactor as
1904 windows_nat_target methods.
1905 (do_initial_windows_stuff): Adjust.
1906 (windows_target): Delete function.
1907 (_initialize_windows_nat): Adjust.
1908
1909 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1910 (darwin_mourn_inferior, darwin_kill_inferior)
1911 (darwin_create_inferior, darwin_attach, darwin_detach)
1912 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1913 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1914 (darwin_supports_multi_process): Refactor as darwin_nat_target
1915 methods.
1916 (darwin_resume_to, darwin_files_info): Delete.
1917 (_initialize_darwin_inferior): Rename to ...
1918 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1919 * darwin-nat.h: Include "inf-child.h".
1920 (darwin_nat_target): New class.
1921 (darwin_complete_target): Delete.
1922 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1923 (darwin_target): New.
1924 (i386_darwin_fetch_inferior_registers)
1925 (i386_darwin_store_inferior_registers): Refactor as methods of
1926 darwin_nat_target.
1927 (darwin_complete_target): Delete, with ...
1928 (_initialize_i386_darwin_nat): ... bits factored out here.
1929
1930 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1931 (the_alpha_linux_nat_target): New.
1932 (alpha_linux_register_u_offset): Refactor as
1933 alpha_linux_nat_target method.
1934 (_initialize_alpha_linux_nat): Adjust.
1935 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1936 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1937 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1938 methods of linux_nat_trad_target.
1939 (linux_trad_target): Delete.
1940 * linux-nat-trad.h (linux_trad_target): Delete function.
1941 (linux_nat_trad_target): New class.
1942 * mips-linux-nat.c (mips_linux_nat_target): New class.
1943 (super_fetch_registers, super_store_registers, super_close):
1944 Delete.
1945 (the_mips_linux_nat_target): New.
1946 (mips64_linux_regsets_fetch_registers)
1947 (mips64_linux_regsets_store_registers)
1948 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1949 (mips_linux_register_u_offset, mips_linux_read_description)
1950 (mips_linux_can_use_hw_breakpoint)
1951 (mips_linux_stopped_by_watchpoint)
1952 (mips_linux_stopped_data_address)
1953 (mips_linux_region_ok_for_hw_watchpoint)
1954 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1955 (mips_linux_close): Refactor as methods of mips_linux_nat.
1956 (_initialize_mips_linux_nat): Adjust to C++ification.
1957
1958 * aix-thread.c (aix_thread_target): New class.
1959 (aix_thread_ops): Now an aix_thread_target.
1960 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1961 (aix_thread_fetch_registers, aix_thread_store_registers)
1962 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1963 (aix_thread_thread_alive, aix_thread_pid_to_str)
1964 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1965 Refactor as methods of aix_thread_target.
1966 (init_aix_thread_ops): Delete.
1967 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1968 and complete_target_initialization.
1969 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1970 (rs6000_nat_target): New class.
1971 (the_rs6000_nat_target): New.
1972 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1973 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1974 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1975 (super_create_inferior): Delete.
1976 (_initialize_rs6000_nat): Adjust to C++ification.
1977
1978 * arm-linux-nat.c (arm_linux_nat_target): New class.
1979 (the_arm_linux_nat_target): New.
1980 (arm_linux_fetch_inferior_registers)
1981 (arm_linux_store_inferior_registers, arm_linux_read_description)
1982 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1983 (arm_linux_remove_hw_breakpoint)
1984 (arm_linux_region_ok_for_hw_watchpoint)
1985 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1986 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1987 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1988 arm_linux_nat_target.
1989 (_initialize_arm_linux_nat): Adjust to C++ification.
1990
1991 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1992 (the_aarch64_linux_nat_target): New.
1993 (aarch64_linux_fetch_inferior_registers)
1994 (aarch64_linux_store_inferior_registers)
1995 (aarch64_linux_child_post_startup_inferior)
1996 (aarch64_linux_read_description)
1997 (aarch64_linux_can_use_hw_breakpoint)
1998 (aarch64_linux_insert_hw_breakpoint)
1999 (aarch64_linux_remove_hw_breakpoint)
2000 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2001 (aarch64_linux_region_ok_for_hw_watchpoint)
2002 (aarch64_linux_stopped_data_address)
2003 (aarch64_linux_stopped_by_watchpoint)
2004 (aarch64_linux_watchpoint_addr_within_range)
2005 (aarch64_linux_can_do_single_step): Refactor as methods of
2006 aarch64_linux_nat_target.
2007 (super_post_startup_inferior): Delete.
2008 (_initialize_aarch64_linux_nat): Adjust to C++ification.
2009
2010 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2011 (the_hppa_linux_nat_target): New.
2012 (hppa_linux_fetch_inferior_registers)
2013 (hppa_linux_store_inferior_registers): Refactor as methods of
2014 hppa_linux_nat_target.
2015 (_initialize_hppa_linux_nat): Adjust to C++ification.
2016
2017 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2018 (the_ia64_linux_nat_target): New.
2019 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2020 (ia64_linux_stopped_data_address)
2021 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2022 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2023 ia64_linux_nat_target methods.
2024 (super_xfer_partial): Delete.
2025 (_initialize_ia64_linux_nat): Adjust to C++ification.
2026
2027 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2028 (the_m32r_linux_nat_target): New.
2029 (m32r_linux_fetch_inferior_registers)
2030 (m32r_linux_store_inferior_registers): Refactor as
2031 m32r_linux_nat_target methods.
2032 (_initialize_m32r_linux_nat): Adjust to C++ification.
2033
2034 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2035 (the_m68k_linux_nat_target): New.
2036 (m68k_linux_fetch_inferior_registers)
2037 (m68k_linux_store_inferior_registers): Refactor as
2038 m68k_linux_nat_target methods.
2039 (_initialize_m68k_linux_nat): Adjust to C++ification.
2040
2041 * s390-linux-nat.c (s390_linux_nat_target): New class.
2042 (the_s390_linux_nat_target): New.
2043 (s390_linux_fetch_inferior_registers)
2044 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2045 (s390_insert_watchpoint, s390_remove_watchpoint)
2046 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2047 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2048 (s390_auxv_parse, s390_read_description): Refactor as methods of
2049 s390_linux_nat_target.
2050 (_initialize_s390_nat): Adjust to C++ification.
2051
2052 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2053 (the_sparc_linux_nat_target): New.
2054 (_initialize_sparc_linux_nat): Adjust to C++ification.
2055 * sparc-nat.c (sparc_fetch_inferior_registers)
2056 (sparc_store_inferior_registers): Remove target_ops parameter.
2057 * sparc-nat.h (sparc_fetch_inferior_registers)
2058 (sparc_store_inferior_registers): Remove target_ops parameter.
2059 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2060 (the_sparc64_linux_nat_target): New.
2061 (_initialize_sparc64_linux_nat): Adjust to C++ification.
2062
2063 * spu-linux-nat.c (spu_linux_nat_target): New class.
2064 (the_spu_linux_nat_target): New.
2065 (spu_child_post_startup_inferior, spu_child_post_attach)
2066 (spu_child_wait, spu_fetch_inferior_registers)
2067 (spu_store_inferior_registers, spu_xfer_partial)
2068 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2069 methods.
2070 (_initialize_spu_nat): Adjust to C++ification.
2071
2072 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2073 (the_tilegx_linux_nat_target): New.
2074 (fetch_inferior_registers, store_inferior_registers):
2075 Refactor as methods.
2076 (_initialize_tile_linux_nat): Adjust to C++ification.
2077
2078 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2079 (the_xtensa_linux_nat_target): New.
2080 (xtensa_linux_fetch_inferior_registers)
2081 (xtensa_linux_store_inferior_registers): Refactor as
2082 xtensa_linux_nat_target methods.
2083 (_initialize_xtensa_linux_nat): Adjust to C++ification.
2084
2085 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
2086 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
2087 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
2088 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
2089 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
2090 (fbsd_stopped_by_sw_breakpoint)
2091 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
2092 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
2093 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
2094 (fbsd_post_startup_inferior, fbsd_post_attach)
2095 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
2096 (fbsd_set_syscall_catchpoint)
2097 (super_xfer_partial, super_resume, super_wait)
2098 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
2099 (fbsd_handle_debug_trap): Remove target_ops parameter.
2100 (fbsd_nat_add_target): Delete.
2101 * fbsd-nat.h: Include "inf-ptrace.h".
2102 (fbsd_nat_add_target): Delete.
2103 (USE_SIGTRAP_SIGINFO): Define.
2104 (fbsd_nat_target): New class.
2105
2106 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
2107 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
2108 (amd64bsd_target): Delete.
2109 * amd64-bsd-nat.h: New file.
2110 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
2111 "x86-bsd-nat.h".
2112 (amd64_fbsd_nat_target): New class.
2113 (the_amd64_fbsd_nat_target): New.
2114 (amd64fbsd_read_description): Refactor as method of
2115 amd64_fbsd_nat_target.
2116 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2117 (_initialize_amd64fbsd_nat): Adjust to C++ification.
2118 * amd64-nat.h (amd64bsd_target): Delete function declaration.
2119 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
2120 (i386bsd_store_inferior_registers): Remove target_ops parameter.
2121 (i386bsd_target): Delete.
2122 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
2123 (i386bsd_fetch_inferior_registers)
2124 (i386bsd_store_inferior_registers): Declare.
2125 (i386_bsd_nat_target): New class.
2126 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
2127 (the_i386_fbsd_nat_target): New.
2128 (i386fbsd_resume, i386fbsd_read_description): Refactor as
2129 i386_fbsd_nat_target methods.
2130 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2131 (_initialize_i386fbsd_nat): Adjust to C++ification.
2132 * x86-bsd-nat.c (super_mourn_inferior): Delete.
2133 (x86bsd_mourn_inferior, x86bsd_target): Delete.
2134 (_initialize_x86_bsd_nat): Adjust to C++ification.
2135 * x86-bsd-nat.h: Include "x86-nat.h".
2136 (x86bsd_target): Delete declaration.
2137 (x86bsd_nat_target): New class.
2138
2139 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2140 (the_aarch64_fbsd_nat_target): New.
2141 (aarch64_fbsd_fetch_inferior_registers)
2142 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2143 aarch64_fbsd_nat_target.
2144 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2145 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2146 (the_alpha_bsd_nat_target): New.
2147 (alphabsd_fetch_inferior_registers)
2148 (alphabsd_store_inferior_registers): Refactor as
2149 alpha_bsd_nat_target methods.
2150 (_initialize_alphabsd_nat): Refactor as methods of
2151 alpha_bsd_nat_target.
2152 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2153 (the_amd64_nbsd_nat_target): New.
2154 (_initialize_amd64nbsd_nat): Adjust to C++ification.
2155 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2156 (the_amd64_obsd_nat_target): New.
2157 (_initialize_amd64obsd_nat): Adjust to C++ification.
2158 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2159 (the_arm_fbsd_nat_target): New.
2160 (arm_fbsd_fetch_inferior_registers)
2161 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2162 (_initialize_arm_fbsd_nat): Refactor as methods of
2163 arm_fbsd_nat_target.
2164 (_initialize_arm_fbsd_nat): Adjust to C++ification.
2165 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2166 (the_arm_netbsd_nat_target): New.
2167 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2168 arm_netbsd_nat_target.
2169 (_initialize_arm_netbsd_nat): Adjust to C++ification.
2170 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2171 (the_hppa_nbsd_nat_target): New.
2172 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2173 hppa_nbsd_nat_target methods.
2174 (_initialize_hppanbsd_nat): Adjust to C++ification.
2175 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2176 (the_hppa_obsd_nat_target): New.
2177 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2178 methods of hppa_obsd_nat_target.
2179 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
2180 add_target.
2181 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2182 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
2183 add_target.
2184 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2185 (_initialize_i386obsd_nat): Use add_target.
2186 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2187 (the_m68k_bsd_nat_target): New.
2188 (m68kbsd_fetch_inferior_registers)
2189 (m68kbsd_store_inferior_registers): Refactor as methods of
2190 m68k_bsd_nat_target.
2191 (_initialize_m68kbsd_nat): Adjust to C++ification.
2192 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2193 (the_mips_fbsd_nat_target): New.
2194 (mips_fbsd_fetch_inferior_registers)
2195 (mips_fbsd_store_inferior_registers): Refactor as methods of
2196 mips_fbsd_nat_target.
2197 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
2198 add_target.
2199 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2200 (the_mips_nbsd_nat_target): New.
2201 (mipsnbsd_fetch_inferior_registers)
2202 (mipsnbsd_store_inferior_registers): Refactor as methods of
2203 mips_nbsd_nat_target.
2204 (_initialize_mipsnbsd_nat): Adjust to C++ification.
2205 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2206 (the_mips64_obsd_nat_target): New.
2207 (mips64obsd_fetch_inferior_registers)
2208 (mips64obsd_store_inferior_registers): Refactor as methods of
2209 mips64_obsd_nat_target.
2210 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
2211 add_target.
2212 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2213 nbsd_nat_target.
2214 * nbsd-nat.h: Include "inf-ptrace.h".
2215 (nbsd_nat_target): New class.
2216 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2217 (obsd_wait): Refactor as methods of obsd_nat_target.
2218 (obsd_add_target): Delete.
2219 * obsd-nat.h: Include "inf-ptrace.h".
2220 (obsd_nat_target): New class.
2221 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2222 (the_ppc_fbsd_nat_target): New.
2223 (ppcfbsd_fetch_inferior_registers)
2224 (ppcfbsd_store_inferior_registers): Refactor as methods of
2225 ppc_fbsd_nat_target.
2226 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
2227 add_target.
2228 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
2229 (the_ppc_nbsd_nat_target): New.
2230 (ppcnbsd_fetch_inferior_registers)
2231 (ppcnbsd_store_inferior_registers): Refactor as methods of
2232 ppc_nbsd_nat_target.
2233 (_initialize_ppcnbsd_nat): Adjust to C++ification.
2234 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
2235 (the_ppc_obsd_nat_target): New.
2236 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
2237 methods of ppc_obsd_nat_target.
2238 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
2239 add_target.
2240 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
2241 (the_sh_nbsd_nat_target): New.
2242 (shnbsd_fetch_inferior_registers)
2243 (shnbsd_store_inferior_registers): Refactor as methods of
2244 sh_nbsd_nat_target.
2245 (_initialize_shnbsd_nat): Adjust to C++ification.
2246 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
2247 (inf_ptrace_xfer_partial): Delete.
2248 (sparc_xfer_partial, sparc_target): Delete.
2249 * sparc-nat.h (sparc_fetch_inferior_registers)
2250 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
2251 (sparc_target): Delete function declaration.
2252 (sparc_target): New template class.
2253 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
2254 (_initialize_sparcnbsd_nat): Adjust to C++ification.
2255 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
2256 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
2257 add_target.
2258 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2259 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2260 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2261 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
2262 add_target.
2263 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2264 (the_vax_bsd_nat_target): New.
2265 (vaxbsd_fetch_inferior_registers)
2266 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2267 methods.
2268 (_initialize_vaxbsd_nat): Adjust to C++ification.
2269
2270 * bsd-kvm.c (bsd_kvm_target): New class.
2271 (bsd_kvm_ops): Now a bsd_kvm_target.
2272 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2273 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2274 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
2275 bsd_kvm_target.
2276 (bsd_kvm_return_one): Delete.
2277 (bsd_kvm_add_target): Adjust to C++ification.
2278
2279 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
2280 (nto_procfs_target_procfs): New classes.
2281 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
2282 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
2283 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
2284 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
2285 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
2286 (procfs_remove_hw_breakpoint, procfs_resume)
2287 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
2288 (procfs_kill_inferior, procfs_store_registers)
2289 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
2290 as methods of nto_procfs_target.
2291 (nto_procfs_ops): Now an nto_procfs_target_procfs.
2292 (nto_native_ops): Delete.
2293 (procfs_open, procfs_native_open): Delete.
2294 (nto_native_ops): Now an nto_procfs_target_native.
2295 (init_procfs_targets): Adjust to C++ification.
2296 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
2297 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
2298 Refactor as methods of nto_procfs_target.
2299
2300 * go32-nat.c (go32_nat_target): New class.
2301 (the_go32_nat_target): New.
2302 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
2303 (go32_store_registers, go32_xfer_partial, go32_files_info)
2304 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
2305 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
2306 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
2307 (go32_pid_to_str): Refactor as methods of go32_nat_target.
2308 (go32_target): Delete.
2309 (_initialize_go32_nat): Adjust to C++ification.
2310
2311 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
2312 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
2313 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
2314 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
2315 gnu_nat_target.
2316 (gnu_target): Delete.
2317 * gnu-nat.h (gnu_target): Delete.
2318 (gnu_nat_target): New class.
2319 * i386-gnu-nat.c (gnu_base_target): New.
2320 (i386_gnu_nat_target): New class.
2321 (the_i386_gnu_nat_target): New.
2322 (_initialize_i386gnu_nat): Adjust to C++ification.
2323
3fffc070
PA
23242018-05-02 Pedro Alves <palves@redhat.com>
2325
2326 * bfd-target.c (target_bfd_xclose): Rename to ...
2327 (target_bfd_close): ... this.
2328 (target_bfd_reopen): Adjust.
2329 * target.c (target_close): Remove references to to_xclose.
2330 * target.h (target_ops::to_xclose): Delete.
2331 (target_ops::to_close): Update comments.
2332
6798487f
PA
23332018-05-02 Pedro Alves <palves@redhat.com>
2334
2335 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
2336 "linux-nat.h".
2337 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
2338 * inf-ptrace.c (inf_ptrace_register_u_offset)
2339 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2340 (inf_ptrace_store_register, inf_ptrace_store_registers)
2341 (inf_ptrace_trad_target): Move to ...
2342 * linux-nat-trad.c: ... this new file.
2343 * linux-nat-trad.h: New file.
2344 * linux-nat.c (linux_target_install_ops): Make extern.
2345 (linux_trad_target): Delete.
2346 * linux-nat.h (linux_trad_target): Delete declaration.
2347 (linux_target_install_ops): Declare.
2348 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
2349 "linux-nat.h".
2350
c1955e17
PA
23512018-05-02 Pedro Alves <palves@redhat.com>
2352
2353 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2354 procfs_target/add_target here.
2355 * procfs.c (procfs_target): Make static.
2356 (_initialize_procfs): Call add_target here.
2357 * procfs.h (struct target_ops): Remove forward declaration.
2358 (procfs_target): Remove declaration.
2359 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
2360
b5c8fcb1
PA
23612018-05-02 Pedro Alves <palves@redhat.com>
2362
2363 * procfs.c (procfs_stopped_by_watchpoint)
2364 (procfs_insert_watchpoint, procfs_remove_watchpoint)
2365 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
2366 Forward declare.
2367 (procfs_use_watchpoints): Delete, move contents...
2368 (procfs_target): ... here.
2369 * procfs.h (procfs_use_watchpoints): Delete declaration.
2370 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2371 procfs_use_watchpoints.
2372 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
2373 procfs_use_watchpoints.
2374
0489430a
TT
23752018-05-02 Tom Tromey <tom@tromey.com>
2376
2377 PR python/20084:
2378 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
2379 and var_zuinteger_unlimited.
2380 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
2381 and PARAM_ZUINTEGER_UNLIMITED.
2382 (set_parameter_value): Handle var_zuinteger and
2383 var_zuinteger_unlimited.
2384 (add_setshow_generic): Likewise.
2385 (parmpy_init): Likewise.
2386
1632f8ba
DR
23872018-04-28 Dan Robertson <danlrobertson89@gmail.com>
2388
2389 PR rust/23124
2390 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
2391 pointer is not null before dereferencing it.
2392
76761936
TT
23932018-04-30 Tom Tromey <tom@tromey.com>
2394
2395 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
2396 is_mi_like_p.
2397
2d33446d
TT
23982018-04-30 Tom Tromey <tom@tromey.com>
2399
2400 * breakpoint.c (mention): Remove use of is_mi_like_p.
2401 (print_mention_ranged_breakpoint): Likewise.
2402 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
2403 of is_mi_like_p.
2404
f3c6abab
TT
24052018-04-30 Tom Tromey <tom@tromey.com>
2406
2407 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
2408
40c03530
TT
24092018-04-30 Tom Tromey <tom@tromey.com>
2410
2411 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
2412 (info_spu_event_command): Remove some uses of is_mi_like_p.
2413
2038b7fd
TT
24142018-04-30 Tom Tromey <tom@tromey.com>
2415
2416 * python/py-framefilter.c (py_print_single_arg)
2417 (enumerate_locals, py_print_args, py_print_frame): Remove some
2418 uses of is_mi_like_p.
2419
4904c3c6
TT
24202018-04-30 Tom Tromey <tom@tromey.com>
2421
2422 * ui-out.c: Update.
2423 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
2424 * ui-out.h (ui_out::is_mi_like_p): Now const.
2425 (ui_out::do_is_mi_like_p): Now const.
2426 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
2427
7c66fffc
TT
24282018-04-30 Tom Tromey <tom@tromey.com>
2429
2430 * varobj.c (varobj_set_visualizer): Use new_reference.
2431 * python/python.c (gdbpy_decode_line): Use new_reference.
2432 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
2433 new_reference.
2434
bbfa6f00
TT
24352018-04-30 Tom Tromey <tom@tromey.com>
2436
2437 * varobj.c (install_new_value): Use new_reference.
2438 * value.h (value_incref): Return void. Swap intro comment with
2439 value_decref.
2440 * value.c (set_value_parent): Use new_reference.
2441 (value_incref): Return void. Update intro comment.
2442 (release_value): Use new_reference.
2443 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
2444
1831a9f9
TT
24452018-04-30 Tom Tromey <tom@tromey.com>
2446
2447 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
2448 * gdb_bfd.h (new_bfd_ref): Remove.
2449 (gdb_bfd_open): Update comment.
2450 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2451 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
2452 (gdb_bfd_fdopenr): Use new_reference.
2453 * exec.c (exec_file_attach): Use new_reference.
2454
7c1b5f3d
TT
24552018-04-30 Tom Tromey <tom@tromey.com>
2456
2457 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
2458 method.
2459
e11fb955
TT
24602018-04-30 Tom Tromey <tom@tromey.com>
2461
2462 * jit.c (jit_read_code_entry): Use type_align.
2463 * i386-tdep.c (i386_gdbarch_init): Don't call
2464 set_gdbarch_long_long_align_bit.
2465 * gdbarch.sh: Remove long_long_align_bit.
2466 * gdbarch.c, gdbarch.h: Rebuild.
2467 * arc-tdep.c (arc_type_align): New function.
2468 (arc_gdbarch_init): Use arc_type_align. Don't call
2469 set_gdbarch_long_long_align_bit.
2470
2fff16dd
TT
24712018-04-30 Tom Tromey <tom@tromey.com>
2472
2473 * rust-lang.c (rust_type_alignment): Remove.
2474 (rust_composite_type): Use type_align.
2475
6d7bb824
TT
24762018-04-30 Tom Tromey <tom@tromey.com>
2477
2478 * NEWS: Mention Type.align.
2479 * python/py-type.c (typy_get_alignof): New function.
2480 (type_object_getset): Add "alignof".
2481
007e1530
TT
24822018-04-30 Tom Tromey <tom@tromey.com>
2483
2484 PR exp/17095:
2485 * NEWS: Update.
2486 * std-operator.def (UNOP_ALIGNOF): New operator.
2487 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
2488 New.
2489 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
2490 * c-lang.c (c_op_print_tab): Add alignof.
2491 * c-exp.y (ALIGNOF): New token.
2492 (exp): Add "ALIGNOF" production.
2493 (ident_tokens): Add _Alignof and alignof.
2494
2b4424c3
TT
24952018-04-30 Tom Tromey <tom@tromey.com>
2496
2497 * i386-tdep.c (i386_type_align): New function.
2498 (i386_gdbarch_init): Update.
2499 * gdbarch.sh (type_align): New method.
2500 * gdbarch.c, gdbarch.h: Rebuild.
2501 * arch-utils.h (default_type_align): Declare.
2502 * arch-utils.c (default_type_align): New function.
2503 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
2504 (struct type) <align_log2>: New field.
2505 <instance_flags>: Now a bitfield.
2506 (TYPE_RAW_ALIGN): New macro.
2507 (type_align, type_raw_align, set_type_align): Declare.
2508 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
2509 functions.
2510 * dwarf2read.c (quirk_rust_enum): Set type alignment.
2511 (get_alignment, maybe_set_alignment): New functions.
2512 (read_structure_type, read_enumeration_type, read_array_type)
2513 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
2514 (read_subrange_type, read_base_type): Set type alignment.
2515
d33bc52e
SM
25162018-04-30 Simon Marchi <simon.marchi@ericsson.com>
2517
2518 * dwarf2read.c (read_index_from_section): Use bool.
2519
e28b63a9
FG
25202018-04-29 Fabian Groffen <grobian@gentoo.org>
2521
2522 PR gdb/22950
2523 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
2524 with #ifdef.
2525
cd8c76e4
JR
25262018-04-29 John Reiser <jreiser@BitWagon.com>
2527
2528 PR build/22873
2529 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
2530 last step, and do it atomically.
2531
476d250e
AO
25322018-04-27 Alexandre Oliva <aoliva@redhat.com>
2533
2534 * compile/compile-c-types.c (convert_int, convert_float):
2535 Update for C FE v1.
2536
6873858b
TT
25372018-04-27 Tom Tromey <tom@tromey.com>
2538
2539 PR rust/22545:
2540 * rust-lang.c (rust_inclusive_range_type_p): New function.
2541 (rust_range): Handle inclusive ranges.
2542 (rust_compute_range): Likewise.
2543 * rust-exp.y (struct rust_op) <inclusive>: New field.
2544 (DOTDOTEQ): New constant.
2545 (range_expr): Add "..=" productions.
2546 (operator_tokens): Add "..=" token.
2547 (ast_range): Add "inclusive" parameter.
2548 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
2549 ranges.
2550 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
2551 bounds values.
2552 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
2553 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
2554 Update comments.
2555 * expprint.c (print_subexp_standard): Handle new bounds values.
2556 (dump_subexp_body_standard): Likewise.
2557
632e107b
TT
25582018-04-27 Tom Tromey <tom@tromey.com>
2559
2560 * configure: Rebuild.
2561 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
2562 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
2563 "OVERRIDE".
2564 (class symbol_needs_eval_context): Likewise.
2565 * dwarf2read.c (mock_mapped_index::symbol_name_count)
2566 (mock_mapped_index::symbol_name_at): Use "override". Remove
2567 "virtual".
2568 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
2569 "override".
2570 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
2571 * aarch64-tdep.c (instruction_reader::read): Use "override".
2572 (instruction_reader_test::read): Likewise.
2573 * arm-tdep.c (instruction_reader::read): Use "override".
2574 (instruction_reader_thumb::read): Likewise.
2575
b75abf5b
AK
25762018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2577
2578 PR remote/9665
2579 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
2580 instead of remote_send.
2581 (remote_send): Remove.
2582
79188d8d
PA
25832018-04-26 Pedro Alves <palves@redhat.com>
2584
2585 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
2586 find_function_start_sal instead of find_pc_line.
2587
f50776aa
PA
25882018-04-26 Pedro Alves <palves@redhat.com>
2589
2590 * breakpoint.c (set_breakpoint_location_function): Handle
2591 mst_data_gnu_ifunc.
2592 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
2593 * elfread.c (elf_symtab_read): Give data symbols with
2594 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
2595 (elf_rel_plt_read): Update comment.
2596 * linespec.c (convert_linespec_to_sals): Handle
2597 mst_data_gnu_ifunc.
2598 (minsym_found): Handle mst_data_gnu_ifunc.
2599 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
2600 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
2601 * parse.c (find_minsym_type_and_address): Handle
2602 mst_data_gnu_ifunc.
2603 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
2604 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
2605 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
2606 comment.
2607 <mst_data_gnu_ifunc>: New enumerator.
2608
20944a6e
PA
26092018-04-26 Pedro Alves <palves@redhat.com>
2610
2611 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
2612 (lookup_minimal_symbol_by_pc_section): ... this. Replace
2613 'want_trampoline' parameter by a lookup_msym_prefer parameter.
2614 Handle it.
2615 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
2616 (lookup_minimal_symbol_by_pc): Adjust.
2617 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2618 (lookup_solib_trampoline_symbol_by_pc): Adjust.
2619 * minsyms.h (lookup_msym_prefer): New enum.
2620 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2621 parameter by a lookup_msym_prefer parameter.
2622
1adeb822
PA
26232018-04-26 Pedro Alves <palves@redhat.com>
2624
2625 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2626 ends in "@plt" instead of looking at the symbol's section.
2627
a0aca7b0
PA
26282018-04-26 Pedro Alves <palves@redhat.com>
2629
2630 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
2631 all references.
2632 (find_pc_partial_function_gnu_ifunc): Rename to ...
2633 (find_pc_partial_function): ... this, and remove references to
2634 'is_gnu_ifunc_p'.
2635 (find_pc_partial_function): Delete old implementation.
2636 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2637
76af0f26
PA
26382018-04-26 Pedro Alves <palves@redhat.com>
2639
2640 * linespec.c (struct bound_minimal_symbol_search_key): New.
2641 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
2642 skip first line if we found a GNU ifunc minimal symbol by name.
2643 (compare_msymbols): Change parameters to work with a destructured
2644 lhs minsym.
2645 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2646 functions.
2647
3467ec66
PA
26482018-04-26 Pedro Alves <palves@redhat.com>
2649
2650 * breakpoint.c (set_breakpoint_location_function): Don't resolve
2651 ifunc targets here. Instead, if we have an ifunc minsym, use its
2652 address/name.
2653 (add_location_to_breakpoint): Store the minsym and the objfile in
2654 the breakpoint location.
2655 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2656 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2657 Record the minsym in the sal.
2658 * symtab.h (symtab_and_line) <msymbol>: New field.
2659
28f4fa4d
PA
26602018-04-26 Pedro Alves <palves@redhat.com>
2661
2662 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2663 unless we actually resolved the ifunc.
2664
ca31ab1d
PA
26652018-04-26 Pedro Alves <palves@redhat.com>
2666
2667 * c-exp.y (variable production): Prefer ifunc minsyms over
2668 regular function symbols.
2669 * symtab.c (find_gnu_ifunc): New function.
2670 * minsyms.h (lookup_msym_prefer): New enum.
2671 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2672 parameter by a lookup_msym_prefer parameter.
2673 * symtab.h (find_gnu_ifunc): New declaration.
2674
8388016d
PA
26752018-04-26 Pedro Alves <palves@redhat.com>
2676
2677 * blockframe.c (find_gnu_ifunc_target_type): New function.
2678 (find_function_type): New.
2679 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2680 return a value with a memory address.
2681 (eval_call): For calls to GNU ifunc functions, try to find the
2682 type of the target function from the type that the resolver
2683 returns.
2684 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2685 symbols.
2686 * infcall.c (find_function_return_type): Delete.
2687 (find_function_addr): Add 'function_type' parameter. For calls to
2688 GNU ifunc functions, try to find the type of the target function
2689 from the type that the resolver returns, and return it via
2690 FUNCTION_TYPE.
2691 (call_function_by_hand_dummy): Adjust to use the function type
2692 returned by find_function_addr.
2693 (find_function_addr): Add 'function_type' parameter and move
2694 description here.
2695 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2696 declarations.
2697
a376e11d
PA
26982018-04-26 Pedro Alves <palves@redhat.com>
2699
2700 * c-exp.y (variable production): Skip finding an alias for ifunc
2701 symbols.
2702
02e169e2
PA
27032018-04-26 Pedro Alves <palves@redhat.com>
2704
2705 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2706
249b5733
PA
27072018-04-25 Pedro Alves <palves@redhat.com>
2708
2709 * infcmd.c (kill_command): Print the pid as string, not the whole
2710 thread's ptid. Add comment. s/has been killed/killed/ in output
2711 message.
2712 * remote.c (remote_detach_1): Print the pid as string, not the
2713 whole thread's ptid.
2714
f67c0c91
SDJ
27152018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2716 Sergio Durigan Junior <sergiodj@redhat.com>
2717 Pedro Alves <palves@redhat.com>
2718
2719 * infcmd.c (kill_command): Print message when inferior has
2720 been killed.
2721 * inferior.c (print_inferior_events): Remove 'static'. Set as
2722 '1'.
2723 (add_inferior): Improve message printed when
2724 'print_inferior_events' is on.
2725 (exit_inferior): Remove message printed when
2726 'print_inferior_events' is on.
2727 (detach_inferior): Improve message printed when
2728 'print_inferior_events' is on.
2729 (initialize_inferiors): Use 'add_inferior_silent' to set
2730 'current_inferior_'.
2731 * inferior.h (print_inferior_events): Declare here as
2732 'extern'.
2733 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2734 '[Detaching...]' messages when 'print_inferior_events' is on.
2735 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2736 as prefix/suffix for messages. Remove periods. Fix erroneous
2737 'Detaching after fork from child...', replace it by '... from
2738 parent...'.
2739 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2740 prefix/suffix when printing 'Detaching...' messages. Print
2741 them when 'print_inferior_events' is on.
2742 * remote.c (remote_detach_1): Print message when detaching
2743 from inferior and '!is_fork_parent'.
2744
e427af18
TT
27452018-04-24 Tom Tromey <tom@tromey.com>
2746
2747 * cli-out.h: Reindent.
2748
05b1d8d6
TT
27492018-04-24 Tom Tromey <tom@tromey.com>
2750
2751 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2752 (cli_ui_out::do_field_string): Use fputs_filtered.
2753 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2754
a95c7dab
TT
27552018-04-23 Tom Tromey <tom@tromey.com>
2756
2757 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2758 gdb::unique_xmalloc_ptr.
2759
458412c3
TT
27602018-04-23 Tom Tromey <tom@tromey.com>
2761
2762 * configure: Rebuild.
2763
db86b02b
RS
27642018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2765
2766 PR gdb/23095
2767 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2768 prepare_for_testing. Set normal_bp to r_debug_state if target
2769 is bsd.
2770
00aecdcf
PA
27712018-04-21 Pedro Alves <palves@redhat.com>
2772 Rajendra SY <rajendra.sy@gmail.com>
2773
2774 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2775 * remote.c (extended_remote_attach): In all-stop mode, mark the
2776 thread as executing.
2777
224608c3
PW
27782018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2779
2780 * thread.c (thread_apply_all_command): Fix comment.
2781 (thread_command): Fix comment.
2782
3b74854b
AH
27832018-04-10 Alan Hayward <alan.hayward@arm.com>
2784
2785 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2786 parameter.
2787 * features/aarch64-core.c (create_feature_aarch64_core):
2788 Regenerate.
2789 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2790 Likewise.
2791 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2792 Likewise.
2793 * features/i386/32bit-avx512.c
2794 (create_feature_i386_32bit_avx512): Likewise.
2795 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2796 Likewise.
2797 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2798 Likewise.
2799 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2800 Likewise.
2801 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2802 Likewise.
2803 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2804 Likewise.
2805 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2806 Likewise.
2807 * features/i386/64bit-avx512.c
2808 (create_feature_i386_64bit_avx512): Likewise.
2809 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2810 Likewise.
2811 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2812 Likewise.
2813 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2814 Likewise.
2815 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2816 Likewise.
2817 * features/i386/64bit-segments.c
2818 (create_feature_i386_64bit_segments): Likewise.
2819 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2820 Likewise.
2821 * features/i386/x32-core.c
2822 (create_feature_i386_x32_core): Likewise.
2823 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2824 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2825 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2826 * target-descriptions.c: In generated code, don't pass xml
2827 filename.
2828
e98577a9
AH
28292018-04-18 Alan Hayward <alan.hayward@arm.com>
2830
2831 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2832 (print_xml_feature::visit_post): Likewise.
2833 (print_xml_feature::visit): Likewise.
2834 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2835 (print_xml_feature): Add new class.
2836 * regformats/regdat.sh: Null xmltarget on feature targets.
2837 * target-descriptions.c (struct target_desc): Add xmltarget.
2838 (maintenance_check_tdesc_xml_convert): Add unittest function.
2839 (tdesc_get_features_xml): Add function to get xml.
2840 (maintenance_check_xml_descriptions): Test xml generation.
2841 * xml-tdesc.c (string_read_description_xml): Add function.
2842 * xml-tdesc.h (string_read_description_xml): Add declaration.
2843
ad7fc756
AH
28442018-04-18 Alan Hayward <alan.hayward@arm.com>
2845
2846 * features/Makefile: Add feature marker to targets with new style
2847 target descriptions.
2848 * regformats/aarch64.dat: Regenerate.
2849 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2850 * regformats/i386/amd64-avx-linux.dat: Likewise.
2851 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2852 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2853 * regformats/i386/amd64-linux.dat: Likewise.
2854 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2855 * regformats/i386/amd64.dat: Likewise.
2856 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2857 * regformats/i386/i386-avx-linux.dat: Likewise.
2858 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2859 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2860 * regformats/i386/i386-linux.dat: Likewise.
2861 * regformats/i386/i386-mmx-linux.dat: Likewise.
2862 * regformats/i386/i386-mpx-linux.dat: Likewise.
2863 * regformats/i386/i386.dat: Likewise.
2864 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2865 * regformats/i386/x32-avx-linux.dat: Likewise.
2866 * regformats/i386/x32-linux.dat: Likewise.
2867 * regformats/tic6x-c62x-linux.dat: Likewise.
2868 * regformats/tic6x-c64x-linux.dat: Likewise.
2869 * regformats/tic6x-c64xp-linux.dat: Likewise.
2870 * regformats/regdat.sh: Parse feature marker.
2871
d278f585
AH
28722018-04-18 Alan Hayward <alan.hayward@arm.com>
2873
2874 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2875 (tdesc_osabi_name): Likewise.
2876 * target-descriptions.c (tdesc_architecture_name): Add new
2877 function.
2878 (tdesc_osabi_name): Likewise.
2879
eee8a18d
AH
28802018-04-18 Alan Hayward <alan.hayward@arm.com>
2881
2882 * common/tdesc.c (tdesc_predefined_type): Move to here.
2883 (tdesc_named_type): Likewise.
2884 (tdesc_create_vector): Likewise.
2885 (tdesc_create_struct): Likewise.
2886 (tdesc_set_struct_size): Likewise.
2887 (tdesc_create_union): Likewise.
2888 (tdesc_create_flags): Likewise.
2889 (tdesc_create_enum): Likewise.
2890 (tdesc_add_field): Likewise.
2891 (tdesc_add_typed_bitfield): Likewise.
2892 (tdesc_add_bitfield): Likewise.
2893 (tdesc_add_flag): Likewise.
2894 (tdesc_add_enum_value): Likewise.
2895 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2896 (struct tdesc_type_vector): Likewise.
2897 (struct tdesc_type_field): Likewise.
2898 (struct tdesc_type_with_fields): Likewise.
2899 (tdesc_create_enum): Add declaration.
2900 (tdesc_add_typed_bitfield): Likewise.
2901 (tdesc_add_enum_value): Likewise.
2902 * target-descriptions.c (tdesc_type_field): Move from here.
2903 (tdesc_type_builtin): Likewise.
2904 (tdesc_type_vector): Likewise.
2905 (tdesc_type_with_fields): Likewise.
2906 (tdesc_predefined_types): Likewise.
2907 (tdesc_named_type): Likewise.
2908 (tdesc_create_vector): Likewise.
2909 (tdesc_create_struct): Likewise.
2910 (tdesc_set_struct_size): Likewise.
2911 (tdesc_create_union): Likewise.
2912 (tdesc_create_flags): Likewise.
2913 (tdesc_create_enum): Likewise.
2914 (tdesc_add_field): Likewise.
2915 (tdesc_add_typed_bitfield): Likewise.
2916 (tdesc_add_bitfield): Likewise.
2917 (tdesc_add_flag): Likewise.
2918 (tdesc_add_enum_value): Likewise.
2919 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2920 (tdesc_add_typed_bitfield): Likewise.
2921 (tdesc_add_enum_value): Likewise.
2922
82ec9bc7
AH
29232018-04-18 Alan Hayward <alan.hayward@arm.com>
2924
2925 * common/tdesc.c (tdesc_feature::accept): Move to here.
2926 (tdesc_feature::operator==): Likewise.
2927 (tdesc_create_reg): Likewise.
2928 * common/tdesc.h (tdesc_type_kind): Likewise.
2929 (struct tdesc_type): Likewise.
2930 (struct tdesc_feature): Likewise.
2931 * regformats/regdat.sh: Create a feature.
2932 * target-descriptions.c (tdesc_type_kind): Move from here.
2933 (tdesc_type): Likewise.
2934 (tdesc_type_up): Likewise.
2935 (tdesc_feature): Likewise.
2936 (tdesc_create_reg): Likewise.
2937
ea3e7d71
AH
29382018-04-18 Alan Hayward <alan.hayward@arm.com>
2939
2940 * Makefile.in: Add arch/tdesc.c
2941 * common/tdesc.c: New file.
2942 * common/tdesc.h (tdesc_element_visitor): Move to here.
2943 (tdesc_element): Likewise.
2944 (tdesc_reg): Likewise.
2945 (tdesc_reg_up): Likewise.
2946 * regformats/regdef.h (reg): Add offset to constructors.
2947 * target-descriptions.c (tdesc_element_visitor): Move from here.
2948 (tdesc_element): Likewise.
2949 (tdesc_reg): Likewise.
2950 (tdesc_reg_up): Likewise.
2951
bedda9ac
TT
29522018-04-17 Tom Tromey <tom@tromey.com>
2953
2954 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2955 discriminant field.
2956
a037790e
TT
29572018-04-17 Tom Tromey <tom@tromey.com>
2958
2959 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2960
c7dcbf88
AA
29612018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2962
2963 * symtab.c (print_symbol_info): Skip printing filename and line
2964 number when `last' is NULL.
2965 (symtab_symbol_info): Use empty string instead of NULL for first
2966 invocation of print_symbol_info.
2967 (rbreak_command): Pass NULL to `last' parameter of
2968 print_symbol_info.
2969
07d28c77
SM
29702018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2973 instead of nullptr.
2974
8a3de5e1
PA
29752018-04-16 Pedro Alves <palves@redhat.com>
2976
2977 * MAINTAINERS (sh): Remove.
2978 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2979 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2980 (ALLDEPFILES): Remove sh64-tdep.c.
2981 * NEWS: Mentions that support for SH-5/SH64 is removed.
2982 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2983 (sh*-*-openbsd*): Ditto.
2984 (sh64-*-elf*): Remove.
2985 (sh*): Remove.
2986 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2987 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2988 * sh-tdep.c: No longer include "sh64-tdep.h".
2989 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2990 * sh64-tdep.c, sh64-tdep.h: Remove files.
2991
a2a79012
PA
29922018-04-16 Pedro Alves <palves@redhat.com>
2993
2994 * MAINTAINERS: Remove m88k.
2995 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2996 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2997 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2998 * NEWS: Mention that support for m88k was removed.
2999 * configure.host (m88*-*-*): Remove support.
3000 * configure.nat (m88k-*-*): Remove support.
3001 * configure.tgt (m88*-*-openbsd*): Remove.
3002 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3003
eda4efb1
SM
30042018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
3005
3006 * configure.tgt (x86_tobjs): New variable.
3007 (amd64_tobjs, i386_tobjs): Use it.
3008
b744723f
AA
30092018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3010
3011 * symtab.c (print_symbol_info): Precede the symbol definition by
3012 the line number when available.
3013 * NEWS: Advertise this enhancement.
3014
4a4495d6
MM
30152018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3016
3017 * NEWS (New options): announce set/show record btrace cpu.
3018 * btrace.c: Include record-btrace.h.
3019 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3020 the vendor is unknown.
3021 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
3022 Maybe overwrite the btrace configuration's cpu.
3023 (btrace_compute_ftrace): Add cpu parameter. Update callers.
3024 (btrace_fetch): Add cpu parameter. Update callers.
3025 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3026 Maybe overwrite the btrace configuration's cpu. Skip enabling
3027 errata workarounds if the vendor is unknown.
3028 * python/py-record-btrace.c: Include record-btrace.h.
3029 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3030 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3031 * record-btrace.c (record_btrace_cpu_state_kind): New.
3032 (record_btrace_cpu): New.
3033 (set_record_btrace_cpu_cmdlist): New.
3034 (record_btrace_get_cpu): New.
3035 (require_btrace_thread, record_btrace_info)
3036 (record_btrace_resume_thread): Call record_btrace_get_cpu.
3037 (cmd_set_record_btrace_cpu_none): New.
3038 (cmd_set_record_btrace_cpu_auto): New.
3039 (cmd_set_record_btrace_cpu): New.
3040 (cmd_show_record_btrace_cpu): New.
3041 (_initialize_record_btrace): Initialize set/show record btrace cpu
3042 commands.
3043 * record-btrace.h (record_btrace_get_cpu): New.
3044
69f90c75
MM
30452018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3046
3047 * record.c (set_record_command): Fix typo in message.
3048
b85310e1
MM
30492018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3050
3051 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3052
1d509aa6
MM
30532018-04-13 Markus Metzger <markus.t.metzger@intel.com>
3054
3055 * infrun.c (process_event_stop_test): Call
3056 gdbarch_in_indirect_branch_thunk.
3057 * gdbarch.sh (in_indirect_branch_thunk): New.
3058 * gdbarch.c: Regenerated.
3059 * gdbarch.h: Regenerated.
3060 * x86-tdep.h: New.
3061 * x86-tdep.c: New.
3062 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3063 (HFILES_NO_SRCDIR): Add x86-tdep.h.
3064 (ALLDEPFILES): Add x86-tdep.c.
3065 * arch-utils.h (default_in_indirect_branch_thunk): New.
3066 * arch-utils.c (default_in_indirect_branch_thunk): New.
3067 * i386-tdep: Include x86-tdep.h.
3068 (i386_in_indirect_branch_thunk): New.
3069 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3070 function.
3071 * amd64-tdep: Include x86-tdep.h.
3072 (amd64_in_indirect_branch_thunk): New.
3073 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3074
b4be9bfd
JK
30752018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3076
3077 PR gdb/23053
3078 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3079 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3080 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3081 regression.
3082
53d7df28
TT
30832018-04-12 Tom Tromey <tom@tromey.com>
3084
3085 * rust-lang.c (rust_print_struct_def): Remove univariant code.
3086 (rust_evaluate_subexp): Likewise.
3087
70b33f19
PA
30882018-04-12 Pedro Alves <palves@redhat.com>
3089
3090 * procfs.c (procfs_detach): Make forward declaration's prototype
3091 match definition's protototype.
3092 (proc_get_LDT_entry): Remove stale do_cleanups call.
3093
436411b1
PA
30942018-04-12 Pedro Alves <palves@redhat.com>
3095
3096 * target.h (target_ops::to_has_exited): Delete.
3097 (target_has_exited): Delete.
3098 * target-delegates.c: Regenerate.
3099
20db9c52
PA
31002018-04-11 Pedro Alves <palves@redhat.com>
3101
3102 * target.c (fileio_fh_t::t): Add comment.
3103 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3104 (target_fileio_close): Handle a NULL target.
3105 (invalidate_fileio_fh): New.
3106 (target_close): Call it.
3107 * remote.c (remote_hostio_send_command): No longer check whether
3108 remote_desc is open.
3109
5ff79300
PA
31102018-04-11 Pedro Alves <palves@redhat.com>
3111
3112 * target.c (fileio_fh_t): Make it a named struct instead of a
3113 typedef.
3114 (fileio_fh_t::is_closed): New method.
3115 (DEF_VEC_O (fileio_fh_t)): Remove.
3116 (fileio_fhandles): Now a std::vector.
3117 (is_closed_fileio_fh): Delete.
3118 (acquire_fileio_fd): Adjust. Rename parameters.
3119 (release_fileio_fd): Adjust.
3120 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
3121 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3122 (target_fileio_close): Adjust.
3123
6e22e10d
SM
31242018-04-10 Simon Marchi <simon.marchi@ericsson.com>
3125
3126 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
3127 index.
3128
731f534f
PA
31292018-04-10 Pedro Alves <palves@redhat.com>
3130
3131 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
3132 (scoped_finish_thread_state): New class.
3133 * infcmd.c (run_command_1): Use it instead of finish_thread_state
3134 cleanup.
3135 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3136 (fetch_inferior_event, normal_stop): Likewise.
3137 * thread.c (finish_thread_state_cleanup): Delete.
3138
d5f4488f
SM
31392018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3140 Pedro Alves <palves@redhat.com>
3141
3142 * value.c: Include "selftest.h" and "common/array-view.h".
3143 (struct range) <operator ==>: New.
3144 (test_ranges_contain): New.
3145 (check_ranges_vector): New.
3146 (test_insert_into_bit_range_vector): New.
3147 (_initialize_values): Register selftests.
3148 * common/array-view.h (operator==, operator!=): New.
3149
b24531ed
SM
31502018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3151
3152 * common/gdb_vecs.h (unordered_remove): Add overload that takes
3153 an iterator.
3154 * inline-frame.c: Include <algorithm>.
3155 (struct inline_state): Add constructor.
3156 (inline_state_s): Remove.
3157 (DEF_VEC_O(inline_state_s)): Remove.
3158 (inline_states): Change type to std::vector.
3159 (find_inline_frame_state): Adjust to std::vector.
3160 (allocate_inline_frame_state): Remove.
3161 (clear_inline_frame_state): Adjust to std::vector.
3162 (skip_inline_frames): Adjust to std::vector.
3163
c252925c
SM
31642018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3165
3166 * tracepoint.h (struct trace_state_variable): Add constructor.
3167 <name>: Change type to std::string.
3168 * tracepoint.c (tsv_s): Remove.
3169 (DEF_VEC_O(tsv_s)): Remove.
3170 (tvariables): Change to std::vector.
3171 (create_trace_state_variable): Adjust to std::vector.
3172 (find_trace_state_variable): Likewise.
3173 (find_trace_state_variable_by_number): Likewise.
3174 (delete_trace_state_variable): Likewise.
3175 (trace_variable_command): Adjust to std::string.
3176 (delete_trace_variable_command): Likewise.
3177 (tvariables_info_1): Adjust to std::vector.
3178 (save_trace_state_variables): Likewise.
3179 (start_tracing): Likewise.
3180 (merge_uploaded_trace_state_variables): Adjust to std::vector
3181 and std::string.
3182 * target.h (struct target_ops)
3183 <to_download_trace_state_variable>: Pass reference to
3184 trace_state_variable.
3185 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3186 * target-delegates.c: Re-generate.
3187 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3188 (mi_tsv_deleted): Likewise.
3189 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3190 * remote.c (remote_download_trace_state_variable): Change
3191 pointer to reference and adjust.
3192 * make-target-delegates (parse_argtypes): Handle references.
3193 (write_function_header): Likewise.
3194 (munge_type): Likewise.
3195
c9638d26
SM
31962018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3197
3198 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3199 string_view-selftests.c.
3200 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3201 testsuite.
3202 * unittests/basic_string_view/cons/char/1.cc: Likewise.
3203 * unittests/basic_string_view/cons/char/2.cc: Likewise.
3204 * unittests/basic_string_view/cons/char/3.cc: Likewise.
3205 * unittests/basic_string_view/element_access/char/1.cc:
3206 Likewise.
3207 * unittests/basic_string_view/element_access/char/empty.cc:
3208 Likewise.
3209 * unittests/basic_string_view/element_access/char/front_back.cc:
3210 Likewise.
3211 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3212 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3213 Likewise.
3214 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3215 Likewise.
3216 * unittests/basic_string_view/modifiers/swap/char/1.cc:
3217 Likewise.
3218 * unittests/basic_string_view/operations/compare/char/1.cc:
3219 Likewise.
3220 * unittests/basic_string_view/operations/compare/char/13650.cc:
3221 Likewise.
3222 * unittests/basic_string_view/operations/copy/char/1.cc:
3223 Likewise.
3224 * unittests/basic_string_view/operations/data/char/1.cc:
3225 Likewise.
3226 * unittests/basic_string_view/operations/find/char/1.cc:
3227 Likewise.
3228 * unittests/basic_string_view/operations/find/char/2.cc:
3229 Likewise.
3230 * unittests/basic_string_view/operations/find/char/3.cc:
3231 Likewise.
3232 * unittests/basic_string_view/operations/find/char/4.cc:
3233 Likewise.
3234 * unittests/basic_string_view/operations/rfind/char/1.cc:
3235 Likewise.
3236 * unittests/basic_string_view/operations/rfind/char/2.cc:
3237 Likewise.
3238 * unittests/basic_string_view/operations/rfind/char/3.cc:
3239 Likewise.
3240 * unittests/basic_string_view/operations/substr/char/1.cc:
3241 Likewise.
3242 * unittests/basic_string_view/operators/char/2.cc: Likewise.
3243 * unittests/string_view-selftests.c: New file.
3244
fdc11678
SM
32452018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3246
3247 * unittests/basic_string_view/capacity/1.cc: New file.
3248 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
3249 * unittests/basic_string_view/cons/char/1.cc: New file.
3250 * unittests/basic_string_view/cons/char/2.cc: New file.
3251 * unittests/basic_string_view/cons/char/3.cc: New file.
3252 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
3253 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
3254 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
3255 * unittests/basic_string_view/element_access/char/1.cc: New file.
3256 * unittests/basic_string_view/element_access/char/2.cc: New file.
3257 * unittests/basic_string_view/element_access/char/empty.cc: New file.
3258 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3259 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3260 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3261 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3262 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3263 * unittests/basic_string_view/include.cc: New file.
3264 * unittests/basic_string_view/inserters/char/1.cc: New file.
3265 * unittests/basic_string_view/inserters/char/2.cc: New file.
3266 * unittests/basic_string_view/inserters/char/3.cc: New file.
3267 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3268 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3269 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3270 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3271 * unittests/basic_string_view/literals/types.cc: New file.
3272 * unittests/basic_string_view/literals/values.cc: New file.
3273 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3274 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
3275 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
3276 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
3277 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
3278 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
3279 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
3280 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
3281 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
3282 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
3283 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
3284 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
3285 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
3286 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
3287 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
3288 * unittests/basic_string_view/operations/data/char/1.cc: New file.
3289 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
3290 * unittests/basic_string_view/operations/find/char/1.cc: New file.
3291 * unittests/basic_string_view/operations/find/char/2.cc: New file.
3292 * unittests/basic_string_view/operations/find/char/3.cc: New file.
3293 * unittests/basic_string_view/operations/find/char/4.cc: New file.
3294 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
3295 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
3296 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
3297 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
3298 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
3299 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
3300 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
3301 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
3302 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
3303 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
3304 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
3305 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
3306 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
3307 * unittests/basic_string_view/operators/char/2.cc: New file.
3308 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
3309 * unittests/basic_string_view/range_access/char/1.cc: New file.
3310 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
3311 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
3312 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
3313 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
3314 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
3315 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
3316 * unittests/basic_string_view/requirements/typedefs.cc: New file.
3317 * unittests/basic_string_view/typedefs.cc: New file.
3318 * unittests/basic_string_view/types/1.cc: New file.
3319
8345c4a2
SM
33202018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3321
3322 * common/gdb_string_view.h: Remove libstdc++ implementation
3323 details, adjust to gdb reality.
3324 * common/gdb_string_view.tcc: Likewise.
3325 * cli/cli-script.c (struct string_view): Remove.
3326 (user_args) <m_args>: Change element type to gdb::string_view.
3327 (user_args::insert_args): Adjust.
3328
7adcdf08
SM
33292018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3330
3331 * common/gdb_string_view.h: New file.
3332 * common/gdb_string_view.tcc: New file.
3333
41260ac2
SM
33342018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3335
3336 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
3337 * configure: Re-generate.
3338
0bee6dd4
PA
33392018-04-09 Pedro Alves <palves@redhat.com>
3340
3341 * gdbarch.sh: Include "observable.h" instead of "observer.h".
3342 (set_target_gdbarch): Call
3343 gdb::observers::architecture_changed.notify instead of
3344 observer_notify_architecture_changed.
3345
6f14adc5
SM
33462018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3347
3348 * tracepoint.c (struct current_traceframe_cleanup): Remove.
3349 (do_restore_current_traceframe_cleanup): Remove.
3350 (restore_current_traceframe_cleanup_dtor): Remove.
3351 (make_cleanup_restore_current_traceframe): Remove.
3352 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
3353 New.
3354 * tracepoint.h (struct scoped_restore_current_traceframe): New.
3355 * infrun.c (fetch_inferior_event): Use
3356 scoped_restore_current_traceframe.
3357
b2bdb8cf
SM
33582018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3359
3360 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
3361 Remove.
3362 <n_allocated_type_units>: Remove.
3363 <all_type_units>: Change to std::vector.
3364 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3365 to std::vector change.
3366 (dwarf2_per_objfile::get_cutu): Likewise.
3367 (dwarf2_per_objfile::get_tu): Likewise.
3368 (create_signatured_type_table_from_index): Likewise.
3369 (create_signatured_type_table_from_debug_names): Likewise.
3370 (dw2_symtab_iter_next): Likewise.
3371 (dw2_print_stats): Likewise.
3372 (dw2_expand_all_symtabs): Likewise.
3373 (dw2_expand_marked_cus): Likewise.
3374 (dw2_debug_names_iterator::next): Likewise.
3375 (dwarf2_initialize_objfile): Likewise.
3376 (add_signatured_type_cu_to_table): Likewise.
3377 (create_all_type_units): Likewise.
3378 (add_type_unit): Likewise.
3379 (struct tu_abbrev_offset): Add constructor.
3380 (build_type_psymtabs_1): Adjust to std::vector change.
3381 (print_tu_stats): Likewise.
3382 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3383 (write_debug_names): Likewise.
3384
b76e467d
SM
33852018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3386
3387 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
3388 Make an std::vector.
3389 <n_comp_units>: Remove.
3390 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3391 to std::vector change.
3392 (dwarf2_per_objfile::get_cutu): Likewise.
3393 (dwarf2_per_objfile::get_cu): Likewise.
3394 (create_cus_from_index): Likewise.
3395 (create_addrmap_from_index): Likewise.
3396 (create_addrmap_from_aranges): Likewise.
3397 (dwarf2_read_index): Likewise.
3398 (dw2_find_last_source_symtab): Likewise.
3399 (dw2_map_symtabs_matching_filename): Likewise.
3400 (dw2_symtab_iter_next): Likewise.
3401 (dw2_print_stats): Likewise.
3402 (dw2_expand_all_symtabs): Likewise.
3403 (dw2_expand_symtabs_with_fullname): Likewise.
3404 (dw2_expand_marked_cus): Likewise.
3405 (dw2_map_symbol_filenames): Likewise.
3406 (create_cus_from_debug_names): Likewise.
3407 (dwarf2_read_debug_names): Likewise.
3408 (dw2_debug_names_iterator::next): Likewise.
3409 (dwarf2_initialize_objfile): Likewise.
3410 (set_partial_user): Likewise.
3411 (dwarf2_build_psymtabs_hard): Likewise.
3412 (read_comp_units_from_section): Remove arguments, adjust to
3413 std::vector change.
3414 (create_all_comp_units): Adjust to std::vector and
3415 read_comp_units_from_section changes.
3416 (dwarf2_find_containing_comp_unit): Adjust to std::vector
3417 change.
3418 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3419 (psyms_seen_size): Likewise.
3420 (write_gdbindex): Likewise.
3421 (write_debug_names): Likewise.
3422
12359b5e
SM
34232018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3424
3425 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
3426 with dwarf2_per_objfile.
3427 (create_cus_from_index): Likewise.
3428 (create_signatured_type_table_from_index): Likewise.
3429 (dwarf2_read_index): Likewise.
3430 (dwarf2_initialize_objfile): Likewise.
3431 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
3432 per_cu rather than get_dwarf2_per_objfile.
3433
ff4c9fec
SM
34342018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3435
3436 * dwarf2read.h (struct signatured_type): Forward declare.
3437 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
3438 New methods.
3439 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
3440 (dw2_get_cutu): ...this.
3441 (dwarf2_per_objfile::get_cu): Rename from...
3442 (dw2_get_cu): ...this.
3443 (dwarf2_per_objfile::get_tu): New.
3444 (create_addrmap_from_index): Adjust.
3445 (create_addrmap_from_aranges): Adjust.
3446 (dw2_find_last_source_symtab): Adjust.
3447 (dw2_map_symtabs_matching_filename): Adjust.
3448 (dw2_symtab_iter_next): Adjust.
3449 (dw2_print_stats): Adjust.
3450 (dw2_expand_all_symtabs): Adjust.
3451 (dw2_expand_symtabs_with_fullname): Adjust.
3452 (dw2_expand_marked_cus): Adjust.
3453 (dw_expand_symtabs_matching_file_matcher): Adjust.
3454 (dw2_map_symbol_filenames): Adjust.
3455 (dw2_debug_names_iterator::next): Adjust.
3456 (dwarf2_initialize_objfile): Adjust.
3457 (set_partial_user): Adjust.
3458 (dwarf2_build_psymtabs_hard): Adjust.
3459
5ca3fcb6
SM
34602018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3461
3462 * dwarf2read.c (create_signatured_type_table_from_debug_names):
3463 Remove unused variables.
3464 (dw2_map_symtabs_matching_filename): Likewise.
3465 (dwarf2_record_block_ranges): Likewise.
3466 (dwarf2_read_addr_index): Likewise.
3467 (follow_die_offset): Likewise.
3468
b2e586e8
SM
34692018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3470
3471 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
3472 to symbol_file_add_main.
3473
7c4e78cf
SM
34742018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3475
3476 PR mi/22299
3477 * mi/mi-console.c (do_fputc_async_safe): New.
3478 (mi_console_file::write_async_safe): New.
3479 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
3480 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
3481 New.
3482 * ui-file.c (ui_file::putstrn): Adjust call to
3483 fputstrn_unfiltered.
3484 * utils.c (printchar): Replace do_fputs and do_fprintf
3485 parameters by do_fputc.
3486 (fputstr_filtered): Adjust call to printchar.
3487 (fputstr_unfiltered): Likewise.
3488 (fputstrn_filtered): Likewise.
3489 (fputstrn_unfiltered): Add do_fputc parameter, pass to
3490 printchar.
3491 * utils.h (do_fputc_ftype): New typedef.
3492 (fputstrn_unfiltered): Add do_fputc parameter.
3493
5dc026d3
SM
34942018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
3495
3496 * regformats/i386/i386-avx.dat: Remove.
3497
c912f608
SM
34982018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3499
3500 PR gdb/22979
3501 * amd64-tdep.c (amd64_none_init_abi): New function.
3502 (amd64_x32_none_init_abi): New function.
3503 (_initialize_amd64_tdep): Register handlers for x86-64 and
3504 x64_32 with GDB_OSABI_NONE.
3505 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
3506 GDB_OSABI_NONE osabi.
3507
26540402
SM
35082018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3509
3510 PR gdb/22980
3511 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
3512 GDB_OSABI_NONE.
3513 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
3514 * osabi.c (gdb_osabi_names): Add "unknown" entry.
3515
9018be22
SM
35162018-04-07 Simon Marchi <simon.marchi@ericsson.com>
3517
3518 * common/byte-vector.h (char_vector): New type.
3519 * target.h (target_read_alloc): Return
3520 gdb::optional<byte_vector>.
3521 (target_read_stralloc): Return gdb::optional<char_vector>.
3522 (target_get_osdata): Return gdb::optional<char_vector>.
3523 * target.c (target_read_alloc_1): Templatize. Replacement
3524 manual memory management with vector.
3525 (target_read_alloc): Change return type, adjust.
3526 (target_read_stralloc): Change return type, adjust.
3527 (target_get_osdata): Change return type, adjust.
3528 * auxv.c (struct auxv_info) <length>: Remove.
3529 <data>: Change type to gdb::optional<byte_vector>.
3530 (auxv_inferior_data_cleanup): Free auxv_info with delete.
3531 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
3532 (target_auxv_search): Adjust.
3533 (fprint_target_auxv): Adjust.
3534 * avr-tdep.c (avr_io_reg_read_command): Adjust.
3535 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
3536 (linux_make_corefile_notes): Adjust.
3537 * osdata.c (get_osdata): Adjust.
3538 * remote.c (remote_get_threads_with_qxfer): Adjust.
3539 (remote_memory_map): Adjust.
3540 (remote_traceframe_info): Adjust.
3541 (btrace_read_config): Adjust.
3542 (remote_read_btrace): Adjust.
3543 (remote_pid_to_exec_file): Adjust.
3544 * solib-aix.c (solib_aix_get_library_list): Adjust.
3545 * solib-dsbt.c (decode_loadmap): Don't free buf.
3546 (dsbt_get_initial_loadmaps): Adjust.
3547 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
3548 * solib-target.c (solib_target_current_sos): Adjust.
3549 * tracepoint.c (sdata_make_value): Adjust.
3550 * xml-support.c (xinclude_start_include): Adjust.
3551 (xml_fetch_content_from_file): Adjust.
3552 * xml-support.h (xml_fetch_another): Change return type.
3553 (xml_fetch_content_from_file): Change return type.
3554 * xml-syscall.c (xml_init_syscalls_info): Adjust.
3555 * xml-tdesc.c (file_read_description_xml): Adjust.
3556 (fetch_available_features_from_target): Change return type.
3557 (target_fetch_description_xml): Adjust.
3558 (target_read_description_xml): Adjust.
3559
14c88955
TT
35602018-04-06 Tom Tromey <tom@tromey.com>
3561
3562 * value.c (~value): Update.
3563 (struct value) <contents>: Now unique_xmalloc_ptr.
3564 (value_contents_bits_eq, allocate_value_contents)
3565 (value_contents_raw, value_contents_all_raw)
3566 (value_contents_for_printing, value_contents_for_printing_const)
3567 (set_value_enclosing_type): Update.
3568
0c7e6dd8
TT
35692018-04-06 Tom Tromey <tom@tromey.com>
3570
3571 * value.c (range_s): Remove typedef, VEC.
3572 (struct range): Add operator<.
3573 (range_lessthan): Remove.
3574 (ranges_contain): Change type.
3575 (~value): Update.
3576 (struct value) <unavailable, optimized_out>: Now std::vector.
3577 (value_entirely_available)
3578 (value_entirely_covered_by_range_vector)
3579 (value_entirely_unavailable, value_entirely_optimized_out):
3580 Update.
3581 (insert_into_bit_range_vector): Change argument type.
3582 (find_first_range_overlap): Likewise.
3583 (struct ranges_and_idx, value_contents_bits_eq)
3584 (require_not_optimized_out, require_available): Update.
3585 (ranges_copy_adjusted): Change argument types.
3586 (value_optimized_out, value_copy, value_fetch_lazy): Update.
3587
2c8331b9
TT
35882018-04-06 Tom Tromey <tom@tromey.com>
3589
3590 * value.c (~value): Update.
3591 (struct value) <parent>: Now a value_ref_ptr.
3592 (value_parent, set_value_parent, value_address, value_copy):
3593 Update.
3594
466ce3ae
TT
35952018-04-06 Tom Tromey <tom@tromey.com>
3596
3597 * value.c (struct value): Add constructor, destructor, and member
3598 initializers.
3599 (allocate_value_lazy, value_decref): Update.
3600
062d818d
TT
36012018-04-06 Tom Tromey <tom@tromey.com>
3602
3603 * value.c (struct value) <released, next>: Remove.
3604 (all_values): Now a std::vector.
3605 (allocate_value_lazy): Update.
3606 (value_next): Remove.
3607 (value_mark, value_free_to_mark, release_value)
3608 (value_release_to_mark): Update.
3609
a6535de1
TT
36102018-04-06 Tom Tromey <tom@tromey.com>
3611
3612 * value.h (fetch_subexp_value, value_release_to_mark): Update.
3613 (free_value_chain): Remove.
3614 * value.c (free_value_chain): Remove.
3615 (value_release_to_mark): Return a std::vector.
3616 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
3617 std::vector.
3618 (check_condition): Update.
3619 * eval.c (fetch_subexp_value): Change "val_chain" to a
3620 std::vector.
3621 * breakpoint.c (update_watchpoint): Update.
3622 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3623
b5621201
TT
36242018-04-06 Tom Tromey <tom@tromey.com>
3625
3626 * value.h (free_all_values): Remove.
3627 * value.c (free_all_values): Remove.
3628
4d0266a0
TT
36292018-04-06 Tom Tromey <tom@tromey.com>
3630
3631 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3632 (value_history_chain, value_history_count): Remove.
3633 (value_history): New global.
3634 (record_latest_value, access_value_history, show_values)
3635 (preserve_values): Update.
3636
b4d61099
TT
36372018-04-06 Tom Tromey <tom@tromey.com>
3638
3639 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3640 * varobj.c (varobj_set_display_format, varobj_set_value)
3641 (install_default_visualizer, construct_visualizer)
3642 (install_new_value, ~varobj, varobj_get_value_type)
3643 (my_value_of_variable, varobj_editable_p): Update.
3644 * c-varobj.c (c_describe_child, c_value_of_variable)
3645 (cplus_number_of_children, cplus_describe_child): Update.
3646 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3647 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3648 (ada_value_of_variable, ada_value_is_changeable_p): Update.
3649
9b558729
TT
36502018-04-06 Tom Tromey <tom@tromey.com>
3651
3652 * printcmd.c (last_examine_address): Change type to
3653 value_ref_ptr.
3654 (do_examine, x_command): Update.
3655
850645cf
TT
36562018-04-06 Tom Tromey <tom@tromey.com>
3657
3658 * value.c (release_value): Update.
3659 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3660 (struct bpstats) <val>: Now a value_ref_ptr.
3661 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3662 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3663 (~watchpoint, print_it_watchpoint, watch_command_1)
3664 (invalidate_bp_value_on_memory_change): Update.
3665
22bc8444
TT
36662018-04-06 Tom Tromey <tom@tromey.com>
3667
3668 * varobj.c (varobj_clear_saved_item)
3669 (update_dynamic_varobj_children, install_new_value, ~varobj):
3670 Update.
3671 * value.h (value_incref): Move declaration earlier.
3672 (value_decref): Rename from value_free.
3673 (struct value_ref_policy): New.
3674 (value_ref_ptr): New typedef.
3675 (struct value_deleter): Remove.
3676 (gdb_value_up): Remove typedef.
3677 (release_value): Change return type.
3678 (release_value_or_incref): Remove.
3679 * value.c (set_value_parent): Update.
3680 (value_incref): Change return type.
3681 (value_decref): Rename from value_free.
3682 (value_free_to_mark, free_all_values, free_value_chain): Update.
3683 (release_value): Return value_ref_ptr.
3684 (release_value_or_incref): Remove.
3685 (record_latest_value, set_internalvar, clear_internalvar):
3686 Update.
3687 * stack.c (info_frame_command): Don't call value_free.
3688 * python/py-value.c (valpy_dealloc, valpy_new)
3689 (value_to_value_object): Update.
3690 * printcmd.c (do_examine): Update.
3691 * opencl-lang.c (lval_func_free_closure): Update.
3692 * mi/mi-main.c (register_changed_p): Don't call value_free.
3693 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3694 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3695 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3696 value_free.
3697 * guile/scm-value.c (vlscm_free_value_smob)
3698 (vlscm_scm_from_value): Update.
3699 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3700 (frame_unwind_register_unsigned, get_frame_register_bytes)
3701 (put_frame_register_bytes): Don't call value_free.
3702 * findvar.c (address_from_register): Don't call value_free.
3703 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3704 * dwarf2loc.c (entry_data_value_free_closure)
3705 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3706 (dwarf2_evaluate_loc_desc_full): Update.
3707 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3708 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3709 (~watchpoint, watch_command_1)
3710 (invalidate_bp_value_on_memory_change): Update.
3711 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3712
7f8a5d38
SM
37132018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3714
3715 PR gdb/23022
3716 * warning.m4: Add -Wno-error=deprecated-register.
3717 * configure: Re-generate.
3718
8a76bd3b
TT
37192018-04-05 Tom Tromey <tom@tromey.com>
3720
3721 * linespec.h: Remove include of "vec.h".
3722
8e8d776e
TT
37232018-04-05 Tom Tromey <tom@tromey.com>
3724
3725 * linespec.c (typep): Remove typedef.
3726 (find_methods, find_superclass_methods): Take a std::vector.
3727 (find_method): Use std::vector.
3728
9b2f8581
TT
37292018-04-05 Tom Tromey <tom@tromey.com>
3730
3731 * utils.c (compare_strings): Remove.
3732 * utils.h (compare_strings): Remove.
3733 * objc-lang.h (find_imps): Update.
3734 * objc-lang.c (find_methods): Take a std::vector.
3735 (uniquify_strings, find_imps): Likewise.
3736 * linespec.c (find_methods): Take a std::vector.
3737 (decode_objc): Use std::vector.
3738 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3739 a std::vector.
3740 (find_method, find_function_symbols): Use std::vector.
3741
459a2e4c
TT
37422018-04-05 Tom Tromey <tom@tromey.com>
3743
3744 * completer.c (completion_tracker::completion_tracker): Remove
3745 cast.
3746 (completion_tracker::discard_completions): Likewise.
3747 * breakpoint.c (ambiguous_names_p): Remove cast.
3748 * ada-lang.c (_initialize_ada_language): Remove cast.
3749 * utils.h (streq): Update.
3750 (streq_hash): Add new declaration.
3751 * utils.c (streq): Return bool.
3752 (streq_hash): New function.
3753
9be2c17a
TT
37542018-04-05 Tom Tromey <tom@tromey.com>
3755
3756 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3757 Remove a string copy.
3758
f73c6ece
TT
37592018-04-05 Tom Tromey <tom@tromey.com>
3760
3761 * linespec.c (filter_results): Use std::vector.
3762 (decode_line_2, decode_line_full): Update.
3763
53a0f8a2
TT
37642018-04-05 Tom Tromey <tom@tromey.com>
3765
3766 * linespec.c (canonical_to_fullform): Return std::string.
3767 (filter_results): Update.
3768 (struct decode_line_2_item): Add constructor.
3769 <fullform, displayform>: Now std::string.
3770 (decode_line_2_compare_items): Now a std::sort comparator.
3771 (decode_line_2): Update.
3772
a5b5adf5
TT
37732018-04-05 Tom Tromey <tom@tromey.com>
3774
3775 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3776 (unexpected_linespec_error): Update.
3777 (linespec_parse_basic, parse_linespec): Update.
3778
6a307fc5
TT
37792018-04-05 Tom Tromey <tom@tromey.com>
3780
3781 * linespec.c (linespec_parse_basic): Reindent.
3782
41c1efc6
TT
37832018-04-05 Tom Tromey <tom@tromey.com>
3784
3785 * minsyms.h (iterate_over_minimal_symbols): Update.
3786 * minsyms.c (iterate_over_minimal_symbols): Take a
3787 gdb::function_view.
3788 * linespec.c (struct collect_minsyms): Remove.
3789 (compare_msyms): Now a std::sort comparator.
3790 (add_minsym): Add parameters.
3791 (search_minsyms_for_name): Update. Use std::vector.
3792
c5edbf3d
TT
37932018-04-03 Tom Tromey <tom@tromey.com>
3794
3795 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3796 gdb::byte_vector.
3797
b39efc48
WP
37982018-04-02 Weimin Pan <weimin.pan@oracle.com>
3799
3800 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3801
121ad66c 38022018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
3803
3804 PR gdb/16959
3805 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3806 printing static type.
3807
09473be8
TT
38082018-04-01 Tom Tromey <tom@tromey.com>
3809
3810 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3811 (rs6000_xfer_shared_libraries): Update.
3812
ec1f2d91
SM
38132018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3814
3815 * common/gdb_vecs.h (char_ptr): Remove.
3816 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3817
d8611974
SM
38182018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3819
3820 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3821 with std::vector.
3822 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3823
a18ba4e4
SM
38242018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3825
3826 * tracepoint.h (struct uploaded_tp): Initialize fields.
3827 <actions, step_actions, cmd_strings>: Change type to
3828 std::vector<char *>.
3829 * tracepoint.c (get_uploaded_tp): Allocate with new.
3830 (free_uploaded_tps): Free with delete.
3831 (parse_tracepoint_definition): Adjust to std::vector change.
3832 * breakpoint.c (read_uploaded_action): Likewise.
3833 (create_tracepoint_from_upload): Likewise.
3834 * ctf.c (ctf_write_uploaded_tp): Likewise.
3835 (SET_ARRAY_FIELD): Likewise.
3836 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3837
a7961323
TT
38382018-03-30 Tom Tromey <tom@tromey.com>
3839
3840 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3841 std::unique_ptr.
3842 (svr4_keep_data_in_core): Update.
3843 (svr4_read_so_list): Update.
3844
e83e4e24
TT
38452018-03-30 Tom Tromey <tom@tromey.com>
3846
3847 * windows-nat.c (handle_output_debug_string, handle_exception):
3848 Update.
3849 * target.h (target_read_string): Update.
3850 * target.c (target_read_string): Change "string" to
3851 unique_xmalloc_ptr.
3852 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3853 Update.
3854 * solib-frv.c (frv_current_sos): Update.
3855 * solib-dsbt.c (dsbt_current_sos): Update.
3856 * solib-darwin.c (darwin_current_sos): Update.
3857 * linux-thread-db.c (inferior_has_bug): Update.
3858 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3859 Update. Remove alloca.
3860 * ada-lang.c (ada_main_name): Update.
3861
263db9a1
TT
38622018-03-30 Tom Tromey <tom@tromey.com>
3863
3864 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3865 (struct dwo_file_deleter): New.
3866 (dwo_file_up): New typedef.
3867 (open_and_init_dwo_file): Use dwo_file_up.
3868 (free_dwo_file_cleanup): Remove.
3869
5dafb3d1
TT
38702018-03-30 Tom Tromey <tom@tromey.com>
3871
3872 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3873 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3874
11ed8cad
TT
38752018-03-30 Tom Tromey <tom@tromey.com>
3876
3877 * dwarf2read.c (class free_cached_comp_units): New class.
3878 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3879 (free_cached_comp_units): Remove function.
3880
9ae79dac
TT
38812018-03-30 Tom Tromey <tom@tromey.com>
3882
3883 * utils.h (make_cleanup_unpush_target): Remove.
3884 * inf-ptrace.c (struct target_unpusher): New.
3885 (target_unpush_up) New typedef.
3886 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3887 target_unpush_up.
3888 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3889
5aa89276
TT
38902018-03-27 Tom Tromey <tom@tromey.com>
3891
3892 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3893
1dbeed45
TT
38942018-03-27 Pedro Alves <palves@redhat.com>
3895 Tom Tromey <tom@tromey.com>
3896
3897 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3898 destructor. Now a class.
3899 (gdb_readline_wrapper_cleanup): Remove function.
3900 (gdb_readline_wrapper): Remove cleanups.
3901
c819b2c0
TT
39022018-03-27 Tom Tromey <tom@tromey.com>
3903
3904 * typeprint.h (struct type_print_options) <local_typedefs,
3905 global_typedefs>: Remove "struct" keyword.
3906 (class typedef_hash_table): New class.
3907 (recursively_update_typedef_hash, add_template_parameters)
3908 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3909 (find_typedef_in_hash): Don't declare.
3910 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3911 (typedef_hash_table::recursively_update): Rename from
3912 recursively_update_typedef_hash. Now a member.
3913 (typedef_hash_table::add_template_parameters): Rename from
3914 add_template_parameters. Now a member.
3915 (typedef_hash_table::typedef_hash_table): Now a constructor;
3916 rename from create_typedef_hash.
3917 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3918 rename from free_typedef_hash.
3919 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3920 (do_free_global_table): Remove.
3921 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3922 from copy_type_recursive.
3923 (create_global_typedef_table): Remove.
3924 (typedef_hash_table::find_global_typedef): Now a member of
3925 typedef_hash_table.
3926 (typedef_hash_table::find_typedef): Rename from
3927 find_typedef_in_hash; now a member.
3928 (whatis_exp): Update.
3929 * extension.h (struct ext_lang_type_printers): Add constructor and
3930 destructor.
3931 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3932 declare.
3933 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3934 Now a constructor; rename from start_ext_lang_type_printers.
3935 (ext_lang_type_printers): Now a destructor; rename from
3936 free_ext_lang_type_printers.
3937 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3938 Update.
3939 (c_type_print_base_struct_union): Update. Remove cleanups.
3940
608219fb
TT
39412018-03-27 Tom Tromey <tom@tromey.com>
3942
3943 * dwarf-index-write.c: Include <cmath>.
3944
3fcded8f
JB
39452018-03-27 Joel Brobecker <brobecker@adacore.com>
3946
3947 * NEWS: Add entry describing new "set|show varsize-limit" command.
3948 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3949 command.
3950 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3951 "set variable".
3952
cd4fb1b2
SM
39532018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3954
3955 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3956 dwarf-index-write.c
3957 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3958 * dwarf-index-common.c: New file.
3959 * dwarf-index-common.h: New file.
3960 * dwarf-index-write.c: New file.
3961 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3962 (struct dwarf2_section_info): Move from here.
3963 (dwarf2_section_info_def): Likewise.
3964 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3965 (offset_type): Likewise.
3966 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3967 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3968 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3969 (byte_swap): Likewise.
3970 (MAYBE_SWAP): Likewise.
3971 (dwarf2_per_cu_ptr): Likewise.
3972 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3973 (struct tu_stats): Likewise.
3974 (struct dwarf2_per_objfile): Likewise.
3975 (struct dwarf2_per_cu_data): Likewise.
3976 (struct signatured_type): Likewise.
3977 (sig_type_ptr): Likewise.
3978 (DEF_VEC_P (sig_type_ptr)): Likewise.
3979 (INDEX4_SUFFIX): Likewise.
3980 (INDEX5_SUFFIX): Likewise.
3981 (DEBUG_STR_SUFFIX): Likewise.
3982 (dwarf2_read_section): Make non-static.
3983 (mapped_index_string_hash): Move from here.
3984 (dwarf5_djb_hash): Likewise.
3985 (file_write): Likewise.
3986 (class data_buf): Likewise.
3987 (struct symtab_index_entry): Likewise.
3988 (struct mapped_symtab): Likewise.
3989 (find_slot): Likewise.
3990 (hash_expand): Likewise.
3991 (add_index_entry): Likewise.
3992 (uniquify_cu_indices): Likewise.
3993 (class c_str_view): Likewise.
3994 (class c_str_view_hasher): Likewise.
3995 (class vector_hasher): Likewise.
3996 (write_hash_table): Likewise.
3997 (psym_index_map): Likewise.
3998 (struct addrmap_index_data): Likewise.
3999 (add_address_entry): Likewise.
4000 (add_address_entry_worker): Likewise.
4001 (write_address_map): Likewise.
4002 (symbol_kind): Likewise.
4003 (write_psymbols): Likewise.
4004 (struct signatured_type_index_data): Likewise.
4005 (write_one_signatured_type): Likewise.
4006 (recursively_count_psymbols): Likewise.
4007 (recursively_write_psymbols): Likewise.
4008 (class debug_names): Likewise.
4009 (check_dwarf64_offsets): Likewise.
4010 (psyms_seen_size): Likewise.
4011 (write_gdbindex): Likewise.
4012 (write_debug_names): Likewise.
4013 (assert_file_size): Likewise.
4014 (write_psymtabs_to_index): Likewise.
4015 (save_gdb_index_command): Likewise.
4016 (_initialize_dwarf2_read): Don't register the "save gdb-index"
4017 command.
4018 * dwarf2read.h: New file.
4019
59cc4834
JB
40202018-03-27 Joel Brobecker <brobecker@adacore.com>
4021
4022 PR gdb/22670
4023 * dwarf2read.c (dwarf2_physname): Do not return the demangled
4024 symbol name if the CU's language stores symbol names in linkage
4025 format.
4026 * language.h (struct language_defn)
4027 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
4028 all instances of this struct.
4029
67501539
TT
40302018-03-26 Tom Tromey <tom@tromey.com>
4031
4032 * stack.c (backtrace_command_1): Remove verbose code.
4033
76c939ac
TT
40342018-03-26 Tom Tromey <tom@tromey.com>
4035
4036 * python/py-framefilter.c (py_print_type): Don't catch
4037 exceptions. Return void.
4038 (py_print_value): Likewise.
4039 (py_print_single_arg): Likewise.
4040 (enumerate_args): Don't catch exceptions.
4041 (py_print_args): Likewise.
4042 (py_print_frame): Likewise.
4043 (gdbpy_apply_frame_filter): Catch exceptions here.
4044
9507b29c
TT
40452018-03-26 Tom Tromey <tom@tromey.com>
4046
4047 * stack.c (_initialize_stack): Remove trailing newlines from help
4048 text. Add "Usage" line to "backtrace" help.
4049
eb68e487
TT
40502018-03-26 Tom Tromey <tom@tromey.com>
4051
4052 PR python/16486:
4053 * python/py-framefilter.c (py_print_args): Call wrap_hint.
4054
1f111921
TT
40552018-03-26 Tom Tromey <tom@tromey.com>
4056
4057 * python/py-framefilter.c (py_print_single_arg): Return
4058 EXT_LANG_BT_ERROR from catch.
4059
fb7eb8b5
TT
40602018-03-26 Tom Tromey <tom@tromey.com>
4061
4062 PR backtrace/15584:
4063 * stack.c (backtrace_command_1): Move some code into no-filters
4064 "if".
4065
4ca59a9f
TT
40662018-03-26 Tom Tromey <tom@tromey.com>
4067
4068 * python/py-framefilter.c (throw_quit_or_print_exception): New
4069 function.
4070 (gdbpy_apply_frame_filter): Use it.
4071
92256134
TT
40722018-03-26 Tom Tromey <tom@tromey.com>
4073
4074 PR cli/17716:
4075 * python/py-framefilter.c (py_print_type, py_print_value)
4076 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4077 RETURN_MASK_ERROR.
4078
7a630bc2
TT
40792018-03-26 Tom Tromey <tom@tromey.com>
4080
4081 * python/py-framefilter.c (enumerate_args): Use
4082 gdb::unique_xmalloc_ptr.
4083
63283d4a
TT
40842018-03-26 Tom Tromey <tom@tromey.com>
4085
4086 * python/py-framefilter.c (py_print_frame): Return
4087 EXT_LANG_BT_OK.
4088 (gdbpy_apply_frame_filter): Update comment.
4089 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
4090 Remove.
4091 <EXT_LANG_BT_NO_FILTERS>: Change value.
4092
978d6c75
TT
40932018-03-26 Tom Tromey <tom@tromey.com>
4094
4095 PR backtrace/15582:
4096 * stack.c (backtrace_command): Parse "hide" argument.
4097 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
4098 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
4099 constant.
4100
1cf7e640
TT
41012018-03-26 Tom Tromey <tom@tromey.com>
4102
4103 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
4104 add "flags".
4105 (backtrace_command): Remove "fulltrace", add "flags".
4106
ea3b0687
TT
41072018-03-26 Tom Tromey <tom@tromey.com>
4108
4109 * stack.c (backtrace_command): Rewrite command line parsing.
4110
9f034d75
SM
41112018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4112
4113 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
4114
ce1459e5
SM
41152018-03-26 Simon Marchi <simon.marchi@ericsson.com>
4116
4117 * filename-seen-cache.h: Add include guard.
4118
4f7ae6f5
KS
41192018-03-26 Keith Seitz <keiths@redhat.com>
4120
4121 * symfile.c (place_section): Remove "struct" from section_addr_info
4122 in comment.
4123 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
4124 "struct" keyword from section_addr_info.
4125
5cd3e386
AH
41262018-03-26 Alan Hayward <alan.hayward@arm.com>
4127
4128 * regformats/regdef.h (reg): Add constructors.
4129
3e5ef9a4
PA
41302018-03-25 Pedro Alves <palves@redhat.com>
4131
4132 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
4133 if then/else bodies in var_func_name extraction.
4134
c88d2fcc 41352018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
4136
4137 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4138 lookup_minimal_symbol() to find symbol entry.
4139 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4140
b7fee5a3
KS
41412018-03-23 Keith Seitz <keiths@redhat.com>
4142
4143 PR c++/22968
4144 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4145 nested type definitions for C++, too.
4146
2cc9b304
TT
41472018-03-23 Tom Tromey <tom@tromey.com>
4148
4149 * machoread.c (struct oso_el): Add a constructor. Don't define as
4150 a typedef.
4151 (macho_register_oso): Remove.
4152 (macho_symtab_read): Take a std::vector.
4153 (oso_el_compare_name): Now a std::sort comparator.
4154 (macho_symfile_read_all_oso): Take a std::vector.
4155 (macho_symfile_read): Use std::vector. Remove cleanups.
4156
a2b2bc12
TT
41572018-03-22 Tom Tromey <tom@tromey.com>
4158
4159 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4160 (record_full_goto_bookmark): Use std::string.
4161
7a8f494c
PFC
41622018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4163
4164 PR tdep/18295
4165 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4166 a single mask.
4167
dd6d677f
PFC
41682018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4169
4170 * rs6000-tdep.c (store_insn_p): New function.
4171 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4172 and cr_reg to their unshifted values. Use store_insn_p to
4173 match LR saves using either R1 or fdata->alloca_reg. Use
4174 store_insn_p to match CR saves. Set alloca_reg_offset
4175 when alloca_reg and framep are set. Remove lr_reg shift
4176 when assigning to fdata->lr_register.
4177
26d6cec4
AA
41782018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4179
4180 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4181 command line args instead of emitting a warning.
4182
5d9310c4
SM
41832018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4184
4185 * tracepoint.h (struct static_tracepoint_marker): Initialize
4186 fields, define default constructor, move constructor and move
4187 assignment, disable the rest.
4188 <str_id, extra>: Make std::string.
4189 (release_static_tracepoint_marker): Remove.
4190 (free_current_marker): Remove.
4191 * tracepoint.c (free_current_marker): Remove.
4192 (parse_static_tracepoint_marker_definition): Adjust to
4193 std::string, use new hex2str overload.
4194 (release_static_tracepoint_marker): Remove.
4195 (print_one_static_tracepoint_marker): Get marker by reference
4196 and adjust to std::string.
4197 (info_static_tracepoint_markers_command): Adjust to std::vector
4198 changes
4199 * target.h (static_tracepoint_marker_p): Remove typedef.
4200 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4201 (struct target_ops) <to_static_tracepoint_marker_at>: Return
4202 bool.
4203 <to_static_tracepoint_markers_by_strid>: Return std::vector.
4204 * target-debug.h
4205 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4206 (target_debug_print_std_vector_static_tracepoint_marker): New.
4207 (target_debug_print_struct_static_tracepoint_marker_p): Rename
4208 to...
4209 (target_debug_print_static_tracepoint_marker_p): ... this.
4210 * target-delegates.c: Re-generate.
4211 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4212 Make std::string.
4213 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4214 (decode_static_tracepoint_spec): Adjust to std::vector.
4215 (tracepoint_print_one_detail): Adjust to std::string.
4216 (strace_marker_decode_location): Adjust to std::string.
4217 (update_static_tracepoint): Adjust to std::string, remove call
4218 to release_static_tracepoint_marker.
4219 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4220 Adjust to std::vector.
4221 * remote.c (remote_static_tracepoint_marker_at): Return bool.
4222 (remote_static_tracepoint_markers_by_strid): Adjust to
4223 std::vector.
4224 * common/rsp-low.h (hex2str): New overload with explicit count
4225 of bytes.
4226 * common/rsp-low.c (hex2str): New overload with explicit count
4227 of bytes.
4228 * unittests/rsp-low-selftests.c (test_hex2str): New function.
4229 (_initialize_rsp_low_selftests): Add test_hex2str test.
4230 * unittests/tracepoint-selftests.c
4231 (test_parse_static_tracepoint_marker_definition): Adjust to
4232 std::string.
4233
62c222b6
SM
42342018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4235
4236 * tracepoint.c (parse_static_tracepoint_marker_definition):
4237 Consider case where the definition is followed by more
4238 definitions.
4239 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4240 tracepoint-selftests.c.
4241 * unittests/tracepoint-selftests.c: New.
4242
7eb2418f
PFC
42432018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4244
4245 * MAINTAINERS (Write After Approval): Add Pedro Franco de
4246 Carvalho.
4247
7cbe16e9
SR
42482018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4249
3d6b3b82 4250 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 4251
4ee89e90
SR
42522018-03-20 Stephen Roberts <stephen.roberts@arm.com>
4253
3d6b3b82 4254 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 4255
92630041
TT
42562018-03-19 Tom Tromey <tom@tromey.com>
4257
4258 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4259 "IDENT" production.
4260
76727919
TT
42612018-03-19 Pedro Alves <palves@redhat.com>
4262 Tom Tromey <tom@tromey.com>
4263
4264 * unittests/observable-selftests.c: New file.
4265 * common/observable.h: New file.
4266 * observable.h: New file.
4267 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4268 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4269 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4270 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4271 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4272 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4273 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4274 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
4275 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
4276 python/py-breakpoint.c, python/py-finishbreakpoint.c,
4277 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
4278 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
4279 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
4280 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
4281 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
4282 tui/tui-interp.c, valops.c: Update all users.
4283 * tui/tui-hooks.c (tui_bp_created_observer)
4284 (tui_bp_deleted_observer, tui_bp_modified_observer)
4285 (tui_inferior_exit_observer, tui_before_prompt_observer)
4286 (tui_normal_stop_observer, tui_register_changed_observer):
4287 Remove.
4288 (tui_observers_token): New global.
4289 (attach_or_detach, tui_attach_detach_observers): New functions.
4290 (tui_install_hooks, tui_remove_hooks): Use
4291 tui_attach_detach_observers.
4292 * record-btrace.c (record_btrace_thread_observer): Remove.
4293 (record_btrace_thread_observer_token): New global.
4294 * observer.sh: Remove.
4295 * observer.c: Rename to observable.c.
4296 * observable.c (namespace gdb_observers): Define new objects.
4297 (observer_debug): Move into gdb_observers namespace.
4298 (struct observer, struct observer_list, xalloc_observer_list_node)
4299 (xfree_observer_list_node, generic_observer_attach)
4300 (generic_observer_detach, generic_observer_notify): Remove.
4301 (_initialize_observer): Update.
4302 Don't include observer.inc.
4303 * Makefile.in (generated_files): Remove observer.h, observer.inc.
4304 (clean mostlyclean): Likewise.
4305 (observer.h, observer.inc): Remove targets.
4306 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
4307 (COMMON_SFILES): Use observable.c, not observer.c.
4308 * .gitignore: Remove observer.h.
4309
1cb1f3da
TT
43102018-03-18 Tom Tromey <tom@tromey.com>
4311
4312 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
4313 gdb::def_vector.
4314 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
4315
a06ab151
TT
43162018-03-17 Tom Tromey <tom@tromey.com>
4317
4318 * auto-load.c (auto_load_objfile_script_1): Use std::string.
4319
770623f7
TT
43202018-03-17 Tom Tromey <tom@tromey.com>
4321
4322 * target.c (class scoped_target_fd): New.
4323 (target_fileio_close_cleanup): Remove.
4324 (target_fileio_read_alloc_1): Use scoped_target_fd.
4325
39be3c7e
SM
43262018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4327
4328 * silent-rules.mk: New.
4329 * Makefile.in: Include silent-rules.mk
4330 (srcdir, VPATH, top_srcdir): Move up.
4331 (COMPILE): Add ECHO_CXX.
4332 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
4333 (init.c): Add ECHO_INIT_C.
4334 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4335 (version.c): Add ECHO_GEN.
4336 (printcmd.o): Add ECHO_CXX.
4337 (target-float.o): Add ECHO_CXX.
4338 (ada-exp.o): Add ECHO_CXX.
4339 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
4340 (insight$(EXEEXT)): Add ECHO_CXXLD.
4341 * gnulib/configure.ac: Add AM_SILENT_RULES.
4342 * gnulib/aclocal.m4: Re-generate.
4343 * gnulib/configure: Re-generate.
4344 * gnulib/import/Makefile.in: Re-generate.
4345
37e136b1
TT
43462018-03-16 Tom Tromey <tom@tromey.com>
4347
4348 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
4349 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
4350 * utils.c (do_free_section_addr_info)
4351 (make_cleanup_free_section_addr_info): Remove.
4352 * symfile.h (struct other_sections): Add constructor.
4353 (struct section_addr_info): Remove.
4354 (section_addr_info): New typedef.
4355 (struct sym_fns) <sym_offsets>: Change type of parameter.
4356 (build_section_addr_info_from_objfile)
4357 (relative_addr_info_to_section_offsets, addr_info_make_relative)
4358 (default_symfile_offsets, symbol_file_add)
4359 (symbol_file_add_from_bfd)
4360 (build_section_addr_info_from_section_table): Update.
4361 (alloc_section_addr_info, free_section_addr_info): Don't declare.
4362 * symfile.c (alloc_section_addr_info): Remove.
4363 (build_section_addr_info_from_section_table): Change return type.
4364 Update.
4365 (build_section_addr_info_from_bfd)
4366 (build_section_addr_info_from_objfile): Likewise.
4367 (free_section_addr_info): Remove.
4368 (relative_addr_info_to_section_offsets): Change type of "addrs".
4369 (addrs_section_compar): Now a std::sort comparator.
4370 (addrs_section_sort): Change return type.
4371 (addr_info_make_relative): Change type of "addrs". Update.
4372 (default_symfile_offsets, syms_from_objfile_1)
4373 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
4374 (symbol_file_add_separate): Update.
4375 (symbol_file_add): Change type of "addrs". Update.
4376 (add_symbol_file_command): Update. Remove cleanups.
4377 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
4378 cleanups.
4379 * symfile-debug.c (debug_sym_offsets): Change type of "info".
4380 * solib.c (solib_read_symbols): Update.
4381 * objfiles.c (objfile_relocate): Update. Remove cleanups.
4382 * machoread.c (macho_symfile_offsets): Update.
4383 * jit.c (jit_bfd_try_read_symtab): Update.
4384
03afa6ef
SM
43852018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
4386
4387 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4388 unittests/utils-selftests.c.
4389 * unittests/utils-selftests.c: New file.
4390
3ae9ce5d
TT
43912018-03-14 Tom Tromey <tom@tromey.com>
4392
4393 PR cli/14977:
4394 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
4395 for NULL.
4396
b8c2339b
TT
43972018-03-14 Tom Tromey <tom@tromey.com>
4398
4399 PR cli/19918:
4400 * printcmd.c (printf_pointer): Allow "-" in format.
4401
80ae639d
TT
44022018-03-14 Tom Tromey <tom@tromey.com>
4403
4404 * printcmd.c (_initialize_printcmd): Add usage to printf.
4405
0d671d99
YQ
44062018-03-14 Yao Qi <qiyao@sourceware.org>
4407
4408 * MAINTAINERS: Update my email address.
4409
b577b6af
TT
44102018-03-13 Tom Tromey <tom@tromey.com>
4411
4412 * machoread.c (macho_check_dsym): Change filenamep to a
4413 std::string*.
4414 (macho_symfile_read): Update.
4415 * symfile.c (load_command): Use std::string.
4416
89a3b63e
AB
44172018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
4418
4419 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
4420 to error message string.
4421 (riscv_register_name): Use xsnprintf instead of sprintf.
4422 (riscv_insn::fetch_instruction): Use gdb_assert instead of
4423 internal_error.
4424 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
4425 error.
4426 (riscv_push_dummy_call): Likewise.
4427
984c7238
TT
44282018-03-12 Tom Tromey <tom@tromey.com>
4429
4430 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
4431 Use gdb::byte_vector.
4432 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
4433
933522d1
YQ
44342018-03-12 Yao Qi <yao.qi@linaro.org>
4435
4436 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
4437 parameter type to readable_regcache.
4438 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
4439 the declaration.
4440
be2daae6
TT
44412018-03-11 Tom Tromey <tom@tromey.com>
4442
4443 * dwarf2read.c (struct nextfield): Add initializers.
4444 (struct nextfnfield): Remove.
4445 (struct fnfieldlist): Add initializers. Remove "length" and
4446 "head", use std::vector.
4447 (struct decl_field_list): Remove.
4448 (struct field_info): Add initializers.
4449 <fields, baseclasses>: Now std::vector.
4450 <nbaseclasses, nfnfields, typedef_field_list_count,
4451 nested_types_list_count>: Remove.
4452 (dwarf2_add_field, dwarf2_add_type_defn)
4453 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
4454 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
4455 (process_structure_scope): Update.
4456
484cf504
TT
44572018-03-11 Tom Tromey <tom@tromey.com>
4458
4459 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
4460 for use by std::sort.
4461 (build_type_psymtabs_1): Use std::vector.
4462
9bd8e0b0
EZ
44632018-03-09 Eli Zaretskii <eliz@gnu.org>
4464
4465 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
4466 and LIBMPFR in the printed configuration.
4467
5dc1a704
TT
44682018-03-08 Tom Tromey <tom@tromey.com>
4469
4470 * source.c (get_filename_and_charpos): Use scoped_fd.
4471 * nto-procfs.c (procfs_open_1): Use scoped_fd.
4472 (procfs_pidlist): Likewise.
4473 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
4474 (iterate_over_mappings): Likewise.
4475
fdf07f3a
TT
44762018-03-08 Tom Tromey <tom@tromey.com>
4477
4478 * infcall.c (struct call_return_meta_info)
4479 <stack_temporaries_enabled>: Remove.
4480 (get_call_return_value, call_function_by_hand_dummy): Update.
4481 * thread.c (disable_thread_stack_temporaries): Remove.
4482 (enable_thread_stack_temporaries): Remove.
4483 (thread_stack_temporaries_enabled_p): Return bool.
4484 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
4485 (get_last_thread_stack_temporary): Update.
4486 * eval.c (evaluate_subexp): Update.
4487 * gdbthread.h (class enable_thread_stack_temporaries): Now a
4488 class, not a function.
4489 (value_ptr, value_vec): Remove typedefs.
4490 (class thread_info) <stack_temporaries_enabled>: Now bool.
4491 <stack_temporaries>: Now a std::vector.
4492 (thread_stack_temporaries_enabled_p)
4493 (value_in_thread_stack_temporaries): Return bool.
4494
567a3e54
SM
44952018-03-08 Simon Marchi <simon.marchi@ericsson.com>
4496
4497 * remote.c (putpkt_binary): Fix omitted bytes reporting.
4498 (getpkt_or_notif_sane_1): Likewise.
4499
00b40057
SM
45002018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4501
4502 * build-id.c (build_id_to_debug_bfd): Use std::string.
4503
a8dbfd58
SM
45042018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4505
4506 * build-id.c (find_separate_debug_file_by_buildid): Return
4507 std::string.
4508 * build-id.h (find_separate_debug_file_by_buildid): Return
4509 std::string.
4510 * coffread.c (coff_symfile_read): Adjust to std::string.
4511 * elfread.c (elf_symfile_read): Adjust to std::string.
4512 * symfile.c (separate_debug_file_exists): Change parameter to
4513 std::string.
4514 (find_separate_debug_file): Return std::string.
4515 (find_separate_debug_file_by_debuglink): Return std::string.
4516 * symfile.h (find_separate_debug_file_by_debuglink): Return
4517 std::string.
4518
e6a58aa8
SM
45192018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4520
4521 * common/xml-utils.c (xml_escape_text): Move code to...
4522 (xml_escape_text_append): ... this new function.
4523 * common/xml-utils.h (xml_escape_text_append): New declaration.
4524 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
4525 New function.
4526 (_initialize_xml_utils): register test_xml_escape_text_append as
4527 a selftest.
4528
4ef0bef6
AH
45292018-03-07 Alan Hayward <alan.hayward@arm.com>
4530
4531 * defs.h: Remove MAX_REGISTER_SIZE.
4532 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
4533 asserts.
4534 * python/py-unwind.c (pyuw_sniffer): Likewise.
4535
e0d3522b
TT
45362018-03-07 Tom Tromey <tom@tromey.com>
4537
4538 * linux-tdep.c (linux_info_proc): Update.
4539 * target.h (struct target_ops) <to_fileio_readlink>: Return
4540 optional<string>.
4541 (target_fileio_readlink): Return optional<string>.
4542 * remote.c (remote_hostio_readlink): Return optional<string>.
4543 * inf-child.c (inf_child_fileio_readlink): Return
4544 optional<string>.
4545 * target.c (target_fileio_readlink): Return optional<string>.
4546
ea005f31
AB
45472018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
4548
4549 * regcache.c (cooked_read_test): Add riscv to the list of
4550 architectures that have a save_reggroup.
4551
e95a97d4
AA
45522018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
4553
4554 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
4555 value is not a dynamic class object.
4556
d8344f3d
TT
45572018-03-06 Tom Tromey <tom@tromey.com>
4558
4559 * rust-exp.y: Formatting fixes.
4560
9add17f2
AB
45612018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4562
4563 * riscv-tdep.c (riscv_register_name): Remove target description
4564 support.
4565 (riscv_gdbarch_init): Remove target description check.
4566
c9486dfe
AB
45672018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4568
4569 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
4570 comment.
4571 * riscv-tdep.h: Likewise.
4572
d74aff3d
AB
45732018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4574
4575 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
4576 (riscv_pseudo_register_write): Delete.
4577 (riscv_gdbarch_init): Remove all use of pseudo registers.
4578
7ea78b59
SM
45792018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4580
4581 * record-btrace.c (btrace_print_lines): Replace cleanup
4582 parameter with RAII equivalents.
4583 (btrace_insn_history): Replace cleanup with RAII equivalents.
4584 * ui-out.h (make_cleanup_ui_out_list_begin_end,
4585 make_cleanup_ui_out_tuple_begin_end): Remove.
4586 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
4587 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
4588 make_cleanup_ui_out_list_begin_end): Remove.
4589
53127008
SM
45902018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4591
4592 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
4593 parameter types to std::vector. Use bool.
4594 (record_btrace_wait): Replace VEC(tp_t) with
4595 std::vector<thread_info *>.
4596 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
4597
228f1508
SM
45982018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
4599
4600 * record-btrace.c (record_btrace_disable_callback): Remove.
4601 (struct scoped_btrace_disable): New.
4602 (record_btrace_open): Use scoped_btrace_disable.
4603
b2970c23
AB
46042018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4605
4606 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
4607 reading values from registers.
4608
fb294655
AB
46092018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4610
4611 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
4612 where appropriate.
4613
cab5bb9d
AB
46142018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4615
4616 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
4617 change parameter type. Use GDB's print functions, and use
4618 core_addr_to_string where appropriate.
4619 (riscv_push_dummy_call): Use core_addr_to_string where
4620 appropriate, update call to riscv_print_arg_location, and reindent
4621 a few lines.
4622 (riscv_return_value): Update call to riscv_print_arg_location.
4623
dbbb1059
AB
46242018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4625 Tim Newsome <tim@sifive.com>
4626 Albert Ou <a0u@eecs.berkeley.edu>
4627 Darius Rad <darius@bluespec.com>
4628
4629 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4630 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4631 (ALLDEPFILES): Add riscv-tdep.c
4632 * configure.tgt: Add riscv support.
4633 * riscv-tdep.c: New file.
4634 * riscv-tdep.h: New file.
4635 * NEWS: Mention new target.
4636 * MAINTAINERS: Add entry for riscv.
4637
5dc43913
AB
46382018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
4639
4640 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4641 fields within aggregates.
4642
3dea1ef7
SM
46432018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
4644
4645 * record-btrace.c (btrace_print_lines): Change type of flags to
4646 gdb_disassembly_flags.
4647
7efba073
JB
46482018-03-04 John Baldwin <jhb@FreeBSD.org>
4649
4650 * fbsd-nat.c: Include "inf-ptrace.h".
4651 (USE_SIGTRAP_SIGINFO): Conditionally define.
4652 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4653 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4654 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4655 function.
4656 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4657 Likewise.
4658 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4659 Likewise.
4660 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4661 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4662 "supports_stopped_by_hw_breakpoint" target methods.
4663
386a8676
JB
46642018-03-04 John Baldwin <jhb@FreeBSD.org>
4665
4666 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4667 * fbsd-nat.c (debug_fbsd_nat): New variable.
4668 (show_fbsd_nat_debug): New function.
4669 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4670 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4671
12279366
JB
46722018-03-04 John Baldwin <jhb@FreeBSD.org>
4673
4674 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4675 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4676 prototype.
4677 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4678 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4679 method.
4680
54693cf5
SM
46812018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4682
4683 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4684 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4685
ccb2231c
SM
46862018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4687
4688 * charset.c (struct charset_vector): New.
4689 (charsets): Change type to charset_vector.
4690 (find_charset_names): Adjust.
4691 (add_one): Adjust.
4692 (_initialize_charset): Adjust.
4693
6fb16ce6
SM
46942018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4695
4696 * progspace.h (struct program_space) <deleted_solibs>: Change
4697 type to std::vector<std::string>.
4698 * progspace.c (clear_program_space_solib_cache): Adjust.
4699 * breakpoint.c (print_solib_event): Adjust.
4700 (check_status_catch_solib): Adjust.
4701 * solib.c (update_solib_list): Adjust.
4702 * ui-out.h (class ui_out) <field_string>: New overload.
4703 * ui-out.c (ui_out::field_string): New overload.
4704
564b1e3f
SM
47052018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4706
4707 * progspace.h (struct program_space): Add constructor and
4708 destructor, initialize fields.
4709 (add_program_space): Remove.
4710 * progspace.c (add_program_space): Rename to...
4711 (program_space::program_space): ... this.
4712 (release_program_space): Rename to...
4713 (program_space::~program_space): ... this.
4714 (delete_program_space): Use delete to delete program_space.
4715 (initialize_progspace): Use new to allocate program_space.
4716 * inferior.c (add_inferior_with_spaces): Likewise.
4717 (clone_inferior_command): Likewise.
4718 * infrun.c (follow_fork_inferior): Likewise.
4719 (handle_vfork_child_exec_or_exit): Likewise.
4720
e80aaf61
SM
47212018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4724 (delim_string_to_char_ptr_vec): Return std::vector of
4725 gdb::unique_xmalloc_ptr.
4726 (dirnames_to_char_ptr_vec_append): Take std::vector of
4727 gdb::unique_xmalloc_ptr.
4728 (dirnames_to_char_ptr_vec): Return std::vector of
4729 gdb::unique_xmalloc_ptr.
4730 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4731 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4732 (delim_string_to_char_ptr_vec): Return an std::vector of
4733 gdb::unique_xmalloc_ptr, adjust the code.
4734 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4735 gdb::unique_xmalloc_ptr, adjust the code.
4736 (dirnames_to_char_ptr_vec): Return an std::vector of
4737 gdb::unique_xmalloc_ptr, adjust the code.
4738 * auto-load.c (auto_load_safe_path_vec): Change type to
4739 std::vector of gdb::unique_xmalloc_ptr.
4740 (auto_load_expand_dir_vars): Return an std::vector of
4741 gdb::unique_xmalloc_ptr, adjust the code.
4742 (auto_load_safe_path_vec_update): Adjust.
4743 (filename_is_in_auto_load_safe_path_vec): Adjust.
4744 (auto_load_objfile_script_1): Adjust.
4745 * build-id.c (build_id_to_debug_bfd): Adjust.
4746 * linux-thread-db.c (thread_db_load_search): Adjust.
4747 * source.c (add_path): Adjust.
4748 (openp): Adjust.
4749 * symfile.c (find_separate_debug_file): Adjust.
4750 * utils.c (do_free_char_ptr_vec): Remove.
4751 (make_cleanup_free_char_ptr_vec): Remove.
4752
ab818ade
SDJ
47532018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4754
4755 PR gdb/22907
4756 * common/pathstuff.c: Conditionally include "<windows.h>".
4757
e1e6f073
GS
47582018-03-01 Georg Sauthoff <mail@georg.so>
4759
4760 PR gdb/22888
4761 * gcore.in: Quote variables and switch interpreter to bash.
4762
c7b15a66
TT
47632018-03-01 Tom Tromey <tom@tromey.com>
4764
4765 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4766 assertion. Add assertion for discriminant_index.
4767 (quirk_rust_enum): Use correct base type name in univariant case.
4768
0cb7c7b0
SM
47692018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4770
4771 * record.c (get_call_history_modifiers): Return a
4772 record_print_flags.
4773 (cmd_record_call_history): Adjust.
4774 * record-btrace.c (record_btrace_call_history): Adjust.
4775 (record_btrace_call_history_range): Adjust.
4776 (record_btrace_call_history_from): Adjust.
4777 * target-debug.h (target_debug_print_record_print_flags): New.
4778 * target-delegates.c: Re-generate.
4779 * target.c (target_call_history): Change flags type.
4780 (target_call_history_from): Likewise.
4781 (target_call_history_range): Likewise.
4782 * target.h (struct target_ops) <target_call_history>: Likewise.
4783 (target_call_history_from): Likewise.
4784 (target_call_history_range): Likewise.
4785
25e3c82c
SDJ
47862018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4787 Simon Marchi <simon.marchi@polymtl.ca>
4788
4789 * common/common-utils.c: Include "sys/stat.h".
4790 (is_regular_file): Move here from "source.c"; change return
4791 type to "bool".
4792 * common/common-utils.h (is_regular_file): New prototype.
4793 * common/pathstuff.c (contains_dir_separator): New function.
4794 * common/pathstuff.h (contains_dir_separator): New prototype.
4795 * source.c: Don't include "sys/stat.h".
4796 (is_regular_file): Move to "common/common-utils.c".
4797
b4987c95
SDJ
47982018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4799
4800 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4801 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4802 * auto-load.c: Include "common/pathstuff.h".
4803 * common/common-def.h (current_directory): Move here.
4804 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4805 function.
4806 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4807 prototype.
4808 * common/pathstuff.c: New file.
4809 * common/pathstuff.h: New file.
4810 * compile/compile.c: Include "common/pathstuff.h".
4811 * defs.h (current_directory): Move to "common/common-defs.h".
4812 * dwarf2read.c: Include "common/pathstuff.h".
4813 * exec.c: Likewise.
4814 * guile/scm-safe-call.c: Likewise.
4815 * linux-thread-db.c: Likewise.
4816 * main.c: Likewise.
4817 * nto-tdep.c: Likewise.
4818 * objfiles.c: Likewise.
4819 * source.c: Likewise.
4820 * symtab.c: Likewise.
4821 * utils.c: Include "common/pathstuff.h".
4822 (gdb_realpath): Move to "common/pathstuff.c".
4823 (gdb_realpath_keepfile): Likewise.
4824 (gdb_abspath): Likewise.
4825 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4826 (gdb_realpath_keepfile): Likewise.
4827 (gdb_abspath): Likewise.
4828
f169cfdc
JB
48292018-02-28 John Baldwin <jhb@FreeBSD.org>
4830
4831 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4832 wildcard process pid for super_resume for kernels with a
4833 specific bug.
4834
e05cac70
PM
48352018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4836
4837 * compile/compile.c (get_args): Add additional comments
4838 explaining function.
4839
55089490
TT
48402018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4841 Tom Tromey <tom@tromey.com>
4842
4843 * target.h (memory_write_request_s): Remove typedef. Don't define
4844 VEC.
4845 (target_write_memory_blocks): Change argument to std::vector.
4846 (struct memory_write_request): Add constructor.
4847 * target-memory.c (compare_block_starting_address): Return bool.
4848 Change argument types.
4849 (claim_memory): Change arguments to use std::vector.
4850 (split_regular_and_flash_blocks, blocks_to_erase)
4851 (compute_garbled_blocks): Likewise.
4852 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4853 (target_write_memory_blocks): Change argument to std::vector.
4854 * symfile.c (struct load_section_data): Add constructor and
4855 destructor. Use std::vector for "requests".
4856 (struct load_progress_data): Add initializers.
4857 (load_section_callback): Update. Use "new".
4858 (clear_memory_write_data): Remove.
4859 (generic_load): Update.
4860
0c305b61
AH
48612018-02-27 Alan Hayward <alan.hayward@arm.com>
4862
4863 * arch/aarch64.h: Use common/tdesc.h.
4864
c5196c92
MR
48652018-02-26 Maciej W. Rozycki <macro@mips.com>
4866
4867 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4868 architecture with a 64-bit ABI.
4869
37c33887
MR
48702018-02-26 Maciej W. Rozycki <macro@mips.com>
4871
4872 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4873 ahead of target description loading.
4874
d4dd3282
TT
48752018-02-26 Tom Tromey <tom@tromey.com>
4876
4877 * stack.c (backtrace_command_1): Update.
4878 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4879 of "flags".
4880 * python/py-framefilter.c (py_print_frame)
4881 (gdbpy_apply_frame_filter): Change type of "flags".
4882 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4883 of "flags".
4884 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4885 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4886 * extension.h (enum frame_filter_flag): Rename from
4887 frame_filter_flags.
4888 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4889 (apply_ext_lang_frame_filter): Change type of "flags".
4890 * extension.c (apply_ext_lang_frame_filter): Change type of
4891 "flags".
4892 * extension-priv.h (struct extension_language_ops)
4893 <apply_frame_filter>: Change type of "flags".
4894
6893c19a
TT
48952018-02-26 Tom Tromey <tom@tromey.com>
4896
4897 PR python/16497:
4898 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4899 off-by-one in py_end computation.
4900 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4901 PRINT_MORE_FRAMES.
4902 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4903 constant.
4904
2ddeaf8a
TT
49052018-02-26 Tom Tromey <tom@tromey.com>
4906
4907 * dwarf2read.c (struct variant_field): New.
4908 (struct nextfield) <variant>: New field.
4909 (dwarf2_add_field): Handle DW_TAG_variant_part.
4910 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4911 discriminated union.
4912 (read_structure_type): Handle DW_TAG_variant_part.
4913 (handle_struct_member_die): New function, extracted from
4914 process_structure_scope. Handle DW_TAG_variant.
4915 (process_structure_scope): Handle discriminated unions. Call
4916 handle_struct_member_die.
4917
c9317f21
TT
49182018-02-26 Tom Tromey <tom@tromey.com>
4919
4920 * rust-lang.h (rust_last_path_segment): Declare.
4921 * rust-lang.c (rust_last_path_segment): Now public. Change
4922 contract.
4923 (struct disr_info): Remove.
4924 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4925 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4926 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4927 (rust_enum_p, rust_enum_variant): New function.
4928 (rust_underscore_fields): Remove "offset" parameter.
4929 (rust_print_enum): New function.
4930 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4931 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4932 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4933 enums.
4934 (rust_internal_print_type): New function, from rust_print_type.
4935 Remove enum code.
4936 (rust_print_type): Call rust_internal_print_type.
4937 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4938 Update enum handling.
4939 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4940 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4941 (rust_union_quirks): New functions.
4942 (process_full_comp_unit, process_full_type_unit): Call
4943 rust_union_quirks.
4944 (process_structure_scope): Update rust_unions if necessary.
4945
7c22600a
TT
49462018-02-26 Tom Tromey <tom@tromey.com>
4947
4948 * value.h (value_union_variant): Declare.
4949 * valops.c (value_union_variant): New function.
4950 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4951 (struct discriminant_info): New.
4952 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4953 enumerator.
4954 (struct main_type) <flag_discriminated_union>: New field.
4955
15ce8941
TT
49562018-02-26 Tom Tromey <tom@tromey.com>
4957
4958 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4959 unittests/unpack-selftests.c.
4960 * unittests/unpack-selftests.c: New file.
4961 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4962
48fbe735
YQ
49632018-02-26 Yao Qi <yao.qi@linaro.org>
4964
4965 * dwarf2read.c (struct partial_die_info) <read>: New method.
4966 (read_partial_die): Remove the declaration.
4967 (load_partial_dies): Update.
4968 (partial_die_info::partial_die_info):
4969 (read_partial_die): Change it to partial_die_info::read.
4970
52356b79
YQ
49712018-02-26 Yao Qi <yao.qi@linaro.org>
4972
4973 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4974 (fixup_partial_die): Remove declaration.
4975 (scan_partial_symbols): Update.
4976 (partial_die_parent_scope): Likewise.
4977 (partial_die_full_name): Likewise.
4978 (fixup_partial_die): Change it to partial_die_info::fixup.
4979
35cc7ed7
YQ
49802018-02-26 Yao Qi <yao.qi@linaro.org>
4981
4982 * dwarf2read.c (read_partial_die): Update the declaration.
4983 (load_partial_dies): Caller update.
4984 (read_partial_die): Remove one argument abbrev_len.
4985
6f06d47b
YQ
49862018-02-26 Yao Qi <yao.qi@linaro.org>
4987
4988 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4989 assignment operator.
4990 (load_partial_dies): Use ctor and copy ctor.
4991 (read_partial_die): Update.
4992 (dwarf2_cu::find_partial_die): Use ctor.
4993
d590ff25
YQ
49942018-02-26 Yao Qi <yao.qi@linaro.org>
4995
4996 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4997 (find_partial_die_in_comp_unit): Change it to
4998 dwarf2_cu::find_partial_die.
4999 (find_partial_die): Update.
5000
fd0a254f
YQ
50012018-02-26 Yao Qi <yao.qi@linaro.org>
5002
5003 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5004 is NULL.
5005
cd9983dd
YQ
50062018-02-26 Yao Qi <yao.qi@linaro.org>
5007
5008 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5009
f46cd62a
AH
50102018-02-26 Alan Hayward <alan.hayward@arm.com>
5011
5012 * arch/amd64.h: Use common/tdesc.h.
5013 * arch/i386.c: Likewise.
5014 * arch/i386.h: Likewise.
5015 * arch/tic6x.c: Likewise.
5016 * arch/tdesc.h: Move file from here...
5017 * common/tdesc.h: ...to here.
5018 * features/aarch64-core.c: Regenerate.
5019 * features/aarch64-fpu.c: Regenerate.
5020 * features/i386/32bit-avx.c: Regenerate.
5021 * features/i386/32bit-avx512.c: Regenerate.
5022 * features/i386/32bit-core.c: Regenerate.
5023 * features/i386/32bit-linux.c: Regenerate.
5024 * features/i386/32bit-mpx.c: Regenerate.
5025 * features/i386/32bit-pkeys.c: Regenerate.
5026 * features/i386/32bit-sse.c: Regenerate.
5027 * features/i386/64bit-avx.c: Regenerate.
5028 * features/i386/64bit-avx512.c: Regenerate.
5029 * features/i386/64bit-core.c: Regenerate.
5030 * features/i386/64bit-linux.c: Regenerate.
5031 * features/i386/64bit-mpx.c: Regenerate.
5032 * features/i386/64bit-pkeys.c: Regenerate.
5033 * features/i386/64bit-segments.c: Regenerate.
5034 * features/i386/64bit-sse.c: Regenerate.
5035 * features/i386/x32-core.c: Regenerate.
5036 * features/tic6x-c6xp.c: Regenerate.
5037 * features/tic6x-core.c: Regenerate.
5038 * features/tic6x-gp.c: Regenerate.
5039 * target-descriptions.c: Use common/tdesc.h.
5040 * target-descriptions.h: Likewise.
5041
9b292f68
TT
50422018-02-24 Tom Tromey <tom@tromey.com>
5043
5044 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5045 (try_thread_db_load_from_dir, thread_db_load_search): Use
5046 std::string.
5047 (info_auto_load_libthread_db_compare): Return bool. Change
5048 argument types.
5049 (info_auto_load_libthread_db): Use std::vector, std::string.
5050 Remove cleanups.
5051
281d762b
TT
50522018-02-24 Tom Tromey <tom@tromey.com>
5053
5054 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5055 std::string.
5056 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5057 std::string*.
5058 * gdbarch.c: Rebuild.
5059 * gdbarch.h: Rebuild.
5060 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5061 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5062 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5063 std::string*.
5064
9d8780f0
SM
50652018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
5066
5067 * gdbtypes.h (sect_offset): Change type to uint64_t.
5068 (sect_offset_str): New function.
5069 * dwarf2read.c (create_addrmap_from_aranges): Use
5070 sect_offset_str.
5071 (error_check_comp_unit_head): Likewise.
5072 (create_debug_type_hash_table): Likewise.
5073 (read_cutu_die_from_dwo): Likewise.
5074 (init_cutu_and_read_dies): Likewise.
5075 (init_cutu_and_read_dies_no_follow): Likewise.
5076 (process_psymtab_comp_unit_reader): Likewise.
5077 (partial_die_parent_scope): Likewise.
5078 (peek_die_abbrev): Likewise.
5079 (process_queue): Likewise.
5080 (dwarf2_physname): Likewise.
5081 (read_namespace_alias): Likewise.
5082 (read_import_statement): Likewise.
5083 (create_dwo_cu_reader): Likewise.
5084 (create_cus_hash_table): Likewise.
5085 (lookup_dwo_cutu): Likewise.
5086 (inherit_abstract_dies): Likewise.
5087 (read_func_scope): Likewise.
5088 (read_call_site_scope): Likewise.
5089 (dwarf2_add_member_fn): Likewise.
5090 (read_common_block): Likewise.
5091 (read_module_type): Likewise.
5092 (read_typedef): Likewise.
5093 (read_subrange_type): Likewise.
5094 (load_partial_dies): Likewise.
5095 (read_partial_die): Likewise.
5096 (find_partial_die): Likewise.
5097 (read_str_index): Likewise.
5098 (dwarf2_string_attr): Likewise.
5099 (build_error_marker_type): Likewise.
5100 (lookup_die_type): Likewise.
5101 (dump_die_shallow): Likewise.
5102 (follow_die_ref): Likewise.
5103 (dwarf2_fetch_die_loc_sect_off): Likewise.
5104 (dwarf2_fetch_constant_bytes): Likewise.
5105 (follow_die_sig): Likewise.
5106 (get_signatured_type): Likewise.
5107 (get_DW_AT_signature_type): Likewise.
5108 (dwarf2_find_containing_comp_unit): Likewise.
5109 (set_die_type): Likewise.
5110
8ec57239
JB
51112018-02-21 John Baldwin <jhb@FreeBSD.org>
5112
5113 * arch/aarch64.c: Include "common-defs.h".
5114 * arch/amd64.c: Likewise.
5115 * arch/i386.c: Likewise.
5116
3eac2b65
TT
51172018-02-21 Tom Tromey <tom@tromey.com>
5118
5119 * value.h: (extract_field_op): Update.
5120 * eval.c (extract_field_op): Return a const char *.
5121 * expression.h (parse_expression_for_completion): Update.
5122 * completer.c (complete_expression): Update.
5123 (add_struct_fields): Make fieldname const.
5124 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
5125 (mark_completion_tag, parse_exp_in_context_1): Update.
5126 (parse_expression_for_completion): Change "name" to
5127 unique_xmalloc_ptr*.
5128
6ccb583f
TT
51292018-02-21 Tom Tromey <tom@tromey.com>
5130
5131 * infcall.c (call_function_by_hand_dummy): Use std::vector.
5132
c113ed0c
YQ
51332018-02-21 Yao Qi <yao.qi@linaro.org>
5134
5135 * avr-tdep.c (avr_read_pc): Change parameter type to
5136 readable_regcache.
5137 * gdbarch.sh (read_pc): Likewise.
5138 * gdbarch.c: Re-generated.
5139 * gdbarch.h: Re-generated.
5140 * hppa-tdep.c (hppa_read_pc): Change parameter type to
5141 readable_regcache.
5142 * ia64-tdep.c (ia64_read_pc): Likewise.
5143 * mips-tdep.c (mips_read_pc): Likewise.
5144 * spu-tdep.c (spu_read_pc): Likewise.
5145
4c74fe6b
YQ
51462018-02-21 Yao Qi <yao.qi@linaro.org>
5147
5148 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5149 * regcache-dump.c: New file.
5150 * regcache.c: Move register_dump to regcache-dump.c.
5151 (maintenance_print_registers): Likewise.
5152 (maintenance_print_raw_registers): Likewise.
5153 (maintenance_print_cooked_registers): Likewise.
5154 (maintenance_print_register_groups): Likewise.
5155 (maintenance_print_remote_registers): Likewise.
5156 (_initialize_regcache): Likewise.
5157 * regcache.h (register_dump): Moved from regcache.c.
5158
796bb026
YQ
51592018-02-21 Yao Qi <yao.qi@linaro.org>
5160
5161 * regcache.c (regcache::regcache): Update.
5162 (regcache::invalidate): Move it to detached_regcache::invalidate.
5163 (get_thread_arch_aspace_regcache): Update.
5164 (regcache::raw_update): Update.
5165 (regcache::cooked_read): Remove some code.
5166 (regcache::cooked_read_value): Likewise.
5167 (regcache::raw_write): Remove assert on m_readonly_p.
5168 (regcache::raw_supply_integer): Move it to
5169 detached_regcache::raw_supply_integer.
5170 (regcache::raw_supply_zeroed): Likewise.
5171 * regcache.h (detached_regcache) <raw_supply_integer>: New
5172 declaration.
5173 <raw_supply_zeroed, invalidate>: Likewise.
5174 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5175 <invalidate>: Likewise.
5176 <m_readonly_p>: Removed.
5177
215c69dc
YQ
51782018-02-21 Yao Qi <yao.qi@linaro.org>
5179
5180 * infcmd.c (get_return_value): Let stop_regs point to
5181 get_current_regcache.
5182 * regcache.c (regcache::regcache): Remove.
5183 (register_dump_reg_buffer): New class.
5184 (regcache_print): Adjust.
5185 * regcache.h (regcache): Remove constructors.
5186
f3384e66
YQ
51872018-02-21 Yao Qi <yao.qi@linaro.org>
5188
5189 * regcache.c (class register_dump): New class.
5190 (register_dump_regcache, register_dump_none): New class.
5191 (register_dump_remote, register_dump_groups): New class.
5192 (regcache_print): Update.
5193 * regcache.h (regcache_dump_what): Move it to regcache.c.
5194 (regcache) <dump>: Remove.
5195
c8ec2f33
YQ
51962018-02-21 Yao Qi <yao.qi@linaro.org>
5197
5198 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5199 reg_buffer_rw *.
5200 (jit_unwind_reg_set_impl): Call raw_supply.
5201 (jit_frame_sniffer): Use reg_buffer_rw.
5202 * record-full.c (record_full_core_regbuf): Change its type.
5203 (record_full_core_open_1): Use reg_buffer_rw.
5204 (record_full_close): Likewise.
5205 (record_full_core_fetch_registers): Use regcache->raw_supply.
5206 (record_full_core_store_registers): Likewise.
5207 * regcache.c (regcache::get_register_status): Move it to
5208 reg_buffer.
5209 (regcache_raw_set_cached_value): Remove.
5210 (regcache::raw_set_cached_value): Remove.
5211 (regcache::raw_write): Call raw_supply.
5212 (regcache::raw_supply): Move it to reg_buffer_rw.
5213 * regcache.h (regcache_raw_set_cached_value): Remove.
5214 (reg_buffer_rw): New class.
5215
daf6667d
YQ
52162018-02-21 Yao Qi <yao.qi@linaro.org>
5217
5218 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5219 readonly_detached_regcache.
5220 (dummy_frame_prev_register): Use regcache->cooked_read.
5221 * frame.c (frame_save_as_regcache): Change return type.
5222 (frame_pop): Update.
5223 * frame.h (frame_save_as_regcache): Update declaration.
5224 * inferior.h (get_infcall_suspend_state_regcache): Update
5225 declaration.
5226 * infrun.c (infcall_suspend_state) <registers>: use
5227 readonly_detached_regcache.
5228 (save_infcall_suspend_state): Don't use regcache_dup.
5229 (get_infcall_suspend_state_regcache): Change return type.
5230 * linux-fork.c (struct fork_info) <savedregs>: Change to
5231 readonly_detached_regcache.
5232 <pc>: New field.
5233 (fork_save_infrun_state): Don't use regcache_dup.
5234 (info_checkpoints_command): Adjust.
5235 * mi/mi-main.c (register_changed_p): Update declaration.
5236 (mi_cmd_data_list_changed_registers): Use
5237 readonly_detached_regcache.
5238 (register_changed_p): Change parameter type to
5239 readonly_detached_regcache.
5240 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
5241 readonly_detached_regcache.
5242 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
5243 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
5244 New.
5245 (regcache::save): Move it to reg_buffer.
5246 (regcache::restore): Change parameter type.
5247 (regcache_dup): Remove.
5248 * regcache.h (reg_buffer) <save>: New method.
5249 (readonly_detached_regcache): New class.
5250 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
5251 readonly_detached_regcache.
5252 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
5253
fc5b8736
YQ
52542018-02-21 Yao Qi <yao.qi@linaro.org>
5255
5256 * frame.c (frame_save_as_regcache): Use regcache method save.
5257 (frame_pop): Use regcache method restore.
5258 * infrun.c (restore_infcall_suspend_state): Likewise.
5259 * linux-fork.c (fork_load_infrun_state): Likewise.
5260 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5261 save.
5262 * regcache.c (regcache_save): Remove.
5263 (regcache::restore): More asserts.
5264 (regcache_cpy): Remove.
5265 * regcache.h (regcache_save): Remove the declaration.
5266 (regcache::restore): Move from private to public.
5267 Remove the friend declaration of regcache_cpy.
5268 (regcache_cpy): Remove declaration.
5269
849d0ba8
YQ
52702018-02-21 Yao Qi <yao.qi@linaro.org>
5271
5272 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5273 parameter type to 'readable_regcache *'.
5274 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5275 * arm-tdep.c (arm_neon_quad_read): Likewise.
5276 (arm_pseudo_read): Likewise.
5277 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5278 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5279 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5280 * gdbarch.c: Re-generated.
5281 * gdbarch.h: Re-generated.
5282 * gdbarch.sh (pseudo_register_read): Change parameter type to
5283 'readable_regcache *'.
5284 (pseudo_register_read_value): Likewise.
5285 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
5286 (h8300_pseudo_register_read): Likewise.
5287 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
5288 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5289 (i386_pseudo_register_read_into_value): Likewise.
5290 (i386_pseudo_register_read_value): Likewise.
5291 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
5292 declaration.
5293 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
5294 * m32c-tdep.c (m32c_raw_read): Likewise.
5295 (m32c_read_flg): Likewise.
5296 (m32c_banked_register): Likewise.
5297 (m32c_banked_read): Likewise.
5298 (m32c_sb_read): Likewise.
5299 (m32c_part_read): Likewise.
5300 (m32c_cat_read): Likewise.
5301 (m32c_r3r2r1r0_read): Likewise.
5302 (m32c_pseudo_register_read): Likewise.
5303 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5304 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5305 (mep_pseudo_cr64_read): Likewise.
5306 (mep_pseudo_register_read): Likewise.
5307 * mips-tdep.c (mips_pseudo_register_read): Likewise.
5308 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5309 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5310 * regcache.c (regcache::raw_read): Move it to readable_regcache.
5311 (regcache::cooked_read): Likewise.
5312 (regcache::cooked_read_value): Likewise.
5313 (regcache_cooked_read_signed):
5314 (regcache::cooked_read): Likewise.
5315 * regcache.h (readable_regcache): New class.
5316 (regcache): Inherit readable_regcache. Move some methods to
5317 readable_regcache.
5318 * rl78-tdep.c (rl78_pseudo_register_read): Change
5319 parameter type to 'readable_regcache *'.
5320 * rs6000-tdep.c (do_regcache_raw_read): Remove.
5321 (e500_pseudo_register_read): Change parameter type to
5322 'readable_regcache *'.
5323 (dfp_pseudo_register_read): Likewise.
5324 (vsx_pseudo_register_read): Likewise.
5325 (efpr_pseudo_register_read): Likewise.
5326 * s390-tdep.c (s390_pseudo_register_read): Likewise.
5327 * sh-tdep.c (sh_pseudo_register_read): Likewise.
5328 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
5329 (sh64_pseudo_register_read): Likewise.
5330 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5331 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5332 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5333 (spu_pseudo_register_read): Likewise.
5334 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5335 (xtensa_pseudo_register_read): Likewise.
5336
31716595
YQ
53372018-02-21 Yao Qi <yao.qi@linaro.org>
5338
5339 * regcache.c (regcache::regcache): Call reg_buffer ctor.
5340 (regcache::arch): Move it to reg_buffer::arch.
5341 (regcache::register_buffer): Likewise.
5342 (regcache::assert_regnum): Likewise.
5343 (regcache::num_raw_registers): Likewise.
5344 * regcache.h (reg_buffer): New class.
5345 (regcache): Inherit reg_buffer.
5346
7104e59b
SM
53472018-02-20 Simon Marchi <simon.marchi@ericsson.com>
5348
5349 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
5350 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
5351
2d8adcbd
MM
53522018-02-20 Markus Metzger <markus.t.metzger@intel.com>
5353
5354 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
5355
b5884fa7
AH
53562018-02-19 Alan Hayward <alan.hayward@arm.com>
5357
5358 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
5359 (SFILES): Remove common/*.c files.
5360 (COMMON_OBS): Remove some *.o files built from common/*.c files.
5361 * common/common.host: Add common reference.
5362 * configure.ac: Likewise.
5363 * configure: Regenerate.
5364
fd90ace4
YQ
53652018-02-16 Yao Qi <yao.qi@linaro.org>
5366
5367 * block.c (block_namespace_info): Inherit allocate_on_obstack.
5368 (block_initialize_namespace): Use new.
5369 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
5370 (dwarf2_free_objfile): Use delete.
5371 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
5372 (copy_type_recursive): Use new.
5373 * gdb_obstack.h (allocate_on_obstack): New.
5374
85046ae2
YQ
53752018-02-15 Yao Qi <yao.qi@linaro.org>
5376
5377 PR gdb/22849
5378 * inferior.c (exit_inferior_1): Reset inf->control.
5379
355c559b
JB
53802018-02-15 Joel Brobecker <brobecker@adacore.com>
5381
5382 * ada-lang.c (ada_to_fixed_value_create): Delete advance
5383 declaration.
5384
980548fd
PA
53852018-02-14 Pedro Alves <palves@redhat.com>
5386
5387 * frame-unwind.c (frame_unwind_try_unwinder): Always call
5388 frame_cleanup_after_sniffer on exception.
5389
692d6f97
TT
53902018-02-14 Tom Tromey <tom@tromey.com>
5391
5392 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
5393 const.
5394 (solib_bfd_open): Make pathname const.
5395 * solib.c (solib_bfd_open): Make pathname const.
5396 * solib-spu.c (spu_bfd_fopen): Make name const.
5397 (spu_bfd_open): Make pathname const.
5398 * solib-darwin.c (darwin_bfd_open): Make pathname const.
5399 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
5400
e0cc99a6
TT
54012018-02-14 Tom Tromey <tom@tromey.com>
5402
5403 * symfile.c (symfile_bfd_open): Update.
5404 * source.h (openp, source_full_path_of, find_and_open_source):
5405 Change argument type to unique_xmalloc_ptr.
5406 * source.c (openp): Take a unique_xmalloc_ptr.
5407 (source_full_path_of, find_and_open_source): Likewise.
5408 (open_source_file, symtab_to_fullname): Update.
5409 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
5410 unique_xmalloc_ptr.
5411 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
5412 (exec_file_find): Update.
5413 * psymtab.c (psymtab_to_fullname): Update.
5414 * nto-tdep.h (nto_find_and_open_solib): Update.
5415 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
5416 unique_xmalloc_ptr.
5417 * exec.c (exec_file_attach): Update.
5418 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
5419 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
5420
b46a8d7c
TT
54212018-02-14 Tom Tromey <tom@tromey.com>
5422
5423 * solib.c: Include source.h.
5424 * nto-tdep.c: Include source.h.
5425 * mi/mi-cmd-env.c: Include source.h.
5426 * infcmd.c: Include source.h.
5427 * exec.c: Include source.h.
5428 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
5429 (add_path, directory_switch, source_path, init_source_path): Move
5430 declarations...
5431 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
5432 (add_path, directory_switch, source_path, init_source_path):
5433 ...here.
5434
797bc1cb
TT
54352018-02-14 Tom Tromey <tom@tromey.com>
5436
5437 * solist.h (exec_file_find, solib_find): Return
5438 unique_xmalloc_ptr.
5439 (solib_bfd_fopen): Take a const char *.
5440 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
5441 (exec_file_find, solib_find): Likewise.
5442 (solib_bfd_fopen): Do not take ownership of "pathname".
5443 (solib_bfd_open): Use unique_xmalloc_ptr.
5444 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
5445 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
5446 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
5447 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
5448
f98b2e33
JB
54492018-02-14 Joel Brobecker <brobecker@adacore.com>
5450
5451 * ada-lang.c (name_match_type_from_name): Remove reference to
5452 ada_name_for_lookup in function's documentation.
5453 * ada-lang.h (ada_name_for_lookup): Delete declaration.
5454
24b9144d
SM
54552018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5456
5457 * defs.h (enum openp_flags): New enum.
5458 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
5459 Move to enum openp_flags.
5460 (openp_flags): New enum flags.
5461 (openp): Change parameter type to openp_flags.
5462 * source.c (openp): Change parameter type to openp_flags.
5463 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
5464 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
5465
387cd15b
SM
54662018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
5467
5468 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
5469 per-command.
5470
b303c6f6
AB
54712018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
5472
5473 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
5474 into...
5475 (class dwarf2_queue_guard): ...the destructor of this new class.
5476 (dw2_do_instantiate_symtab): Create instance of the new class
5477 dwarf2_queue_guard, remove cleanup.
5478
9c3630e9
TT
54792018-02-09 Tom Tromey <tom@tromey.com>
5480
5481 * source.c (find_source_lines): Don't reference past the end of
5482 the vector.
5483
c4e12631
MM
54842018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5485
5486 * remote.c (remote_btrace_maybe_reopen): Change error message.
5487 * btrace.c (btrace_enable): Likewise.
5488 (parse_xml_btrace): Likewise.
5489 (parse_xml_btrace_conf): Likewise.
5490
88711fbf
MM
54912018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5492
5493 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
5494 (linux_enable_pt, linux_enable_bts): Call
5495 diagnose_perf_event_open_fail.
5496
17ad2a4f
MM
54972018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5498
5499 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
5500 Remove parameter and change return type. Update callers. Move it.
5501 (linux_enable_bts, linux_enable_pt): Improve error message.
5502 (linux_enable_pt): Remove zero buffer size check.
5503 (linux_enable_btrace): Improve error messages. Remove NULL return
5504 check.
5505
de6242d3
MM
55062018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5507
5508 * btrace.c (btrace_enable): Remove target_supports_btrace call.
5509 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
5510 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
5511 (linux_supports_pt, linux_supports_btrace): Remove.
5512 (linux_enable_bts): Call cpu_supports_bts.
5513 * nat/linux-btrace.h (linux_supports_btrace): Remove.
5514 * remote.c (remote_supports_btrace): Remove.
5515 (init_remote_ops): Remove remote_supports_btrace.
5516 * target-delegates.c: Regenerated.
5517 * target.c (target_supports_btrace): Remove.
5518 * target.h (target_ops) <to_supports_btrace>: Remove
5519 (target_supports_btrace): Remove.
5520 * x86-linux-nat.c (x86_linux_create_target): Remove
5521 linux_supports_btrace.
5522
9ee23a85
MM
55232018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5524
5525 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
5526 btrace failed.
5527 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
5528 exception and use message in own exception.
5529
5c3284c1
MM
55302018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5531
5532 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
5533 (perf_event_pt_event_type): Use gdb_file_up.
5534 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
5535 scoped_fd, and scoped_mmap.
5536
84696f37
MM
55372018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5538
5539 * common/scoped_mmap.h: New.
5540 * unittests/scoped_mmap-selftest.c: New.
5541 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5542 unittests/scoped_mmap-selftest.c.
5543
ea4a0888
MM
55442018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5545
5546 * common/scoped_fd.h: New.
5547 * unittests/scoped_fd-selftest.c: New.
5548 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5549 unittests/scoped_fd-selftest.c.
5550
869e8290
TT
55512018-02-09 Tom Tromey <tom@tromey.com>
5552
5553 * auto-load.c (auto_load_section_scripts): Use
5554 gdb::unique_xmalloc_ptr.
5555
a37a2ae7
TT
55562018-02-09 Tom Tromey <tom@tromey.com>
5557
5558 * auto-load.c (execute_script_contents): Use std::string.
5559
4e725347
JB
55602018-02-09 Joel Brobecker <brobecker@adacore.com>
5561
5562 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
5563 Python function, rather than a new command.
5564
9a897d43
TT
55652018-02-08 Tom Tromey <tom@tromey.com>
5566
5567 * solib.c (solib_find_1): Use std::string.
5568 (solib_bfd_fopen): Use unique_xmalloc_ptr.
5569
58ef3771
TT
55702018-02-08 Tom Tromey <tom@tromey.com>
5571
5572 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
5573
a9abc434
TT
55742018-02-08 Tom Tromey <tom@tromey.com>
5575
5576 * source.c (find_source_lines): Use gdb::def_vector.
5577
84f27c6f
TT
55782018-02-08 Tom Tromey <tom@tromey.com>
5579
5580 * macrocmd.c (struct temporary_macro_definition): New.
5581 (macro_define_command): Use temporary_macro_definition. Remove
5582 cleanups.
5583 (free_macro_definition_ptr): Remove.
5584
0354904b
TT
55852018-02-08 Tom Tromey <tom@tromey.com>
5586
5587 * macroexp.c (maybe_expand): Use std::string.
5588
1739cf24
TT
55892018-02-08 Tom Tromey <tom@tromey.com>
5590
5591 * macroexp.c (struct macro_buffer): Add initializers for some
5592 members.
5593 (init_buffer, init_shared_buffer, free_buffer)
5594 (free_buffer_return_text): Remove.
5595 (macro_buffer): New constructors.
5596 (~macro_buffer): New destructor.
5597 (macro_buffer::set_shared): New method.
5598 (macro_buffer::resize_buffer, macro_buffer::appendc)
5599 (macro_buffer::appendmem): Now methods, not free functions.
5600 (set_token, append_tokens_without_splicing, stringify)
5601 (macro_stringify): Update.
5602 (gather_arguments): Change return type. Remove argc_p argument,
5603 add args_ptr argument. Use std::vector.
5604 (substitute_args): Remove argc argument. Accept std::vector.
5605 (expand): Update. Use std::vector.
5606 (scan, macro_expand, macro_expand_next): Update.
5607
f6c2623e
TT
56082018-02-08 Tom Tromey <tom@tromey.com>
5609
5610 * symtab.c (default_collect_symbol_completion_matches_break_on):
5611 Use unique_xmalloc_ptr.
5612 * macroscope.h: (sal_macro_scope, user_macro_scope)
5613 (default_macro_scope): Return unique_xmalloc_ptr.
5614 * macroscope.c (sal_macro_scope, user_macro_scope)
5615 (default_macro_scope): Return unique_xmalloc_ptr.
5616 * macroexp.h (macro_expand, macro_expand_once): Return
5617 unique_xmalloc_ptr.
5618 * macroexp.c (macro_expand, macro_expand_once): Return
5619 unique_xmalloc_ptr.
5620 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5621 (info_macro_command, info_macros_command): Use
5622 unique_xmalloc_ptr.
5623 * compile/compile-c-support.c (write_macro_definitions): Use
5624 unique_xmalloc_ptr.
5625 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5626
c2e0e465
SM
56272018-02-07 Simon Marchi <simon.marchi@ericsson.com>
5628
5629 * value.c (value_static_field): Assign field type instead of
5630 containing type when returning an optimized out value.
5631
3f8c94b4
YQ
56322018-02-06 Yao Qi <yao.qi@linaro.org>
5633
5634 * ft32-tdep.c (ft32_read_pc): Remove.
5635 (ft32_write_pc): Remove.
5636 (ft32_gdbarch_init): Update.
5637 * m32r-tdep.c (m32r_read_pc): Remove.
5638 (m32r_gdbarch_init): Update.
5639 * mep-tdep.c (mep_read_pc): Remove.
5640 (mep_gdbarch_init): Update.
5641 * microblaze-tdep.c (microblaze_write_pc): Remove.
5642 (microblaze_gdbarch_init): Update.
5643 * mn10300-tdep.c (mn10300_read_pc): Remove.
5644 (mn10300_write_pc): Remove.
5645 (mn10300_gdbarch_init): Update.
5646 * moxie-tdep.c (moxie_read_pc): Remove.
5647 (moxie_write_pc): Remove.
5648 (moxie_gdbarch_init): Update.
5649
bca65a23
YQ
56502018-02-06 Yao Qi <yao.qi@linaro.org>
5651
5652 * expprint.c (print_subexp_standard): Handle
5653 OP_F77_UNDETERMINED_ARGLIST.
5654 (dump_subexp_body_standard): Likewise.
5655
583e3f90 56562018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 5657
583e3f90
YQ
5658 * target-descriptions.c (tdesc_element_visitor) Add empty
5659 implementations.
b8df6ca7
AH
5660 (tdesc_type): Move make_gdb_type from here.
5661 (tdesc_type_builtin): Likewise.
5662 (tdesc_type_vector): Likewise.
5663 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5664 (make_gdb_type_struct): Move from tdesc_type_with_fields.
5665 (make_gdb_type_union): Likewise.
5666 (make_gdb_type_flags): Likewise.
5667 (make_gdb_type_enum): Likewise.
5668 (make_gdb_type): New function.
5669 (tdesc_register_type): Use static make_gdb_type.
5670
e813d34a
RK
56712018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
5672
5673 * infcmd.c (default_print_one_register_info): Align natural-format
5674 column values consistently one under another.
5675 (pad_to_column): New function.
5676
0eb876f5
JB
56772018-02-05 Joel Brobecker <brobecker@adacore.com>
5678
5679 * dwarf2read.c (dwarf2_physname): Move commment.
5680
0625771b
LS
56812018-02-01 Leszek Swirski <leszeks@google.com>
5682
5683 * varobj.c (varobj_formatted_print_options): Allow recursive
5684 pretty printing if pretty printing is enabled.
5685
59498c30
LS
56862018-02-01 Leszek Swirski <leszeks@google.com>
5687
5688 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5689 names after a structop as a filename.
5690
2d9e6acb
YQ
56912018-02-01 Yao Qi <yao.qi@linaro.org>
5692
5693 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5694 (arm_record_coproc_data_proc): Likewise.
5695
df95a9cf
YQ
56962018-02-01 Yao Qi <yao.qi@linaro.org>
5697
5698 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5699
07e5f5cf
NP
57002018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5701
5702 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5703 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5704
3045b475
PA
57052018-01-31 Pedro Alves <palves@redhat.com>
5706
5707 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5708 * inflow.c (child_terminal_save_inferior): Wrap reference to
5709 tcgetpgrp in HAVE_TERMIOS_H.
5710 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5711 _WIN32.
5712 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5713 always iterate over all inferiors.
5714 (gdbsim_cntrl_c): Adjust.
5715 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5716
929b5ad4
JB
57172018-01-31 Joel Brobecker <brobecker@adacore.com>
5718
5719 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5720 index type is objfile-owned if the element type is as well.
5721
29236ca2
JB
57222018-01-31 Joel Brobecker <brobecker@adacore.com>
5723
5724 GDB 8.1 released.
5725
c81e8879
PR
57262018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5727
5728 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5729 "features/s390x-linux64.c".
5730 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5731 s390_linux32 and s390x_linux64.
5732 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5733 default tdesc.
5734 * s390-tdep.c: Include "features/s390-linux32.c" and
5735 "features/s390x-linux64.c".
5736 (s390_tdesc_valid): Add check for tdesc_has_registers.
5737 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5738 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5739 tdesc_s390x_linux64.
5740 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5741 tdesc_s390x_linux64 to...
5742 * s390-tdep.h: ...here.
5743
e671cd59
PA
57442018-01-30 Pedro Alves <palves@redhat.com>
5745
5746 PR gdb/13211
5747 * config.in, configure: Regenerate.
5748 * configure.ac: Check for getpgid.
5749 * go32-nat.c (go32_pass_ctrlc): New.
5750 (go32_target): Install it.
5751 * inf-child.c (inf_child_target): Install
5752 child_terminal_save_inferior, child_pass_ctrlc and
5753 child_interrupt.
5754 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5755 (inf_ptrace_target): No longer install it.
5756 * infcmd.c (interrupt_target_1): Adjust.
5757 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5758 (child_interrupt): Declare.
5759 (inferior::terminal_state): New.
5760 * inflow.c (struct terminal_info): Update comments.
5761 (inferior_process_group): Delete.
5762 (terminal_is_ours): Delete.
5763 (gdb_tty_state): New.
5764 (child_terminal_init): Adjust.
5765 (is_gdb_terminal, sharing_input_terminal_1)
5766 (sharing_input_terminal): New functions.
5767 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5768 Set the process's actual process group in the foreground if
5769 possible. Handle is_ours_for_output/is_ours distinction. Don't
5770 mark terminal as the inferior's if not sharing GDB's terminal.
5771 Don't check attach_flag.
5772 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5773 pass down a target_terminal_state.
5774 (child_terminal_save_inferior): New, factored out from ...
5775 (child_terminal_ours_1): ... this. Handle
5776 target_terminal_state::is_ours_for_output.
5777 (child_interrupt, child_pass_ctrlc): New.
5778 (inflow_inferior_exit): Clear the inferior's terminal_state.
5779 (copy_terminal_info): Copy the inferior's terminal state.
5780 (_initialize_inflow): Remove reference to terminal_is_ours.
5781 * inflow.h (inferior_process_group): Delete.
5782 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5783 * procfs.c (procfs_target): Don't install procfs_interrupt.
5784 (procfs_interrupt): Delete.
5785 * remote.c (remote_serial_quit_handler): Adjust.
5786 (remote_interrupt): Remove ptid parameter. Adjust.
5787 * target-delegates.c: Regenerate.
5788 * target.c: Include "terminal.h".
5789 (target_terminal::terminal_state): Rename to ...
5790 (target_terminal::m_terminal_state): ... this.
5791 (target_terminal::init): Adjust.
5792 (target_terminal::inferior): Adjust to per-inferior
5793 terminal_state.
5794 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5795 (target_terminal::ours, target_terminal::ours_for_output): Use
5796 target_terminal_is_ours_kind.
5797 (target_interrupt): Remove ptid parameter. Adjust.
5798 (default_target_pass_ctrlc): Adjust.
5799 * target.h (target_ops::to_terminal_save_inferior): New field.
5800 (target_ops::to_interrupt): Remove ptid_t parameter.
5801 (target_interrupt): Remove ptid_t parameter. Update comment.
5802 (target_pass_ctrlc): Update comment.
5803 * target/target.h (target_terminal_state): New scoped enum,
5804 factored out of ...
5805 (target_terminal::terminal_state): ... here.
5806 (target_terminal::inferior): Update comments.
5807 (target_terminal::restore_inferior): New.
5808 (target_terminal::is_inferior, target_terminal::is_ours)
5809 (target_terminal::is_ours_for_output): Adjust.
5810 (target_terminal::scoped_restore_terminal_state): Adjust to
5811 rename, and call restore_inferior() instead of inferior().
5812 (target_terminal::scoped_restore_terminal_state::m_state): Change
5813 type.
5814 (target_terminal::terminal_state): Rename to ...
5815 (target_terminal::m_terminal_state): ... this and change type.
5816
9c3a5d93
PA
58172018-01-30 Pedro Alves <palves@redhat.com>
5818
5819 * linux-nat.c (wait_for_signal): New function.
5820 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5821 directly.
5822 (async_terminal_is_ours)
5823 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5824 (linux_nat_add_target): Don't override
5825 to_terminal_inferior/to_terminal_ours.
5826
69ab5edb
SDJ
58272018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5828
5829 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5830
fc8e7e75
SM
58312018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5832
5833 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5834 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5835 dwarf2_per_objfile_free here.
5836 (dwarf2_per_objfile_free): Remove.
5837 (_initialize_dwarf2_read): Don't register
5838 dwarf2_per_objfile_free as a registry cleanup.
5839
b2a426e2
EZ
58402018-01-27 Eli Zaretskii <eliz@gnu.org>
5841
5842 Avoid compilation errors in MinGW native builds
5843
5844 The error is triggered by including python-internal.h, and the
5845 error message is:
5846
5847 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5848 from build-gnulib/import/math.h:27,
5849 from d:/usr/Python26/include/pyport.h:235,
5850 from d:/usr/Python26/include/Python.h:58,
5851 from python/python-internal.h:94,
5852 from python/py-arch.c:24:
5853 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5854 using ::hypot;
5855 ^~~~~
5856
5857 This happens because Python headers define 'hypot' to expand t
5858 '_hypot' in the Windows builds.
5859 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5860 'hypoth'. This avoids a compilation error.
5861
0bdd8eac
AH
58622018-01-26 Alan Hayward <alan.hayward@arm.com>
5863
5864 * MAINTAINERS (Write After Approval): Fix ordering.
5865
56ae9dc3
AH
58662018-01-26 Alan Hayward <alan.hayward@arm.com>
5867
5868 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5869
7433498b
AM
58702018-01-26 Alan Modra <amodra@gmail.com>
5871
5872 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5873 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5874 Remove nop. Make const. Comment.
5875 (powerpc32_plt_stub_so_2): New.
5876 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5877 Correct count. Update uses.
5878 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5879 Move common code reading PLT entry word. Correct
5880 powerpc32_plt_stub PLT address calculation.
5881 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5882 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5883 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5884 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5885 (ppc64_standard_linkage8): Likewise.
5886 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5887 Correct insns description.
5888 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5889
0f59d5fc
PA
58902018-01-24 Pedro Alves <palves@redhat.com>
5891
5892 GCC PR libstdc++/83906
5893 * gdbtypes.c (operator==(const dynamic_prop &,
5894 const dynamic_prop &)): New.
5895 (operator==(const range_bounds &, const range_bounds &)): New.
5896 (check_types_equal): Use them instead of memcmp.
5897 * gdbtypes.h (operator==(const dynamic_prop &,
5898 const dynamic_prop &)): Declare.
5899 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5900 (operator==(const range_bounds &, const range_bounds &)): Declare.
5901 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5902
ef8914a4
PR
59032018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5904
5905 * s390-linux-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): Move to s390-tdep.c.
5910 (s390_linux_init_abi_any): Adjust.
5911 * s390-tdep.c (s390_record_address_mask)
5912 (s390_record_calc_disp_common, s390_record_calc_disp)
5913 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5914 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5915 (s390_process_record): Moved from s390-linux-tdep.c
5916 (s390_gdbarch_init): Adjust.
5917
d6e58945
PR
59182018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5919
5920 * s390-linux-nat.c (s390-tdep.h): New include.
5921 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5922 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5923 (ALLDEPFILES): Add s390-tdep.c.
5924 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5925 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5926 * s390-tdep.h: ...this. New file.
5927 * s390-linux-tdep.c (s390-tdep.h): New include.
5928 (_initialize_s390_tdep): Rename to...
5929 (_initialize_s390_linux_tdep): ...this and adjust.
5930 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5931 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5932 s390-tdep.h.
5933 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5934 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5935 (s390_is_partial_instruction, s390_software_single_step)
5936 (is_non_branch_ril, s390_displaced_step_copy_insn)
5937 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5938 (s390_prologue_data, s390_addr, s390_store, s390_load)
5939 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5940 (s390_register_call_saved, s390_guess_tracepoint_registers)
5941 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5942 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5943 (s390_pseudo_register_name, s390_pseudo_register_type)
5944 (s390_pseudo_register_read, s390_pseudo_register_write)
5945 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5946 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5947 (s390_addr_bits_remove, s390_address_class_type_flags)
5948 (s390_address_class_type_flags_to_name)
5949 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5950 (s390_function_arg_float, s390_function_arg_vector)
5951 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5952 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5953 (s390_frame_align, s390_register_return_value, s390_return_value)
5954 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5955 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5956 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5957 (s390_trad_frame_prev_register, s390_unwind_cache)
5958 (s390_prologue_frame_unwind_cache)
5959 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5960 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5961 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5962 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5963 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5964 (s390_frame_base_address, s390_local_base_address)
5965 (s390_frame_base, s390_gcc_target_options)
5966 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5967 (s390_validate_reg_range, s390_tdesc_valid)
5968 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5969 * s390-tdep.c: ...this. New file.
5970
9c0b896e
PR
59712018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5972
5973 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5974 (s390_process_record, s390_gdbarch_tdep_alloc)
5975 (s390_linux_init_abi_any): Use/set new hook.
5976
7042632b
PR
59772018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5978
5979 * s390-linux-tdep.c (osabi.h): New include.
5980 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5981 (s390_linux_init_abi_any): New functions.
5982 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5983
650f5e13
PR
59842018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5985
5986 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5987 tdesc_has_registers check
5988
47c9317e
PR
59892018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5990
5991 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5992 (s390_validate_reg_range): New macro.
5993 (s390_gdbarch_init): Adjust.
5994
095085d8
PR
59952018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5996
5997 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5998 (s390_gdbarch_tdep_alloc): Adjust.
5999 (s390_gdbarch_init): Adjust.
6000
ab9bcc67
PR
60012018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6002
6003 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6004 <have_tdb>: Change type to bool.
6005 (s390_gdbarch_tdep_alloc): Adjust.
6006 (s390_gdbarch_init): Adjust.
6007
21f6f5ff
PR
60082018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6009
6010 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6011 (gdbarch_tdep) <have_upper, have_vx>: New fields.
6012 (s390_gdbarch_tdep_alloc): New function.
6013 (s390_gdbarch_init): Allocate tdep at start and use its fields
6014 instead of separate variables.
6015
0eb97953
PR
60162018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6017
6018 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6019 when looking for cached gdbarch and add comment for remaining.
6020
5c319bb2
PA
60212018-01-22 Pedro Alves <palves@redhat.com>
6022 Sergio Durigan Junior <sergiodj@redhat.com>
6023
6024 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6025 case.
6026
d65ce302
MR
60272018-01-22 Maciej W. Rozycki <macro@mips.com>
6028
6029 * MAINTAINERS: Update my company e-mail address.
6030
ec7a5fcb
YQ
60312018-01-22 Yao Qi <yao.qi@linaro.org>
6032
6033 * regcache.c (cooked_write_test): New function.
6034 (_initialize_regcache): Register the test.
6035
11f57cb6
YQ
60362018-01-22 Yao Qi <yao.qi@linaro.org>
6037
6038 * ia64-tdep.c (ia64_pseudo_register_read): Call
6039 regcache->cooked_read instead of regcache_cooked_read_unsigned.
6040 * m32c-tdep.c (m32c_cat_read): Likewise.
6041 (m32c_r3r2r1r0_read): Likewise.
6042 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6043 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6044
03f50fc8
YQ
60452018-01-22 Yao Qi <yao.qi@linaro.org>
6046
6047 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6048 method raw_read instead of regcache_raw_read.
6049 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6050 * arm-tdep.c (arm_neon_quad_read): Likewise.
6051 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6052 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6053 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6054 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6055 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6056 (i386_pseudo_register_read_into_value): Likewise.
6057 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6058 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6059 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6060 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6061 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6062 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6063 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6064 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6065 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6066
dc711524
YQ
60672018-01-22 Yao Qi <yao.qi@linaro.org>
6068
6069 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6070 * configure.tgt: Remove target mt.
6071 * mt-tdep.c: Remove.
6072 * regcache.c (cooked_read_test): Remove the check for mt.
6073
3f5a868b
YQ
60742018-01-22 Yao Qi <yao.qi@linaro.org>
6075
6076 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6077 instead of gdbarch_pseudo_register_read_value.
6078
de4cb04a
JB
60792018-01-22 Joel Brobecker <brobecker@adacore.com>
6080
6081 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
6082 language is Ada.
6083
a9e40818
JB
60842018-01-22 Joel Brobecker <brobecker@adacore.com>
6085
6086 * linespec.c (create_sals_line_offset): Remove code that preserved
6087 the symtab_and_line's line number.
6088
e707fc44
AB
60892018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6090
6091 * varobj.c (varobj_create): Don't set valid_block when creating a
6092 floating varobj.
6093
03d0bf7b
AB
60942018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6095
6096 * varobj.c (varobj_create): Remove out of date comment.
6097
ae451627
AB
60982018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6099
6100 PR mi/20395
6101 * ada-exp.y (write_var_from_sym): Pass extra parameter when
6102 updating innermost block.
6103 * parse.c (innermost_block_tracker::update): Take extra type
6104 parameter, and check types match before updating innermost block.
6105 (write_dollar_variable): Update innermost block for registers.
6106 * parser-defs.h (enum innermost_block_tracker_type): New enum.
6107 (innermost_block_tracker::innermost_block_tracker): Initialise
6108 m_types member.
6109 (innermost_block_tracker::reset): Take type parameter.
6110 (innermost_block_tracker::update): Take type parameter, and pass
6111 type through as needed.
6112 (innermost_block_tracker::m_types): New member.
6113 * varobj.c (varobj_create): Pass type when reseting innermost
6114 block.
6115
aee1fcdf
AB
61162018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6117
6118 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
6119 * ada-lang.c (resolve_subexp): Likewise.
6120 * breakpoint.c (set_breakpoint_condition) Likewise.
6121 (watch_command_1) Likewise.
6122 * c-exp.y (variable): Likewise.
6123 * d-exp.y (PrimaryExpression): Likewise.
6124 * f-exp.y (variable): Likewise.
6125 * go-exp.y (variable): Likewise.
6126 * m2-exp.y (variable): Likewise.
6127 * objfiles.c (objfile::~objfile): Likewise.
6128 * p-exp.y (variable): Likewise.
6129 * parse.c (innermost_block): Change type.
6130 * parser-defs.h (class innermost_block_tracker): New.
6131 (innermost_block): Change to innermost_block_tracker.
6132 * printcmd.c (display_command): Switch to innermost_block API.
6133 (do_one_display): Likewise.
6134 * rust-exp.y (do_one_display): Likewise.
6135 * symfile.c (clear_symtab_users): Likewise.
6136 * varobj.c (varobj_create): Switch to innermost_block API, replace
6137 use of innermost_block with block stored on varobj object.
6138
396af9a1
AB
61392018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
6140
6141 * expression.h (innermost_block): Remove declaration.
6142 * varobj.c: Add 'parser-defs.h' include.
6143
fcfcc376
TT
61442018-01-19 Tom Tromey <tom@tromey.com>
6145
6146 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6147 symbols in the static and global blocks.
6148
5a6c3296
JC
61492018-01-19 James Clarke <jrtc27@jrtc27.com>
6150
6151 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6152 gdb_ptrace.h, and move including gdb_wait.h ...
6153 * nat/linux-ptrace.h: ... to here.
6154
bc09b0c1
SM
61552018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6156
6157 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6158 inf_ptrace_detach_success.
6159 (inf_ptrace_detach_success): Add inferior parameter, use it
6160 instead of inferior_ptid, pass it to detach_inferior.
6161 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6162 parameter.
6163 * inferior.c (detach_inferior): Add overload that takes an
6164 inferior object.
6165 * inferior.h (detach_inferior): Likewise.
6166 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6167 use inferior_ptid, adjust call to inf_ptrace_detach_success.
6168 * linux-thread-db.c (thread_db_detach): Use inf parameter.
6169
6e1e1966
SM
61702018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6171
6172 * target.h (struct target_ops) <to_detach>: Add inferior
6173 parameter.
6174 (target_detach): Likewise.
6175 * target.c (dispose_inferior): Pass inferior down.
6176 (target_detach): Pass inferior down. Assert that it is equal to
6177 the current inferior.
6178 * aix-thread.c (aix_thread_detach): Pass inferior down.
6179 * corefile.c (core_file_command): Pass current_inferior() down.
6180 * corelow.c (core_detach): Add inferior parameter.
6181 * darwin-nat.c (darwin_detach): Likewise.
6182 * gnu-nat.c (gnu_detach): Likewise.
6183 * inf-ptrace.c (inf_ptrace_detach): Likewise.
6184 * infcmd.c (detach_command): Pass current_inferior() down to
6185 target_detach.
6186 * infrun.c (follow_fork_inferior): Pass parent_inf to
6187 target_detach.
6188 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6189 target_detach.
6190 * linux-nat.c (linux_nat_detach): Add inferior parameter.
6191 * linux-thread-db.c (thread_db_detach): Likewise.
6192 * nto-procfs.c (procfs_detach): Likewise.
6193 * procfs.c (procfs_detach): Likewise.
6194 * record.c (record_detach): Likewise.
6195 * record.h (struct inferior): Forward-declare.
6196 (record_detach): Add inferior parameter.
6197 * remote-sim.c (gdbsim_detach): Likewise.
6198 * remote.c (remote_detach_1): Likewise.
6199 (remote_detach): Likewise.
6200 (extended_remote_detach): Likewise.
6201 * sol-thread.c (sol_thread_detach): Likewise.
6202 * target-debug.h (target_debug_print_inferior_p): New macro.
6203 * target-delegates.c: Re-generate.
6204 * top.c (kill_or_detach): Pass inferior down to target_detach.
6205 * windows-nat.c (windows_detach): Add inferior parameter.
6206
6bd6f3b6
SM
62072018-01-19 Simon Marchi <simon.marchi@ericsson.com>
6208
6209 * target.h (struct target_ops) <to_detach>: Remove args
6210 parameter.
6211 (target_detach): Likewise.
6212 * target.c (dispose_inferior): Adjust.
6213 (target_detach): Remove args parameter, adjust.
6214 * aix-thread.c (aix_thread_detach): Adjust.
6215 * corefile.c (core_file_command): Adjust.
6216 * corelow.c (core_detach): Adjust.
6217 * darwin-nat.c (darwin_detach): Adjust.
6218 * gnu-nat.c (gnu_detach): Adjust.
6219 * inf-ptrace.c (inf_ptrace_detach): Adjust.
6220 * infcmd.c (detach_command): Adjust
6221 * infrun.c (follow_fork_inferior): Adjust.
6222 (handle_vfork_child_exec_or_exit): Adjust.
6223 * linux-fork.c (linux_fork_detach): Remove args parameter.
6224 * linux-fork.h (linux_fork_detach): Likewise.
6225 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6226 * linux-thread-db.c (thread_db_detach): Likewise.
6227 * nto-procfs.c (procfs_detach): Likewise.
6228 * procfs.c (procfs_detach): Likewise.
6229 (do_detach): Remove signo parameter.
6230 * record.c (record_detach): Remove args parameter.
6231 * record.h (record_detach): Likewise.
6232 * remote-sim.c (gdbsim_detach): Likewise.
6233 * remote.c (remote_detach_1): Likewise.
6234 (remote_detach): Likewise.
6235 (extended_remote_detach): Likewise.
6236 * sol-thread.c (sol_thread_detach): Likewise.
6237 * target-delegates.c: Re-generate.
6238 * top.c (struct qt_args) <args>: Remove field.
6239 (kill_or_detach): Don't pass args.
6240 (quit_force): Don't set args.
6241 * windows-nat.c (windows_detach): Remove args parameter.
6242
88af8ea8
YQ
62432018-01-19 Yao Qi <yao.qi@linaro.org>
6244
6245 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
6246 (arm_linux_init_abi): Install it.
6247
dea445b9
YQ
62482018-01-19 Yao Qi <yao.qi@linaro.org>
6249
6250 * osabi.c (gdb_osabi_names): Extend the regexp for
6251 arm-linux-gnueabihf.
6252
4a17f768
YQ
62532018-01-18 Yao Qi <yao.qi@linaro.org>
6254
6255 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
6256 m_abbrevs.
6257 (abbrev_table::add_abbrev): Update.
6258 (abbrev_table::lookup_abbrev): Update.
6259
d679c21a
YQ
62602018-01-18 Yao Qi <yao.qi@linaro.org>
6261
6262 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6263
7d937cad
SDJ
62642018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
6265
6266 * compile/compile.c (compile_to_object): Convert "triplet_rx"
6267 to "std::string".
6268
9e14690d
TT
62692018-01-17 Tom Tromey <tom@tromey.com>
6270
6271 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
6272
50a82047
TT
62732018-01-17 Tom Tromey <tom@tromey.com>
6274
6275 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
6276 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
6277 (create_array_type_with_stride): Update.
6278 * dwarf2read.c (set_die_type): Update.
6279
c89b44cd
TT
62802018-01-17 Tom Tromey <tom@tromey.com>
6281
6282 * dwarf2read.c (delayed_method_info): Remove typedef.
6283 (dwarf2_cu::method_info): Now a std::vector.
6284 (add_to_method_list): Update.
6285 (free_delayed_list): Remove.
6286 (compute_delayed_physnames): Update.
6287 (process_full_comp_unit, process_full_type_unit): Clear the method
6288 list. Remove cleanups.
6289 (psymtab_include_file_name): Add name_holder parameter. Use
6290 unique_xmalloc_ptr.
6291 (dwarf_decode_lines): Update.
6292
fcd3b13d
SM
62932018-01-17 Tom Tromey <tom@tromey.com>
6294 Simon Marchi <simon.marchi@ericsson.com>
6295
6296 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
6297 (dwarf2_per_objfile::free_cached_comp_units)
6298 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6299 (init_cutu_and_read_dies_no_follow): Update.
6300 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
6301 (dwarf2_cu::~dwarf2_cu): New.
6302 (free_heap_comp_unit, free_stack_comp_unit): Remove.
6303 (age_cached_comp_units, free_one_cached_comp_unit): Update.
6304
685af9cd
TT
63052018-01-17 Tom Tromey <tom@tromey.com>
6306 Simon Marchi <simon.marchi@ericsson.com>
6307
6308 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
6309 (struct die_reader_specs) <abbrev_table>: New member.
6310 (struct abbrev_table): Add constructor.
6311 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
6312 <abbrev_obstack>: Now an auto_obstack.
6313 (abbrev_table_up): New typedef.
6314 (init_cu_die_reader): Add abbrev_table parameter.
6315 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
6316 Add result_dwo_abbrev_table.
6317 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6318 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
6319 Update.
6320 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
6321 parameter.
6322 (skip_children): Update.
6323 (abbrev_table::alloc_abbrev): Rename from
6324 abbrev_table_alloc_abbrev.
6325 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
6326 (abbrev_table::lookup_abbrev): Rename from
6327 abbrev_table_lookup_abbrev.
6328 (abbrev_table_read_table): Return abbrev_table_up.
6329 (abbrev_table_free, abbrev_table_free_cleanup)
6330 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
6331 (load_partial_dies): Update.
6332
5e2db402
TT
63332018-01-17 Tom Tromey <tom@tromey.com>
6334
6335 * dwarf2read.c (dwarf2_compute_name): Update comment.
6336 (read_func_scope, read_variable): Update.
6337 (new_symbol): Remove.
6338 (new_symbol_full): Rename to new_symbol.
6339
ee7f689e 63402018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
6341
6342 PR gdb/16577
6343 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
6344 a warning instead of throwing an error, set section size to 0 and return
6345 NULL.
6346 * gdb_bfd.h (gdb_bfd_map_section): Update description.
6347
4d9b86e1
SM
63482018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6349
6350 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
6351 std::string.
6352 (linux_ptrace_attach_fail_reason_string): Likewise.
6353 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
6354 Likewise.
6355 (linux_ptrace_attach_fail_reason_string): Likewise.
6356 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
6357
a7b2d0fb
SM
63582018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6359
6360 * linux-nat.c (linux_nat_attach): Remove xstrdup.
6361
f517c180
EA
63622018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6363
6364 PR gdb/21559
6365 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6366 checking for fs_base/gs_base fields in struct user_regs_struct.
6367 * configure: Regenerate.
6368
7045b1ca
YQ
63692018-01-17 Yao Qi <yao.qi@linaro.org>
6370
6371 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
6372 function.
6373 (aarch64_linux_init_abi): Install it to gdbarch hook
6374 gcc_target_options.
6375
db422fb2
PA
63762018-01-15 Pedro Alves <palves@redhat.com>
6377
6378 * common/signals-state-save-restore.c
6379 (save_original_signals_state): Fix typos.
6380
ba643918
SDJ
63812017-01-12 Tom Tromey <tom@tromey.com>
6382 Sergio Durigan Junior <sergiodj@redhat.com>
6383
6384 * Makefile.in (install-only): Install gdb-add-index.
6385
906b4aac
JB
63862018-01-12 John Baldwin <jhb@FreeBSD.org>
6387
6388 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
6389
bdf2a94a
AA
63902018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6391
6392 * infrun.c (keep_going_pass_signal): Clear step-over info when
6393 insert_breakpoints fails.
6394
71d378ae
PA
63952018-01-11 Pedro Alves <palves@redhat.com>
6396
6397 PR gdb/22583
6398 * infrun.c (resume): Rename to ...
6399 (resume_1): ... this.
6400 (resume): Reimplement as wrapper around resume_1.
6401
3cada740
PA
64022018-01-11 Pedro Alves <palves@redhat.com>
6403
6404 PR remote/22597
6405 * remote.c (remote_parse_stop_reply): Default to the last-set
6406 general thread instead of to 'magic_null_ptid'.
6407
618daa93
PA
64082018-01-10 Pedro Alves <palves@redhat.com>
6409
6410 * language.h (language_get_symbol_name_matcher): Rename ...
6411 (get_symbol_name_matcher): ... this.
6412 * language.c (language_get_symbol_name_matcher): Ditto.
6413 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
6414 callers adjusted.
6415
c63d3e8d
PA
64162018-01-10 Pedro Alves <palves@redhat.com>
6417
6418 PR gdb/22670
6419 * dwarf2read.c
6420 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
6421 Adjust to use language_get_symbol_name_matcher instead of
6422 language_defn::la_get_symbol_name_matcher.
6423 * language.c (language_get_symbol_name_matcher): If in Ada mode
6424 and the lookup name is a verbatim match, return Ada's matcher.
6425 * language.h (language_get_symbol_name_matcher): Adjust comment.
6426 (ada_lookup_name_info::verbatim_p):: New method.
6427
d4c2a405
PA
64282018-01-10 Pedro Alves <palves@redhat.com>
6429
6430 PR gdb/22670
6431 * ada-lang.c (ada_collect_symbol_completion_matches): If the
6432 minsym's language is language_auto or language_cplus, pass down
6433 language_ada instead.
6434 * symtab.c (compare_symbol_name): Don't frob symbol language here.
6435
8825213e
PA
64362018-01-10 Pedro Alves <palves@redhat.com>
6437
6438 PR gdb/22670
6439 * minsyms.c (linkage_name_str): New function.
6440 (iterate_over_minimal_symbols): Use it.
6441
2d97a5d9
JB
64422018-01-09 John Baldwin <jhb@FreeBSD.org>
6443
6444 * NEWS: Document that 'info proc' now works on FreeBSD.
6445
92fce24d
JB
64462018-01-09 John Baldwin <jhb@FreeBSD.org>
6447
6448 * configure.ac: Check for kinfo_getfile in libutil.
6449 * configure: Regenerate.
6450 * config.in: Regenerate.
6451 * fbsd-nat.c: Include "fbsd-tdep.h".
6452 (fbsd_fetch_cmdline): New.
6453 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
6454 rather than calling error.
6455 (fbsd_info_proc): New.
6456 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
6457 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
6458 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
6459
262f62f5
JB
64602018-01-09 John Baldwin <jhb@FreeBSD.org>
6461
6462 * fbsd-nat.c (struct free_deleter): Remove.
6463 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
6464
b999e203
JB
64652018-01-09 John Baldwin <jhb@FreeBSD.org>
6466
6467 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
6468 NULL for an empty pathname.
6469
d2176225
JB
64702018-01-09 John Baldwin <jhb@FreeBSD.org>
6471
6472 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
6473 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
6474 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6475 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6476 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
6477 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
6478 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
6479 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
6480 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
6481 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
6482 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
6483 (fbsd_core_fetch_timeval, fbsd_print_sigset)
6484 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
6485 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
6486 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
6487
9c4ac400
ST
64882018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
6489
6490 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
6491 (gnu_xfer_auxv): New function.
6492 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
6493 TARGET_OBJECT_AUXV.
6494
1e5ded6c
YQ
64952018-01-08 Yao Qi <yao.qi@linaro.org>
6496 Simon Marchi <simon.marchi@ericsson.com>
6497
6498 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
6499 common/selftest.c.
6500 (COMMON_OBS): Remove selftest.o.
6501 * configure.ac: Append selftest-arch.c and common/selftest.c to
6502 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
6503 * configure: Re-generated.
6504 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
6505 GDB_SELF_TEST.
6506 (maintenance_info_selftests): Likewise.
6507
04bafb1e
XR
65082018-01-08 Xavier Roirand <roirand@adacore.com>
6509
6510 * ada-valprint.c (val_print_packed_array_elements): Use
6511 proper number of elements when printing an array indexed
6512 by an enumeration type.
6513
518817b3
SM
65142018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6515
6516 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
6517 (dw2_get_file_names_reader): Adjust.
6518 (lookup_dwo_signatured_type): Adjust.
6519 (lookup_dwp_signatured_type): Adjust.
6520 (lookup_signatured_type): Adjust.
6521 (create_type_unit_group): Adjust.
6522 (get_type_unit_group): Adjust.
6523 (process_psymtab_comp_unit_reader): Adjust.
6524 (build_type_psymtabs_reader): Adjust.
6525 (scan_partial_symbols): Adjust.
6526 (add_partial_symbol): Adjust.
6527 (add_partial_subprogram): Adjust.
6528 (peek_die_abbrev): Adjust.
6529 (fixup_go_packaging): Adjust.
6530 (process_imported_unit_die): Adjust.
6531 (dwarf2_compute_name): Adjust.
6532 (dwarf2_physname): Adjust.
6533 (read_import_statement): Adjust.
6534 (handle_DW_AT_stmt_list): Adjust.
6535 (read_file_scope): Adjust.
6536 (read_func_scope): Adjust.
6537 (read_lexical_block_scope): Adjust.
6538 (read_call_site_scope): Adjust.
6539 (read_variable): Adjust.
6540 (dwarf2_rnglists_process): Adjust.
6541 (dwarf2_ranges_process): Adjust.
6542 (dwarf2_ranges_read): Adjust.
6543 (dwarf2_get_pc_bounds): Adjust.
6544 (dwarf2_record_block_ranges): Adjust.
6545 (dwarf2_add_field): Adjust.
6546 (dwarf2_add_member_fn): Adjust.
6547 (read_structure_type): Adjust.
6548 (process_structure_scope): Adjust.
6549 (read_enumeration_type): Adjust.
6550 (read_array_type): Adjust.
6551 (mark_common_block_symbol_computed): Adjust.
6552 (read_common_block): Adjust.
6553 (read_namespace_type): Adjust.
6554 (read_namespace): Adjust.
6555 (read_module_type): Adjust.
6556 (read_tag_pointer_type): Adjust.
6557 (read_tag_ptr_to_member_type): Adjust.
6558 (read_tag_string_type): Adjust.
6559 (read_subroutine_type): Adjust.
6560 (read_typedef): Adjust.
6561 (read_base_type): Adjust.
6562 (attr_to_dynamic_prop): Adjust.
6563 (read_subrange_type): Adjust.
6564 (read_unspecified_type): Adjust.
6565 (dwarf2_read_abbrevs): Adjust.
6566 (load_partial_dies): Adjust.
6567 (read_partial_die): Adjust.
6568 (find_partial_die): Adjust.
6569 (guess_partial_die_structure_name): Adjust.
6570 (fixup_partial_die): Adjust.
6571 (read_attribute_value): Adjust.
6572 (read_addr_index): Adjust.
6573 (read_addr_index_from_leb128): Adjust.
6574 (read_str_index): Adjust.
6575 (dwarf2_string_attr): Adjust.
6576 (get_debug_line_section): Adjust.
6577 (dwarf_decode_line_header): Adjust.
6578 (lnp_state_machine::check_line_address): Adjust.
6579 (dwarf_decode_lines_1): Adjust.
6580 (dwarf_decode_lines): Adjust.
6581 (dwarf2_start_symtab): Adjust.
6582 (var_decode_location): Adjust.
6583 (new_symbol_full): Adjust.
6584 (dwarf2_const_value_data): Adjust.
6585 (dwarf2_const_value_attr): Adjust.
6586 (dwarf2_const_value): Adjust.
6587 (die_type): Adjust.
6588 (die_containing_type): Adjust.
6589 (build_error_marker_type): Adjust.
6590 (lookup_die_type): Adjust.
6591 (guess_full_die_structure_name): Adjust.
6592 (anonymous_struct_prefix): Adjust.
6593 (determine_prefix): Adjust.
6594 (dwarf2_name): Adjust.
6595 (follow_die_ref_or_sig): Adjust.
6596 (follow_die_offset): Adjust.
6597 (follow_die_ref): Adjust.
6598 (follow_die_sig_1): Adjust.
6599 (follow_die_sig): Adjust.
6600 (get_signatured_type): Adjust.
6601 (get_DW_AT_signature_type): Adjust.
6602 (decode_locdesc): Adjust.
6603 (dwarf_decode_macros): Adjust.
6604 (cu_debug_loc_section): Adjust.
6605 (fill_in_loclist_baton): Adjust.
6606 (dwarf2_symbol_mark_computed): Adjust.
6607 (init_one_comp_unit): Don't assign
6608 dwarf2_cu::dwarf2_per_objfile.
6609 (set_die_type): Adjust.
6610
ed2dc618
SM
66112018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6612
6613 * dwarf2read.c (struct mapped_debug_names): Add constructor.
6614 <dwarf2_per_objfile>: New field.
6615 (dwarf2_per_objfile): Remove global.
6616 (get_dwarf2_per_objfile): New function.
6617 (set_dwarf2_per_objfile): New function.
6618 (dwarf2_build_psymtabs_hard): Change objfile parameter to
6619 dwarf2_per_objfile.
6620 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6621 (read_abbrev_offset): Likewise.
6622 (read_indirect_string): Likewise.
6623 (read_indirect_line_string): Likewise.
6624 (read_indirect_string_at_offset): Likewise.
6625 (read_indirect_string_from_dwz): Likewise.
6626 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6627 dwarf2_per_objfile.
6628 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6629 (create_all_comp_units): Change objfile parameter to
6630 dwarf2_per_objfile.
6631 (create_all_type_units): Likewise.
6632 (process_queue): Add dwarf2_per_objfile parameter.
6633 (read_and_check_comp_unit_head): Likewise.
6634 (lookup_dwo_unit_in_dwp): Likewise.
6635 (get_dwp_file): Likewise.
6636 (process_cu_includes): Likewise.
6637 (struct free_dwo_file_cleanup_data): New struct.
6638 (dwarf2_has_info): Use get_dwarf2_per_objfile and
6639 set_dwarf2_per_objfile.
6640 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6641 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6642 context, adjust calls.
6643 (dw2_instantiate_symtab): Likewise.
6644 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6645 (dw2_get_cu): Likewise.
6646 (create_cu_from_index_list): Change objfile parameter to
6647 dwarf2_per_objfile.
6648 (create_cus_from_index_list): Get dwarf2_per_objfile from
6649 context, adjust calls.
6650 (create_cus_from_index): Likewise.
6651 (create_signatured_type_table_from_index): Change objfile
6652 parameter to dwarf2_per_objfile.
6653 (create_signatured_type_table_from_debug_names): Change objfile
6654 parameter to dwarf2_per_objfile.
6655 (create_addrmap_from_index): Likewise.
6656 (create_addrmap_from_aranges): Likewise.
6657 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6658 (dw2_setup): Remove.
6659 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6660 context.
6661 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6662 get_dwarf2_per_objfile.
6663 (dw2_forget_cached_source_info): Likewise.
6664 (dw2_map_symtabs_matching_filename): Likewise.
6665 (struct dw2_symtab_iterator) <index>: Remove.
6666 <dwarf2_per_objfile>: New field.
6667 (dw2_symtab_iter_init): Replace index parameter with
6668 dwarf2_per_objfile.
6669 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6670 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6671 (dw2_print_stats): Likewise.
6672 (dw2_dump): Likewise.
6673 (dw2_expand_symtabs_for_function): Likewise.
6674 (dw2_expand_all_symtabs): Likewise.
6675 (dw2_expand_symtabs_with_fullname): Likewise.
6676 (dw2_expand_marked_cus): Replace index and objfile parameters
6677 with dwarf2_per_objfile.
6678 (dw_expand_symtabs_matching_file_matcher): Add
6679 dwarf2_per_objfile parameter and adjust calls.
6680 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6681 adjust calls.
6682 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6683 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6684 adjust calls.
6685 (create_cus_from_debug_names_list): Replace objfile parameter
6686 with dwarf2_per_objfile and adjust calls.
6687 (create_cus_from_debug_names): Likewise.
6688 (dwarf2_read_debug_names): Likewise.
6689 (mapped_debug_names::namei_to_name): Adjust call.
6690 (dw2_debug_names_iterator::next): Likewise.
6691 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6692 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6693 (dw2_debug_names_dump): Likewise.
6694 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6695 (dw2_debug_names_expand_symtabs_matching): Likewise.
6696 (dwarf2_initialize_objfile): Likewise.
6697 (dwarf2_build_psymtabs): Likewise.
6698 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6699 this_cu.
6700 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6701 (read_and_check_comp_unit_head): Likewise.
6702 (read_abbrev_offset): Likewise.
6703 (create_debug_type_hash_table): Likewise.
6704 (create_debug_types_hash_table): Likewise.
6705 (create_all_type_units): Replace objfile parameter with
6706 dwarf2_per_objfile.
6707 (add_type_unit): Add dwarf2_per_objfile parameter.
6708 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6709 with dwarf2_per_objfile.
6710 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6711 (lookup_dwp_signatured_type): Likewise.
6712 (lookup_signatured_type): Likewise.
6713 (read_cutu_die_from_dwo): Likewise.
6714 (init_tu_and_read_dwo_dies): Likewise.
6715 (init_cutu_and_read_dies): Likewise.
6716 (init_cutu_and_read_dies_no_follow): Likewise.
6717 (allocate_type_unit_groups_table): Add objfile parameter.
6718 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6719 (get_type_unit_group): Likewise.
6720 (process_psymtab_comp_unit): Update call.
6721 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6722 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6723 (print_tu_stats): Likewise.
6724 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6725 in void* parameter.
6726 (build_type_psymtabs): Change objfile parameter to
6727 dwarf2_per_objfile.
6728 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6729 passed in void* parameter.
6730 (process_skeletonless_type_units): Change objfile parameter to
6731 dwarf2_per_objfile.
6732 (set_partial_user): Likewise.
6733 (dwarf2_build_psymtabs_hard): Likewise.
6734 (read_comp_units_from_section): Likewise.
6735 (create_all_comp_units): Likewise.
6736 (scan_partial_symbols): Update calls.
6737 (add_partial_symbol): Likewise.
6738 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6739 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6740 (process_queue): Add dwarf2_per_objfile parameter.
6741 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6742 (compute_compunit_symtab_includes): Likewise.
6743 (process_cu_includes): Add dwarf2_per_objfile parameter.
6744 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6745 (process_full_type_unit): Likewise.
6746 (process_imported_unit_die): Update call.
6747 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6748 (read_file_scope): Likewise.
6749 (allocate_dwo_file_hash_table): Add objfile parameter.
6750 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6751 (create_cus_hash_table): Likewise.
6752 (create_dwp_hash_table): Likewise.
6753 (create_dwo_unit_in_dwp_v1): Likewise.
6754 (create_dwp_v2_section): Likewise.
6755 (create_dwo_unit_in_dwp_v2): Likewise.
6756 (lookup_dwo_unit_in_dwp): Likewise.
6757 (try_open_dwop_file): Likewise.
6758 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6759 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6760 cleanup to include a reference to dwarf2_per_objfile.
6761 (open_dwp_file): Add dwarf2_per_objfile parameter.
6762 (open_and_init_dwp_file): Likewise.
6763 (get_dwp_file): Likewise.
6764 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6765 (queue_and_load_all_dwo_tus): Update call.
6766 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6767 data.
6768 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6769 (dwarf2_ranges_process): Likewise.
6770 (dwarf2_get_pc_bounds): Likewise.
6771 (mark_common_block_symbol_computed): Likewise.
6772 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6773 (dwarf2_read_abbrevs): Update call.
6774 (read_partial_die): Use dwarf2_per_objfile from cu.
6775 (find_partial_die): Likewise.
6776 (fixup_partial_die): Likewise.
6777 (read_attribute_value): Likewise.
6778 (read_indirect_string_at_offset_from): Add objfile parameter.
6779 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6780 parameter.
6781 (read_indirect_string_from_dwz): Add objfile parameter.
6782 (read_indirect_string): Add objfile parameter.
6783 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6784 (read_addr_index): Use dwarf2_per_objfile from cu.
6785 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6786 call dw2_setup.
6787 (read_str_index): Use dwarf2_per_objfile from cu.
6788 (get_debug_line_section): Likewise.
6789 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6790 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6791 (new_symbol_full): Use dwarf2_per_objfile from cu.
6792 (build_error_marker_type): Likewise.
6793 (lookup_die_type): Likewise.
6794 (determine_prefix): Likewise.
6795 (follow_die_offset): Likewise.
6796 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6797 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6798 (dwarf2_fetch_die_type_sect_off): Likewise.
6799 (dwarf2_get_die_type): Likewise.
6800 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6801 (get_signatured_type): Likewise.
6802 (get_DW_AT_signature_type): Likewise.
6803 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6804 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6805 (cu_debug_loc_section): Likewise.
6806 (fill_in_loclist_baton): Likewise.
6807 (dwarf2_symbol_mark_computed): Likewise.
6808 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6809 dwarf2_per_objfile.
6810 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6811 parameter.
6812 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6813 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6814 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6815 (set_die_type): Use dwarf2_free_objfile from cu.
6816 (get_die_type_at_offset): Likewise.
6817 (dwarf2_per_objfile_free): Don't assign global variable.
6818 (debug_names) <constructor>: Add dwarf2_per_objfile
6819 parameter, update m_debugstrlookup construction.
6820 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6821 parameter.
6822 <m_dwarf2_per_objfile>: New field.
6823 <lookup>: Use m_dwarf2_per_objfile.
6824 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6825 (psyms_seen_size): Likewise.
6826 (write_gdbindex): Replace objfile parameter with
6827 dwarf2_per_objfile.
6828 (write_debug_names): Likewise.
6829 (write_psymtabs_to_index): Likewise.
6830 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6831 calls.
6832
e3b94546
SM
68332018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6834
6835 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6836 <dwarf2_per_objfile>: New field.
6837 (struct dwarf2_per_cu_data) <objfile>: Remove.
6838 <dwarf2_per_objfile>: New field.
6839 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6840 of objfile.
6841 (create_signatured_type_table_from_index): Likewise.
6842 (create_debug_type_hash_table): Likewise.
6843 (fill_in_sig_entry_from_dwo_entry): Likewise.
6844 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6845 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6846 objfile.
6847 (create_partial_symtab): Access objfile through
6848 dwarf2_per_objfile.
6849 (process_psymtab_comp_unit_reader): Likewise.
6850 (read_comp_units_from_section): Likewise.
6851 (scan_partial_symbols): Likewise.
6852 (add_partial_symbol): Likewise.
6853 (add_partial_subprogram): Likewise.
6854 (peek_die_abbrev): Likewise.
6855 (fixup_go_packaging): Likewise.
6856 (process_full_comp_unit): Likewise.
6857 (process_full_type_unit): Likewise.
6858 (process_imported_unit_die): Likewise.
6859 (dwarf2_compute_name): Likewise.
6860 (dwarf2_physname): Likewise.
6861 (read_import_statement): Likewise.
6862 (create_cus_hash_table): Assign dwarf2_physname instead of
6863 objfile.
6864 (read_func_scope): Access objfile through dwarf2_per_objfile.
6865 (read_lexical_block_scope): Likewise.
6866 (read_call_site_scope): Likewise.
6867 (read_variable): Likewise.
6868 (dwarf2_rnglists_process): Likewise.
6869 (dwarf2_ranges_process): Likewise.
6870 (dwarf2_ranges_read): Likewise.
6871 (dwarf2_record_block_ranges): Likewise.
6872 (dwarf2_add_field): Likewise.
6873 (dwarf2_add_member_fn): Likewise.
6874 (read_structure_type): Likewise.
6875 (process_structure_scope): Likewise.
6876 (read_enumeration_type): Likewise.
6877 (read_array_type): Likewise.
6878 (read_common_block): Likewise.
6879 (read_namespace_type): Likewise.
6880 (read_namespace): Likewise.
6881 (read_module_type): Likewise.
6882 (read_tag_pointer_type): Likewise.
6883 (read_tag_ptr_to_member_type): Likewise.
6884 (read_tag_string_type): Likewise.
6885 (read_subroutine_type): Likewise.
6886 (read_typedef): Likewise.
6887 (read_base_type): Likewise.
6888 (attr_to_dynamic_prop): Likewise.
6889 (read_subrange_type): Likewise.
6890 (read_unspecified_type): Likewise.
6891 (load_partial_dies): Likewise.
6892 (read_partial_die): Likewise.
6893 (find_partial_die): Likewise.
6894 (guess_partial_die_structure_name): Likewise.
6895 (fixup_partial_die): Likewise.
6896 (read_attribute_value): Likewise.
6897 (read_addr_index_from_leb128): Likewise.
6898 (dwarf2_read_addr_index): Likewise.
6899 (dwarf2_string_attr): Likewise.
6900 (lnp_state_machine::check_line_address): Likewise.
6901 (dwarf_decode_lines_1): Likewise.
6902 (dwarf_decode_lines): Likewise.
6903 (dwarf2_start_symtab): Likewise.
6904 (var_decode_location): Likewise.
6905 (new_symbol_full): Likewise.
6906 (dwarf2_const_value_data): Likewise.
6907 (dwarf2_const_value_attr): Likewise.
6908 (dwarf2_const_value): Likewise.
6909 (die_type): Likewise.
6910 (die_containing_type): Likewise.
6911 (lookup_die_type): Likewise.
6912 (guess_full_die_structure_name): Likewise.
6913 (anonymous_struct_prefix): Likewise.
6914 (dwarf2_name): Likewise.
6915 (follow_die_ref_or_sig): Likewise.
6916 (follow_die_offset): Likewise.
6917 (follow_die_ref): Likewise.
6918 (dwarf2_fetch_die_loc_sect_off): Likewise.
6919 (dwarf2_fetch_constant_bytes): Likewise.
6920 (dwarf2_fetch_die_type_sect_off): Likewise.
6921 (dwarf2_get_die_type): Likewise.
6922 (follow_die_sig): Likewise.
6923 (decode_locdesc): Likewise.
6924 (dwarf2_per_cu_objfile): Likewise.
6925 (dwarf2_per_cu_text_offset): Likewise.
6926 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6927 objfile.
6928 (set_die_type): Access objfile through
6929 dwarf2_per_objfile.
6930
b01ba14d
SM
69312018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6932
6933 * valprint.c (converted_character_d): Remove typedef.
6934 (DEF_VEC_O (converted_character_d)): Remove.
6935 (count_next_character): Use std::vector.
6936 (print_converted_chars_to_obstack): Likewise.
6937 (generic_printstr): Likewise.
6938
4d0fdd9b
SM
69392018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6940
6941 * xml-support.h (struct gdb_xml_value): Add constructor.
6942 <value>: Change type to unique_xmalloc_ptr.
6943 (gdb_xml_value_s): Remove typedef.
6944 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6945 (gdb_xml_element_start_handler): Change parameter type to
6946 std::vector.
6947 (xml_find_attribute): Likewise.
6948 * xml-support.c (xml_find_attribute): Change parameter type to
6949 std::vector and adjust.
6950 (gdb_xml_values_cleanup): Remove.
6951 (gdb_xml_parser::start_element): Adjust to std::vector.
6952 (xinclude_start_include): Change paraeter type to std::vector
6953 and adjust.
6954 * btrace.c (check_xml_btrace_version): Likewise.
6955 (parse_xml_btrace_block): Likewise.
6956 (parse_xml_btrace_pt_config_cpu): Likewise.
6957 (parse_xml_btrace_pt): Likewise.
6958 (parse_xml_btrace_conf_bts): Likewise.
6959 (parse_xml_btrace_conf_pt): Likewise.
6960 * memory-map.c (memory_map_start_memory): Likewise.
6961 (memory_map_start_property): Likewise.
6962 * osdata.c (osdata_start_osdata): Likewise.
6963 (osdata_start_item): Likewise.
6964 (osdata_start_column): Likewise.
6965 * remote.c (start_thread): Likewise.
6966 * solib-aix.c (library_list_start_library): Likewise.
6967 (library_list_start_list): Likewise.
6968 * solib-svr4.c (library_list_start_library): Likewise.
6969 (svr4_library_list_start_list): Likewise.
6970 * solib-target.c (library_list_start_segment): Likewise.
6971 (library_list_start_section): Likewise.
6972 (library_list_start_library): Likewise.
6973 (library_list_start_list): Likewise.
6974 * tracepoint.c (traceframe_info_start_memory): Likewise.
6975 (traceframe_info_start_tvar): Likewise.
6976 * xml-syscall.c (syscall_start_syscall): Likewise.
6977 * xml-tdesc.c (tdesc_start_target): Likewise.
6978 (tdesc_start_feature): Likewise.
6979 (tdesc_start_reg): Likewise.
6980 (tdesc_start_union): Likewise.
6981 (tdesc_start_struct): Likewise.
6982 (tdesc_start_flags): Likewise.
6983 (tdesc_start_enum): Likewise.
6984 (tdesc_start_field): Likewise.
6985 (tdesc_start_enum_value): Likewise.
6986 (tdesc_start_vector): Likewise.
6987
f979c73f
SM
69882018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6989
6990 * extension.h (struct xmethod_worker) <clone>: Remove.
6991 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6992 Remove.
6993 (python_xmethod_worker::clone): Remove.
6994 * valops.c (find_overload_match): Use std::move instead of
6995 clone.
6996
ba18742c
SM
69972018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6998
6999 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7000 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7001 <free_xmethod_worker_data>: Remove.
7002 <get_matching_xmethod_workers>: Chance VEC to std::vector.
7003 <get_xmethod_arg_types>: Remove.
7004 <get_xmethod_result_type>: Remove.
7005 <invoke_xmethod>: Remove.
7006 * extension.c (new_xmethod_worker): Remove.
7007 (clone_xmethod_worker): Remove.
7008 (get_matching_xmethod_workers): Return void, pass std::vector by
7009 pointer.
7010 (get_xmethod_arg_types): Rename to...
7011 (xmethod_worker::get_arg_types): ... this, and adjust.
7012 (get_xmethod_result_type): Rename to...
7013 (xmethod_worker::get_result_type): ... this, and adjust.
7014 (invoke_xmethod): Remove.
7015 (free_xmethod_worker): Remove.
7016 (free_xmethod_worker_vec): Remove.
7017 * extension.h (enum ext_lang_rc): Move here from
7018 extension-priv.h.
7019 (struct xmethod_worker): Add constructor and destructor.
7020 <data>: Remove.
7021 <value>: Remove.
7022 <invoke, clone, do_get_result_type, do_get_arg_types>: New
7023 virtual pure methods.
7024 <get_arg_types, get_result_type>: New methods.
7025 (xmethod_worker_ptr): Remove typedef.
7026 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7027 (xmethod_worker_vec): Remove typedef.
7028 (xmethod_worker_up): New typedef.
7029 (invoke_xmethod): Remove.
7030 (clone_xmethod_worker): Remove.
7031 (free_xmethod_worker): Remove.
7032 (free_xmethod_worker_vec): Remove.
7033 (get_xmethod_arg_types): Remove.
7034 (get_xmethod_result_type): Remove.
7035 * valops.c (find_method_list): Use std::vector, don't use
7036 intermediate vector.
7037 (value_find_oload_method_list): Use std::vector.
7038 (find_overload_match): Use std::vector.
7039 (find_oload_champ): Use std::vector.
7040 * value.c (value_free): Use operator delete.
7041 (value_of_xmethod): Rename to...
7042 (value_from_xmethod): ... this. Don't assign
7043 xmethod_worker::value, take rvalue-reference.
7044 (result_type_of_xmethod): Adjust.
7045 (call_xmethod): Adjust.
7046 * value.h: Include extension.h.
7047 (struct xmethod_worker): Don't forward-declare.
7048 (value_of_xmethod): Rename to...
7049 (value_from_xmethod): ... this, take rvalue-reference.
7050 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7051 (struct python_xmethod_worker): ... this, add constructor and
7052 destructor.
7053 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7054 (gdbpy_free_xmethod_worker_data): Rename to...
7055 (python_xmethod_worker::~python_xmethod_worker): ... this and
7056 adjust.
7057 (gdbpy_clone_xmethod_worker_data): Rename to...
7058 (python_xmethod_worker::clone): ... this and adjust.
7059 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7060 temporary vector.
7061 (gdbpy_get_xmethod_arg_types): Rename to...
7062 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7063 (gdbpy_get_xmethod_result_type): Rename to...
7064 (python_xmethod_worker::do_get_result_type): ... this and
7065 adjust.
7066 (gdbpy_invoke_xmethod): Rename to...
7067 (python_xmethod_worker::invoke): ... this and adjust.
7068 (new_python_xmethod_worker): Rename to...
7069 (python_xmethod_worker::python_xmethod_worker): ... this and
7070 adjust.
7071 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7072 Remove.
7073 (gdbpy_free_xmethod_worker_data): Remove.
7074 (gdbpy_get_matching_xmethod_workers): Use std::vector.
7075 (gdbpy_get_xmethod_arg_types): Remove.
7076 (gdbpy_get_xmethod_result_type): Remove.
7077 (gdbpy_invoke_xmethod): Remove.
7078 * python/python.c (python_extension_ops): Remove obsolete
7079 callbacks.
7080
e379cee6
PA
70812018-01-05 Pedro Alves <palves@redhat.com>
7082
7083 PR gdb/18653
7084 * common/signals-state-save-restore.c
7085 (save_original_signals_state): New parameter 'quiet'. Warn if we
7086 find a custom handler preinstalled, instead of internal erroring.
7087 But only warn if !quiet.
7088 * common/signals-state-save-restore.h
7089 (save_original_signals_state): New parameter 'quiet'.
7090 * main.c (captured_main_1): Move save_original_signals_state call
7091 after option handling, and pass QUIET.
7092
a655456c
PA
70932018-01-05 Pedro Alves <palves@redhat.com>
7094
7095 * spu-tdep.c (spu_catch_start): Pass
7096 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
7097
de63c46b
PA
70982018-01-05 Pedro Alves <palves@redhat.com>
7099
7100 PR gdb/22670
7101 * ada-lang.c (literal_symbol_name_matcher): New function.
7102 (ada_get_symbol_name_matcher): Use it for
7103 symbol_name_match_type::SEARCH_NAME.
7104 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
7105 it down instead of assuming symbol_name_match_type::FULL.
7106 * block.h (block_lookup_symbol): New parameter 'match_type'.
7107 * c-valprint.c (print_unpacked_pointer): Use
7108 lookup_symbol_search_name instead of lookup_symbol.
7109 * compile/compile-object-load.c (get_out_value_type): Pass down
7110 symbol_name_match_type::SEARCH_NAME.
7111 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
7112 symbol_name_match_type::FULL.
7113 * cp-support.c (cp_get_symbol_name_matcher): Handle
7114 symbol_name_match_type::SEARCH_NAME.
7115 * infrun.c (insert_exception_resume_breakpoint): Use
7116 lookup_symbol_search_name.
7117 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
7118 * psymtab.c (maintenance_check_psymtabs): Use
7119 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
7120 * stack.c (print_frame_args): Use lookup_symbol_search_name and
7121 SYMBOL_SEARCH_NAME.
7122 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
7123 if symbol_name_match_type::SEARCH_NAME.
7124 (lookup_symbol_in_language): Pass down
7125 symbol_name_match_type::FULL.
7126 (lookup_symbol_search_name): New.
7127 (lookup_language_this): Pass down
7128 symbol_name_match_type::SEARCH_NAME.
7129 (lookup_symbol_aux, lookup_local_symbol): New parameter
7130 'match_type'. Pass it down.
7131 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
7132 (lookup_symbol_search_name): New declaration.
7133 (lookup_symbol_in_block): New 'match_type' parameter.
7134
f98fc17b
PA
71352018-01-05 Pedro Alves <palves@redhat.com>
7136
7137 PR gdb/22670
7138 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7139 ada_lookup_symbol.
7140 (ada_lookup_symbol): Reimplement in terms of
7141 ada_lookup_symbol_list, bits factored out from
7142 ada_lookup_encoded_symbol.
7143
342f8240
JB
71442018-01-05 Joel Brobecker <brobecker@adacore.com>
7145
7146 * ada-exp.y (write_object_renaming): When subscripting an array
7147 using a symbol as the index, pass the block in call to
7148 ada_lookup_encoded_symbol when looking that symbol up.
7149
7150d33c
JG
71502018-01-05 Jerome Guitton <guitton@adacore.com>
7151
7152 * ada-lang.c (ada_array_length): Use ada_index_type instead of
7153 TYPE_INDEX_TYPE.
7154
cc0e770c
JB
71552018-01-05 Joel Brobecker <brobecker@adacore.com>
7156
7157 * ada-lang.c (ada_to_fixed_value_create): Add handling of
7158 the case where VALUE_LVAL (val0) is not lval_memory.
7159
f79da888 71602018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
7161
7162 * ada-valprint.c (print_optional_low_bound): Handle
7163 character-indexed array printing like boolean-indexed array
7164 printing.
7165
cd385f94
JB
71662018-01-05 Joel Brobecker <brobecker@adacore.com>
7167
7168 * NEWS: Create a new section for the next release branch.
7169 Rename the section of the current branch, now that it has
7170 been cut.
7171
09aca949
JB
71722018-01-05 Joel Brobecker <brobecker@adacore.com>
7173
7174 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7175 * version.in: Bump version to 8.1.50.DATE-git.
7176
9f757bf7
XR
71772018-01-03 Xavier Roirand <roirand@adacore.com>
7178
7179 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7180 Add field.
7181 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7182 Add field.
7183 (default_exception_support_info) <catch_handlers_sym>: Add field.
7184 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7185 (ada_exception_name_addr_1): Add "catch handlers" handling.
7186 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7187 Update all callers.
7188 (create_excep_cond_exprs) <ex>: Add parameter.
7189 (re_set_exception): Update create_excep_cond_exprs call.
7190 (print_it_exception, print_one_exception, print_mention_exception)
7191 (print_recreate_exception): Add "catch handler" handling.
7192 (allocate_location_catch_handlers, re_set_catch_handlers)
7193 (check_status_catch_handlers, print_it_catch_handlers)
7194 (print_one_catch_handlers, print_mention_catch_handlers)
7195 (print_recreate_catch_handlers): New function.
7196 (catch_handlers_breakpoint_ops): New variable.
7197 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7198 Add parameter. Add "catch handler" handling.
7199 (ada_exception_sym_name, ada_exception_breakpoint_ops):
7200 Add "catch handler" handling.
7201 (ada_exception_catchpoint_cond_string): Add "catch handler"
7202 handling.
7203 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7204 call.
7205 (catch_ada_handlers_command): New function.
7206 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7207 operations structure.
7208 (_initialize_ada_language): Add "catch handlers" command entry.
7209 * NEWS: Document "catch handlers" feature.
7210
9fe561ab
JB
72112018-01-02 Joel Brobecker <brobecker@adacore.com>
7212
7213 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7214 account when creating the array type of the slice.
7215 (ada_value_slice): Likewise.
7216
a405673c
JB
72172018-01-02 Joel Brobecker <brobecker@adacore.com>
7218
7219 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7220 New enum value.
7221 (create_array_type_with_stride): Add byte_stride_prop parameter.
7222 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7223 New parameter. Update all callers in this file.
7224 (array_type_has_dynamic_stride): New function.
7225 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7226 of arrays with dynamic byte strides.
7227 * dwarf2read.c (read_array_type): Add support for dynamic
7228 DW_AT_byte_stride attributes.
7229
74a2f8ff
JB
72302018-01-02 Joel Brobecker <brobecker@adacore.com>
7231
7232 * dwarf2read.c (read_unspecified_type): Treat
7233 DW_TAG_enumeration_type DIEs from Ada units as stubs.
7234
e2882c85
JB
72352018-01-01 Joel Brobecker <brobecker@adacore.com>
7236
7237 Update copyright year range in all GDB files.
7238
1690bb24
JB
72392018-01-01 Joel Brobecker <brobecker@adacore.com>
7240
7241 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
7242 and gdb/testsuite/gdb.base/step-line.c.
7243
0f0c98a8
JB
72442018-01-01 Joel Brobecker <brobecker@adacore.com>
7245
7246 * copyright.py (main): Dump the contents of
7247 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
7248 even if BY_HAND is empty.
7249
82e1e79a
JB
72502018-01-01 Joel Brobecker <brobecker@adacore.com>
7251
7252 * top.c (print_gdb_version): Update Copyright year in version
7253 message.
7254
053f54e5 72552018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 7256
053f54e5 7257 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 7258
053f54e5 7259For older changes see ChangeLog-2017.
c906108c
SS
7260\f
7261Local Variables:
7262mode: change-log
7263left-margin: 8
7264fill-column: 74
7265version-control: never
57da7796 7266coding: utf-8
c906108c 7267End:
This page took 2.497899 seconds and 4 git commands to generate.