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