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