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