Allocate cmd_list_element with new
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
e2fc72e2
TT
12018-05-04 Tom Tromey <tom@tromey.com>
2
3 * cli/cli-decode.h (cmd_list_element): New constructor.
4 (~cmd_list_element): New destructor.
5 (struct cmd_list_element): Add initializers.
6 * cli/cli-decode.c (do_add_cmd): Use "new".
7 (delete_cmd): Use "delete".
8
a3b60e45
JK
92018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10 Pedro Alves <palves@redhat.com>
11
12 PR breakpoints/19806 and support for PR external/20207.
13 * NEWS: Mention Aarch64 watchpoint improvements.
14 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
15 watchpoints and PR external/20207 watchpoints.
16 * nat/aarch64-linux-hw-point.c
17 (kernel_supports_any_contiguous_range): New.
18 (aarch64_watchpoint_offset): New.
19 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
20 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
21 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
22 (aarch64_align_watchpoint): New parameters aligned_offset_p and
23 next_addr_orig_p. Support PR external/20207 watchpoints.
24 (aarch64_downgrade_regs): New.
25 (aarch64_dr_state_insert_one_point): New parameters offset and
26 addr_orig.
27 (aarch64_dr_state_remove_one_point): Likewise.
28 (aarch64_handle_breakpoint): Update caller.
29 (aarch64_handle_aligned_watchpoint): Likewise.
30 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
31 aligned_offset.
32 (aarch64_linux_set_debug_regs): Remove const from state. Call
33 aarch64_downgrade_regs.
34 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
35 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
36 (DR_CONTROL_MASK): ... this.
37 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
38 (unsigned int aarch64_watchpoint_offset): New prototype.
39 (aarch64_linux_set_debug_regs): Remove const from state.
40 * utils.c (align_up, align_down): Move to ...
41 * common/common-utils.c (align_up, align_down): ... here.
42 * utils.h (align_up, align_down): Move to ...
43 * common/common-utils.h (align_up, align_down): ... here.
44
05bc7456
JB
452018-05-04 Joel Brobecker <brobecker@adacore.com>
46
47 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
48 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
49 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
50 Re-implement to match the ABI as summarized in GCC's
51 gcc/config/sparc/sparc.c. All callers updated.
52 (sparc32_store_arguments): Remove assertion.
53
2f433492
TT
542018-05-04 Tom Tromey <tom@tromey.com>
55
56 * printcmd.c: Don't include tui.h.
57 (decode_format): Use skip_spaces.
58
9be2ae8f
TT
592018-05-04 Tom Tromey <tom@tromey.com>
60
61 PR gdb/22619:
62 * printcmd.c (last_count): New global.
63 (x_command): Use saved count when repeating.
64
f0b3976b
TT
652018-05-04 Tom Tromey <tom@tromey.com>
66
67 * nto-procfs.c (do_closedir_cleanup): Remove.
68 (procfs_pidlist): Use gdb_dir_up.
69 * procfs.c (do_closedir_cleanup): Remove.
70 (proc_update_threads): Use gdb_dir_up.
71 * common/filestuff.h (struct gdb_dir_deleter): New.
72 (gdb_dir_up): New typedef.
73
862d101a
TT
742018-05-04 Tom Tromey <tom@tromey.com>
75
76 * ada-lang.c (print_mention_exception): Use std::string.
77
cb7de75e
TT
782018-05-04 Tom Tromey <tom@tromey.com>
79
80 * ada-lang.c (create_excep_cond_exprs): Update.
81 (ada_exception_catchpoint_cond_string): Use std::string.
82
49d83361
TT
832018-05-04 Tom Tromey <tom@tromey.com>
84
85 * ada-lang.c (xget_renaming_scope): Return std::string.
86 (old_renaming_is_invisible): Update.
87
ade72a34
TT
882018-05-04 Tom Tromey <tom@tromey.com>
89
90 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
91 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
92
2be4d7f0
UW
932018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
94
95 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
96
69b6ecb0
TT
972018-05-04 Tom Tromey <tom@tromey.com>
98
99 * remote.c (remote_query_supported_append): Change type.
100 (remote_check_symbols): Update.
101
bf27f0e2
PP
1022018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
103
104 PR gdb/11420
105 * configure.ac: Prepend libpython.
106 * python/python-config.py: Likewise.
107 * configure: Regenerate.
108
4ea17de8
SM
1092018-05-03 Simon Marchi <simon.marchi@ericsson.com>
110
111 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
112
bd732259
PA
1132018-05-03 Pedro Alves <palves@redhat.com>
114
115 * s390-linux-nat.c
116 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
117 override. Write 'true' instead of '1'.
118 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
119 declaration.
120
d9f719f1
PA
1212018-05-02 Pedro Alves <palves@redhat.com>
122
123 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
124 add_inf_child_target.
125 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
126 add_inf_child_target.
127 * aix-thread.c (aix_thread_target_info): New.
128 (aix_thread_target) <shortname, longname, doc>: Delete.
129 <info>: New.
130 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
131 add_inf_child_target.
132 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
133 add_inf_child_target.
134 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
135 add_inf_child_target.
136 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
137 add_inf_child_target.
138 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
139 add_inf_child_target.
140 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
141 add_inf_child_target.
142 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
143 add_inf_child_target.
144 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
145 add_inf_child_target.
146 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
147 add_inf_child_target.
148 * bfd-target.c (target_bfd_target_info): New.
149 (target_bfd) <shortname, longname, doc>: Delete.
150 <info>: New.
151 * bsd-kvm.c (bsd_kvm_target_info): New.
152 (bsd_kvm_target) <shortname, longname, doc>: Delete.
153 <info>: New.
154 (bsd_kvm_target::open): Rename to ...
155 (bsd_kvm_target_open): ... this. Adjust.
156 * bsd-uthread.c (bsd_uthread_target_info): New.
157 (bsd_uthread_target) <shortname, longname, doc>: Delete.
158 <info>: New.
159 * corefile.c (core_file_command): Adjust.
160 * corelow.c (core_target_info): New.
161 (core_target) <shortname, longname, doc>: Delete.
162 <info>: New.
163 (core_target::open): Rename to ...
164 (core_target_open): ... this. Adjust.
165 * ctf.c (ctf_target_info): New.
166 (ctf_target) <shortname, longname, doc>: Delete.
167 <info>: New.
168 (ctf_target::open): Rename to ...
169 (ctf_target_open): ... this.
170 (_initialize_ctf): Adjust.
171 * exec.c (exec_target_info): New.
172 (exec_target) <shortname, longname, doc>: Delete.
173 <info>: New.
174 (exec_target::open): Rename to ...
175 (exec_target_open): ... this.
176 * gdbcore.h (core_target_open): Declare.
177 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
178 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
179 add_inf_child_target.
180 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
181 add_inf_child_target.
182 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
183 add_inf_child_target.
184 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
185 add_inf_child_target.
186 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
187 add_inf_child_target.
188 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
189 add_inf_child_target.
190 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
191 add_inf_child_target.
192 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
193 add_inf_child_target.
194 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
195 add_inf_child_target.
196 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
197 add_inf_child_target.
198 * inf-child.c (inf_child_target_info): New.
199 (inf_child_target::info): New.
200 (inf_child_open_target): Remove 'target' parameter. Use
201 get_native_target instead.
202 (inf_child_target::open): Delete.
203 (add_inf_child_target): New.
204 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
205 Delete.
206 <info>: New.
207 (add_inf_child_target): Declare.
208 (inf_child_open_target): Declare.
209 * linux-thread-db.c (thread_db_target_info): New.
210 (thread_db_target) <shortname, longname, doc>: Delete.
211 <info>: New.
212 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
213 add_inf_child_target.
214 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
215 add_inf_child_target.
216 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
217 add_inf_child_target.
218 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
219 add_inf_child_target.
220 * make-target-delegates (print_class): Adjust.
221 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
222 add_inf_child_target.
223 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
224 add_inf_child_target.
225 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
226 add_inf_child_target.
227 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
228 add_inf_child_target.
229 * nto-procfs.c (nto_native_target_info): New.
230 (nto_procfs_target_native) <shortname, longname, doc>:
231 Delete.
232 <info>: New.
233 (nto_procfs_target_info): New.
234 (nto_procfs_target_procfs) <shortname, longname, doc>:
235 Delete.
236 <info>: New.
237 (init_procfs_targets): Adjust.
238 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
239 add_inf_child_target.
240 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
241 add_inf_child_target.
242 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
243 add_inf_child_target.
244 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
245 add_inf_child_target.
246 * ravenscar-thread.c (ravenscar_target_info): New.
247 (ravenscar_thread_target) <shortname, longname, doc>:
248 Delete.
249 <info>: New.
250 * record-btrace.c (record_btrace_target_info):
251 (record_btrace_target) <shortname, longname, doc>: Delete.
252 <info>: New.
253 (record_btrace_target::open): Rename to ...
254 (record_btrace_target_open): ... this. Adjust.
255 * record-full.c (record_longname, record_doc): New.
256 (record_full_base_target) <shortname, longname, doc>: Delete.
257 <info>: New.
258 (record_full_target_info): New.
259 (record_full_target): <shortname>: Delete.
260 <info>: New.
261 (record_full_core_open_1, record_full_open_1): Update comments.
262 (record_full_base_target::open): Rename to ...
263 (record_full_open): ... this.
264 (cmd_record_full_restore): Update.
265 (_initialize_record_full): Update.
266 * remote-sim.c (remote_sim_target_info): New.
267 (gdbsim_target) <shortname, longname, doc>: Delete.
268 <info>: New.
269 (gdbsim_target::open): Rename to ...
270 (gdbsim_target_open): ... this.
271 (_initialize_remote_sim): Adjust.
272 * remote.c (remote_doc): New.
273 (remote_target_info): New.
274 (remote_target) <shortname, longname, doc>: Delete.
275 <info>: New.
276 (extended_remote_target_info): New.
277 (extended_remote_target) <shortname, longname, doc>: Delete.
278 <info>: New.
279 (remote_target::open_1): Make static. Adjust.
280 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
281 * s390-linux-nat.c (_initialize_s390_nat): Use
282 add_inf_child_target.
283 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
284 add_inf_child_target.
285 * sol-thread.c (thread_db_target_info): New.
286 (sol_thread_target) <shortname, longname, doc>: Delete.
287 <info>: New.
288 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
289 add_inf_child_target.
290 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
291 add_inf_child_target.
292 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
293 add_inf_child_target.
294 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
295 add_inf_child_target.
296 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
297 add_inf_child_target.
298 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
299 add_inf_child_target.
300 * spu-linux-nat.c (_initialize_spu_nat): Use
301 add_inf_child_target.
302 * spu-multiarch.c (spu_multiarch_target_info): New.
303 (spu_multiarch_target) <shortname, longname, doc>: Delete.
304 <info>: New.
305 * target-delegates.c: Regenerate.
306 * target.c: Include <unordered_map>.
307 (target_ops_p): Delete.
308 (DEF_VEC_P(target_ops_p)): Delete.
309 (target_factories): New.
310 (test_target_info): New.
311 (test_target_ops::info): New.
312 (open_target): Adjust to use target_factories.
313 (add_target_with_completer): Rename to ...
314 (add_target): ... this. Change prototype. Register target_info
315 and open callback in target_factories. Register target_info in
316 command context instead of target_ops.
317 (add_target): Delete old implementation.
318 (add_deprecated_target_alias): Change prototype. Adjust.
319 (the_native_target): New.
320 (set_native_target, get_native_target): New.
321 (find_default_run_target): Use the_native_target.
322 (find_attach_target, find_run_target): Simplify.
323 (target_ops::open): Delete.
324 (dummy_target_info): New.
325 (dummy_target::shortname, dummy_target::longname)
326 (dummy_target::doc): Delete.
327 (dummy_target::info): New.
328 (debug_target::shortname, debug_target::longname)
329 (debug_target::doc): Delete.
330 (debug_target::info): New.
331 * target.h (struct target_info): New.
332 (target_ops::~target_ops): Add comment.
333 (target_ops::info): New.
334 (target_ops::shortname, target_ops::longname, target_ops::doc): No
335 longer virtual. Implement in terms of target_info.
336 (set_native_target, get_native_target): Declare.
337 (target_open_ftype): New.
338 (add_target, add_target_with_completer)
339 (add_deprecated_target_alias): Change prototype.
340 (test_target) <shortname, longname, doc>: Delete.
341 <info>: New.
342 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
343 add_inf_child_target.
344 * tracefile-tfile.c (tfile_target_info): New.
345 (tfile_target) <shortname, longname, doc>: Delete.
346 <info>: New.
347 (tfile_target::open): Rename to ...
348 (tfile_target_open): ... this.
349 (_initialize_tracefile_tfile): Adjust.
350 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
351 add_inf_child_target.
352 * windows-nat.c (_initialize_windows_nat): Use
353 add_inf_child_target.
354 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
355 add_inf_child_target.
356
135340af
PA
3572018-05-02 Pedro Alves <palves@redhat.com>
358
359 * linux-nat.h (linux_nat_target) <low_new_thread,
360 low_delete_thread, low_new_fork, low_forget_process,
361 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
362 New virtual methods.
363 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
364 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
365 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
366 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
367 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
368 Delete.
369 * linux-fork.c (delete_fork): Adjust to call low method.
370 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
371 (linux_nat_new_fork, linux_nat_forget_process_hook)
372 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
373 (linux_nat_status_is_event):
374 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
375 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
376 to call low method.
377 (sigtrap_is_event): Rename to ...
378 (linux_nat_target::low_status_is_event): ... this.
379 (linux_nat_set_status_is_event): Delete.
380 (save_stop_reason, linux_nat_wait_1)
381 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
382 low methods.
383 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
384 (linux_nat_set_new_fork, linux_nat_set_forget_process)
385 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
386 (linux_nat_set_prepare_to_resume): Delete.
387 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
388 low virtual methods.
389 * amd64-linux-nat.c: Likewise.
390 * arm-linux-nat.c: Likewise.
391 * i386-linux-nat.c: Likewise.
392 * ia64-linux-nat.c: Likewise.
393 * mips-linux-nat.c: Likewise.
394 * ppc-linux-nat.c: Likewise.
395 * s390-linux-nat.c: Likewise.
396 * sparc64-linux-nat.c: Likewise.
397 * x86-linux-nat.c: Likewise.
398 * x86-linux-nat.h: Include "nat/x86-linux.h".
399 (x86_linux_nat_target) <low_new_fork, low_forget_process,
400 low_prepare_to_resume, low_new_thread, low_delete_thread>:
401 Override methods.
402
57810aa7
PA
4032018-05-02 Pedro Alves <palves@redhat.com>
404
405 * target.h (target_ops)
406 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
407 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
408 stopped_by_watchpoint, have_continuable_watchpoint,
409 stopped_data_address, watchpoint_addr_within_range,
410 can_accel_watchpoint_condition, can_run, thread_alive,
411 has_all_memory, has_memory, has_stack, has_registers,
412 has_execution, can_async_p, is_async_p, supports_non_stop,
413 always_non_stop_p, can_execute_reverse, supports_multi_process,
414 supports_enable_disable_tracepoint,
415 supports_disable_randomization, supports_string_tracing,
416 supports_evaluation_of_breakpoint_conditions,
417 can_run_breakpoint_commands, filesystem_is_local,
418 can_download_tracepoint, get_trace_state_variable_value,
419 set_trace_notes, get_tib_address, use_agent, can_use_agent,
420 record_is_replaying, record_will_replay,
421 augmented_libraries_svr4_read>: Adjust to return bool.
422 * aarch64-linux-nat.c: All implementations adjusted.
423 * aix-thread.c: All implementations adjusted.
424 * arm-linux-nat.c: All implementations adjusted.
425 * breakpoint.c: All implementations adjusted.
426 * bsd-kvm.c: All implementations adjusted.
427 * bsd-uthread.c: All implementations adjusted.
428 * corelow.c: All implementations adjusted.
429 * ctf.c: All implementations adjusted.
430 * darwin-nat.c: All implementations adjusted.
431 * darwin-nat.h: All implementations adjusted.
432 * exec.c: All implementations adjusted.
433 * fbsd-nat.c: All implementations adjusted.
434 * fbsd-nat.h: All implementations adjusted.
435 * gnu-nat.c: All implementations adjusted.
436 * gnu-nat.h: All implementations adjusted.
437 * go32-nat.c: All implementations adjusted.
438 * ia64-linux-nat.c: All implementations adjusted.
439 * inf-child.c: All implementations adjusted.
440 * inf-child.h: All implementations adjusted.
441 * inf-ptrace.c: All implementations adjusted.
442 * inf-ptrace.h: All implementations adjusted.
443 * linux-nat.c: All implementations adjusted.
444 * linux-nat.h: All implementations adjusted.
445 * mips-linux-nat.c: All implementations adjusted.
446 * nto-procfs.c: All implementations adjusted.
447 * ppc-linux-nat.c: All implementations adjusted.
448 * procfs.c: All implementations adjusted.
449 * ravenscar-thread.c: All implementations adjusted.
450 * record-btrace.c: All implementations adjusted.
451 * record-full.c: All implementations adjusted.
452 * remote-sim.c: All implementations adjusted.
453 * remote.c: All implementations adjusted.
454 * s390-linux-nat.c: All implementations adjusted.
455 * sol-thread.c: All implementations adjusted.
456 * spu-multiarch.c: All implementations adjusted.
457 * target-delegates.c: All implementations adjusted.
458 * target.c: All implementations adjusted.
459 * target.h: All implementations adjusted.
460 * tracefile-tfile.c: All implementations adjusted.
461 * tracefile.c: All implementations adjusted.
462 * tracefile.h: All implementations adjusted.
463 * windows-nat.c: All implementations adjusted.
464 * x86-linux-nat.h: All implementations adjusted.
465 * x86-nat.h: All implementations adjusted.
466
ad6a4e2d
PA
4672018-05-02 Pedro Alves <palves@redhat.com>
468
469 * make-target-delegates (scan_target_h): Don't trim lines here.
470 Replace sequences of tabs and/or whitespace with a single
471 whitespace.
472 (top level, parsing methods): Trim each line before processing it
473 here.
474
f6ac5f3d
PA
4752018-05-02 Pedro Alves <palves@redhat.com>
476 John Baldwin <jhb@freebsd.org>
477
478 * target.h (enum strata) <debug_stratum>: New.
479 (struct target_ops) <all delegation methods>: Replace by C++
480 virtual methods, and drop "to_" prefix. All references updated
481 throughout.
482 <to_shortname, to_longname, to_doc, to_data,
483 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
484 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
485 virtual methods. All references updated throughout.
486 <can_attach, supports_terminal_ours, can_create_inferior,
487 get_thread_control_capabilities, attach_no_wait>: New
488 virtual methods.
489 <insert_breakpoint, remove_breakpoint>: Now
490 TARGET_DEFAULT_NORETURN methods.
491 <info_proc>: Now returns bool.
492 <to_magic>: Delete.
493 (OPS_MAGIC): Delete.
494 (current_target): Delete. All references replaced by references
495 to ...
496 (target_stack): ... this. New.
497 (target_shortname, target_longname): Adjust.
498 (target_can_run): Now a function declaration.
499 (default_child_has_all_memory, default_child_has_memory)
500 (default_child_has_stack, default_child_has_registers)
501 (default_child_has_execution): Remove target_ops parameter.
502 (complete_target_initialization): Delete.
503 (memory_breakpoint_target): New template class.
504 (test_target_ops): Refactor as a C++ class with virtual methods.
505 * make-target-delegates (NAME_PART): Tighten.
506 (POINTER_PART, CP_SYMBOL): New.
507 (SIMPLE_RETURN_PART): Reimplement.
508 (VEC_RETURN_PART): Expect less.
509 (RETURN_PART, VIRTUAL_PART): New.
510 (METHOD): Adjust to C++ virtual methods.
511 (scan_target_h): Remove reference to C99.
512 (dname): Output "target_ops::" prefix.
513 (write_function_header): Adjust to output a C++ class method.
514 (write_declaration): New.
515 (write_delegator): Adjust to output a C++ class method.
516 (tdname): Output "dummy_target::" prefix.
517 (write_tdefault, write_debugmethod): Adjust to output a C++ class
518 method.
519 (tdefault_names, debug_names): Delete.
520 (return_types, tdefaults, styles, argtypes_array): New.
521 (top level): All methods are delegators.
522 (print_class): New.
523 (top level): Print dummy_target and debug_target classes.
524 * target-delegates.c: Regenerate.
525 * target-debug.h (target_debug_print_enum_info_proc_what)
526 (target_debug_print_thread_control_capabilities)
527 (target_debug_print_thread_info_p): New.
528 * target.c (dummy_target): Delete.
529 (the_dummy_target, the_debug_target): New.
530 (target_stack): Now extern.
531 (set_targetdebug): Push/unpush debug target.
532 (default_child_has_all_memory, default_child_has_memory)
533 (default_child_has_stack, default_child_has_registers)
534 (default_child_has_execution): Remove target_ops parameter.
535 (complete_target_initialization): Delete.
536 (add_target_with_completer): No longer call
537 complete_target_initialization.
538 (target_supports_terminal_ours): Use regular delegation.
539 (update_current_target): Delete.
540 (push_target): No longer check magic number. Don't call
541 update_current_target.
542 (unpush_target): Don't call update_current_target.
543 (target_is_pushed): No longer check magic number.
544 (target_require_runnable): Skip for all stratums over
545 process_stratum.
546 (target_ops::info_proc): New.
547 (target_info_proc): Use find_target_at and
548 find_default_run_target.
549 (target_supports_disable_randomization): Use regular delegation.
550 (target_get_osdata): Use find_target_at.
551 (target_ops::open, target_ops::close, target_ops::can_attach)
552 (target_ops::attach, target_ops::can_create_inferior)
553 (target_ops::create_inferior, target_ops::can_run)
554 (target_can_run): New.
555 (default_fileio_target): Use regular delegation.
556 (target_ops::fileio_open, target_ops::fileio_pwrite)
557 (target_ops::fileio_pread, target_ops::fileio_fstat)
558 (target_ops::fileio_close, target_ops::fileio_unlink)
559 (target_ops::fileio_readlink): New.
560 (target_fileio_open_1, target_fileio_unlink)
561 (target_fileio_readlink): Always call the target method. Handle
562 FILEIO_ENOSYS.
563 (return_zero, return_zero_has_execution): Delete.
564 (init_dummy_target): Delete.
565 (dummy_target::dummy_target, dummy_target::shortname)
566 (dummy_target::longname, dummy_target::doc)
567 (debug_target::debug_target, debug_target::shortname)
568 (debug_target::longname, debug_target::doc): New.
569 (target_supports_delete_record): Use regular delegation.
570 (setup_target_debug): Delete.
571 (maintenance_print_target_stack): Skip debug_stratum.
572 (initialize_targets): Instantiate the_dummy_target and
573 the_debug_target.
574 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
575 use target_stack.
576 (target_auxv_search, fprint_target_auxv): Adjust.
577 (info_auxv_command): Adjust to use target_stack.
578 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
579 * exceptions.c (print_flush): Handle a NULL target_stack.
580 * regcache.c (target_ops_no_register): Refactor as class with
581 virtual methods.
582
583 * exec.c (exec_target): New class.
584 (exec_ops): Now an exec_target.
585 (exec_open, exec_close_1, exec_get_section_table)
586 (exec_xfer_partial, exec_files_info, exec_has_memory)
587 (exec_make_note_section): Refactor as exec_target methods.
588 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
589 Delete.
590 (exec_target::find_memory_regions): New.
591 (_initialize_exec): Don't call init_exec_ops.
592 * gdbcore.h (exec_file_clear): Delete.
593
594 * corefile.c (core_target): Delete.
595 (core_file_command): Adjust.
596 * corelow.c (core_target): New class.
597 (the_core_target): New.
598 (core_close): Remove target_ops parameter.
599 (core_close_cleanup): Adjust.
600 (core_target::close): New.
601 (core_open, core_detach, get_core_registers, core_files_info)
602 (core_xfer_partial, core_thread_alive, core_read_description)
603 (core_pid_to_str, core_thread_name, core_has_memory)
604 (core_has_stack, core_has_registers, core_info_proc): Rework as
605 core_target methods.
606 (ignore, core_remove_breakpoint, init_core_ops): Delete.
607 (_initialize_corelow): Initialize the_core_target.
608 * gdbcore.h (core_target): Delete.
609 (the_core_target): New.
610
611 * ctf.c: (ctf_target): New class.
612 (ctf_ops): Now a ctf_target.
613 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
614 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
615 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
616 methods.
617 (init_ctf_ops): Delete.
618 (_initialize_ctf): Don't call it.
619 * tracefile-tfile.c (tfile_target): New class.
620 (tfile_ops): Now a tfile_target.
621 (tfile_open, tfile_close, tfile_files_info)
622 (tfile_get_tracepoint_status, tfile_trace_find)
623 (tfile_fetch_registers, tfile_xfer_partial)
624 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
625 Refactor as tfile_target methods.
626 (tfile_xfer_partial_features): Remove target_ops parameter.
627 (init_tfile_ops): Delete.
628 (_initialize_tracefile_tfile): Don't call it.
629 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
630 (tracefile_has_stack, tracefile_has_registers)
631 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
632 tracefile_target methods.
633 (init_tracefile_ops): Delete.
634 (tracefile_target::tracefile_target): New.
635 * tracefile.h: Include "target.h".
636 (tracefile_target): New class.
637 (init_tracefile_ops): Delete.
638
639 * spu-multiarch.c (spu_multiarch_target): New class.
640 (spu_ops): Now a spu_multiarch_target.
641 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
642 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
643 (spu_search_memory, spu_mourn_inferior): Refactor as
644 spu_multiarch_target methods.
645 (init_spu_ops): Delete.
646 (_initialize_spu_multiarch): Remove references to init_spu_ops,
647 complete_target_initialization.
648
649 * ravenscar-thread.c (ravenscar_thread_target): New class.
650 (ravenscar_ops): Now a ravenscar_thread_target.
651 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
652 (ravenscar_thread_alive, ravenscar_pid_to_str)
653 (ravenscar_fetch_registers, ravenscar_store_registers)
654 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
655 (ravenscar_stopped_by_hw_breakpoint)
656 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
657 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
658 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
659 methods.
660 (init_ravenscar_thread_ops): Delete.
661 (_initialize_ravenscar): Remove references to
662 init_ravenscar_thread_ops and complete_target_initialization.
663
664 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
665 (bsd_uthread_target): New class.
666 (bsd_uthread_ops): Now a bsd_uthread_target.
667 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
668 (bsd_uthread_close, bsd_uthread_mourn_inferior)
669 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
670 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
671 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
672 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
673 (bsd_uthread_target): Delete function.
674 (_initialize_bsd_uthread): Remove reference to
675 complete_target_initialization.
676
677 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
678 (target_bfd): ... this new class.
679 (target_bfd_xfer_partial, target_bfd_get_section_table)
680 (target_bfd_close): Refactor as target_bfd methods.
681 (target_bfd::~target_bfd): New.
682 (target_bfd_reopen): Adjust.
683 (target_bfd::close): New.
684
685 * record-btrace.c (record_btrace_target): New class.
686 (record_btrace_ops): Now a record_btrace_target.
687 (record_btrace_open, record_btrace_stop_recording)
688 (record_btrace_disconnect, record_btrace_close)
689 (record_btrace_async, record_btrace_info)
690 (record_btrace_insn_history, record_btrace_insn_history_range)
691 (record_btrace_insn_history_from, record_btrace_call_history)
692 (record_btrace_call_history_range)
693 (record_btrace_call_history_from, record_btrace_record_method)
694 (record_btrace_is_replaying, record_btrace_will_replay)
695 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
696 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
697 (record_btrace_store_registers, record_btrace_prepare_to_store)
698 (record_btrace_to_get_unwinder)
699 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
700 (record_btrace_commit_resume, record_btrace_wait)
701 (record_btrace_stop, record_btrace_can_execute_reverse)
702 (record_btrace_stopped_by_sw_breakpoint)
703 (record_btrace_supports_stopped_by_sw_breakpoint)
704 (record_btrace_stopped_by_hw_breakpoint)
705 (record_btrace_supports_stopped_by_hw_breakpoint)
706 (record_btrace_update_thread_list, record_btrace_thread_alive)
707 (record_btrace_goto_begin, record_btrace_goto_end)
708 (record_btrace_goto, record_btrace_stop_replaying_all)
709 (record_btrace_execution_direction)
710 (record_btrace_prepare_to_generate_core)
711 (record_btrace_done_generating_core): Refactor as
712 record_btrace_target methods.
713 (init_record_btrace_ops): Delete.
714 (_initialize_record_btrace): Remove reference to
715 init_record_btrace_ops.
716 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
717 the execution_direction global.
718 (record_full_base_target, record_full_target)
719 (record_full_core_target): New classes.
720 (record_full_ops): Now a record_full_target.
721 (record_full_core_ops): Now a record_full_core_target.
722 (record_full_target::detach, record_full_target::disconnect)
723 (record_full_core_target::disconnect)
724 (record_full_target::mourn_inferior, record_full_target::kill):
725 New.
726 (record_full_open, record_full_close, record_full_async): Refactor
727 as methods of the record_full_base_target class.
728 (record_full_resume, record_full_commit_resume): Refactor
729 as methods of the record_full_target class.
730 (record_full_wait, record_full_stopped_by_watchpoint)
731 (record_full_stopped_data_address)
732 (record_full_stopped_by_sw_breakpoint)
733 (record_full_supports_stopped_by_sw_breakpoint)
734 (record_full_stopped_by_hw_breakpoint)
735 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
736 methods of the record_full_base_target class.
737 (record_full_store_registers, record_full_xfer_partial)
738 (record_full_insert_breakpoint, record_full_remove_breakpoint):
739 Refactor as methods of the record_full_target class.
740 (record_full_can_execute_reverse, record_full_get_bookmark)
741 (record_full_goto_bookmark, record_full_execution_direction)
742 (record_full_record_method, record_full_info, record_full_delete)
743 (record_full_is_replaying, record_full_will_replay)
744 (record_full_goto_begin, record_full_goto_end, record_full_goto)
745 (record_full_stop_replaying): Refactor as methods of the
746 record_full_base_target class.
747 (record_full_core_resume, record_full_core_kill)
748 (record_full_core_fetch_registers)
749 (record_full_core_prepare_to_store)
750 (record_full_core_store_registers, record_full_core_xfer_partial)
751 (record_full_core_insert_breakpoint)
752 (record_full_core_remove_breakpoint)
753 (record_full_core_has_execution): Refactor
754 as methods of the record_full_core_target class.
755 (record_full_base_target::supports_delete_record): New.
756 (init_record_full_ops): Delete.
757 (init_record_full_core_ops): Delete.
758 (record_full_save): Refactor as method of the
759 record_full_base_target class.
760 (_initialize_record_full): Remove references to
761 init_record_full_ops and init_record_full_core_ops.
762
763 * remote.c (remote_target, extended_remote_target): New classes.
764 (remote_ops): Now a remote_target.
765 (extended_remote_ops): Now an extended_remote_target.
766 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
767 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
768 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
769 (remote_pass_signals, remote_set_syscall_catchpoint)
770 (remote_program_signals, )
771 (remote_thread_always_alive): Remove target_ops parameter.
772 (remote_thread_alive, remote_thread_name)
773 (remote_update_thread_list, remote_threads_extra_info)
774 (remote_static_tracepoint_marker_at)
775 (remote_static_tracepoint_markers_by_strid)
776 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
777 (remote_open): Refactor as methods of remote_target.
778 (extended_remote_open, extended_remote_detach)
779 (extended_remote_attach, extended_remote_post_attach):
780 (extended_remote_supports_disable_randomization)
781 (extended_remote_create_inferior): : Refactor as method of
782 extended_remote_target.
783 (remote_set_permissions, remote_open_1, remote_detach)
784 (remote_follow_fork, remote_follow_exec, remote_disconnect)
785 (remote_resume, remote_commit_resume, remote_stop)
786 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
787 (remote_terminal_ours, remote_wait, remote_fetch_registers)
788 (remote_prepare_to_store, remote_store_registers)
789 (remote_flash_erase, remote_flash_done, remote_files_info)
790 (remote_kill, remote_mourn, remote_insert_breakpoint)
791 (remote_remove_breakpoint, remote_insert_watchpoint)
792 (remote_watchpoint_addr_within_range)
793 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
794 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
795 (remote_supports_stopped_by_sw_breakpoint)
796 (remote_stopped_by_hw_breakpoint)
797 (remote_supports_stopped_by_hw_breakpoint)
798 (remote_stopped_by_watchpoint, remote_stopped_data_address)
799 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
800 (remote_verify_memory): Refactor as methods of remote_target.
801 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
802 parameter.
803 (remote_xfer_partial, remote_get_memory_xfer_limit)
804 (remote_search_memory, remote_rcmd, remote_memory_map)
805 (remote_pid_to_str, remote_get_thread_local_address)
806 (remote_get_tib_address, remote_read_description): Refactor as
807 methods of remote_target.
808 (remote_target::fileio_open, remote_target::fileio_pwrite)
809 (remote_target::fileio_pread, remote_target::fileio_close): New.
810 (remote_hostio_readlink, remote_hostio_fstat)
811 (remote_filesystem_is_local, remote_can_execute_reverse)
812 (remote_supports_non_stop, remote_supports_disable_randomization)
813 (remote_supports_multi_process, remote_supports_cond_breakpoints)
814 (remote_supports_enable_disable_tracepoint)
815 (remote_supports_string_tracing)
816 (remote_can_run_breakpoint_commands, remote_trace_init)
817 (remote_download_tracepoint, remote_can_download_tracepoint)
818 (remote_download_trace_state_variable, remote_enable_tracepoint)
819 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
820 (remote_trace_start, remote_get_trace_status)
821 (remote_get_tracepoint_status, remote_trace_stop)
822 (remote_trace_find, remote_get_trace_state_variable_value)
823 (remote_save_trace_data, remote_get_raw_trace_data)
824 (remote_set_disconnected_tracing, remote_core_of_thread)
825 (remote_set_circular_trace_buffer, remote_traceframe_info)
826 (remote_get_min_fast_tracepoint_insn_len)
827 (remote_set_trace_buffer_size, remote_set_trace_notes)
828 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
829 (remote_disable_btrace, remote_teardown_btrace)
830 (remote_read_btrace, remote_btrace_conf)
831 (remote_augmented_libraries_svr4_read, remote_load)
832 (remote_pid_to_exec_file, remote_can_do_single_step)
833 (remote_execution_direction, remote_thread_handle_to_thread_info):
834 Refactor as methods of remote_target.
835 (init_remote_ops, init_extended_remote_ops): Delete.
836 (remote_can_async_p, remote_is_async_p, remote_async)
837 (remote_thread_events, remote_upload_tracepoints)
838 (remote_upload_trace_state_variables): Refactor as methods of
839 remote_target.
840 (_initialize_remote): Remove references to init_remote_ops and
841 init_extended_remote_ops.
842
843 * remote-sim.c (gdbsim_target): New class.
844 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
845 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
846 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
847 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
848 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
849 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
850 Refactor as methods of gdbsim_target.
851 (gdbsim_ops): Now a gdbsim_target.
852 (init_gdbsim_ops): Delete.
853 (gdbsim_cntrl_c): Adjust.
854 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
855
856 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
857 (the_amd64_linux_nat_target): New.
858 (amd64_linux_fetch_inferior_registers)
859 (amd64_linux_store_inferior_registers): Refactor as methods of
860 amd64_linux_nat_target.
861 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
862 * i386-linux-nat.c: Don't include "linux-nat.h".
863 (i386_linux_nat_target): New class.
864 (the_i386_linux_nat_target): New.
865 (i386_linux_fetch_inferior_registers)
866 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
867 as methods of i386_linux_nat_target.
868 (_initialize_i386_linux_nat): Adjust. Set linux_target.
869 * inf-child.c (inf_child_ops): Delete.
870 (inf_child_fetch_inferior_registers)
871 (inf_child_store_inferior_registers): Delete.
872 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
873 methods of inf_child_target.
874 (inf_child_target::supports_terminal_ours)
875 (inf_child_target::terminal_init)
876 (inf_child_target::terminal_inferior)
877 (inf_child_target::terminal_ours_for_output)
878 (inf_child_target::terminal_ours, inf_child_target::interrupt)
879 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
880 New.
881 (inf_child_open, inf_child_disconnect, inf_child_close)
882 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
883 (inf_child_post_startup_inferior, inf_child_can_run)
884 (inf_child_pid_to_exec_file): Refactor as methods of
885 inf_child_target.
886 (inf_child_follow_fork): Delete.
887 (inf_child_target::can_create_inferior)
888 (inf_child_target::can_attach): New.
889 (inf_child_target::has_all_memory, inf_child_target::has_memory)
890 (inf_child_target::has_stack, inf_child_target::has_registers)
891 (inf_child_target::has_execution): New.
892 (inf_child_fileio_open, inf_child_fileio_pwrite)
893 (inf_child_fileio_pread, inf_child_fileio_fstat)
894 (inf_child_fileio_close, inf_child_fileio_unlink)
895 (inf_child_fileio_readlink, inf_child_use_agent)
896 (inf_child_can_use_agent): Refactor as methods of
897 inf_child_target.
898 (return_zero, inf_child_target): Delete.
899 (inf_child_target::inf_child_target): New.
900 * inf-child.h: Include "target.h".
901 (inf_child_target): Delete function prototype.
902 (inf_child_target): New class.
903 (inf_child_open_target, inf_child_mourn_inferior)
904 (inf_child_maybe_unpush_target): Delete.
905 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
906 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
907 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
908 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
909 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
910 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
911 (inf_ptrace_wait, inf_ptrace_xfer_partial)
912 (inf_ptrace_thread_alive, inf_ptrace_files_info)
913 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
914 methods of inf_ptrace_target.
915 (inf_ptrace_target): Delete function.
916 * inf-ptrace.h: Include "inf-child.h".
917 (inf_ptrace_target): Delete function declaration.
918 (inf_ptrace_target): New class.
919 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
920 * linux-nat.c (linux_target): New.
921 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
922 (linux_nat_target::~linux_nat_target): New.
923 (linux_child_post_attach, linux_child_post_startup_inferior)
924 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
925 (linux_child_remove_fork_catchpoint)
926 (linux_child_insert_vfork_catchpoint)
927 (linux_child_remove_vfork_catchpoint)
928 (linux_child_insert_exec_catchpoint)
929 (linux_child_remove_exec_catchpoint)
930 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
931 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
932 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
933 (linux_nat_stopped_data_address)
934 (linux_nat_stopped_by_sw_breakpoint)
935 (linux_nat_supports_stopped_by_sw_breakpoint)
936 (linux_nat_stopped_by_hw_breakpoint)
937 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
938 (linux_nat_kill, linux_nat_mourn_inferior)
939 (linux_nat_xfer_partial, linux_nat_thread_alive)
940 (linux_nat_update_thread_list, linux_nat_pid_to_str)
941 (linux_nat_thread_name, linux_child_pid_to_exec_file)
942 (linux_child_static_tracepoint_markers_by_strid)
943 (linux_nat_is_async_p, linux_nat_can_async_p)
944 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
945 (linux_nat_supports_multi_process)
946 (linux_nat_supports_disable_randomization, linux_nat_async)
947 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
948 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
949 (linux_nat_fileio_open, linux_nat_fileio_readlink)
950 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
951 methods of linux_nat_target.
952 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
953 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
954 parameter.
955 (check_stopped_by_watchpoint): Adjust.
956 (linux_xfer_partial): Delete.
957 (linux_target_install_ops, linux_target, linux_nat_add_target):
958 Delete.
959 (linux_nat_target::linux_nat_target): New.
960 * linux-nat.h: Include "inf-ptrace.h".
961 (linux_nat_target): New.
962 (linux_target, linux_target_install_ops, linux_nat_add_target):
963 Delete function declarations.
964 (linux_target): Declare global.
965 * linux-thread-db.c (thread_db_target): New.
966 (thread_db_target::thread_db_target): New.
967 (thread_db_ops): Delete.
968 (the_thread_db_target): New.
969 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
970 (thread_db_update_thread_list, thread_db_pid_to_str)
971 (thread_db_extra_thread_info)
972 (thread_db_thread_handle_to_thread_info)
973 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
974 (thread_db_resume): Refactor as methods of thread_db_target.
975 (init_thread_db_ops): Delete.
976 (_initialize_thread_db): Remove reference to init_thread_db_ops.
977 * x86-linux-nat.c: Don't include "linux-nat.h".
978 (super_post_startup_inferior): Delete.
979 (x86_linux_nat_target::~x86_linux_nat_target): New.
980 (x86_linux_child_post_startup_inferior)
981 (x86_linux_read_description, x86_linux_enable_btrace)
982 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
983 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
984 methods of x86_linux_nat_target.
985 (x86_linux_create_target): Delete. Bits folded ...
986 (x86_linux_add_target): ... here. Now takes a linux_nat_target
987 pointer.
988 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
989 (x86_linux_nat_target): New class.
990 (x86_linux_create_target): Delete.
991 (x86_linux_add_target): Now takes a linux_nat_target pointer.
992 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
993 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
994 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
995 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
996 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
997 make extern.
998 (x86_use_watchpoints): Delete.
999 * x86-nat.h: Include "breakpoint.h" and "target.h".
1000 (x86_use_watchpoints): Delete.
1001 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1002 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1003 (x86_insert_watchpoint, x86_remove_watchpoint)
1004 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1005 (x86_stopped_by_hw_breakpoint): New declarations.
1006 (x86_nat_target): New template class.
1007
1008 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1009 (the_ppc_linux_nat_target): New.
1010 (ppc_linux_fetch_inferior_registers)
1011 (ppc_linux_can_use_hw_breakpoint)
1012 (ppc_linux_region_ok_for_hw_watchpoint)
1013 (ppc_linux_ranged_break_num_registers)
1014 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1015 (ppc_linux_insert_mask_watchpoint)
1016 (ppc_linux_remove_mask_watchpoint)
1017 (ppc_linux_can_accel_watchpoint_condition)
1018 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1019 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1020 (ppc_linux_watchpoint_addr_within_range)
1021 (ppc_linux_masked_watch_num_registers)
1022 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1023 (ppc_linux_read_description): Refactor as methods of
1024 ppc_linux_nat_target.
1025 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1026
1027 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1028 (procfs_target): New class.
1029 (the_procfs_target): New.
1030 (procfs_target): Delete function.
1031 (procfs_auxv_parse, procfs_attach, procfs_detach)
1032 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1033 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1034 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1035 (procfs_create_inferior, procfs_update_thread_list)
1036 (procfs_thread_alive, procfs_pid_to_str)
1037 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1038 (procfs_stopped_data_address, procfs_insert_watchpoint)
1039 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1040 (proc_find_memory_regions, procfs_info_proc)
1041 (procfs_make_note_section): Refactor as methods of procfs_target.
1042 (_initialize_procfs): Adjust.
1043 * sol-thread.c (sol_thread_target): New class.
1044 (sol_thread_ops): Now a sol_thread_target.
1045 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1046 (sol_thread_fetch_registers, sol_thread_store_registers)
1047 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1048 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1049 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1050 (init_sol_thread_ops): Delete.
1051 (_initialize_sol_thread): Adjust. Remove references to
1052 init_sol_thread_ops and complete_target_initialization.
1053
1054 * windows-nat.c (windows_nat_target): New class.
1055 (windows_fetch_inferior_registers)
1056 (windows_store_inferior_registers, windows_resume, windows_wait)
1057 (windows_attach, windows_detach, windows_pid_to_exec_file)
1058 (windows_files_info, windows_create_inferior)
1059 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1060 (windows_close, windows_pid_to_str, windows_xfer_partial)
1061 (windows_get_tib_address, windows_get_ada_task_ptid)
1062 (windows_thread_name, windows_thread_alive): Refactor as
1063 windows_nat_target methods.
1064 (do_initial_windows_stuff): Adjust.
1065 (windows_target): Delete function.
1066 (_initialize_windows_nat): Adjust.
1067
1068 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1069 (darwin_mourn_inferior, darwin_kill_inferior)
1070 (darwin_create_inferior, darwin_attach, darwin_detach)
1071 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1072 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1073 (darwin_supports_multi_process): Refactor as darwin_nat_target
1074 methods.
1075 (darwin_resume_to, darwin_files_info): Delete.
1076 (_initialize_darwin_inferior): Rename to ...
1077 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1078 * darwin-nat.h: Include "inf-child.h".
1079 (darwin_nat_target): New class.
1080 (darwin_complete_target): Delete.
1081 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1082 (darwin_target): New.
1083 (i386_darwin_fetch_inferior_registers)
1084 (i386_darwin_store_inferior_registers): Refactor as methods of
1085 darwin_nat_target.
1086 (darwin_complete_target): Delete, with ...
1087 (_initialize_i386_darwin_nat): ... bits factored out here.
1088
1089 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1090 (the_alpha_linux_nat_target): New.
1091 (alpha_linux_register_u_offset): Refactor as
1092 alpha_linux_nat_target method.
1093 (_initialize_alpha_linux_nat): Adjust.
1094 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1095 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1096 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1097 methods of linux_nat_trad_target.
1098 (linux_trad_target): Delete.
1099 * linux-nat-trad.h (linux_trad_target): Delete function.
1100 (linux_nat_trad_target): New class.
1101 * mips-linux-nat.c (mips_linux_nat_target): New class.
1102 (super_fetch_registers, super_store_registers, super_close):
1103 Delete.
1104 (the_mips_linux_nat_target): New.
1105 (mips64_linux_regsets_fetch_registers)
1106 (mips64_linux_regsets_store_registers)
1107 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1108 (mips_linux_register_u_offset, mips_linux_read_description)
1109 (mips_linux_can_use_hw_breakpoint)
1110 (mips_linux_stopped_by_watchpoint)
1111 (mips_linux_stopped_data_address)
1112 (mips_linux_region_ok_for_hw_watchpoint)
1113 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1114 (mips_linux_close): Refactor as methods of mips_linux_nat.
1115 (_initialize_mips_linux_nat): Adjust to C++ification.
1116
1117 * aix-thread.c (aix_thread_target): New class.
1118 (aix_thread_ops): Now an aix_thread_target.
1119 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1120 (aix_thread_fetch_registers, aix_thread_store_registers)
1121 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1122 (aix_thread_thread_alive, aix_thread_pid_to_str)
1123 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1124 Refactor as methods of aix_thread_target.
1125 (init_aix_thread_ops): Delete.
1126 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1127 and complete_target_initialization.
1128 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1129 (rs6000_nat_target): New class.
1130 (the_rs6000_nat_target): New.
1131 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1132 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1133 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1134 (super_create_inferior): Delete.
1135 (_initialize_rs6000_nat): Adjust to C++ification.
1136
1137 * arm-linux-nat.c (arm_linux_nat_target): New class.
1138 (the_arm_linux_nat_target): New.
1139 (arm_linux_fetch_inferior_registers)
1140 (arm_linux_store_inferior_registers, arm_linux_read_description)
1141 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1142 (arm_linux_remove_hw_breakpoint)
1143 (arm_linux_region_ok_for_hw_watchpoint)
1144 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1145 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1146 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1147 arm_linux_nat_target.
1148 (_initialize_arm_linux_nat): Adjust to C++ification.
1149
1150 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1151 (the_aarch64_linux_nat_target): New.
1152 (aarch64_linux_fetch_inferior_registers)
1153 (aarch64_linux_store_inferior_registers)
1154 (aarch64_linux_child_post_startup_inferior)
1155 (aarch64_linux_read_description)
1156 (aarch64_linux_can_use_hw_breakpoint)
1157 (aarch64_linux_insert_hw_breakpoint)
1158 (aarch64_linux_remove_hw_breakpoint)
1159 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1160 (aarch64_linux_region_ok_for_hw_watchpoint)
1161 (aarch64_linux_stopped_data_address)
1162 (aarch64_linux_stopped_by_watchpoint)
1163 (aarch64_linux_watchpoint_addr_within_range)
1164 (aarch64_linux_can_do_single_step): Refactor as methods of
1165 aarch64_linux_nat_target.
1166 (super_post_startup_inferior): Delete.
1167 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1168
1169 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1170 (the_hppa_linux_nat_target): New.
1171 (hppa_linux_fetch_inferior_registers)
1172 (hppa_linux_store_inferior_registers): Refactor as methods of
1173 hppa_linux_nat_target.
1174 (_initialize_hppa_linux_nat): Adjust to C++ification.
1175
1176 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1177 (the_ia64_linux_nat_target): New.
1178 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1179 (ia64_linux_stopped_data_address)
1180 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1181 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1182 ia64_linux_nat_target methods.
1183 (super_xfer_partial): Delete.
1184 (_initialize_ia64_linux_nat): Adjust to C++ification.
1185
1186 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1187 (the_m32r_linux_nat_target): New.
1188 (m32r_linux_fetch_inferior_registers)
1189 (m32r_linux_store_inferior_registers): Refactor as
1190 m32r_linux_nat_target methods.
1191 (_initialize_m32r_linux_nat): Adjust to C++ification.
1192
1193 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1194 (the_m68k_linux_nat_target): New.
1195 (m68k_linux_fetch_inferior_registers)
1196 (m68k_linux_store_inferior_registers): Refactor as
1197 m68k_linux_nat_target methods.
1198 (_initialize_m68k_linux_nat): Adjust to C++ification.
1199
1200 * s390-linux-nat.c (s390_linux_nat_target): New class.
1201 (the_s390_linux_nat_target): New.
1202 (s390_linux_fetch_inferior_registers)
1203 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1204 (s390_insert_watchpoint, s390_remove_watchpoint)
1205 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1206 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1207 (s390_auxv_parse, s390_read_description): Refactor as methods of
1208 s390_linux_nat_target.
1209 (_initialize_s390_nat): Adjust to C++ification.
1210
1211 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1212 (the_sparc_linux_nat_target): New.
1213 (_initialize_sparc_linux_nat): Adjust to C++ification.
1214 * sparc-nat.c (sparc_fetch_inferior_registers)
1215 (sparc_store_inferior_registers): Remove target_ops parameter.
1216 * sparc-nat.h (sparc_fetch_inferior_registers)
1217 (sparc_store_inferior_registers): Remove target_ops parameter.
1218 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1219 (the_sparc64_linux_nat_target): New.
1220 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1221
1222 * spu-linux-nat.c (spu_linux_nat_target): New class.
1223 (the_spu_linux_nat_target): New.
1224 (spu_child_post_startup_inferior, spu_child_post_attach)
1225 (spu_child_wait, spu_fetch_inferior_registers)
1226 (spu_store_inferior_registers, spu_xfer_partial)
1227 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1228 methods.
1229 (_initialize_spu_nat): Adjust to C++ification.
1230
1231 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1232 (the_tilegx_linux_nat_target): New.
1233 (fetch_inferior_registers, store_inferior_registers):
1234 Refactor as methods.
1235 (_initialize_tile_linux_nat): Adjust to C++ification.
1236
1237 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1238 (the_xtensa_linux_nat_target): New.
1239 (xtensa_linux_fetch_inferior_registers)
1240 (xtensa_linux_store_inferior_registers): Refactor as
1241 xtensa_linux_nat_target methods.
1242 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1243
1244 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1245 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1246 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1247 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1248 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1249 (fbsd_stopped_by_sw_breakpoint)
1250 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1251 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1252 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1253 (fbsd_post_startup_inferior, fbsd_post_attach)
1254 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1255 (fbsd_set_syscall_catchpoint)
1256 (super_xfer_partial, super_resume, super_wait)
1257 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1258 (fbsd_handle_debug_trap): Remove target_ops parameter.
1259 (fbsd_nat_add_target): Delete.
1260 * fbsd-nat.h: Include "inf-ptrace.h".
1261 (fbsd_nat_add_target): Delete.
1262 (USE_SIGTRAP_SIGINFO): Define.
1263 (fbsd_nat_target): New class.
1264
1265 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1266 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1267 (amd64bsd_target): Delete.
1268 * amd64-bsd-nat.h: New file.
1269 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1270 "x86-bsd-nat.h".
1271 (amd64_fbsd_nat_target): New class.
1272 (the_amd64_fbsd_nat_target): New.
1273 (amd64fbsd_read_description): Refactor as method of
1274 amd64_fbsd_nat_target.
1275 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1276 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1277 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1278 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1279 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1280 (i386bsd_target): Delete.
1281 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1282 (i386bsd_fetch_inferior_registers)
1283 (i386bsd_store_inferior_registers): Declare.
1284 (i386_bsd_nat_target): New class.
1285 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1286 (the_i386_fbsd_nat_target): New.
1287 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1288 i386_fbsd_nat_target methods.
1289 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1290 (_initialize_i386fbsd_nat): Adjust to C++ification.
1291 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1292 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1293 (_initialize_x86_bsd_nat): Adjust to C++ification.
1294 * x86-bsd-nat.h: Include "x86-nat.h".
1295 (x86bsd_target): Delete declaration.
1296 (x86bsd_nat_target): New class.
1297
1298 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1299 (the_aarch64_fbsd_nat_target): New.
1300 (aarch64_fbsd_fetch_inferior_registers)
1301 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1302 aarch64_fbsd_nat_target.
1303 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1304 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1305 (the_alpha_bsd_nat_target): New.
1306 (alphabsd_fetch_inferior_registers)
1307 (alphabsd_store_inferior_registers): Refactor as
1308 alpha_bsd_nat_target methods.
1309 (_initialize_alphabsd_nat): Refactor as methods of
1310 alpha_bsd_nat_target.
1311 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1312 (the_amd64_nbsd_nat_target): New.
1313 (_initialize_amd64nbsd_nat): Adjust to C++ification.
1314 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1315 (the_amd64_obsd_nat_target): New.
1316 (_initialize_amd64obsd_nat): Adjust to C++ification.
1317 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1318 (the_arm_fbsd_nat_target): New.
1319 (arm_fbsd_fetch_inferior_registers)
1320 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1321 (_initialize_arm_fbsd_nat): Refactor as methods of
1322 arm_fbsd_nat_target.
1323 (_initialize_arm_fbsd_nat): Adjust to C++ification.
1324 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1325 (the_arm_netbsd_nat_target): New.
1326 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1327 arm_netbsd_nat_target.
1328 (_initialize_arm_netbsd_nat): Adjust to C++ification.
1329 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1330 (the_hppa_nbsd_nat_target): New.
1331 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1332 hppa_nbsd_nat_target methods.
1333 (_initialize_hppanbsd_nat): Adjust to C++ification.
1334 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1335 (the_hppa_obsd_nat_target): New.
1336 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1337 methods of hppa_obsd_nat_target.
1338 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
1339 add_target.
1340 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1341 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
1342 add_target.
1343 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1344 (_initialize_i386obsd_nat): Use add_target.
1345 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1346 (the_m68k_bsd_nat_target): New.
1347 (m68kbsd_fetch_inferior_registers)
1348 (m68kbsd_store_inferior_registers): Refactor as methods of
1349 m68k_bsd_nat_target.
1350 (_initialize_m68kbsd_nat): Adjust to C++ification.
1351 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1352 (the_mips_fbsd_nat_target): New.
1353 (mips_fbsd_fetch_inferior_registers)
1354 (mips_fbsd_store_inferior_registers): Refactor as methods of
1355 mips_fbsd_nat_target.
1356 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1357 add_target.
1358 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1359 (the_mips_nbsd_nat_target): New.
1360 (mipsnbsd_fetch_inferior_registers)
1361 (mipsnbsd_store_inferior_registers): Refactor as methods of
1362 mips_nbsd_nat_target.
1363 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1364 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1365 (the_mips64_obsd_nat_target): New.
1366 (mips64obsd_fetch_inferior_registers)
1367 (mips64obsd_store_inferior_registers): Refactor as methods of
1368 mips64_obsd_nat_target.
1369 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1370 add_target.
1371 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1372 nbsd_nat_target.
1373 * nbsd-nat.h: Include "inf-ptrace.h".
1374 (nbsd_nat_target): New class.
1375 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1376 (obsd_wait): Refactor as methods of obsd_nat_target.
1377 (obsd_add_target): Delete.
1378 * obsd-nat.h: Include "inf-ptrace.h".
1379 (obsd_nat_target): New class.
1380 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1381 (the_ppc_fbsd_nat_target): New.
1382 (ppcfbsd_fetch_inferior_registers)
1383 (ppcfbsd_store_inferior_registers): Refactor as methods of
1384 ppc_fbsd_nat_target.
1385 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1386 add_target.
1387 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1388 (the_ppc_nbsd_nat_target): New.
1389 (ppcnbsd_fetch_inferior_registers)
1390 (ppcnbsd_store_inferior_registers): Refactor as methods of
1391 ppc_nbsd_nat_target.
1392 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1393 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1394 (the_ppc_obsd_nat_target): New.
1395 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1396 methods of ppc_obsd_nat_target.
1397 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1398 add_target.
1399 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1400 (the_sh_nbsd_nat_target): New.
1401 (shnbsd_fetch_inferior_registers)
1402 (shnbsd_store_inferior_registers): Refactor as methods of
1403 sh_nbsd_nat_target.
1404 (_initialize_shnbsd_nat): Adjust to C++ification.
1405 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1406 (inf_ptrace_xfer_partial): Delete.
1407 (sparc_xfer_partial, sparc_target): Delete.
1408 * sparc-nat.h (sparc_fetch_inferior_registers)
1409 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1410 (sparc_target): Delete function declaration.
1411 (sparc_target): New template class.
1412 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1413 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1414 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1415 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1416 add_target.
1417 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1418 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1419 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1420 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
1421 add_target.
1422 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1423 (the_vax_bsd_nat_target): New.
1424 (vaxbsd_fetch_inferior_registers)
1425 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1426 methods.
1427 (_initialize_vaxbsd_nat): Adjust to C++ification.
1428
1429 * bsd-kvm.c (bsd_kvm_target): New class.
1430 (bsd_kvm_ops): Now a bsd_kvm_target.
1431 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1432 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1433 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1434 bsd_kvm_target.
1435 (bsd_kvm_return_one): Delete.
1436 (bsd_kvm_add_target): Adjust to C++ification.
1437
1438 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1439 (nto_procfs_target_procfs): New classes.
1440 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1441 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1442 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1443 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1444 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1445 (procfs_remove_hw_breakpoint, procfs_resume)
1446 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1447 (procfs_kill_inferior, procfs_store_registers)
1448 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1449 as methods of nto_procfs_target.
1450 (nto_procfs_ops): Now an nto_procfs_target_procfs.
1451 (nto_native_ops): Delete.
1452 (procfs_open, procfs_native_open): Delete.
1453 (nto_native_ops): Now an nto_procfs_target_native.
1454 (init_procfs_targets): Adjust to C++ification.
1455 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1456 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1457 Refactor as methods of nto_procfs_target.
1458
1459 * go32-nat.c (go32_nat_target): New class.
1460 (the_go32_nat_target): New.
1461 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1462 (go32_store_registers, go32_xfer_partial, go32_files_info)
1463 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1464 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1465 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1466 (go32_pid_to_str): Refactor as methods of go32_nat_target.
1467 (go32_target): Delete.
1468 (_initialize_go32_nat): Adjust to C++ification.
1469
1470 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1471 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1472 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1473 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1474 gnu_nat_target.
1475 (gnu_target): Delete.
1476 * gnu-nat.h (gnu_target): Delete.
1477 (gnu_nat_target): New class.
1478 * i386-gnu-nat.c (gnu_base_target): New.
1479 (i386_gnu_nat_target): New class.
1480 (the_i386_gnu_nat_target): New.
1481 (_initialize_i386gnu_nat): Adjust to C++ification.
1482
3fffc070
PA
14832018-05-02 Pedro Alves <palves@redhat.com>
1484
1485 * bfd-target.c (target_bfd_xclose): Rename to ...
1486 (target_bfd_close): ... this.
1487 (target_bfd_reopen): Adjust.
1488 * target.c (target_close): Remove references to to_xclose.
1489 * target.h (target_ops::to_xclose): Delete.
1490 (target_ops::to_close): Update comments.
1491
6798487f
PA
14922018-05-02 Pedro Alves <palves@redhat.com>
1493
1494 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1495 "linux-nat.h".
1496 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1497 * inf-ptrace.c (inf_ptrace_register_u_offset)
1498 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1499 (inf_ptrace_store_register, inf_ptrace_store_registers)
1500 (inf_ptrace_trad_target): Move to ...
1501 * linux-nat-trad.c: ... this new file.
1502 * linux-nat-trad.h: New file.
1503 * linux-nat.c (linux_target_install_ops): Make extern.
1504 (linux_trad_target): Delete.
1505 * linux-nat.h (linux_trad_target): Delete declaration.
1506 (linux_target_install_ops): Declare.
1507 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1508 "linux-nat.h".
1509
c1955e17
PA
15102018-05-02 Pedro Alves <palves@redhat.com>
1511
1512 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1513 procfs_target/add_target here.
1514 * procfs.c (procfs_target): Make static.
1515 (_initialize_procfs): Call add_target here.
1516 * procfs.h (struct target_ops): Remove forward declaration.
1517 (procfs_target): Remove declaration.
1518 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1519
b5c8fcb1
PA
15202018-05-02 Pedro Alves <palves@redhat.com>
1521
1522 * procfs.c (procfs_stopped_by_watchpoint)
1523 (procfs_insert_watchpoint, procfs_remove_watchpoint)
1524 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1525 Forward declare.
1526 (procfs_use_watchpoints): Delete, move contents...
1527 (procfs_target): ... here.
1528 * procfs.h (procfs_use_watchpoints): Delete declaration.
1529 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1530 procfs_use_watchpoints.
1531 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1532 procfs_use_watchpoints.
1533
0489430a
TT
15342018-05-02 Tom Tromey <tom@tromey.com>
1535
1536 PR python/20084:
1537 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1538 and var_zuinteger_unlimited.
1539 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1540 and PARAM_ZUINTEGER_UNLIMITED.
1541 (set_parameter_value): Handle var_zuinteger and
1542 var_zuinteger_unlimited.
1543 (add_setshow_generic): Likewise.
1544 (parmpy_init): Likewise.
1545
1632f8ba
DR
15462018-04-28 Dan Robertson <danlrobertson89@gmail.com>
1547
1548 PR rust/23124
1549 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1550 pointer is not null before dereferencing it.
1551
76761936
TT
15522018-04-30 Tom Tromey <tom@tromey.com>
1553
1554 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1555 is_mi_like_p.
1556
2d33446d
TT
15572018-04-30 Tom Tromey <tom@tromey.com>
1558
1559 * breakpoint.c (mention): Remove use of is_mi_like_p.
1560 (print_mention_ranged_breakpoint): Likewise.
1561 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1562 of is_mi_like_p.
1563
f3c6abab
TT
15642018-04-30 Tom Tromey <tom@tromey.com>
1565
1566 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1567
40c03530
TT
15682018-04-30 Tom Tromey <tom@tromey.com>
1569
1570 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1571 (info_spu_event_command): Remove some uses of is_mi_like_p.
1572
2038b7fd
TT
15732018-04-30 Tom Tromey <tom@tromey.com>
1574
1575 * python/py-framefilter.c (py_print_single_arg)
1576 (enumerate_locals, py_print_args, py_print_frame): Remove some
1577 uses of is_mi_like_p.
1578
4904c3c6
TT
15792018-04-30 Tom Tromey <tom@tromey.com>
1580
1581 * ui-out.c: Update.
1582 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1583 * ui-out.h (ui_out::is_mi_like_p): Now const.
1584 (ui_out::do_is_mi_like_p): Now const.
1585 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1586
7c66fffc
TT
15872018-04-30 Tom Tromey <tom@tromey.com>
1588
1589 * varobj.c (varobj_set_visualizer): Use new_reference.
1590 * python/python.c (gdbpy_decode_line): Use new_reference.
1591 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1592 new_reference.
1593
bbfa6f00
TT
15942018-04-30 Tom Tromey <tom@tromey.com>
1595
1596 * varobj.c (install_new_value): Use new_reference.
1597 * value.h (value_incref): Return void. Swap intro comment with
1598 value_decref.
1599 * value.c (set_value_parent): Use new_reference.
1600 (value_incref): Return void. Update intro comment.
1601 (release_value): Use new_reference.
1602 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1603
1831a9f9
TT
16042018-04-30 Tom Tromey <tom@tromey.com>
1605
1606 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1607 * gdb_bfd.h (new_bfd_ref): Remove.
1608 (gdb_bfd_open): Update comment.
1609 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1610 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1611 (gdb_bfd_fdopenr): Use new_reference.
1612 * exec.c (exec_file_attach): Use new_reference.
1613
7c1b5f3d
TT
16142018-04-30 Tom Tromey <tom@tromey.com>
1615
1616 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1617 method.
1618
e11fb955
TT
16192018-04-30 Tom Tromey <tom@tromey.com>
1620
1621 * jit.c (jit_read_code_entry): Use type_align.
1622 * i386-tdep.c (i386_gdbarch_init): Don't call
1623 set_gdbarch_long_long_align_bit.
1624 * gdbarch.sh: Remove long_long_align_bit.
1625 * gdbarch.c, gdbarch.h: Rebuild.
1626 * arc-tdep.c (arc_type_align): New function.
1627 (arc_gdbarch_init): Use arc_type_align. Don't call
1628 set_gdbarch_long_long_align_bit.
1629
2fff16dd
TT
16302018-04-30 Tom Tromey <tom@tromey.com>
1631
1632 * rust-lang.c (rust_type_alignment): Remove.
1633 (rust_composite_type): Use type_align.
1634
6d7bb824
TT
16352018-04-30 Tom Tromey <tom@tromey.com>
1636
1637 * NEWS: Mention Type.align.
1638 * python/py-type.c (typy_get_alignof): New function.
1639 (type_object_getset): Add "alignof".
1640
007e1530
TT
16412018-04-30 Tom Tromey <tom@tromey.com>
1642
1643 PR exp/17095:
1644 * NEWS: Update.
1645 * std-operator.def (UNOP_ALIGNOF): New operator.
1646 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1647 New.
1648 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1649 * c-lang.c (c_op_print_tab): Add alignof.
1650 * c-exp.y (ALIGNOF): New token.
1651 (exp): Add "ALIGNOF" production.
1652 (ident_tokens): Add _Alignof and alignof.
1653
2b4424c3
TT
16542018-04-30 Tom Tromey <tom@tromey.com>
1655
1656 * i386-tdep.c (i386_type_align): New function.
1657 (i386_gdbarch_init): Update.
1658 * gdbarch.sh (type_align): New method.
1659 * gdbarch.c, gdbarch.h: Rebuild.
1660 * arch-utils.h (default_type_align): Declare.
1661 * arch-utils.c (default_type_align): New function.
1662 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1663 (struct type) <align_log2>: New field.
1664 <instance_flags>: Now a bitfield.
1665 (TYPE_RAW_ALIGN): New macro.
1666 (type_align, type_raw_align, set_type_align): Declare.
1667 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1668 functions.
1669 * dwarf2read.c (quirk_rust_enum): Set type alignment.
1670 (get_alignment, maybe_set_alignment): New functions.
1671 (read_structure_type, read_enumeration_type, read_array_type)
1672 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1673 (read_subrange_type, read_base_type): Set type alignment.
1674
d33bc52e
SM
16752018-04-30 Simon Marchi <simon.marchi@ericsson.com>
1676
1677 * dwarf2read.c (read_index_from_section): Use bool.
1678
e28b63a9
FG
16792018-04-29 Fabian Groffen <grobian@gentoo.org>
1680
1681 PR gdb/22950
1682 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1683 with #ifdef.
1684
cd8c76e4
JR
16852018-04-29 John Reiser <jreiser@BitWagon.com>
1686
1687 PR build/22873
1688 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1689 last step, and do it atomically.
1690
476d250e
AO
16912018-04-27 Alexandre Oliva <aoliva@redhat.com>
1692
1693 * compile/compile-c-types.c (convert_int, convert_float):
1694 Update for C FE v1.
1695
6873858b
TT
16962018-04-27 Tom Tromey <tom@tromey.com>
1697
1698 PR rust/22545:
1699 * rust-lang.c (rust_inclusive_range_type_p): New function.
1700 (rust_range): Handle inclusive ranges.
1701 (rust_compute_range): Likewise.
1702 * rust-exp.y (struct rust_op) <inclusive>: New field.
1703 (DOTDOTEQ): New constant.
1704 (range_expr): Add "..=" productions.
1705 (operator_tokens): Add "..=" token.
1706 (ast_range): Add "inclusive" parameter.
1707 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1708 ranges.
1709 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1710 bounds values.
1711 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1712 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1713 Update comments.
1714 * expprint.c (print_subexp_standard): Handle new bounds values.
1715 (dump_subexp_body_standard): Likewise.
1716
632e107b
TT
17172018-04-27 Tom Tromey <tom@tromey.com>
1718
1719 * configure: Rebuild.
1720 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1721 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1722 "OVERRIDE".
1723 (class symbol_needs_eval_context): Likewise.
1724 * dwarf2read.c (mock_mapped_index::symbol_name_count)
1725 (mock_mapped_index::symbol_name_at): Use "override". Remove
1726 "virtual".
1727 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1728 "override".
1729 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1730 * aarch64-tdep.c (instruction_reader::read): Use "override".
1731 (instruction_reader_test::read): Likewise.
1732 * arm-tdep.c (instruction_reader::read): Use "override".
1733 (instruction_reader_thumb::read): Likewise.
1734
b75abf5b
AK
17352018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
1736
1737 PR remote/9665
1738 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1739 instead of remote_send.
1740 (remote_send): Remove.
1741
79188d8d
PA
17422018-04-26 Pedro Alves <palves@redhat.com>
1743
1744 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1745 find_function_start_sal instead of find_pc_line.
1746
f50776aa
PA
17472018-04-26 Pedro Alves <palves@redhat.com>
1748
1749 * breakpoint.c (set_breakpoint_location_function): Handle
1750 mst_data_gnu_ifunc.
1751 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1752 * elfread.c (elf_symtab_read): Give data symbols with
1753 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1754 (elf_rel_plt_read): Update comment.
1755 * linespec.c (convert_linespec_to_sals): Handle
1756 mst_data_gnu_ifunc.
1757 (minsym_found): Handle mst_data_gnu_ifunc.
1758 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1759 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1760 * parse.c (find_minsym_type_and_address): Handle
1761 mst_data_gnu_ifunc.
1762 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1763 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1764 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1765 comment.
1766 <mst_data_gnu_ifunc>: New enumerator.
1767
20944a6e
PA
17682018-04-26 Pedro Alves <palves@redhat.com>
1769
1770 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1771 (lookup_minimal_symbol_by_pc_section): ... this. Replace
1772 'want_trampoline' parameter by a lookup_msym_prefer parameter.
1773 Handle it.
1774 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1775 (lookup_minimal_symbol_by_pc): Adjust.
1776 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1777 (lookup_solib_trampoline_symbol_by_pc): Adjust.
1778 * minsyms.h (lookup_msym_prefer): New enum.
1779 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1780 parameter by a lookup_msym_prefer parameter.
1781
1adeb822
PA
17822018-04-26 Pedro Alves <palves@redhat.com>
1783
1784 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1785 ends in "@plt" instead of looking at the symbol's section.
1786
a0aca7b0
PA
17872018-04-26 Pedro Alves <palves@redhat.com>
1788
1789 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
1790 all references.
1791 (find_pc_partial_function_gnu_ifunc): Rename to ...
1792 (find_pc_partial_function): ... this, and remove references to
1793 'is_gnu_ifunc_p'.
1794 (find_pc_partial_function): Delete old implementation.
1795 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1796
76af0f26
PA
17972018-04-26 Pedro Alves <palves@redhat.com>
1798
1799 * linespec.c (struct bound_minimal_symbol_search_key): New.
1800 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
1801 skip first line if we found a GNU ifunc minimal symbol by name.
1802 (compare_msymbols): Change parameters to work with a destructured
1803 lhs minsym.
1804 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1805 functions.
1806
3467ec66
PA
18072018-04-26 Pedro Alves <palves@redhat.com>
1808
1809 * breakpoint.c (set_breakpoint_location_function): Don't resolve
1810 ifunc targets here. Instead, if we have an ifunc minsym, use its
1811 address/name.
1812 (add_location_to_breakpoint): Store the minsym and the objfile in
1813 the breakpoint location.
1814 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1815 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1816 Record the minsym in the sal.
1817 * symtab.h (symtab_and_line) <msymbol>: New field.
1818
28f4fa4d
PA
18192018-04-26 Pedro Alves <palves@redhat.com>
1820
1821 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1822 unless we actually resolved the ifunc.
1823
ca31ab1d
PA
18242018-04-26 Pedro Alves <palves@redhat.com>
1825
1826 * c-exp.y (variable production): Prefer ifunc minsyms over
1827 regular function symbols.
1828 * symtab.c (find_gnu_ifunc): New function.
1829 * minsyms.h (lookup_msym_prefer): New enum.
1830 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1831 parameter by a lookup_msym_prefer parameter.
1832 * symtab.h (find_gnu_ifunc): New declaration.
1833
8388016d
PA
18342018-04-26 Pedro Alves <palves@redhat.com>
1835
1836 * blockframe.c (find_gnu_ifunc_target_type): New function.
1837 (find_function_type): New.
1838 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1839 return a value with a memory address.
1840 (eval_call): For calls to GNU ifunc functions, try to find the
1841 type of the target function from the type that the resolver
1842 returns.
1843 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
1844 symbols.
1845 * infcall.c (find_function_return_type): Delete.
1846 (find_function_addr): Add 'function_type' parameter. For calls to
1847 GNU ifunc functions, try to find the type of the target function
1848 from the type that the resolver returns, and return it via
1849 FUNCTION_TYPE.
1850 (call_function_by_hand_dummy): Adjust to use the function type
1851 returned by find_function_addr.
1852 (find_function_addr): Add 'function_type' parameter and move
1853 description here.
1854 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
1855 declarations.
1856
a376e11d
PA
18572018-04-26 Pedro Alves <palves@redhat.com>
1858
1859 * c-exp.y (variable production): Skip finding an alias for ifunc
1860 symbols.
1861
02e169e2
PA
18622018-04-26 Pedro Alves <palves@redhat.com>
1863
1864 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
1865
249b5733
PA
18662018-04-25 Pedro Alves <palves@redhat.com>
1867
1868 * infcmd.c (kill_command): Print the pid as string, not the whole
1869 thread's ptid. Add comment. s/has been killed/killed/ in output
1870 message.
1871 * remote.c (remote_detach_1): Print the pid as string, not the
1872 whole thread's ptid.
1873
f67c0c91
SDJ
18742018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1875 Sergio Durigan Junior <sergiodj@redhat.com>
1876 Pedro Alves <palves@redhat.com>
1877
1878 * infcmd.c (kill_command): Print message when inferior has
1879 been killed.
1880 * inferior.c (print_inferior_events): Remove 'static'. Set as
1881 '1'.
1882 (add_inferior): Improve message printed when
1883 'print_inferior_events' is on.
1884 (exit_inferior): Remove message printed when
1885 'print_inferior_events' is on.
1886 (detach_inferior): Improve message printed when
1887 'print_inferior_events' is on.
1888 (initialize_inferiors): Use 'add_inferior_silent' to set
1889 'current_inferior_'.
1890 * inferior.h (print_inferior_events): Declare here as
1891 'extern'.
1892 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
1893 '[Detaching...]' messages when 'print_inferior_events' is on.
1894 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
1895 as prefix/suffix for messages. Remove periods. Fix erroneous
1896 'Detaching after fork from child...', replace it by '... from
1897 parent...'.
1898 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
1899 prefix/suffix when printing 'Detaching...' messages. Print
1900 them when 'print_inferior_events' is on.
1901 * remote.c (remote_detach_1): Print message when detaching
1902 from inferior and '!is_fork_parent'.
1903
e427af18
TT
19042018-04-24 Tom Tromey <tom@tromey.com>
1905
1906 * cli-out.h: Reindent.
1907
05b1d8d6
TT
19082018-04-24 Tom Tromey <tom@tromey.com>
1909
1910 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
1911 (cli_ui_out::do_field_string): Use fputs_filtered.
1912 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
1913
a95c7dab
TT
19142018-04-23 Tom Tromey <tom@tromey.com>
1915
1916 * guile/scm-frame.c (gdbscm_frame_read_var): Use
1917 gdb::unique_xmalloc_ptr.
1918
458412c3
TT
19192018-04-23 Tom Tromey <tom@tromey.com>
1920
1921 * configure: Rebuild.
1922
db86b02b
RS
19232018-04-22 Rajendra SY <rajendra.sy@gmail.com>
1924
1925 PR gdb/23095
1926 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
1927 prepare_for_testing. Set normal_bp to r_debug_state if target
1928 is bsd.
1929
00aecdcf
PA
19302018-04-21 Pedro Alves <palves@redhat.com>
1931 Rajendra SY <rajendra.sy@gmail.com>
1932
1933 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
1934 * remote.c (extended_remote_attach): In all-stop mode, mark the
1935 thread as executing.
1936
224608c3
PW
19372018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1938
1939 * thread.c (thread_apply_all_command): Fix comment.
1940 (thread_command): Fix comment.
1941
3b74854b
AH
19422018-04-10 Alan Hayward <alan.hayward@arm.com>
1943
1944 * common/tdesc.h (tdesc_create_feature): Remove xml filename
1945 parameter.
1946 * features/aarch64-core.c (create_feature_aarch64_core):
1947 Regenerate.
1948 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
1949 Likewise.
1950 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
1951 Likewise.
1952 * features/i386/32bit-avx512.c
1953 (create_feature_i386_32bit_avx512): Likewise.
1954 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
1955 Likewise.
1956 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
1957 Likewise.
1958 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
1959 Likewise.
1960 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
1961 Likewise.
1962 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
1963 Likewise.
1964 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
1965 Likewise.
1966 * features/i386/64bit-avx512.c
1967 (create_feature_i386_64bit_avx512): Likewise.
1968 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
1969 Likewise.
1970 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
1971 Likewise.
1972 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
1973 Likewise.
1974 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
1975 Likewise.
1976 * features/i386/64bit-segments.c
1977 (create_feature_i386_64bit_segments): Likewise.
1978 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
1979 Likewise.
1980 * features/i386/x32-core.c
1981 (create_feature_i386_x32_core): Likewise.
1982 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
1983 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
1984 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
1985 * target-descriptions.c: In generated code, don't pass xml
1986 filename.
1987
e98577a9
AH
19882018-04-18 Alan Hayward <alan.hayward@arm.com>
1989
1990 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
1991 (print_xml_feature::visit_post): Likewise.
1992 (print_xml_feature::visit): Likewise.
1993 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
1994 (print_xml_feature): Add new class.
1995 * regformats/regdat.sh: Null xmltarget on feature targets.
1996 * target-descriptions.c (struct target_desc): Add xmltarget.
1997 (maintenance_check_tdesc_xml_convert): Add unittest function.
1998 (tdesc_get_features_xml): Add function to get xml.
1999 (maintenance_check_xml_descriptions): Test xml generation.
2000 * xml-tdesc.c (string_read_description_xml): Add function.
2001 * xml-tdesc.h (string_read_description_xml): Add declaration.
2002
ad7fc756
AH
20032018-04-18 Alan Hayward <alan.hayward@arm.com>
2004
2005 * features/Makefile: Add feature marker to targets with new style
2006 target descriptions.
2007 * regformats/aarch64.dat: Regenerate.
2008 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2009 * regformats/i386/amd64-avx-linux.dat: Likewise.
2010 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2011 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2012 * regformats/i386/amd64-linux.dat: Likewise.
2013 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2014 * regformats/i386/amd64.dat: Likewise.
2015 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2016 * regformats/i386/i386-avx-linux.dat: Likewise.
2017 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2018 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2019 * regformats/i386/i386-linux.dat: Likewise.
2020 * regformats/i386/i386-mmx-linux.dat: Likewise.
2021 * regformats/i386/i386-mpx-linux.dat: Likewise.
2022 * regformats/i386/i386.dat: Likewise.
2023 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2024 * regformats/i386/x32-avx-linux.dat: Likewise.
2025 * regformats/i386/x32-linux.dat: Likewise.
2026 * regformats/tic6x-c62x-linux.dat: Likewise.
2027 * regformats/tic6x-c64x-linux.dat: Likewise.
2028 * regformats/tic6x-c64xp-linux.dat: Likewise.
2029 * regformats/regdat.sh: Parse feature marker.
2030
d278f585
AH
20312018-04-18 Alan Hayward <alan.hayward@arm.com>
2032
2033 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2034 (tdesc_osabi_name): Likewise.
2035 * target-descriptions.c (tdesc_architecture_name): Add new
2036 function.
2037 (tdesc_osabi_name): Likewise.
2038
eee8a18d
AH
20392018-04-18 Alan Hayward <alan.hayward@arm.com>
2040
2041 * common/tdesc.c (tdesc_predefined_type): Move to here.
2042 (tdesc_named_type): Likewise.
2043 (tdesc_create_vector): Likewise.
2044 (tdesc_create_struct): Likewise.
2045 (tdesc_set_struct_size): Likewise.
2046 (tdesc_create_union): Likewise.
2047 (tdesc_create_flags): Likewise.
2048 (tdesc_create_enum): Likewise.
2049 (tdesc_add_field): Likewise.
2050 (tdesc_add_typed_bitfield): Likewise.
2051 (tdesc_add_bitfield): Likewise.
2052 (tdesc_add_flag): Likewise.
2053 (tdesc_add_enum_value): Likewise.
2054 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2055 (struct tdesc_type_vector): Likewise.
2056 (struct tdesc_type_field): Likewise.
2057 (struct tdesc_type_with_fields): Likewise.
2058 (tdesc_create_enum): Add declaration.
2059 (tdesc_add_typed_bitfield): Likewise.
2060 (tdesc_add_enum_value): Likewise.
2061 * target-descriptions.c (tdesc_type_field): Move from here.
2062 (tdesc_type_builtin): Likewise.
2063 (tdesc_type_vector): Likewise.
2064 (tdesc_type_with_fields): Likewise.
2065 (tdesc_predefined_types): Likewise.
2066 (tdesc_named_type): Likewise.
2067 (tdesc_create_vector): Likewise.
2068 (tdesc_create_struct): Likewise.
2069 (tdesc_set_struct_size): Likewise.
2070 (tdesc_create_union): Likewise.
2071 (tdesc_create_flags): Likewise.
2072 (tdesc_create_enum): Likewise.
2073 (tdesc_add_field): Likewise.
2074 (tdesc_add_typed_bitfield): Likewise.
2075 (tdesc_add_bitfield): Likewise.
2076 (tdesc_add_flag): Likewise.
2077 (tdesc_add_enum_value): Likewise.
2078 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2079 (tdesc_add_typed_bitfield): Likewise.
2080 (tdesc_add_enum_value): Likewise.
2081
82ec9bc7
AH
20822018-04-18 Alan Hayward <alan.hayward@arm.com>
2083
2084 * common/tdesc.c (tdesc_feature::accept): Move to here.
2085 (tdesc_feature::operator==): Likewise.
2086 (tdesc_create_reg): Likewise.
2087 * common/tdesc.h (tdesc_type_kind): Likewise.
2088 (struct tdesc_type): Likewise.
2089 (struct tdesc_feature): Likewise.
2090 * regformats/regdat.sh: Create a feature.
2091 * target-descriptions.c (tdesc_type_kind): Move from here.
2092 (tdesc_type): Likewise.
2093 (tdesc_type_up): Likewise.
2094 (tdesc_feature): Likewise.
2095 (tdesc_create_reg): Likewise.
2096
ea3e7d71
AH
20972018-04-18 Alan Hayward <alan.hayward@arm.com>
2098
2099 * Makefile.in: Add arch/tdesc.c
2100 * common/tdesc.c: New file.
2101 * common/tdesc.h (tdesc_element_visitor): Move to here.
2102 (tdesc_element): Likewise.
2103 (tdesc_reg): Likewise.
2104 (tdesc_reg_up): Likewise.
2105 * regformats/regdef.h (reg): Add offset to constructors.
2106 * target-descriptions.c (tdesc_element_visitor): Move from here.
2107 (tdesc_element): Likewise.
2108 (tdesc_reg): Likewise.
2109 (tdesc_reg_up): Likewise.
2110
bedda9ac
TT
21112018-04-17 Tom Tromey <tom@tromey.com>
2112
2113 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2114 discriminant field.
2115
a037790e
TT
21162018-04-17 Tom Tromey <tom@tromey.com>
2117
2118 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2119
c7dcbf88
AA
21202018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2121
2122 * symtab.c (print_symbol_info): Skip printing filename and line
2123 number when `last' is NULL.
2124 (symtab_symbol_info): Use empty string instead of NULL for first
2125 invocation of print_symbol_info.
2126 (rbreak_command): Pass NULL to `last' parameter of
2127 print_symbol_info.
2128
07d28c77
SM
21292018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2130
2131 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2132 instead of nullptr.
2133
8a3de5e1
PA
21342018-04-16 Pedro Alves <palves@redhat.com>
2135
2136 * MAINTAINERS (sh): Remove.
2137 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2138 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2139 (ALLDEPFILES): Remove sh64-tdep.c.
2140 * NEWS: Mentions that support for SH-5/SH64 is removed.
2141 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2142 (sh*-*-openbsd*): Ditto.
2143 (sh64-*-elf*): Remove.
2144 (sh*): Remove.
2145 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2146 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2147 * sh-tdep.c: No longer include "sh64-tdep.h".
2148 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2149 * sh64-tdep.c, sh64-tdep.h: Remove files.
2150
a2a79012
PA
21512018-04-16 Pedro Alves <palves@redhat.com>
2152
2153 * MAINTAINERS: Remove m88k.
2154 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2155 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2156 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2157 * NEWS: Mention that support for m88k was removed.
2158 * configure.host (m88*-*-*): Remove support.
2159 * configure.nat (m88k-*-*): Remove support.
2160 * configure.tgt (m88*-*-openbsd*): Remove.
2161 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2162
eda4efb1
SM
21632018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2164
2165 * configure.tgt (x86_tobjs): New variable.
2166 (amd64_tobjs, i386_tobjs): Use it.
2167
b744723f
AA
21682018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2169
2170 * symtab.c (print_symbol_info): Precede the symbol definition by
2171 the line number when available.
2172 * NEWS: Advertise this enhancement.
2173
4a4495d6
MM
21742018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2175
2176 * NEWS (New options): announce set/show record btrace cpu.
2177 * btrace.c: Include record-btrace.h.
2178 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2179 the vendor is unknown.
2180 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2181 Maybe overwrite the btrace configuration's cpu.
2182 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2183 (btrace_fetch): Add cpu parameter. Update callers.
2184 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2185 Maybe overwrite the btrace configuration's cpu. Skip enabling
2186 errata workarounds if the vendor is unknown.
2187 * python/py-record-btrace.c: Include record-btrace.h.
2188 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2189 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2190 * record-btrace.c (record_btrace_cpu_state_kind): New.
2191 (record_btrace_cpu): New.
2192 (set_record_btrace_cpu_cmdlist): New.
2193 (record_btrace_get_cpu): New.
2194 (require_btrace_thread, record_btrace_info)
2195 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2196 (cmd_set_record_btrace_cpu_none): New.
2197 (cmd_set_record_btrace_cpu_auto): New.
2198 (cmd_set_record_btrace_cpu): New.
2199 (cmd_show_record_btrace_cpu): New.
2200 (_initialize_record_btrace): Initialize set/show record btrace cpu
2201 commands.
2202 * record-btrace.h (record_btrace_get_cpu): New.
2203
69f90c75
MM
22042018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2205
2206 * record.c (set_record_command): Fix typo in message.
2207
b85310e1
MM
22082018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2209
2210 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2211
1d509aa6
MM
22122018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2213
2214 * infrun.c (process_event_stop_test): Call
2215 gdbarch_in_indirect_branch_thunk.
2216 * gdbarch.sh (in_indirect_branch_thunk): New.
2217 * gdbarch.c: Regenerated.
2218 * gdbarch.h: Regenerated.
2219 * x86-tdep.h: New.
2220 * x86-tdep.c: New.
2221 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2222 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2223 (ALLDEPFILES): Add x86-tdep.c.
2224 * arch-utils.h (default_in_indirect_branch_thunk): New.
2225 * arch-utils.c (default_in_indirect_branch_thunk): New.
2226 * i386-tdep: Include x86-tdep.h.
2227 (i386_in_indirect_branch_thunk): New.
2228 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2229 function.
2230 * amd64-tdep: Include x86-tdep.h.
2231 (amd64_in_indirect_branch_thunk): New.
2232 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2233
b4be9bfd
JK
22342018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2235
2236 PR gdb/23053
2237 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2238 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2239 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2240 regression.
2241
53d7df28
TT
22422018-04-12 Tom Tromey <tom@tromey.com>
2243
2244 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2245 (rust_evaluate_subexp): Likewise.
2246
70b33f19
PA
22472018-04-12 Pedro Alves <palves@redhat.com>
2248
2249 * procfs.c (procfs_detach): Make forward declaration's prototype
2250 match definition's protototype.
2251 (proc_get_LDT_entry): Remove stale do_cleanups call.
2252
436411b1
PA
22532018-04-12 Pedro Alves <palves@redhat.com>
2254
2255 * target.h (target_ops::to_has_exited): Delete.
2256 (target_has_exited): Delete.
2257 * target-delegates.c: Regenerate.
2258
20db9c52
PA
22592018-04-11 Pedro Alves <palves@redhat.com>
2260
2261 * target.c (fileio_fh_t::t): Add comment.
2262 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2263 (target_fileio_close): Handle a NULL target.
2264 (invalidate_fileio_fh): New.
2265 (target_close): Call it.
2266 * remote.c (remote_hostio_send_command): No longer check whether
2267 remote_desc is open.
2268
5ff79300
PA
22692018-04-11 Pedro Alves <palves@redhat.com>
2270
2271 * target.c (fileio_fh_t): Make it a named struct instead of a
2272 typedef.
2273 (fileio_fh_t::is_closed): New method.
2274 (DEF_VEC_O (fileio_fh_t)): Remove.
2275 (fileio_fhandles): Now a std::vector.
2276 (is_closed_fileio_fh): Delete.
2277 (acquire_fileio_fd): Adjust. Rename parameters.
2278 (release_fileio_fd): Adjust.
2279 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2280 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2281 (target_fileio_close): Adjust.
2282
6e22e10d
SM
22832018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2284
2285 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2286 index.
2287
731f534f
PA
22882018-04-10 Pedro Alves <palves@redhat.com>
2289
2290 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2291 (scoped_finish_thread_state): New class.
2292 * infcmd.c (run_command_1): Use it instead of finish_thread_state
2293 cleanup.
2294 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2295 (fetch_inferior_event, normal_stop): Likewise.
2296 * thread.c (finish_thread_state_cleanup): Delete.
2297
d5f4488f
SM
22982018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2299 Pedro Alves <palves@redhat.com>
2300
2301 * value.c: Include "selftest.h" and "common/array-view.h".
2302 (struct range) <operator ==>: New.
2303 (test_ranges_contain): New.
2304 (check_ranges_vector): New.
2305 (test_insert_into_bit_range_vector): New.
2306 (_initialize_values): Register selftests.
2307 * common/array-view.h (operator==, operator!=): New.
2308
b24531ed
SM
23092018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2310
2311 * common/gdb_vecs.h (unordered_remove): Add overload that takes
2312 an iterator.
2313 * inline-frame.c: Include <algorithm>.
2314 (struct inline_state): Add constructor.
2315 (inline_state_s): Remove.
2316 (DEF_VEC_O(inline_state_s)): Remove.
2317 (inline_states): Change type to std::vector.
2318 (find_inline_frame_state): Adjust to std::vector.
2319 (allocate_inline_frame_state): Remove.
2320 (clear_inline_frame_state): Adjust to std::vector.
2321 (skip_inline_frames): Adjust to std::vector.
2322
c252925c
SM
23232018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2324
2325 * tracepoint.h (struct trace_state_variable): Add constructor.
2326 <name>: Change type to std::string.
2327 * tracepoint.c (tsv_s): Remove.
2328 (DEF_VEC_O(tsv_s)): Remove.
2329 (tvariables): Change to std::vector.
2330 (create_trace_state_variable): Adjust to std::vector.
2331 (find_trace_state_variable): Likewise.
2332 (find_trace_state_variable_by_number): Likewise.
2333 (delete_trace_state_variable): Likewise.
2334 (trace_variable_command): Adjust to std::string.
2335 (delete_trace_variable_command): Likewise.
2336 (tvariables_info_1): Adjust to std::vector.
2337 (save_trace_state_variables): Likewise.
2338 (start_tracing): Likewise.
2339 (merge_uploaded_trace_state_variables): Adjust to std::vector
2340 and std::string.
2341 * target.h (struct target_ops)
2342 <to_download_trace_state_variable>: Pass reference to
2343 trace_state_variable.
2344 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2345 * target-delegates.c: Re-generate.
2346 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2347 (mi_tsv_deleted): Likewise.
2348 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2349 * remote.c (remote_download_trace_state_variable): Change
2350 pointer to reference and adjust.
2351 * make-target-delegates (parse_argtypes): Handle references.
2352 (write_function_header): Likewise.
2353 (munge_type): Likewise.
2354
c9638d26
SM
23552018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2356
2357 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2358 string_view-selftests.c.
2359 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2360 testsuite.
2361 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2362 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2363 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2364 * unittests/basic_string_view/element_access/char/1.cc:
2365 Likewise.
2366 * unittests/basic_string_view/element_access/char/empty.cc:
2367 Likewise.
2368 * unittests/basic_string_view/element_access/char/front_back.cc:
2369 Likewise.
2370 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2371 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2372 Likewise.
2373 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2374 Likewise.
2375 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2376 Likewise.
2377 * unittests/basic_string_view/operations/compare/char/1.cc:
2378 Likewise.
2379 * unittests/basic_string_view/operations/compare/char/13650.cc:
2380 Likewise.
2381 * unittests/basic_string_view/operations/copy/char/1.cc:
2382 Likewise.
2383 * unittests/basic_string_view/operations/data/char/1.cc:
2384 Likewise.
2385 * unittests/basic_string_view/operations/find/char/1.cc:
2386 Likewise.
2387 * unittests/basic_string_view/operations/find/char/2.cc:
2388 Likewise.
2389 * unittests/basic_string_view/operations/find/char/3.cc:
2390 Likewise.
2391 * unittests/basic_string_view/operations/find/char/4.cc:
2392 Likewise.
2393 * unittests/basic_string_view/operations/rfind/char/1.cc:
2394 Likewise.
2395 * unittests/basic_string_view/operations/rfind/char/2.cc:
2396 Likewise.
2397 * unittests/basic_string_view/operations/rfind/char/3.cc:
2398 Likewise.
2399 * unittests/basic_string_view/operations/substr/char/1.cc:
2400 Likewise.
2401 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2402 * unittests/string_view-selftests.c: New file.
2403
fdc11678
SM
24042018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2405
2406 * unittests/basic_string_view/capacity/1.cc: New file.
2407 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2408 * unittests/basic_string_view/cons/char/1.cc: New file.
2409 * unittests/basic_string_view/cons/char/2.cc: New file.
2410 * unittests/basic_string_view/cons/char/3.cc: New file.
2411 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2412 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2413 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2414 * unittests/basic_string_view/element_access/char/1.cc: New file.
2415 * unittests/basic_string_view/element_access/char/2.cc: New file.
2416 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2417 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2418 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2419 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2420 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2421 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2422 * unittests/basic_string_view/include.cc: New file.
2423 * unittests/basic_string_view/inserters/char/1.cc: New file.
2424 * unittests/basic_string_view/inserters/char/2.cc: New file.
2425 * unittests/basic_string_view/inserters/char/3.cc: New file.
2426 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2427 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2428 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2429 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2430 * unittests/basic_string_view/literals/types.cc: New file.
2431 * unittests/basic_string_view/literals/values.cc: New file.
2432 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2433 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2434 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2435 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2436 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2437 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2438 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2439 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2440 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2441 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2442 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2443 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2444 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2445 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2446 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2447 * unittests/basic_string_view/operations/data/char/1.cc: New file.
2448 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2449 * unittests/basic_string_view/operations/find/char/1.cc: New file.
2450 * unittests/basic_string_view/operations/find/char/2.cc: New file.
2451 * unittests/basic_string_view/operations/find/char/3.cc: New file.
2452 * unittests/basic_string_view/operations/find/char/4.cc: New file.
2453 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2454 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2455 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2456 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2457 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2458 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2459 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2460 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2461 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2462 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2463 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2464 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2465 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2466 * unittests/basic_string_view/operators/char/2.cc: New file.
2467 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2468 * unittests/basic_string_view/range_access/char/1.cc: New file.
2469 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2470 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2471 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2472 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2473 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2474 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2475 * unittests/basic_string_view/requirements/typedefs.cc: New file.
2476 * unittests/basic_string_view/typedefs.cc: New file.
2477 * unittests/basic_string_view/types/1.cc: New file.
2478
8345c4a2
SM
24792018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2480
2481 * common/gdb_string_view.h: Remove libstdc++ implementation
2482 details, adjust to gdb reality.
2483 * common/gdb_string_view.tcc: Likewise.
2484 * cli/cli-script.c (struct string_view): Remove.
2485 (user_args) <m_args>: Change element type to gdb::string_view.
2486 (user_args::insert_args): Adjust.
2487
7adcdf08
SM
24882018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2489
2490 * common/gdb_string_view.h: New file.
2491 * common/gdb_string_view.tcc: New file.
2492
41260ac2
SM
24932018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2494
2495 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2496 * configure: Re-generate.
2497
0bee6dd4
PA
24982018-04-09 Pedro Alves <palves@redhat.com>
2499
2500 * gdbarch.sh: Include "observable.h" instead of "observer.h".
2501 (set_target_gdbarch): Call
2502 gdb::observers::architecture_changed.notify instead of
2503 observer_notify_architecture_changed.
2504
6f14adc5
SM
25052018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2506
2507 * tracepoint.c (struct current_traceframe_cleanup): Remove.
2508 (do_restore_current_traceframe_cleanup): Remove.
2509 (restore_current_traceframe_cleanup_dtor): Remove.
2510 (make_cleanup_restore_current_traceframe): Remove.
2511 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2512 New.
2513 * tracepoint.h (struct scoped_restore_current_traceframe): New.
2514 * infrun.c (fetch_inferior_event): Use
2515 scoped_restore_current_traceframe.
2516
b2bdb8cf
SM
25172018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2518
2519 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2520 Remove.
2521 <n_allocated_type_units>: Remove.
2522 <all_type_units>: Change to std::vector.
2523 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2524 to std::vector change.
2525 (dwarf2_per_objfile::get_cutu): Likewise.
2526 (dwarf2_per_objfile::get_tu): Likewise.
2527 (create_signatured_type_table_from_index): Likewise.
2528 (create_signatured_type_table_from_debug_names): Likewise.
2529 (dw2_symtab_iter_next): Likewise.
2530 (dw2_print_stats): Likewise.
2531 (dw2_expand_all_symtabs): Likewise.
2532 (dw2_expand_marked_cus): Likewise.
2533 (dw2_debug_names_iterator::next): Likewise.
2534 (dwarf2_initialize_objfile): Likewise.
2535 (add_signatured_type_cu_to_table): Likewise.
2536 (create_all_type_units): Likewise.
2537 (add_type_unit): Likewise.
2538 (struct tu_abbrev_offset): Add constructor.
2539 (build_type_psymtabs_1): Adjust to std::vector change.
2540 (print_tu_stats): Likewise.
2541 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2542 (write_debug_names): Likewise.
2543
b76e467d
SM
25442018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2545
2546 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2547 Make an std::vector.
2548 <n_comp_units>: Remove.
2549 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2550 to std::vector change.
2551 (dwarf2_per_objfile::get_cutu): Likewise.
2552 (dwarf2_per_objfile::get_cu): Likewise.
2553 (create_cus_from_index): Likewise.
2554 (create_addrmap_from_index): Likewise.
2555 (create_addrmap_from_aranges): Likewise.
2556 (dwarf2_read_index): Likewise.
2557 (dw2_find_last_source_symtab): Likewise.
2558 (dw2_map_symtabs_matching_filename): Likewise.
2559 (dw2_symtab_iter_next): Likewise.
2560 (dw2_print_stats): Likewise.
2561 (dw2_expand_all_symtabs): Likewise.
2562 (dw2_expand_symtabs_with_fullname): Likewise.
2563 (dw2_expand_marked_cus): Likewise.
2564 (dw2_map_symbol_filenames): Likewise.
2565 (create_cus_from_debug_names): Likewise.
2566 (dwarf2_read_debug_names): Likewise.
2567 (dw2_debug_names_iterator::next): Likewise.
2568 (dwarf2_initialize_objfile): Likewise.
2569 (set_partial_user): Likewise.
2570 (dwarf2_build_psymtabs_hard): Likewise.
2571 (read_comp_units_from_section): Remove arguments, adjust to
2572 std::vector change.
2573 (create_all_comp_units): Adjust to std::vector and
2574 read_comp_units_from_section changes.
2575 (dwarf2_find_containing_comp_unit): Adjust to std::vector
2576 change.
2577 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2578 (psyms_seen_size): Likewise.
2579 (write_gdbindex): Likewise.
2580 (write_debug_names): Likewise.
2581
12359b5e
SM
25822018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2583
2584 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2585 with dwarf2_per_objfile.
2586 (create_cus_from_index): Likewise.
2587 (create_signatured_type_table_from_index): Likewise.
2588 (dwarf2_read_index): Likewise.
2589 (dwarf2_initialize_objfile): Likewise.
2590 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
2591 per_cu rather than get_dwarf2_per_objfile.
2592
ff4c9fec
SM
25932018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2594
2595 * dwarf2read.h (struct signatured_type): Forward declare.
2596 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2597 New methods.
2598 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2599 (dw2_get_cutu): ...this.
2600 (dwarf2_per_objfile::get_cu): Rename from...
2601 (dw2_get_cu): ...this.
2602 (dwarf2_per_objfile::get_tu): New.
2603 (create_addrmap_from_index): Adjust.
2604 (create_addrmap_from_aranges): Adjust.
2605 (dw2_find_last_source_symtab): Adjust.
2606 (dw2_map_symtabs_matching_filename): Adjust.
2607 (dw2_symtab_iter_next): Adjust.
2608 (dw2_print_stats): Adjust.
2609 (dw2_expand_all_symtabs): Adjust.
2610 (dw2_expand_symtabs_with_fullname): Adjust.
2611 (dw2_expand_marked_cus): Adjust.
2612 (dw_expand_symtabs_matching_file_matcher): Adjust.
2613 (dw2_map_symbol_filenames): Adjust.
2614 (dw2_debug_names_iterator::next): Adjust.
2615 (dwarf2_initialize_objfile): Adjust.
2616 (set_partial_user): Adjust.
2617 (dwarf2_build_psymtabs_hard): Adjust.
2618
5ca3fcb6
SM
26192018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2620
2621 * dwarf2read.c (create_signatured_type_table_from_debug_names):
2622 Remove unused variables.
2623 (dw2_map_symtabs_matching_filename): Likewise.
2624 (dwarf2_record_block_ranges): Likewise.
2625 (dwarf2_read_addr_index): Likewise.
2626 (follow_die_offset): Likewise.
2627
b2e586e8
SM
26282018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2629
2630 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2631 to symbol_file_add_main.
2632
7c4e78cf
SM
26332018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 PR mi/22299
2636 * mi/mi-console.c (do_fputc_async_safe): New.
2637 (mi_console_file::write_async_safe): New.
2638 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2639 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2640 New.
2641 * ui-file.c (ui_file::putstrn): Adjust call to
2642 fputstrn_unfiltered.
2643 * utils.c (printchar): Replace do_fputs and do_fprintf
2644 parameters by do_fputc.
2645 (fputstr_filtered): Adjust call to printchar.
2646 (fputstr_unfiltered): Likewise.
2647 (fputstrn_filtered): Likewise.
2648 (fputstrn_unfiltered): Add do_fputc parameter, pass to
2649 printchar.
2650 * utils.h (do_fputc_ftype): New typedef.
2651 (fputstrn_unfiltered): Add do_fputc parameter.
2652
5dc026d3
SM
26532018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2654
2655 * regformats/i386/i386-avx.dat: Remove.
2656
c912f608
SM
26572018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2658
2659 PR gdb/22979
2660 * amd64-tdep.c (amd64_none_init_abi): New function.
2661 (amd64_x32_none_init_abi): New function.
2662 (_initialize_amd64_tdep): Register handlers for x86-64 and
2663 x64_32 with GDB_OSABI_NONE.
2664 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2665 GDB_OSABI_NONE osabi.
2666
26540402
SM
26672018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2668
2669 PR gdb/22980
2670 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2671 GDB_OSABI_NONE.
2672 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2673 * osabi.c (gdb_osabi_names): Add "unknown" entry.
2674
9018be22
SM
26752018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2676
2677 * common/byte-vector.h (char_vector): New type.
2678 * target.h (target_read_alloc): Return
2679 gdb::optional<byte_vector>.
2680 (target_read_stralloc): Return gdb::optional<char_vector>.
2681 (target_get_osdata): Return gdb::optional<char_vector>.
2682 * target.c (target_read_alloc_1): Templatize. Replacement
2683 manual memory management with vector.
2684 (target_read_alloc): Change return type, adjust.
2685 (target_read_stralloc): Change return type, adjust.
2686 (target_get_osdata): Change return type, adjust.
2687 * auxv.c (struct auxv_info) <length>: Remove.
2688 <data>: Change type to gdb::optional<byte_vector>.
2689 (auxv_inferior_data_cleanup): Free auxv_info with delete.
2690 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2691 (target_auxv_search): Adjust.
2692 (fprint_target_auxv): Adjust.
2693 * avr-tdep.c (avr_io_reg_read_command): Adjust.
2694 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2695 (linux_make_corefile_notes): Adjust.
2696 * osdata.c (get_osdata): Adjust.
2697 * remote.c (remote_get_threads_with_qxfer): Adjust.
2698 (remote_memory_map): Adjust.
2699 (remote_traceframe_info): Adjust.
2700 (btrace_read_config): Adjust.
2701 (remote_read_btrace): Adjust.
2702 (remote_pid_to_exec_file): Adjust.
2703 * solib-aix.c (solib_aix_get_library_list): Adjust.
2704 * solib-dsbt.c (decode_loadmap): Don't free buf.
2705 (dsbt_get_initial_loadmaps): Adjust.
2706 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2707 * solib-target.c (solib_target_current_sos): Adjust.
2708 * tracepoint.c (sdata_make_value): Adjust.
2709 * xml-support.c (xinclude_start_include): Adjust.
2710 (xml_fetch_content_from_file): Adjust.
2711 * xml-support.h (xml_fetch_another): Change return type.
2712 (xml_fetch_content_from_file): Change return type.
2713 * xml-syscall.c (xml_init_syscalls_info): Adjust.
2714 * xml-tdesc.c (file_read_description_xml): Adjust.
2715 (fetch_available_features_from_target): Change return type.
2716 (target_fetch_description_xml): Adjust.
2717 (target_read_description_xml): Adjust.
2718
14c88955
TT
27192018-04-06 Tom Tromey <tom@tromey.com>
2720
2721 * value.c (~value): Update.
2722 (struct value) <contents>: Now unique_xmalloc_ptr.
2723 (value_contents_bits_eq, allocate_value_contents)
2724 (value_contents_raw, value_contents_all_raw)
2725 (value_contents_for_printing, value_contents_for_printing_const)
2726 (set_value_enclosing_type): Update.
2727
0c7e6dd8
TT
27282018-04-06 Tom Tromey <tom@tromey.com>
2729
2730 * value.c (range_s): Remove typedef, VEC.
2731 (struct range): Add operator<.
2732 (range_lessthan): Remove.
2733 (ranges_contain): Change type.
2734 (~value): Update.
2735 (struct value) <unavailable, optimized_out>: Now std::vector.
2736 (value_entirely_available)
2737 (value_entirely_covered_by_range_vector)
2738 (value_entirely_unavailable, value_entirely_optimized_out):
2739 Update.
2740 (insert_into_bit_range_vector): Change argument type.
2741 (find_first_range_overlap): Likewise.
2742 (struct ranges_and_idx, value_contents_bits_eq)
2743 (require_not_optimized_out, require_available): Update.
2744 (ranges_copy_adjusted): Change argument types.
2745 (value_optimized_out, value_copy, value_fetch_lazy): Update.
2746
2c8331b9
TT
27472018-04-06 Tom Tromey <tom@tromey.com>
2748
2749 * value.c (~value): Update.
2750 (struct value) <parent>: Now a value_ref_ptr.
2751 (value_parent, set_value_parent, value_address, value_copy):
2752 Update.
2753
466ce3ae
TT
27542018-04-06 Tom Tromey <tom@tromey.com>
2755
2756 * value.c (struct value): Add constructor, destructor, and member
2757 initializers.
2758 (allocate_value_lazy, value_decref): Update.
2759
062d818d
TT
27602018-04-06 Tom Tromey <tom@tromey.com>
2761
2762 * value.c (struct value) <released, next>: Remove.
2763 (all_values): Now a std::vector.
2764 (allocate_value_lazy): Update.
2765 (value_next): Remove.
2766 (value_mark, value_free_to_mark, release_value)
2767 (value_release_to_mark): Update.
2768
a6535de1
TT
27692018-04-06 Tom Tromey <tom@tromey.com>
2770
2771 * value.h (fetch_subexp_value, value_release_to_mark): Update.
2772 (free_value_chain): Remove.
2773 * value.c (free_value_chain): Remove.
2774 (value_release_to_mark): Return a std::vector.
2775 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2776 std::vector.
2777 (check_condition): Update.
2778 * eval.c (fetch_subexp_value): Change "val_chain" to a
2779 std::vector.
2780 * breakpoint.c (update_watchpoint): Update.
2781 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2782
b5621201
TT
27832018-04-06 Tom Tromey <tom@tromey.com>
2784
2785 * value.h (free_all_values): Remove.
2786 * value.c (free_all_values): Remove.
2787
4d0266a0
TT
27882018-04-06 Tom Tromey <tom@tromey.com>
2789
2790 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2791 (value_history_chain, value_history_count): Remove.
2792 (value_history): New global.
2793 (record_latest_value, access_value_history, show_values)
2794 (preserve_values): Update.
2795
b4d61099
TT
27962018-04-06 Tom Tromey <tom@tromey.com>
2797
2798 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2799 * varobj.c (varobj_set_display_format, varobj_set_value)
2800 (install_default_visualizer, construct_visualizer)
2801 (install_new_value, ~varobj, varobj_get_value_type)
2802 (my_value_of_variable, varobj_editable_p): Update.
2803 * c-varobj.c (c_describe_child, c_value_of_variable)
2804 (cplus_number_of_children, cplus_describe_child): Update.
2805 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2806 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2807 (ada_value_of_variable, ada_value_is_changeable_p): Update.
2808
9b558729
TT
28092018-04-06 Tom Tromey <tom@tromey.com>
2810
2811 * printcmd.c (last_examine_address): Change type to
2812 value_ref_ptr.
2813 (do_examine, x_command): Update.
2814
850645cf
TT
28152018-04-06 Tom Tromey <tom@tromey.com>
2816
2817 * value.c (release_value): Update.
2818 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2819 (struct bpstats) <val>: Now a value_ref_ptr.
2820 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2821 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2822 (~watchpoint, print_it_watchpoint, watch_command_1)
2823 (invalidate_bp_value_on_memory_change): Update.
2824
22bc8444
TT
28252018-04-06 Tom Tromey <tom@tromey.com>
2826
2827 * varobj.c (varobj_clear_saved_item)
2828 (update_dynamic_varobj_children, install_new_value, ~varobj):
2829 Update.
2830 * value.h (value_incref): Move declaration earlier.
2831 (value_decref): Rename from value_free.
2832 (struct value_ref_policy): New.
2833 (value_ref_ptr): New typedef.
2834 (struct value_deleter): Remove.
2835 (gdb_value_up): Remove typedef.
2836 (release_value): Change return type.
2837 (release_value_or_incref): Remove.
2838 * value.c (set_value_parent): Update.
2839 (value_incref): Change return type.
2840 (value_decref): Rename from value_free.
2841 (value_free_to_mark, free_all_values, free_value_chain): Update.
2842 (release_value): Return value_ref_ptr.
2843 (release_value_or_incref): Remove.
2844 (record_latest_value, set_internalvar, clear_internalvar):
2845 Update.
2846 * stack.c (info_frame_command): Don't call value_free.
2847 * python/py-value.c (valpy_dealloc, valpy_new)
2848 (value_to_value_object): Update.
2849 * printcmd.c (do_examine): Update.
2850 * opencl-lang.c (lval_func_free_closure): Update.
2851 * mi/mi-main.c (register_changed_p): Don't call value_free.
2852 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
2853 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
2854 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
2855 value_free.
2856 * guile/scm-value.c (vlscm_free_value_smob)
2857 (vlscm_scm_from_value): Update.
2858 * frame.c (frame_register_unwind, frame_unwind_register_signed)
2859 (frame_unwind_register_unsigned, get_frame_register_bytes)
2860 (put_frame_register_bytes): Don't call value_free.
2861 * findvar.c (address_from_register): Don't call value_free.
2862 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
2863 * dwarf2loc.c (entry_data_value_free_closure)
2864 (value_of_dwarf_reg_entry, free_pieced_value_closure)
2865 (dwarf2_evaluate_loc_desc_full): Update.
2866 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2867 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2868 (~watchpoint, watch_command_1)
2869 (invalidate_bp_value_on_memory_change): Update.
2870 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
2871
7f8a5d38
SM
28722018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
2873
2874 PR gdb/23022
2875 * warning.m4: Add -Wno-error=deprecated-register.
2876 * configure: Re-generate.
2877
8a76bd3b
TT
28782018-04-05 Tom Tromey <tom@tromey.com>
2879
2880 * linespec.h: Remove include of "vec.h".
2881
8e8d776e
TT
28822018-04-05 Tom Tromey <tom@tromey.com>
2883
2884 * linespec.c (typep): Remove typedef.
2885 (find_methods, find_superclass_methods): Take a std::vector.
2886 (find_method): Use std::vector.
2887
9b2f8581
TT
28882018-04-05 Tom Tromey <tom@tromey.com>
2889
2890 * utils.c (compare_strings): Remove.
2891 * utils.h (compare_strings): Remove.
2892 * objc-lang.h (find_imps): Update.
2893 * objc-lang.c (find_methods): Take a std::vector.
2894 (uniquify_strings, find_imps): Likewise.
2895 * linespec.c (find_methods): Take a std::vector.
2896 (decode_objc): Use std::vector.
2897 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
2898 a std::vector.
2899 (find_method, find_function_symbols): Use std::vector.
2900
459a2e4c
TT
29012018-04-05 Tom Tromey <tom@tromey.com>
2902
2903 * completer.c (completion_tracker::completion_tracker): Remove
2904 cast.
2905 (completion_tracker::discard_completions): Likewise.
2906 * breakpoint.c (ambiguous_names_p): Remove cast.
2907 * ada-lang.c (_initialize_ada_language): Remove cast.
2908 * utils.h (streq): Update.
2909 (streq_hash): Add new declaration.
2910 * utils.c (streq): Return bool.
2911 (streq_hash): New function.
2912
9be2c17a
TT
29132018-04-05 Tom Tromey <tom@tromey.com>
2914
2915 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
2916 Remove a string copy.
2917
f73c6ece
TT
29182018-04-05 Tom Tromey <tom@tromey.com>
2919
2920 * linespec.c (filter_results): Use std::vector.
2921 (decode_line_2, decode_line_full): Update.
2922
53a0f8a2
TT
29232018-04-05 Tom Tromey <tom@tromey.com>
2924
2925 * linespec.c (canonical_to_fullform): Return std::string.
2926 (filter_results): Update.
2927 (struct decode_line_2_item): Add constructor.
2928 <fullform, displayform>: Now std::string.
2929 (decode_line_2_compare_items): Now a std::sort comparator.
2930 (decode_line_2): Update.
2931
a5b5adf5
TT
29322018-04-05 Tom Tromey <tom@tromey.com>
2933
2934 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
2935 (unexpected_linespec_error): Update.
2936 (linespec_parse_basic, parse_linespec): Update.
2937
6a307fc5
TT
29382018-04-05 Tom Tromey <tom@tromey.com>
2939
2940 * linespec.c (linespec_parse_basic): Reindent.
2941
41c1efc6
TT
29422018-04-05 Tom Tromey <tom@tromey.com>
2943
2944 * minsyms.h (iterate_over_minimal_symbols): Update.
2945 * minsyms.c (iterate_over_minimal_symbols): Take a
2946 gdb::function_view.
2947 * linespec.c (struct collect_minsyms): Remove.
2948 (compare_msyms): Now a std::sort comparator.
2949 (add_minsym): Add parameters.
2950 (search_minsyms_for_name): Update. Use std::vector.
2951
c5edbf3d
TT
29522018-04-03 Tom Tromey <tom@tromey.com>
2953
2954 * mipsread.c (read_alphacoff_dynamic_symtab): Use
2955 gdb::byte_vector.
2956
b39efc48
WP
29572018-04-02 Weimin Pan <weimin.pan@oracle.com>
2958
2959 * MAINTAINERS (Write After Approval): Add Weimin Pan.
2960
121ad66c 29612018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
2962
2963 PR gdb/16959
2964 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
2965 printing static type.
2966
09473be8
TT
29672018-04-01 Tom Tromey <tom@tromey.com>
2968
2969 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
2970 (rs6000_xfer_shared_libraries): Update.
2971
ec1f2d91
SM
29722018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
2973
2974 * common/gdb_vecs.h (char_ptr): Remove.
2975 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
2976
d8611974
SM
29772018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2978
2979 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
2980 with std::vector.
2981 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
2982
a18ba4e4
SM
29832018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2984
2985 * tracepoint.h (struct uploaded_tp): Initialize fields.
2986 <actions, step_actions, cmd_strings>: Change type to
2987 std::vector<char *>.
2988 * tracepoint.c (get_uploaded_tp): Allocate with new.
2989 (free_uploaded_tps): Free with delete.
2990 (parse_tracepoint_definition): Adjust to std::vector change.
2991 * breakpoint.c (read_uploaded_action): Likewise.
2992 (create_tracepoint_from_upload): Likewise.
2993 * ctf.c (ctf_write_uploaded_tp): Likewise.
2994 (SET_ARRAY_FIELD): Likewise.
2995 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
2996
a7961323
TT
29972018-03-30 Tom Tromey <tom@tromey.com>
2998
2999 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3000 std::unique_ptr.
3001 (svr4_keep_data_in_core): Update.
3002 (svr4_read_so_list): Update.
3003
e83e4e24
TT
30042018-03-30 Tom Tromey <tom@tromey.com>
3005
3006 * windows-nat.c (handle_output_debug_string, handle_exception):
3007 Update.
3008 * target.h (target_read_string): Update.
3009 * target.c (target_read_string): Change "string" to
3010 unique_xmalloc_ptr.
3011 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3012 Update.
3013 * solib-frv.c (frv_current_sos): Update.
3014 * solib-dsbt.c (dsbt_current_sos): Update.
3015 * solib-darwin.c (darwin_current_sos): Update.
3016 * linux-thread-db.c (inferior_has_bug): Update.
3017 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3018 Update. Remove alloca.
3019 * ada-lang.c (ada_main_name): Update.
3020
263db9a1
TT
30212018-03-30 Tom Tromey <tom@tromey.com>
3022
3023 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3024 (struct dwo_file_deleter): New.
3025 (dwo_file_up): New typedef.
3026 (open_and_init_dwo_file): Use dwo_file_up.
3027 (free_dwo_file_cleanup): Remove.
3028
5dafb3d1
TT
30292018-03-30 Tom Tromey <tom@tromey.com>
3030
3031 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3032 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3033
11ed8cad
TT
30342018-03-30 Tom Tromey <tom@tromey.com>
3035
3036 * dwarf2read.c (class free_cached_comp_units): New class.
3037 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3038 (free_cached_comp_units): Remove function.
3039
9ae79dac
TT
30402018-03-30 Tom Tromey <tom@tromey.com>
3041
3042 * utils.h (make_cleanup_unpush_target): Remove.
3043 * inf-ptrace.c (struct target_unpusher): New.
3044 (target_unpush_up) New typedef.
3045 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3046 target_unpush_up.
3047 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3048
5aa89276
TT
30492018-03-27 Tom Tromey <tom@tromey.com>
3050
3051 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3052
1dbeed45
TT
30532018-03-27 Pedro Alves <palves@redhat.com>
3054 Tom Tromey <tom@tromey.com>
3055
3056 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3057 destructor. Now a class.
3058 (gdb_readline_wrapper_cleanup): Remove function.
3059 (gdb_readline_wrapper): Remove cleanups.
3060
c819b2c0
TT
30612018-03-27 Tom Tromey <tom@tromey.com>
3062
3063 * typeprint.h (struct type_print_options) <local_typedefs,
3064 global_typedefs>: Remove "struct" keyword.
3065 (class typedef_hash_table): New class.
3066 (recursively_update_typedef_hash, add_template_parameters)
3067 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3068 (find_typedef_in_hash): Don't declare.
3069 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3070 (typedef_hash_table::recursively_update): Rename from
3071 recursively_update_typedef_hash. Now a member.
3072 (typedef_hash_table::add_template_parameters): Rename from
3073 add_template_parameters. Now a member.
3074 (typedef_hash_table::typedef_hash_table): Now a constructor;
3075 rename from create_typedef_hash.
3076 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3077 rename from free_typedef_hash.
3078 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3079 (do_free_global_table): Remove.
3080 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3081 from copy_type_recursive.
3082 (create_global_typedef_table): Remove.
3083 (typedef_hash_table::find_global_typedef): Now a member of
3084 typedef_hash_table.
3085 (typedef_hash_table::find_typedef): Rename from
3086 find_typedef_in_hash; now a member.
3087 (whatis_exp): Update.
3088 * extension.h (struct ext_lang_type_printers): Add constructor and
3089 destructor.
3090 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3091 declare.
3092 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3093 Now a constructor; rename from start_ext_lang_type_printers.
3094 (ext_lang_type_printers): Now a destructor; rename from
3095 free_ext_lang_type_printers.
3096 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3097 Update.
3098 (c_type_print_base_struct_union): Update. Remove cleanups.
3099
608219fb
TT
31002018-03-27 Tom Tromey <tom@tromey.com>
3101
3102 * dwarf-index-write.c: Include <cmath>.
3103
3fcded8f
JB
31042018-03-27 Joel Brobecker <brobecker@adacore.com>
3105
3106 * NEWS: Add entry describing new "set|show varsize-limit" command.
3107 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3108 command.
3109 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3110 "set variable".
3111
cd4fb1b2
SM
31122018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3113
3114 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3115 dwarf-index-write.c
3116 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3117 * dwarf-index-common.c: New file.
3118 * dwarf-index-common.h: New file.
3119 * dwarf-index-write.c: New file.
3120 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3121 (struct dwarf2_section_info): Move from here.
3122 (dwarf2_section_info_def): Likewise.
3123 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3124 (offset_type): Likewise.
3125 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3126 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3127 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3128 (byte_swap): Likewise.
3129 (MAYBE_SWAP): Likewise.
3130 (dwarf2_per_cu_ptr): Likewise.
3131 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3132 (struct tu_stats): Likewise.
3133 (struct dwarf2_per_objfile): Likewise.
3134 (struct dwarf2_per_cu_data): Likewise.
3135 (struct signatured_type): Likewise.
3136 (sig_type_ptr): Likewise.
3137 (DEF_VEC_P (sig_type_ptr)): Likewise.
3138 (INDEX4_SUFFIX): Likewise.
3139 (INDEX5_SUFFIX): Likewise.
3140 (DEBUG_STR_SUFFIX): Likewise.
3141 (dwarf2_read_section): Make non-static.
3142 (mapped_index_string_hash): Move from here.
3143 (dwarf5_djb_hash): Likewise.
3144 (file_write): Likewise.
3145 (class data_buf): Likewise.
3146 (struct symtab_index_entry): Likewise.
3147 (struct mapped_symtab): Likewise.
3148 (find_slot): Likewise.
3149 (hash_expand): Likewise.
3150 (add_index_entry): Likewise.
3151 (uniquify_cu_indices): Likewise.
3152 (class c_str_view): Likewise.
3153 (class c_str_view_hasher): Likewise.
3154 (class vector_hasher): Likewise.
3155 (write_hash_table): Likewise.
3156 (psym_index_map): Likewise.
3157 (struct addrmap_index_data): Likewise.
3158 (add_address_entry): Likewise.
3159 (add_address_entry_worker): Likewise.
3160 (write_address_map): Likewise.
3161 (symbol_kind): Likewise.
3162 (write_psymbols): Likewise.
3163 (struct signatured_type_index_data): Likewise.
3164 (write_one_signatured_type): Likewise.
3165 (recursively_count_psymbols): Likewise.
3166 (recursively_write_psymbols): Likewise.
3167 (class debug_names): Likewise.
3168 (check_dwarf64_offsets): Likewise.
3169 (psyms_seen_size): Likewise.
3170 (write_gdbindex): Likewise.
3171 (write_debug_names): Likewise.
3172 (assert_file_size): Likewise.
3173 (write_psymtabs_to_index): Likewise.
3174 (save_gdb_index_command): Likewise.
3175 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3176 command.
3177 * dwarf2read.h: New file.
3178
59cc4834
JB
31792018-03-27 Joel Brobecker <brobecker@adacore.com>
3180
3181 PR gdb/22670
3182 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3183 symbol name if the CU's language stores symbol names in linkage
3184 format.
3185 * language.h (struct language_defn)
3186 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3187 all instances of this struct.
3188
67501539
TT
31892018-03-26 Tom Tromey <tom@tromey.com>
3190
3191 * stack.c (backtrace_command_1): Remove verbose code.
3192
76c939ac
TT
31932018-03-26 Tom Tromey <tom@tromey.com>
3194
3195 * python/py-framefilter.c (py_print_type): Don't catch
3196 exceptions. Return void.
3197 (py_print_value): Likewise.
3198 (py_print_single_arg): Likewise.
3199 (enumerate_args): Don't catch exceptions.
3200 (py_print_args): Likewise.
3201 (py_print_frame): Likewise.
3202 (gdbpy_apply_frame_filter): Catch exceptions here.
3203
9507b29c
TT
32042018-03-26 Tom Tromey <tom@tromey.com>
3205
3206 * stack.c (_initialize_stack): Remove trailing newlines from help
3207 text. Add "Usage" line to "backtrace" help.
3208
eb68e487
TT
32092018-03-26 Tom Tromey <tom@tromey.com>
3210
3211 PR python/16486:
3212 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3213
1f111921
TT
32142018-03-26 Tom Tromey <tom@tromey.com>
3215
3216 * python/py-framefilter.c (py_print_single_arg): Return
3217 EXT_LANG_BT_ERROR from catch.
3218
fb7eb8b5
TT
32192018-03-26 Tom Tromey <tom@tromey.com>
3220
3221 PR backtrace/15584:
3222 * stack.c (backtrace_command_1): Move some code into no-filters
3223 "if".
3224
4ca59a9f
TT
32252018-03-26 Tom Tromey <tom@tromey.com>
3226
3227 * python/py-framefilter.c (throw_quit_or_print_exception): New
3228 function.
3229 (gdbpy_apply_frame_filter): Use it.
3230
92256134
TT
32312018-03-26 Tom Tromey <tom@tromey.com>
3232
3233 PR cli/17716:
3234 * python/py-framefilter.c (py_print_type, py_print_value)
3235 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3236 RETURN_MASK_ERROR.
3237
7a630bc2
TT
32382018-03-26 Tom Tromey <tom@tromey.com>
3239
3240 * python/py-framefilter.c (enumerate_args): Use
3241 gdb::unique_xmalloc_ptr.
3242
63283d4a
TT
32432018-03-26 Tom Tromey <tom@tromey.com>
3244
3245 * python/py-framefilter.c (py_print_frame): Return
3246 EXT_LANG_BT_OK.
3247 (gdbpy_apply_frame_filter): Update comment.
3248 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3249 Remove.
3250 <EXT_LANG_BT_NO_FILTERS>: Change value.
3251
978d6c75
TT
32522018-03-26 Tom Tromey <tom@tromey.com>
3253
3254 PR backtrace/15582:
3255 * stack.c (backtrace_command): Parse "hide" argument.
3256 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3257 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3258 constant.
3259
1cf7e640
TT
32602018-03-26 Tom Tromey <tom@tromey.com>
3261
3262 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3263 add "flags".
3264 (backtrace_command): Remove "fulltrace", add "flags".
3265
ea3b0687
TT
32662018-03-26 Tom Tromey <tom@tromey.com>
3267
3268 * stack.c (backtrace_command): Rewrite command line parsing.
3269
9f034d75
SM
32702018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3271
3272 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3273
ce1459e5
SM
32742018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3275
3276 * filename-seen-cache.h: Add include guard.
3277
4f7ae6f5
KS
32782018-03-26 Keith Seitz <keiths@redhat.com>
3279
3280 * symfile.c (place_section): Remove "struct" from section_addr_info
3281 in comment.
3282 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3283 "struct" keyword from section_addr_info.
3284
5cd3e386
AH
32852018-03-26 Alan Hayward <alan.hayward@arm.com>
3286
3287 * regformats/regdef.h (reg): Add constructors.
3288
3e5ef9a4
PA
32892018-03-25 Pedro Alves <palves@redhat.com>
3290
3291 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3292 if then/else bodies in var_func_name extraction.
3293
c88d2fcc 32942018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
3295
3296 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3297 lookup_minimal_symbol() to find symbol entry.
3298 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3299
b7fee5a3
KS
33002018-03-23 Keith Seitz <keiths@redhat.com>
3301
3302 PR c++/22968
3303 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3304 nested type definitions for C++, too.
3305
2cc9b304
TT
33062018-03-23 Tom Tromey <tom@tromey.com>
3307
3308 * machoread.c (struct oso_el): Add a constructor. Don't define as
3309 a typedef.
3310 (macho_register_oso): Remove.
3311 (macho_symtab_read): Take a std::vector.
3312 (oso_el_compare_name): Now a std::sort comparator.
3313 (macho_symfile_read_all_oso): Take a std::vector.
3314 (macho_symfile_read): Use std::vector. Remove cleanups.
3315
a2b2bc12
TT
33162018-03-22 Tom Tromey <tom@tromey.com>
3317
3318 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3319 (record_full_goto_bookmark): Use std::string.
3320
7a8f494c
PFC
33212018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3322
3323 PR tdep/18295
3324 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3325 a single mask.
3326
dd6d677f
PFC
33272018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3328
3329 * rs6000-tdep.c (store_insn_p): New function.
3330 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3331 and cr_reg to their unshifted values. Use store_insn_p to
3332 match LR saves using either R1 or fdata->alloca_reg. Use
3333 store_insn_p to match CR saves. Set alloca_reg_offset
3334 when alloca_reg and framep are set. Remove lr_reg shift
3335 when assigning to fdata->lr_register.
3336
26d6cec4
AA
33372018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3338
3339 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3340 command line args instead of emitting a warning.
3341
5d9310c4
SM
33422018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3343
3344 * tracepoint.h (struct static_tracepoint_marker): Initialize
3345 fields, define default constructor, move constructor and move
3346 assignment, disable the rest.
3347 <str_id, extra>: Make std::string.
3348 (release_static_tracepoint_marker): Remove.
3349 (free_current_marker): Remove.
3350 * tracepoint.c (free_current_marker): Remove.
3351 (parse_static_tracepoint_marker_definition): Adjust to
3352 std::string, use new hex2str overload.
3353 (release_static_tracepoint_marker): Remove.
3354 (print_one_static_tracepoint_marker): Get marker by reference
3355 and adjust to std::string.
3356 (info_static_tracepoint_markers_command): Adjust to std::vector
3357 changes
3358 * target.h (static_tracepoint_marker_p): Remove typedef.
3359 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3360 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3361 bool.
3362 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3363 * target-debug.h
3364 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3365 (target_debug_print_std_vector_static_tracepoint_marker): New.
3366 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3367 to...
3368 (target_debug_print_static_tracepoint_marker_p): ... this.
3369 * target-delegates.c: Re-generate.
3370 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3371 Make std::string.
3372 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3373 (decode_static_tracepoint_spec): Adjust to std::vector.
3374 (tracepoint_print_one_detail): Adjust to std::string.
3375 (strace_marker_decode_location): Adjust to std::string.
3376 (update_static_tracepoint): Adjust to std::string, remove call
3377 to release_static_tracepoint_marker.
3378 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3379 Adjust to std::vector.
3380 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3381 (remote_static_tracepoint_markers_by_strid): Adjust to
3382 std::vector.
3383 * common/rsp-low.h (hex2str): New overload with explicit count
3384 of bytes.
3385 * common/rsp-low.c (hex2str): New overload with explicit count
3386 of bytes.
3387 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3388 (_initialize_rsp_low_selftests): Add test_hex2str test.
3389 * unittests/tracepoint-selftests.c
3390 (test_parse_static_tracepoint_marker_definition): Adjust to
3391 std::string.
3392
62c222b6
SM
33932018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * tracepoint.c (parse_static_tracepoint_marker_definition):
3396 Consider case where the definition is followed by more
3397 definitions.
3398 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3399 tracepoint-selftests.c.
3400 * unittests/tracepoint-selftests.c: New.
3401
7eb2418f
PFC
34022018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3403
3404 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3405 Carvalho.
3406
7cbe16e9
SR
34072018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3408
3d6b3b82 3409 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 3410
4ee89e90
SR
34112018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3412
3d6b3b82 3413 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 3414
92630041
TT
34152018-03-19 Tom Tromey <tom@tromey.com>
3416
3417 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3418 "IDENT" production.
3419
76727919
TT
34202018-03-19 Pedro Alves <palves@redhat.com>
3421 Tom Tromey <tom@tromey.com>
3422
3423 * unittests/observable-selftests.c: New file.
3424 * common/observable.h: New file.
3425 * observable.h: New file.
3426 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3427 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3428 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3429 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3430 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3431 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3432 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3433 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3434 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3435 python/py-breakpoint.c, python/py-finishbreakpoint.c,
3436 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3437 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3438 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3439 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3440 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3441 tui/tui-interp.c, valops.c: Update all users.
3442 * tui/tui-hooks.c (tui_bp_created_observer)
3443 (tui_bp_deleted_observer, tui_bp_modified_observer)
3444 (tui_inferior_exit_observer, tui_before_prompt_observer)
3445 (tui_normal_stop_observer, tui_register_changed_observer):
3446 Remove.
3447 (tui_observers_token): New global.
3448 (attach_or_detach, tui_attach_detach_observers): New functions.
3449 (tui_install_hooks, tui_remove_hooks): Use
3450 tui_attach_detach_observers.
3451 * record-btrace.c (record_btrace_thread_observer): Remove.
3452 (record_btrace_thread_observer_token): New global.
3453 * observer.sh: Remove.
3454 * observer.c: Rename to observable.c.
3455 * observable.c (namespace gdb_observers): Define new objects.
3456 (observer_debug): Move into gdb_observers namespace.
3457 (struct observer, struct observer_list, xalloc_observer_list_node)
3458 (xfree_observer_list_node, generic_observer_attach)
3459 (generic_observer_detach, generic_observer_notify): Remove.
3460 (_initialize_observer): Update.
3461 Don't include observer.inc.
3462 * Makefile.in (generated_files): Remove observer.h, observer.inc.
3463 (clean mostlyclean): Likewise.
3464 (observer.h, observer.inc): Remove targets.
3465 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3466 (COMMON_SFILES): Use observable.c, not observer.c.
3467 * .gitignore: Remove observer.h.
3468
1cb1f3da
TT
34692018-03-18 Tom Tromey <tom@tromey.com>
3470
3471 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3472 gdb::def_vector.
3473 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3474
a06ab151
TT
34752018-03-17 Tom Tromey <tom@tromey.com>
3476
3477 * auto-load.c (auto_load_objfile_script_1): Use std::string.
3478
770623f7
TT
34792018-03-17 Tom Tromey <tom@tromey.com>
3480
3481 * target.c (class scoped_target_fd): New.
3482 (target_fileio_close_cleanup): Remove.
3483 (target_fileio_read_alloc_1): Use scoped_target_fd.
3484
39be3c7e
SM
34852018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3486
3487 * silent-rules.mk: New.
3488 * Makefile.in: Include silent-rules.mk
3489 (srcdir, VPATH, top_srcdir): Move up.
3490 (COMPILE): Add ECHO_CXX.
3491 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3492 (init.c): Add ECHO_INIT_C.
3493 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3494 (version.c): Add ECHO_GEN.
3495 (printcmd.o): Add ECHO_CXX.
3496 (target-float.o): Add ECHO_CXX.
3497 (ada-exp.o): Add ECHO_CXX.
3498 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3499 (insight$(EXEEXT)): Add ECHO_CXXLD.
3500 * gnulib/configure.ac: Add AM_SILENT_RULES.
3501 * gnulib/aclocal.m4: Re-generate.
3502 * gnulib/configure: Re-generate.
3503 * gnulib/import/Makefile.in: Re-generate.
3504
37e136b1
TT
35052018-03-16 Tom Tromey <tom@tromey.com>
3506
3507 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3508 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3509 * utils.c (do_free_section_addr_info)
3510 (make_cleanup_free_section_addr_info): Remove.
3511 * symfile.h (struct other_sections): Add constructor.
3512 (struct section_addr_info): Remove.
3513 (section_addr_info): New typedef.
3514 (struct sym_fns) <sym_offsets>: Change type of parameter.
3515 (build_section_addr_info_from_objfile)
3516 (relative_addr_info_to_section_offsets, addr_info_make_relative)
3517 (default_symfile_offsets, symbol_file_add)
3518 (symbol_file_add_from_bfd)
3519 (build_section_addr_info_from_section_table): Update.
3520 (alloc_section_addr_info, free_section_addr_info): Don't declare.
3521 * symfile.c (alloc_section_addr_info): Remove.
3522 (build_section_addr_info_from_section_table): Change return type.
3523 Update.
3524 (build_section_addr_info_from_bfd)
3525 (build_section_addr_info_from_objfile): Likewise.
3526 (free_section_addr_info): Remove.
3527 (relative_addr_info_to_section_offsets): Change type of "addrs".
3528 (addrs_section_compar): Now a std::sort comparator.
3529 (addrs_section_sort): Change return type.
3530 (addr_info_make_relative): Change type of "addrs". Update.
3531 (default_symfile_offsets, syms_from_objfile_1)
3532 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3533 (symbol_file_add_separate): Update.
3534 (symbol_file_add): Change type of "addrs". Update.
3535 (add_symbol_file_command): Update. Remove cleanups.
3536 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
3537 cleanups.
3538 * symfile-debug.c (debug_sym_offsets): Change type of "info".
3539 * solib.c (solib_read_symbols): Update.
3540 * objfiles.c (objfile_relocate): Update. Remove cleanups.
3541 * machoread.c (macho_symfile_offsets): Update.
3542 * jit.c (jit_bfd_try_read_symtab): Update.
3543
03afa6ef
SM
35442018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
3545
3546 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3547 unittests/utils-selftests.c.
3548 * unittests/utils-selftests.c: New file.
3549
3ae9ce5d
TT
35502018-03-14 Tom Tromey <tom@tromey.com>
3551
3552 PR cli/14977:
3553 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3554 for NULL.
3555
b8c2339b
TT
35562018-03-14 Tom Tromey <tom@tromey.com>
3557
3558 PR cli/19918:
3559 * printcmd.c (printf_pointer): Allow "-" in format.
3560
80ae639d
TT
35612018-03-14 Tom Tromey <tom@tromey.com>
3562
3563 * printcmd.c (_initialize_printcmd): Add usage to printf.
3564
0d671d99
YQ
35652018-03-14 Yao Qi <qiyao@sourceware.org>
3566
3567 * MAINTAINERS: Update my email address.
3568
b577b6af
TT
35692018-03-13 Tom Tromey <tom@tromey.com>
3570
3571 * machoread.c (macho_check_dsym): Change filenamep to a
3572 std::string*.
3573 (macho_symfile_read): Update.
3574 * symfile.c (load_command): Use std::string.
3575
89a3b63e
AB
35762018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
3577
3578 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3579 to error message string.
3580 (riscv_register_name): Use xsnprintf instead of sprintf.
3581 (riscv_insn::fetch_instruction): Use gdb_assert instead of
3582 internal_error.
3583 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3584 error.
3585 (riscv_push_dummy_call): Likewise.
3586
984c7238
TT
35872018-03-12 Tom Tromey <tom@tromey.com>
3588
3589 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3590 Use gdb::byte_vector.
3591 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3592
933522d1
YQ
35932018-03-12 Yao Qi <yao.qi@linaro.org>
3594
3595 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3596 parameter type to readable_regcache.
3597 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3598 the declaration.
3599
be2daae6
TT
36002018-03-11 Tom Tromey <tom@tromey.com>
3601
3602 * dwarf2read.c (struct nextfield): Add initializers.
3603 (struct nextfnfield): Remove.
3604 (struct fnfieldlist): Add initializers. Remove "length" and
3605 "head", use std::vector.
3606 (struct decl_field_list): Remove.
3607 (struct field_info): Add initializers.
3608 <fields, baseclasses>: Now std::vector.
3609 <nbaseclasses, nfnfields, typedef_field_list_count,
3610 nested_types_list_count>: Remove.
3611 (dwarf2_add_field, dwarf2_add_type_defn)
3612 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3613 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3614 (process_structure_scope): Update.
3615
484cf504
TT
36162018-03-11 Tom Tromey <tom@tromey.com>
3617
3618 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3619 for use by std::sort.
3620 (build_type_psymtabs_1): Use std::vector.
3621
9bd8e0b0
EZ
36222018-03-09 Eli Zaretskii <eliz@gnu.org>
3623
3624 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3625 and LIBMPFR in the printed configuration.
3626
5dc1a704
TT
36272018-03-08 Tom Tromey <tom@tromey.com>
3628
3629 * source.c (get_filename_and_charpos): Use scoped_fd.
3630 * nto-procfs.c (procfs_open_1): Use scoped_fd.
3631 (procfs_pidlist): Likewise.
3632 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3633 (iterate_over_mappings): Likewise.
3634
fdf07f3a
TT
36352018-03-08 Tom Tromey <tom@tromey.com>
3636
3637 * infcall.c (struct call_return_meta_info)
3638 <stack_temporaries_enabled>: Remove.
3639 (get_call_return_value, call_function_by_hand_dummy): Update.
3640 * thread.c (disable_thread_stack_temporaries): Remove.
3641 (enable_thread_stack_temporaries): Remove.
3642 (thread_stack_temporaries_enabled_p): Return bool.
3643 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3644 (get_last_thread_stack_temporary): Update.
3645 * eval.c (evaluate_subexp): Update.
3646 * gdbthread.h (class enable_thread_stack_temporaries): Now a
3647 class, not a function.
3648 (value_ptr, value_vec): Remove typedefs.
3649 (class thread_info) <stack_temporaries_enabled>: Now bool.
3650 <stack_temporaries>: Now a std::vector.
3651 (thread_stack_temporaries_enabled_p)
3652 (value_in_thread_stack_temporaries): Return bool.
3653
567a3e54
SM
36542018-03-08 Simon Marchi <simon.marchi@ericsson.com>
3655
3656 * remote.c (putpkt_binary): Fix omitted bytes reporting.
3657 (getpkt_or_notif_sane_1): Likewise.
3658
00b40057
SM
36592018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3660
3661 * build-id.c (build_id_to_debug_bfd): Use std::string.
3662
a8dbfd58
SM
36632018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3664
3665 * build-id.c (find_separate_debug_file_by_buildid): Return
3666 std::string.
3667 * build-id.h (find_separate_debug_file_by_buildid): Return
3668 std::string.
3669 * coffread.c (coff_symfile_read): Adjust to std::string.
3670 * elfread.c (elf_symfile_read): Adjust to std::string.
3671 * symfile.c (separate_debug_file_exists): Change parameter to
3672 std::string.
3673 (find_separate_debug_file): Return std::string.
3674 (find_separate_debug_file_by_debuglink): Return std::string.
3675 * symfile.h (find_separate_debug_file_by_debuglink): Return
3676 std::string.
3677
e6a58aa8
SM
36782018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3679
3680 * common/xml-utils.c (xml_escape_text): Move code to...
3681 (xml_escape_text_append): ... this new function.
3682 * common/xml-utils.h (xml_escape_text_append): New declaration.
3683 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3684 New function.
3685 (_initialize_xml_utils): register test_xml_escape_text_append as
3686 a selftest.
3687
4ef0bef6
AH
36882018-03-07 Alan Hayward <alan.hayward@arm.com>
3689
3690 * defs.h: Remove MAX_REGISTER_SIZE.
3691 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3692 asserts.
3693 * python/py-unwind.c (pyuw_sniffer): Likewise.
3694
e0d3522b
TT
36952018-03-07 Tom Tromey <tom@tromey.com>
3696
3697 * linux-tdep.c (linux_info_proc): Update.
3698 * target.h (struct target_ops) <to_fileio_readlink>: Return
3699 optional<string>.
3700 (target_fileio_readlink): Return optional<string>.
3701 * remote.c (remote_hostio_readlink): Return optional<string>.
3702 * inf-child.c (inf_child_fileio_readlink): Return
3703 optional<string>.
3704 * target.c (target_fileio_readlink): Return optional<string>.
3705
ea005f31
AB
37062018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
3707
3708 * regcache.c (cooked_read_test): Add riscv to the list of
3709 architectures that have a save_reggroup.
3710
e95a97d4
AA
37112018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
3712
3713 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3714 value is not a dynamic class object.
3715
d8344f3d
TT
37162018-03-06 Tom Tromey <tom@tromey.com>
3717
3718 * rust-exp.y: Formatting fixes.
3719
9add17f2
AB
37202018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3721
3722 * riscv-tdep.c (riscv_register_name): Remove target description
3723 support.
3724 (riscv_gdbarch_init): Remove target description check.
3725
c9486dfe
AB
37262018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3727
3728 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3729 comment.
3730 * riscv-tdep.h: Likewise.
3731
d74aff3d
AB
37322018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3733
3734 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3735 (riscv_pseudo_register_write): Delete.
3736 (riscv_gdbarch_init): Remove all use of pseudo registers.
3737
7ea78b59
SM
37382018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3739
3740 * record-btrace.c (btrace_print_lines): Replace cleanup
3741 parameter with RAII equivalents.
3742 (btrace_insn_history): Replace cleanup with RAII equivalents.
3743 * ui-out.h (make_cleanup_ui_out_list_begin_end,
3744 make_cleanup_ui_out_tuple_begin_end): Remove.
3745 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3746 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3747 make_cleanup_ui_out_list_begin_end): Remove.
3748
53127008
SM
37492018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3750
3751 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3752 parameter types to std::vector. Use bool.
3753 (record_btrace_wait): Replace VEC(tp_t) with
3754 std::vector<thread_info *>.
3755 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3756
228f1508
SM
37572018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3758
3759 * record-btrace.c (record_btrace_disable_callback): Remove.
3760 (struct scoped_btrace_disable): New.
3761 (record_btrace_open): Use scoped_btrace_disable.
3762
b2970c23
AB
37632018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3764
3765 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3766 reading values from registers.
3767
fb294655
AB
37682018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3769
3770 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3771 where appropriate.
3772
cab5bb9d
AB
37732018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3774
3775 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3776 change parameter type. Use GDB's print functions, and use
3777 core_addr_to_string where appropriate.
3778 (riscv_push_dummy_call): Use core_addr_to_string where
3779 appropriate, update call to riscv_print_arg_location, and reindent
3780 a few lines.
3781 (riscv_return_value): Update call to riscv_print_arg_location.
3782
dbbb1059
AB
37832018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3784 Tim Newsome <tim@sifive.com>
3785 Albert Ou <a0u@eecs.berkeley.edu>
3786 Darius Rad <darius@bluespec.com>
3787
3788 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3789 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3790 (ALLDEPFILES): Add riscv-tdep.c
3791 * configure.tgt: Add riscv support.
3792 * riscv-tdep.c: New file.
3793 * riscv-tdep.h: New file.
3794 * NEWS: Mention new target.
3795 * MAINTAINERS: Add entry for riscv.
3796
5dc43913
AB
37972018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3798
3799 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3800 fields within aggregates.
3801
3dea1ef7
SM
38022018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
3803
3804 * record-btrace.c (btrace_print_lines): Change type of flags to
3805 gdb_disassembly_flags.
3806
7efba073
JB
38072018-03-04 John Baldwin <jhb@FreeBSD.org>
3808
3809 * fbsd-nat.c: Include "inf-ptrace.h".
3810 (USE_SIGTRAP_SIGINFO): Conditionally define.
3811 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3812 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3813 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3814 function.
3815 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3816 Likewise.
3817 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3818 Likewise.
3819 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3820 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3821 "supports_stopped_by_hw_breakpoint" target methods.
3822
386a8676
JB
38232018-03-04 John Baldwin <jhb@FreeBSD.org>
3824
3825 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3826 * fbsd-nat.c (debug_fbsd_nat): New variable.
3827 (show_fbsd_nat_debug): New function.
3828 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3829 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3830
12279366
JB
38312018-03-04 John Baldwin <jhb@FreeBSD.org>
3832
3833 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3834 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3835 prototype.
3836 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3837 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3838 method.
3839
54693cf5
SM
38402018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3841
3842 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
3843 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
3844
ccb2231c
SM
38452018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3846
3847 * charset.c (struct charset_vector): New.
3848 (charsets): Change type to charset_vector.
3849 (find_charset_names): Adjust.
3850 (add_one): Adjust.
3851 (_initialize_charset): Adjust.
3852
6fb16ce6
SM
38532018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3854
3855 * progspace.h (struct program_space) <deleted_solibs>: Change
3856 type to std::vector<std::string>.
3857 * progspace.c (clear_program_space_solib_cache): Adjust.
3858 * breakpoint.c (print_solib_event): Adjust.
3859 (check_status_catch_solib): Adjust.
3860 * solib.c (update_solib_list): Adjust.
3861 * ui-out.h (class ui_out) <field_string>: New overload.
3862 * ui-out.c (ui_out::field_string): New overload.
3863
564b1e3f
SM
38642018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3865
3866 * progspace.h (struct program_space): Add constructor and
3867 destructor, initialize fields.
3868 (add_program_space): Remove.
3869 * progspace.c (add_program_space): Rename to...
3870 (program_space::program_space): ... this.
3871 (release_program_space): Rename to...
3872 (program_space::~program_space): ... this.
3873 (delete_program_space): Use delete to delete program_space.
3874 (initialize_progspace): Use new to allocate program_space.
3875 * inferior.c (add_inferior_with_spaces): Likewise.
3876 (clone_inferior_command): Likewise.
3877 * infrun.c (follow_fork_inferior): Likewise.
3878 (handle_vfork_child_exec_or_exit): Likewise.
3879
e80aaf61
SM
38802018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3881
3882 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
3883 (delim_string_to_char_ptr_vec): Return std::vector of
3884 gdb::unique_xmalloc_ptr.
3885 (dirnames_to_char_ptr_vec_append): Take std::vector of
3886 gdb::unique_xmalloc_ptr.
3887 (dirnames_to_char_ptr_vec): Return std::vector of
3888 gdb::unique_xmalloc_ptr.
3889 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
3890 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
3891 (delim_string_to_char_ptr_vec): Return an std::vector of
3892 gdb::unique_xmalloc_ptr, adjust the code.
3893 (dirnames_to_char_ptr_vec_append): Take an std::vector of
3894 gdb::unique_xmalloc_ptr, adjust the code.
3895 (dirnames_to_char_ptr_vec): Return an std::vector of
3896 gdb::unique_xmalloc_ptr, adjust the code.
3897 * auto-load.c (auto_load_safe_path_vec): Change type to
3898 std::vector of gdb::unique_xmalloc_ptr.
3899 (auto_load_expand_dir_vars): Return an std::vector of
3900 gdb::unique_xmalloc_ptr, adjust the code.
3901 (auto_load_safe_path_vec_update): Adjust.
3902 (filename_is_in_auto_load_safe_path_vec): Adjust.
3903 (auto_load_objfile_script_1): Adjust.
3904 * build-id.c (build_id_to_debug_bfd): Adjust.
3905 * linux-thread-db.c (thread_db_load_search): Adjust.
3906 * source.c (add_path): Adjust.
3907 (openp): Adjust.
3908 * symfile.c (find_separate_debug_file): Adjust.
3909 * utils.c (do_free_char_ptr_vec): Remove.
3910 (make_cleanup_free_char_ptr_vec): Remove.
3911
ab818ade
SDJ
39122018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
3913
3914 PR gdb/22907
3915 * common/pathstuff.c: Conditionally include "<windows.h>".
3916
e1e6f073
GS
39172018-03-01 Georg Sauthoff <mail@georg.so>
3918
3919 PR gdb/22888
3920 * gcore.in: Quote variables and switch interpreter to bash.
3921
c7b15a66
TT
39222018-03-01 Tom Tromey <tom@tromey.com>
3923
3924 * dwarf2read.c (alloc_discriminant_info): Fix default_index
3925 assertion. Add assertion for discriminant_index.
3926 (quirk_rust_enum): Use correct base type name in univariant case.
3927
0cb7c7b0
SM
39282018-03-01 Simon Marchi <simon.marchi@ericsson.com>
3929
3930 * record.c (get_call_history_modifiers): Return a
3931 record_print_flags.
3932 (cmd_record_call_history): Adjust.
3933 * record-btrace.c (record_btrace_call_history): Adjust.
3934 (record_btrace_call_history_range): Adjust.
3935 (record_btrace_call_history_from): Adjust.
3936 * target-debug.h (target_debug_print_record_print_flags): New.
3937 * target-delegates.c: Re-generate.
3938 * target.c (target_call_history): Change flags type.
3939 (target_call_history_from): Likewise.
3940 (target_call_history_range): Likewise.
3941 * target.h (struct target_ops) <target_call_history>: Likewise.
3942 (target_call_history_from): Likewise.
3943 (target_call_history_range): Likewise.
3944
25e3c82c
SDJ
39452018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3946 Simon Marchi <simon.marchi@polymtl.ca>
3947
3948 * common/common-utils.c: Include "sys/stat.h".
3949 (is_regular_file): Move here from "source.c"; change return
3950 type to "bool".
3951 * common/common-utils.h (is_regular_file): New prototype.
3952 * common/pathstuff.c (contains_dir_separator): New function.
3953 * common/pathstuff.h (contains_dir_separator): New prototype.
3954 * source.c: Don't include "sys/stat.h".
3955 (is_regular_file): Move to "common/common-utils.c".
3956
b4987c95
SDJ
39572018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3958
3959 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
3960 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
3961 * auto-load.c: Include "common/pathstuff.h".
3962 * common/common-def.h (current_directory): Move here.
3963 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
3964 function.
3965 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
3966 prototype.
3967 * common/pathstuff.c: New file.
3968 * common/pathstuff.h: New file.
3969 * compile/compile.c: Include "common/pathstuff.h".
3970 * defs.h (current_directory): Move to "common/common-defs.h".
3971 * dwarf2read.c: Include "common/pathstuff.h".
3972 * exec.c: Likewise.
3973 * guile/scm-safe-call.c: Likewise.
3974 * linux-thread-db.c: Likewise.
3975 * main.c: Likewise.
3976 * nto-tdep.c: Likewise.
3977 * objfiles.c: Likewise.
3978 * source.c: Likewise.
3979 * symtab.c: Likewise.
3980 * utils.c: Include "common/pathstuff.h".
3981 (gdb_realpath): Move to "common/pathstuff.c".
3982 (gdb_realpath_keepfile): Likewise.
3983 (gdb_abspath): Likewise.
3984 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
3985 (gdb_realpath_keepfile): Likewise.
3986 (gdb_abspath): Likewise.
3987
f169cfdc
JB
39882018-02-28 John Baldwin <jhb@FreeBSD.org>
3989
3990 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
3991 wildcard process pid for super_resume for kernels with a
3992 specific bug.
3993
e05cac70
PM
39942018-02-27 Phil Muldoon <pmuldoon@redhat.com>
3995
3996 * compile/compile.c (get_args): Add additional comments
3997 explaining function.
3998
55089490
TT
39992018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4000 Tom Tromey <tom@tromey.com>
4001
4002 * target.h (memory_write_request_s): Remove typedef. Don't define
4003 VEC.
4004 (target_write_memory_blocks): Change argument to std::vector.
4005 (struct memory_write_request): Add constructor.
4006 * target-memory.c (compare_block_starting_address): Return bool.
4007 Change argument types.
4008 (claim_memory): Change arguments to use std::vector.
4009 (split_regular_and_flash_blocks, blocks_to_erase)
4010 (compute_garbled_blocks): Likewise.
4011 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4012 (target_write_memory_blocks): Change argument to std::vector.
4013 * symfile.c (struct load_section_data): Add constructor and
4014 destructor. Use std::vector for "requests".
4015 (struct load_progress_data): Add initializers.
4016 (load_section_callback): Update. Use "new".
4017 (clear_memory_write_data): Remove.
4018 (generic_load): Update.
4019
0c305b61
AH
40202018-02-27 Alan Hayward <alan.hayward@arm.com>
4021
4022 * arch/aarch64.h: Use common/tdesc.h.
4023
c5196c92
MR
40242018-02-26 Maciej W. Rozycki <macro@mips.com>
4025
4026 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4027 architecture with a 64-bit ABI.
4028
37c33887
MR
40292018-02-26 Maciej W. Rozycki <macro@mips.com>
4030
4031 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4032 ahead of target description loading.
4033
d4dd3282
TT
40342018-02-26 Tom Tromey <tom@tromey.com>
4035
4036 * stack.c (backtrace_command_1): Update.
4037 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4038 of "flags".
4039 * python/py-framefilter.c (py_print_frame)
4040 (gdbpy_apply_frame_filter): Change type of "flags".
4041 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4042 of "flags".
4043 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4044 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4045 * extension.h (enum frame_filter_flag): Rename from
4046 frame_filter_flags.
4047 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4048 (apply_ext_lang_frame_filter): Change type of "flags".
4049 * extension.c (apply_ext_lang_frame_filter): Change type of
4050 "flags".
4051 * extension-priv.h (struct extension_language_ops)
4052 <apply_frame_filter>: Change type of "flags".
4053
6893c19a
TT
40542018-02-26 Tom Tromey <tom@tromey.com>
4055
4056 PR python/16497:
4057 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4058 off-by-one in py_end computation.
4059 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4060 PRINT_MORE_FRAMES.
4061 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4062 constant.
4063
2ddeaf8a
TT
40642018-02-26 Tom Tromey <tom@tromey.com>
4065
4066 * dwarf2read.c (struct variant_field): New.
4067 (struct nextfield) <variant>: New field.
4068 (dwarf2_add_field): Handle DW_TAG_variant_part.
4069 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4070 discriminated union.
4071 (read_structure_type): Handle DW_TAG_variant_part.
4072 (handle_struct_member_die): New function, extracted from
4073 process_structure_scope. Handle DW_TAG_variant.
4074 (process_structure_scope): Handle discriminated unions. Call
4075 handle_struct_member_die.
4076
c9317f21
TT
40772018-02-26 Tom Tromey <tom@tromey.com>
4078
4079 * rust-lang.h (rust_last_path_segment): Declare.
4080 * rust-lang.c (rust_last_path_segment): Now public. Change
4081 contract.
4082 (struct disr_info): Remove.
4083 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4084 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4085 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4086 (rust_enum_p, rust_enum_variant): New function.
4087 (rust_underscore_fields): Remove "offset" parameter.
4088 (rust_print_enum): New function.
4089 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4090 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4091 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4092 enums.
4093 (rust_internal_print_type): New function, from rust_print_type.
4094 Remove enum code.
4095 (rust_print_type): Call rust_internal_print_type.
4096 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4097 Update enum handling.
4098 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4099 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4100 (rust_union_quirks): New functions.
4101 (process_full_comp_unit, process_full_type_unit): Call
4102 rust_union_quirks.
4103 (process_structure_scope): Update rust_unions if necessary.
4104
7c22600a
TT
41052018-02-26 Tom Tromey <tom@tromey.com>
4106
4107 * value.h (value_union_variant): Declare.
4108 * valops.c (value_union_variant): New function.
4109 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4110 (struct discriminant_info): New.
4111 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4112 enumerator.
4113 (struct main_type) <flag_discriminated_union>: New field.
4114
15ce8941
TT
41152018-02-26 Tom Tromey <tom@tromey.com>
4116
4117 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4118 unittests/unpack-selftests.c.
4119 * unittests/unpack-selftests.c: New file.
4120 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4121
48fbe735
YQ
41222018-02-26 Yao Qi <yao.qi@linaro.org>
4123
4124 * dwarf2read.c (struct partial_die_info) <read>: New method.
4125 (read_partial_die): Remove the declaration.
4126 (load_partial_dies): Update.
4127 (partial_die_info::partial_die_info):
4128 (read_partial_die): Change it to partial_die_info::read.
4129
52356b79
YQ
41302018-02-26 Yao Qi <yao.qi@linaro.org>
4131
4132 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4133 (fixup_partial_die): Remove declaration.
4134 (scan_partial_symbols): Update.
4135 (partial_die_parent_scope): Likewise.
4136 (partial_die_full_name): Likewise.
4137 (fixup_partial_die): Change it to partial_die_info::fixup.
4138
35cc7ed7
YQ
41392018-02-26 Yao Qi <yao.qi@linaro.org>
4140
4141 * dwarf2read.c (read_partial_die): Update the declaration.
4142 (load_partial_dies): Caller update.
4143 (read_partial_die): Remove one argument abbrev_len.
4144
6f06d47b
YQ
41452018-02-26 Yao Qi <yao.qi@linaro.org>
4146
4147 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4148 assignment operator.
4149 (load_partial_dies): Use ctor and copy ctor.
4150 (read_partial_die): Update.
4151 (dwarf2_cu::find_partial_die): Use ctor.
4152
d590ff25
YQ
41532018-02-26 Yao Qi <yao.qi@linaro.org>
4154
4155 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4156 (find_partial_die_in_comp_unit): Change it to
4157 dwarf2_cu::find_partial_die.
4158 (find_partial_die): Update.
4159
fd0a254f
YQ
41602018-02-26 Yao Qi <yao.qi@linaro.org>
4161
4162 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4163 is NULL.
4164
cd9983dd
YQ
41652018-02-26 Yao Qi <yao.qi@linaro.org>
4166
4167 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4168
f46cd62a
AH
41692018-02-26 Alan Hayward <alan.hayward@arm.com>
4170
4171 * arch/amd64.h: Use common/tdesc.h.
4172 * arch/i386.c: Likewise.
4173 * arch/i386.h: Likewise.
4174 * arch/tic6x.c: Likewise.
4175 * arch/tdesc.h: Move file from here...
4176 * common/tdesc.h: ...to here.
4177 * features/aarch64-core.c: Regenerate.
4178 * features/aarch64-fpu.c: Regenerate.
4179 * features/i386/32bit-avx.c: Regenerate.
4180 * features/i386/32bit-avx512.c: Regenerate.
4181 * features/i386/32bit-core.c: Regenerate.
4182 * features/i386/32bit-linux.c: Regenerate.
4183 * features/i386/32bit-mpx.c: Regenerate.
4184 * features/i386/32bit-pkeys.c: Regenerate.
4185 * features/i386/32bit-sse.c: Regenerate.
4186 * features/i386/64bit-avx.c: Regenerate.
4187 * features/i386/64bit-avx512.c: Regenerate.
4188 * features/i386/64bit-core.c: Regenerate.
4189 * features/i386/64bit-linux.c: Regenerate.
4190 * features/i386/64bit-mpx.c: Regenerate.
4191 * features/i386/64bit-pkeys.c: Regenerate.
4192 * features/i386/64bit-segments.c: Regenerate.
4193 * features/i386/64bit-sse.c: Regenerate.
4194 * features/i386/x32-core.c: Regenerate.
4195 * features/tic6x-c6xp.c: Regenerate.
4196 * features/tic6x-core.c: Regenerate.
4197 * features/tic6x-gp.c: Regenerate.
4198 * target-descriptions.c: Use common/tdesc.h.
4199 * target-descriptions.h: Likewise.
4200
9b292f68
TT
42012018-02-24 Tom Tromey <tom@tromey.com>
4202
4203 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4204 (try_thread_db_load_from_dir, thread_db_load_search): Use
4205 std::string.
4206 (info_auto_load_libthread_db_compare): Return bool. Change
4207 argument types.
4208 (info_auto_load_libthread_db): Use std::vector, std::string.
4209 Remove cleanups.
4210
281d762b
TT
42112018-02-24 Tom Tromey <tom@tromey.com>
4212
4213 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4214 std::string.
4215 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4216 std::string*.
4217 * gdbarch.c: Rebuild.
4218 * gdbarch.h: Rebuild.
4219 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4220 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4221 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4222 std::string*.
4223
9d8780f0
SM
42242018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4225
4226 * gdbtypes.h (sect_offset): Change type to uint64_t.
4227 (sect_offset_str): New function.
4228 * dwarf2read.c (create_addrmap_from_aranges): Use
4229 sect_offset_str.
4230 (error_check_comp_unit_head): Likewise.
4231 (create_debug_type_hash_table): Likewise.
4232 (read_cutu_die_from_dwo): Likewise.
4233 (init_cutu_and_read_dies): Likewise.
4234 (init_cutu_and_read_dies_no_follow): Likewise.
4235 (process_psymtab_comp_unit_reader): Likewise.
4236 (partial_die_parent_scope): Likewise.
4237 (peek_die_abbrev): Likewise.
4238 (process_queue): Likewise.
4239 (dwarf2_physname): Likewise.
4240 (read_namespace_alias): Likewise.
4241 (read_import_statement): Likewise.
4242 (create_dwo_cu_reader): Likewise.
4243 (create_cus_hash_table): Likewise.
4244 (lookup_dwo_cutu): Likewise.
4245 (inherit_abstract_dies): Likewise.
4246 (read_func_scope): Likewise.
4247 (read_call_site_scope): Likewise.
4248 (dwarf2_add_member_fn): Likewise.
4249 (read_common_block): Likewise.
4250 (read_module_type): Likewise.
4251 (read_typedef): Likewise.
4252 (read_subrange_type): Likewise.
4253 (load_partial_dies): Likewise.
4254 (read_partial_die): Likewise.
4255 (find_partial_die): Likewise.
4256 (read_str_index): Likewise.
4257 (dwarf2_string_attr): Likewise.
4258 (build_error_marker_type): Likewise.
4259 (lookup_die_type): Likewise.
4260 (dump_die_shallow): Likewise.
4261 (follow_die_ref): Likewise.
4262 (dwarf2_fetch_die_loc_sect_off): Likewise.
4263 (dwarf2_fetch_constant_bytes): Likewise.
4264 (follow_die_sig): Likewise.
4265 (get_signatured_type): Likewise.
4266 (get_DW_AT_signature_type): Likewise.
4267 (dwarf2_find_containing_comp_unit): Likewise.
4268 (set_die_type): Likewise.
4269
8ec57239
JB
42702018-02-21 John Baldwin <jhb@FreeBSD.org>
4271
4272 * arch/aarch64.c: Include "common-defs.h".
4273 * arch/amd64.c: Likewise.
4274 * arch/i386.c: Likewise.
4275
3eac2b65
TT
42762018-02-21 Tom Tromey <tom@tromey.com>
4277
4278 * value.h: (extract_field_op): Update.
4279 * eval.c (extract_field_op): Return a const char *.
4280 * expression.h (parse_expression_for_completion): Update.
4281 * completer.c (complete_expression): Update.
4282 (add_struct_fields): Make fieldname const.
4283 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4284 (mark_completion_tag, parse_exp_in_context_1): Update.
4285 (parse_expression_for_completion): Change "name" to
4286 unique_xmalloc_ptr*.
4287
6ccb583f
TT
42882018-02-21 Tom Tromey <tom@tromey.com>
4289
4290 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4291
c113ed0c
YQ
42922018-02-21 Yao Qi <yao.qi@linaro.org>
4293
4294 * avr-tdep.c (avr_read_pc): Change parameter type to
4295 readable_regcache.
4296 * gdbarch.sh (read_pc): Likewise.
4297 * gdbarch.c: Re-generated.
4298 * gdbarch.h: Re-generated.
4299 * hppa-tdep.c (hppa_read_pc): Change parameter type to
4300 readable_regcache.
4301 * ia64-tdep.c (ia64_read_pc): Likewise.
4302 * mips-tdep.c (mips_read_pc): Likewise.
4303 * spu-tdep.c (spu_read_pc): Likewise.
4304
4c74fe6b
YQ
43052018-02-21 Yao Qi <yao.qi@linaro.org>
4306
4307 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4308 * regcache-dump.c: New file.
4309 * regcache.c: Move register_dump to regcache-dump.c.
4310 (maintenance_print_registers): Likewise.
4311 (maintenance_print_raw_registers): Likewise.
4312 (maintenance_print_cooked_registers): Likewise.
4313 (maintenance_print_register_groups): Likewise.
4314 (maintenance_print_remote_registers): Likewise.
4315 (_initialize_regcache): Likewise.
4316 * regcache.h (register_dump): Moved from regcache.c.
4317
796bb026
YQ
43182018-02-21 Yao Qi <yao.qi@linaro.org>
4319
4320 * regcache.c (regcache::regcache): Update.
4321 (regcache::invalidate): Move it to detached_regcache::invalidate.
4322 (get_thread_arch_aspace_regcache): Update.
4323 (regcache::raw_update): Update.
4324 (regcache::cooked_read): Remove some code.
4325 (regcache::cooked_read_value): Likewise.
4326 (regcache::raw_write): Remove assert on m_readonly_p.
4327 (regcache::raw_supply_integer): Move it to
4328 detached_regcache::raw_supply_integer.
4329 (regcache::raw_supply_zeroed): Likewise.
4330 * regcache.h (detached_regcache) <raw_supply_integer>: New
4331 declaration.
4332 <raw_supply_zeroed, invalidate>: Likewise.
4333 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4334 <invalidate>: Likewise.
4335 <m_readonly_p>: Removed.
4336
215c69dc
YQ
43372018-02-21 Yao Qi <yao.qi@linaro.org>
4338
4339 * infcmd.c (get_return_value): Let stop_regs point to
4340 get_current_regcache.
4341 * regcache.c (regcache::regcache): Remove.
4342 (register_dump_reg_buffer): New class.
4343 (regcache_print): Adjust.
4344 * regcache.h (regcache): Remove constructors.
4345
f3384e66
YQ
43462018-02-21 Yao Qi <yao.qi@linaro.org>
4347
4348 * regcache.c (class register_dump): New class.
4349 (register_dump_regcache, register_dump_none): New class.
4350 (register_dump_remote, register_dump_groups): New class.
4351 (regcache_print): Update.
4352 * regcache.h (regcache_dump_what): Move it to regcache.c.
4353 (regcache) <dump>: Remove.
4354
c8ec2f33
YQ
43552018-02-21 Yao Qi <yao.qi@linaro.org>
4356
4357 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4358 reg_buffer_rw *.
4359 (jit_unwind_reg_set_impl): Call raw_supply.
4360 (jit_frame_sniffer): Use reg_buffer_rw.
4361 * record-full.c (record_full_core_regbuf): Change its type.
4362 (record_full_core_open_1): Use reg_buffer_rw.
4363 (record_full_close): Likewise.
4364 (record_full_core_fetch_registers): Use regcache->raw_supply.
4365 (record_full_core_store_registers): Likewise.
4366 * regcache.c (regcache::get_register_status): Move it to
4367 reg_buffer.
4368 (regcache_raw_set_cached_value): Remove.
4369 (regcache::raw_set_cached_value): Remove.
4370 (regcache::raw_write): Call raw_supply.
4371 (regcache::raw_supply): Move it to reg_buffer_rw.
4372 * regcache.h (regcache_raw_set_cached_value): Remove.
4373 (reg_buffer_rw): New class.
4374
daf6667d
YQ
43752018-02-21 Yao Qi <yao.qi@linaro.org>
4376
4377 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4378 readonly_detached_regcache.
4379 (dummy_frame_prev_register): Use regcache->cooked_read.
4380 * frame.c (frame_save_as_regcache): Change return type.
4381 (frame_pop): Update.
4382 * frame.h (frame_save_as_regcache): Update declaration.
4383 * inferior.h (get_infcall_suspend_state_regcache): Update
4384 declaration.
4385 * infrun.c (infcall_suspend_state) <registers>: use
4386 readonly_detached_regcache.
4387 (save_infcall_suspend_state): Don't use regcache_dup.
4388 (get_infcall_suspend_state_regcache): Change return type.
4389 * linux-fork.c (struct fork_info) <savedregs>: Change to
4390 readonly_detached_regcache.
4391 <pc>: New field.
4392 (fork_save_infrun_state): Don't use regcache_dup.
4393 (info_checkpoints_command): Adjust.
4394 * mi/mi-main.c (register_changed_p): Update declaration.
4395 (mi_cmd_data_list_changed_registers): Use
4396 readonly_detached_regcache.
4397 (register_changed_p): Change parameter type to
4398 readonly_detached_regcache.
4399 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4400 readonly_detached_regcache.
4401 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4402 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4403 New.
4404 (regcache::save): Move it to reg_buffer.
4405 (regcache::restore): Change parameter type.
4406 (regcache_dup): Remove.
4407 * regcache.h (reg_buffer) <save>: New method.
4408 (readonly_detached_regcache): New class.
4409 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4410 readonly_detached_regcache.
4411 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4412
fc5b8736
YQ
44132018-02-21 Yao Qi <yao.qi@linaro.org>
4414
4415 * frame.c (frame_save_as_regcache): Use regcache method save.
4416 (frame_pop): Use regcache method restore.
4417 * infrun.c (restore_infcall_suspend_state): Likewise.
4418 * linux-fork.c (fork_load_infrun_state): Likewise.
4419 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4420 save.
4421 * regcache.c (regcache_save): Remove.
4422 (regcache::restore): More asserts.
4423 (regcache_cpy): Remove.
4424 * regcache.h (regcache_save): Remove the declaration.
4425 (regcache::restore): Move from private to public.
4426 Remove the friend declaration of regcache_cpy.
4427 (regcache_cpy): Remove declaration.
4428
849d0ba8
YQ
44292018-02-21 Yao Qi <yao.qi@linaro.org>
4430
4431 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4432 parameter type to 'readable_regcache *'.
4433 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4434 * arm-tdep.c (arm_neon_quad_read): Likewise.
4435 (arm_pseudo_read): Likewise.
4436 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4437 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4438 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4439 * gdbarch.c: Re-generated.
4440 * gdbarch.h: Re-generated.
4441 * gdbarch.sh (pseudo_register_read): Change parameter type to
4442 'readable_regcache *'.
4443 (pseudo_register_read_value): Likewise.
4444 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4445 (h8300_pseudo_register_read): Likewise.
4446 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4447 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4448 (i386_pseudo_register_read_into_value): Likewise.
4449 (i386_pseudo_register_read_value): Likewise.
4450 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4451 declaration.
4452 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4453 * m32c-tdep.c (m32c_raw_read): Likewise.
4454 (m32c_read_flg): Likewise.
4455 (m32c_banked_register): Likewise.
4456 (m32c_banked_read): Likewise.
4457 (m32c_sb_read): Likewise.
4458 (m32c_part_read): Likewise.
4459 (m32c_cat_read): Likewise.
4460 (m32c_r3r2r1r0_read): Likewise.
4461 (m32c_pseudo_register_read): Likewise.
4462 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4463 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4464 (mep_pseudo_cr64_read): Likewise.
4465 (mep_pseudo_register_read): Likewise.
4466 * mips-tdep.c (mips_pseudo_register_read): Likewise.
4467 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4468 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4469 * regcache.c (regcache::raw_read): Move it to readable_regcache.
4470 (regcache::cooked_read): Likewise.
4471 (regcache::cooked_read_value): Likewise.
4472 (regcache_cooked_read_signed):
4473 (regcache::cooked_read): Likewise.
4474 * regcache.h (readable_regcache): New class.
4475 (regcache): Inherit readable_regcache. Move some methods to
4476 readable_regcache.
4477 * rl78-tdep.c (rl78_pseudo_register_read): Change
4478 parameter type to 'readable_regcache *'.
4479 * rs6000-tdep.c (do_regcache_raw_read): Remove.
4480 (e500_pseudo_register_read): Change parameter type to
4481 'readable_regcache *'.
4482 (dfp_pseudo_register_read): Likewise.
4483 (vsx_pseudo_register_read): Likewise.
4484 (efpr_pseudo_register_read): Likewise.
4485 * s390-tdep.c (s390_pseudo_register_read): Likewise.
4486 * sh-tdep.c (sh_pseudo_register_read): Likewise.
4487 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4488 (sh64_pseudo_register_read): Likewise.
4489 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4490 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4491 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4492 (spu_pseudo_register_read): Likewise.
4493 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4494 (xtensa_pseudo_register_read): Likewise.
4495
31716595
YQ
44962018-02-21 Yao Qi <yao.qi@linaro.org>
4497
4498 * regcache.c (regcache::regcache): Call reg_buffer ctor.
4499 (regcache::arch): Move it to reg_buffer::arch.
4500 (regcache::register_buffer): Likewise.
4501 (regcache::assert_regnum): Likewise.
4502 (regcache::num_raw_registers): Likewise.
4503 * regcache.h (reg_buffer): New class.
4504 (regcache): Inherit reg_buffer.
4505
7104e59b
SM
45062018-02-20 Simon Marchi <simon.marchi@ericsson.com>
4507
4508 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4509 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4510
2d8adcbd
MM
45112018-02-20 Markus Metzger <markus.t.metzger@intel.com>
4512
4513 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4514
b5884fa7
AH
45152018-02-19 Alan Hayward <alan.hayward@arm.com>
4516
4517 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4518 (SFILES): Remove common/*.c files.
4519 (COMMON_OBS): Remove some *.o files built from common/*.c files.
4520 * common/common.host: Add common reference.
4521 * configure.ac: Likewise.
4522 * configure: Regenerate.
4523
fd90ace4
YQ
45242018-02-16 Yao Qi <yao.qi@linaro.org>
4525
4526 * block.c (block_namespace_info): Inherit allocate_on_obstack.
4527 (block_initialize_namespace): Use new.
4528 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4529 (dwarf2_free_objfile): Use delete.
4530 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4531 (copy_type_recursive): Use new.
4532 * gdb_obstack.h (allocate_on_obstack): New.
4533
85046ae2
YQ
45342018-02-15 Yao Qi <yao.qi@linaro.org>
4535
4536 PR gdb/22849
4537 * inferior.c (exit_inferior_1): Reset inf->control.
4538
355c559b
JB
45392018-02-15 Joel Brobecker <brobecker@adacore.com>
4540
4541 * ada-lang.c (ada_to_fixed_value_create): Delete advance
4542 declaration.
4543
980548fd
PA
45442018-02-14 Pedro Alves <palves@redhat.com>
4545
4546 * frame-unwind.c (frame_unwind_try_unwinder): Always call
4547 frame_cleanup_after_sniffer on exception.
4548
692d6f97
TT
45492018-02-14 Tom Tromey <tom@tromey.com>
4550
4551 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4552 const.
4553 (solib_bfd_open): Make pathname const.
4554 * solib.c (solib_bfd_open): Make pathname const.
4555 * solib-spu.c (spu_bfd_fopen): Make name const.
4556 (spu_bfd_open): Make pathname const.
4557 * solib-darwin.c (darwin_bfd_open): Make pathname const.
4558 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4559
e0cc99a6
TT
45602018-02-14 Tom Tromey <tom@tromey.com>
4561
4562 * symfile.c (symfile_bfd_open): Update.
4563 * source.h (openp, source_full_path_of, find_and_open_source):
4564 Change argument type to unique_xmalloc_ptr.
4565 * source.c (openp): Take a unique_xmalloc_ptr.
4566 (source_full_path_of, find_and_open_source): Likewise.
4567 (open_source_file, symtab_to_fullname): Update.
4568 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4569 unique_xmalloc_ptr.
4570 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4571 (exec_file_find): Update.
4572 * psymtab.c (psymtab_to_fullname): Update.
4573 * nto-tdep.h (nto_find_and_open_solib): Update.
4574 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4575 unique_xmalloc_ptr.
4576 * exec.c (exec_file_attach): Update.
4577 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4578 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4579
b46a8d7c
TT
45802018-02-14 Tom Tromey <tom@tromey.com>
4581
4582 * solib.c: Include source.h.
4583 * nto-tdep.c: Include source.h.
4584 * mi/mi-cmd-env.c: Include source.h.
4585 * infcmd.c: Include source.h.
4586 * exec.c: Include source.h.
4587 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4588 (add_path, directory_switch, source_path, init_source_path): Move
4589 declarations...
4590 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4591 (add_path, directory_switch, source_path, init_source_path):
4592 ...here.
4593
797bc1cb
TT
45942018-02-14 Tom Tromey <tom@tromey.com>
4595
4596 * solist.h (exec_file_find, solib_find): Return
4597 unique_xmalloc_ptr.
4598 (solib_bfd_fopen): Take a const char *.
4599 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4600 (exec_file_find, solib_find): Likewise.
4601 (solib_bfd_fopen): Do not take ownership of "pathname".
4602 (solib_bfd_open): Use unique_xmalloc_ptr.
4603 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4604 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4605 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4606 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4607
f98b2e33
JB
46082018-02-14 Joel Brobecker <brobecker@adacore.com>
4609
4610 * ada-lang.c (name_match_type_from_name): Remove reference to
4611 ada_name_for_lookup in function's documentation.
4612 * ada-lang.h (ada_name_for_lookup): Delete declaration.
4613
24b9144d
SM
46142018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4615
4616 * defs.h (enum openp_flags): New enum.
4617 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4618 Move to enum openp_flags.
4619 (openp_flags): New enum flags.
4620 (openp): Change parameter type to openp_flags.
4621 * source.c (openp): Change parameter type to openp_flags.
4622 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4623 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4624
387cd15b
SM
46252018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4626
4627 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4628 per-command.
4629
b303c6f6
AB
46302018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
4631
4632 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4633 into...
4634 (class dwarf2_queue_guard): ...the destructor of this new class.
4635 (dw2_do_instantiate_symtab): Create instance of the new class
4636 dwarf2_queue_guard, remove cleanup.
4637
9c3630e9
TT
46382018-02-09 Tom Tromey <tom@tromey.com>
4639
4640 * source.c (find_source_lines): Don't reference past the end of
4641 the vector.
4642
c4e12631
MM
46432018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4644
4645 * remote.c (remote_btrace_maybe_reopen): Change error message.
4646 * btrace.c (btrace_enable): Likewise.
4647 (parse_xml_btrace): Likewise.
4648 (parse_xml_btrace_conf): Likewise.
4649
88711fbf
MM
46502018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4651
4652 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4653 (linux_enable_pt, linux_enable_bts): Call
4654 diagnose_perf_event_open_fail.
4655
17ad2a4f
MM
46562018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4657
4658 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4659 Remove parameter and change return type. Update callers. Move it.
4660 (linux_enable_bts, linux_enable_pt): Improve error message.
4661 (linux_enable_pt): Remove zero buffer size check.
4662 (linux_enable_btrace): Improve error messages. Remove NULL return
4663 check.
4664
de6242d3
MM
46652018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4666
4667 * btrace.c (btrace_enable): Remove target_supports_btrace call.
4668 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4669 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4670 (linux_supports_pt, linux_supports_btrace): Remove.
4671 (linux_enable_bts): Call cpu_supports_bts.
4672 * nat/linux-btrace.h (linux_supports_btrace): Remove.
4673 * remote.c (remote_supports_btrace): Remove.
4674 (init_remote_ops): Remove remote_supports_btrace.
4675 * target-delegates.c: Regenerated.
4676 * target.c (target_supports_btrace): Remove.
4677 * target.h (target_ops) <to_supports_btrace>: Remove
4678 (target_supports_btrace): Remove.
4679 * x86-linux-nat.c (x86_linux_create_target): Remove
4680 linux_supports_btrace.
4681
9ee23a85
MM
46822018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4683
4684 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4685 btrace failed.
4686 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4687 exception and use message in own exception.
4688
5c3284c1
MM
46892018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4690
4691 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4692 (perf_event_pt_event_type): Use gdb_file_up.
4693 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4694 scoped_fd, and scoped_mmap.
4695
84696f37
MM
46962018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4697
4698 * common/scoped_mmap.h: New.
4699 * unittests/scoped_mmap-selftest.c: New.
4700 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4701 unittests/scoped_mmap-selftest.c.
4702
ea4a0888
MM
47032018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4704
4705 * common/scoped_fd.h: New.
4706 * unittests/scoped_fd-selftest.c: New.
4707 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4708 unittests/scoped_fd-selftest.c.
4709
869e8290
TT
47102018-02-09 Tom Tromey <tom@tromey.com>
4711
4712 * auto-load.c (auto_load_section_scripts): Use
4713 gdb::unique_xmalloc_ptr.
4714
a37a2ae7
TT
47152018-02-09 Tom Tromey <tom@tromey.com>
4716
4717 * auto-load.c (execute_script_contents): Use std::string.
4718
4e725347
JB
47192018-02-09 Joel Brobecker <brobecker@adacore.com>
4720
4721 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4722 Python function, rather than a new command.
4723
9a897d43
TT
47242018-02-08 Tom Tromey <tom@tromey.com>
4725
4726 * solib.c (solib_find_1): Use std::string.
4727 (solib_bfd_fopen): Use unique_xmalloc_ptr.
4728
58ef3771
TT
47292018-02-08 Tom Tromey <tom@tromey.com>
4730
4731 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4732
a9abc434
TT
47332018-02-08 Tom Tromey <tom@tromey.com>
4734
4735 * source.c (find_source_lines): Use gdb::def_vector.
4736
84f27c6f
TT
47372018-02-08 Tom Tromey <tom@tromey.com>
4738
4739 * macrocmd.c (struct temporary_macro_definition): New.
4740 (macro_define_command): Use temporary_macro_definition. Remove
4741 cleanups.
4742 (free_macro_definition_ptr): Remove.
4743
0354904b
TT
47442018-02-08 Tom Tromey <tom@tromey.com>
4745
4746 * macroexp.c (maybe_expand): Use std::string.
4747
1739cf24
TT
47482018-02-08 Tom Tromey <tom@tromey.com>
4749
4750 * macroexp.c (struct macro_buffer): Add initializers for some
4751 members.
4752 (init_buffer, init_shared_buffer, free_buffer)
4753 (free_buffer_return_text): Remove.
4754 (macro_buffer): New constructors.
4755 (~macro_buffer): New destructor.
4756 (macro_buffer::set_shared): New method.
4757 (macro_buffer::resize_buffer, macro_buffer::appendc)
4758 (macro_buffer::appendmem): Now methods, not free functions.
4759 (set_token, append_tokens_without_splicing, stringify)
4760 (macro_stringify): Update.
4761 (gather_arguments): Change return type. Remove argc_p argument,
4762 add args_ptr argument. Use std::vector.
4763 (substitute_args): Remove argc argument. Accept std::vector.
4764 (expand): Update. Use std::vector.
4765 (scan, macro_expand, macro_expand_next): Update.
4766
f6c2623e
TT
47672018-02-08 Tom Tromey <tom@tromey.com>
4768
4769 * symtab.c (default_collect_symbol_completion_matches_break_on):
4770 Use unique_xmalloc_ptr.
4771 * macroscope.h: (sal_macro_scope, user_macro_scope)
4772 (default_macro_scope): Return unique_xmalloc_ptr.
4773 * macroscope.c (sal_macro_scope, user_macro_scope)
4774 (default_macro_scope): Return unique_xmalloc_ptr.
4775 * macroexp.h (macro_expand, macro_expand_once): Return
4776 unique_xmalloc_ptr.
4777 * macroexp.c (macro_expand, macro_expand_once): Return
4778 unique_xmalloc_ptr.
4779 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4780 (info_macro_command, info_macros_command): Use
4781 unique_xmalloc_ptr.
4782 * compile/compile-c-support.c (write_macro_definitions): Use
4783 unique_xmalloc_ptr.
4784 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4785
c2e0e465
SM
47862018-02-07 Simon Marchi <simon.marchi@ericsson.com>
4787
4788 * value.c (value_static_field): Assign field type instead of
4789 containing type when returning an optimized out value.
4790
3f8c94b4
YQ
47912018-02-06 Yao Qi <yao.qi@linaro.org>
4792
4793 * ft32-tdep.c (ft32_read_pc): Remove.
4794 (ft32_write_pc): Remove.
4795 (ft32_gdbarch_init): Update.
4796 * m32r-tdep.c (m32r_read_pc): Remove.
4797 (m32r_gdbarch_init): Update.
4798 * mep-tdep.c (mep_read_pc): Remove.
4799 (mep_gdbarch_init): Update.
4800 * microblaze-tdep.c (microblaze_write_pc): Remove.
4801 (microblaze_gdbarch_init): Update.
4802 * mn10300-tdep.c (mn10300_read_pc): Remove.
4803 (mn10300_write_pc): Remove.
4804 (mn10300_gdbarch_init): Update.
4805 * moxie-tdep.c (moxie_read_pc): Remove.
4806 (moxie_write_pc): Remove.
4807 (moxie_gdbarch_init): Update.
4808
bca65a23
YQ
48092018-02-06 Yao Qi <yao.qi@linaro.org>
4810
4811 * expprint.c (print_subexp_standard): Handle
4812 OP_F77_UNDETERMINED_ARGLIST.
4813 (dump_subexp_body_standard): Likewise.
4814
583e3f90 48152018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 4816
583e3f90
YQ
4817 * target-descriptions.c (tdesc_element_visitor) Add empty
4818 implementations.
b8df6ca7
AH
4819 (tdesc_type): Move make_gdb_type from here.
4820 (tdesc_type_builtin): Likewise.
4821 (tdesc_type_vector): Likewise.
4822 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4823 (make_gdb_type_struct): Move from tdesc_type_with_fields.
4824 (make_gdb_type_union): Likewise.
4825 (make_gdb_type_flags): Likewise.
4826 (make_gdb_type_enum): Likewise.
4827 (make_gdb_type): New function.
4828 (tdesc_register_type): Use static make_gdb_type.
4829
e813d34a
RK
48302018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
4831
4832 * infcmd.c (default_print_one_register_info): Align natural-format
4833 column values consistently one under another.
4834 (pad_to_column): New function.
4835
0eb876f5
JB
48362018-02-05 Joel Brobecker <brobecker@adacore.com>
4837
4838 * dwarf2read.c (dwarf2_physname): Move commment.
4839
0625771b
LS
48402018-02-01 Leszek Swirski <leszeks@google.com>
4841
4842 * varobj.c (varobj_formatted_print_options): Allow recursive
4843 pretty printing if pretty printing is enabled.
4844
59498c30
LS
48452018-02-01 Leszek Swirski <leszeks@google.com>
4846
4847 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
4848 names after a structop as a filename.
4849
2d9e6acb
YQ
48502018-02-01 Yao Qi <yao.qi@linaro.org>
4851
4852 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
4853 (arm_record_coproc_data_proc): Likewise.
4854
df95a9cf
YQ
48552018-02-01 Yao Qi <yao.qi@linaro.org>
4856
4857 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
4858
07e5f5cf
NP
48592018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
4860
4861 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
4862 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
4863
3045b475
PA
48642018-01-31 Pedro Alves <palves@redhat.com>
4865
4866 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
4867 * inflow.c (child_terminal_save_inferior): Wrap reference to
4868 tcgetpgrp in HAVE_TERMIOS_H.
4869 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
4870 _WIN32.
4871 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
4872 always iterate over all inferiors.
4873 (gdbsim_cntrl_c): Adjust.
4874 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
4875
929b5ad4
JB
48762018-01-31 Joel Brobecker <brobecker@adacore.com>
4877
4878 * gdbtypes.c (lookup_array_range_type): Make sure the array's
4879 index type is objfile-owned if the element type is as well.
4880
29236ca2
JB
48812018-01-31 Joel Brobecker <brobecker@adacore.com>
4882
4883 GDB 8.1 released.
4884
c81e8879
PR
48852018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
4886
4887 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
4888 "features/s390x-linux64.c".
4889 (_initialize_s390_linux_tdep): Remove initialization of tdescs
4890 s390_linux32 and s390x_linux64.
4891 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
4892 default tdesc.
4893 * s390-tdep.c: Include "features/s390-linux32.c" and
4894 "features/s390x-linux64.c".
4895 (s390_tdesc_valid): Add check for tdesc_has_registers.
4896 (s390_gdbarch_init): Make sure there is always a valid tdesc.
4897 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
4898 tdesc_s390x_linux64.
4899 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
4900 tdesc_s390x_linux64 to...
4901 * s390-tdep.h: ...here.
4902
e671cd59
PA
49032018-01-30 Pedro Alves <palves@redhat.com>
4904
4905 PR gdb/13211
4906 * config.in, configure: Regenerate.
4907 * configure.ac: Check for getpgid.
4908 * go32-nat.c (go32_pass_ctrlc): New.
4909 (go32_target): Install it.
4910 * inf-child.c (inf_child_target): Install
4911 child_terminal_save_inferior, child_pass_ctrlc and
4912 child_interrupt.
4913 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
4914 (inf_ptrace_target): No longer install it.
4915 * infcmd.c (interrupt_target_1): Adjust.
4916 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
4917 (child_interrupt): Declare.
4918 (inferior::terminal_state): New.
4919 * inflow.c (struct terminal_info): Update comments.
4920 (inferior_process_group): Delete.
4921 (terminal_is_ours): Delete.
4922 (gdb_tty_state): New.
4923 (child_terminal_init): Adjust.
4924 (is_gdb_terminal, sharing_input_terminal_1)
4925 (sharing_input_terminal): New functions.
4926 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
4927 Set the process's actual process group in the foreground if
4928 possible. Handle is_ours_for_output/is_ours distinction. Don't
4929 mark terminal as the inferior's if not sharing GDB's terminal.
4930 Don't check attach_flag.
4931 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
4932 pass down a target_terminal_state.
4933 (child_terminal_save_inferior): New, factored out from ...
4934 (child_terminal_ours_1): ... this. Handle
4935 target_terminal_state::is_ours_for_output.
4936 (child_interrupt, child_pass_ctrlc): New.
4937 (inflow_inferior_exit): Clear the inferior's terminal_state.
4938 (copy_terminal_info): Copy the inferior's terminal state.
4939 (_initialize_inflow): Remove reference to terminal_is_ours.
4940 * inflow.h (inferior_process_group): Delete.
4941 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
4942 * procfs.c (procfs_target): Don't install procfs_interrupt.
4943 (procfs_interrupt): Delete.
4944 * remote.c (remote_serial_quit_handler): Adjust.
4945 (remote_interrupt): Remove ptid parameter. Adjust.
4946 * target-delegates.c: Regenerate.
4947 * target.c: Include "terminal.h".
4948 (target_terminal::terminal_state): Rename to ...
4949 (target_terminal::m_terminal_state): ... this.
4950 (target_terminal::init): Adjust.
4951 (target_terminal::inferior): Adjust to per-inferior
4952 terminal_state.
4953 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
4954 (target_terminal::ours, target_terminal::ours_for_output): Use
4955 target_terminal_is_ours_kind.
4956 (target_interrupt): Remove ptid parameter. Adjust.
4957 (default_target_pass_ctrlc): Adjust.
4958 * target.h (target_ops::to_terminal_save_inferior): New field.
4959 (target_ops::to_interrupt): Remove ptid_t parameter.
4960 (target_interrupt): Remove ptid_t parameter. Update comment.
4961 (target_pass_ctrlc): Update comment.
4962 * target/target.h (target_terminal_state): New scoped enum,
4963 factored out of ...
4964 (target_terminal::terminal_state): ... here.
4965 (target_terminal::inferior): Update comments.
4966 (target_terminal::restore_inferior): New.
4967 (target_terminal::is_inferior, target_terminal::is_ours)
4968 (target_terminal::is_ours_for_output): Adjust.
4969 (target_terminal::scoped_restore_terminal_state): Adjust to
4970 rename, and call restore_inferior() instead of inferior().
4971 (target_terminal::scoped_restore_terminal_state::m_state): Change
4972 type.
4973 (target_terminal::terminal_state): Rename to ...
4974 (target_terminal::m_terminal_state): ... this and change type.
4975
9c3a5d93
PA
49762018-01-30 Pedro Alves <palves@redhat.com>
4977
4978 * linux-nat.c (wait_for_signal): New function.
4979 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
4980 directly.
4981 (async_terminal_is_ours)
4982 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
4983 (linux_nat_add_target): Don't override
4984 to_terminal_inferior/to_terminal_ours.
4985
69ab5edb
SDJ
49862018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
4987
4988 * remote.c (remote_follow_fork): Don't call "detach_inferior".
4989
fc8e7e75
SM
49902018-01-28 Simon Marchi <simon.marchi@ericsson.com>
4991
4992 * dwarf2read.c (free_dwo_files): Add forward-declaration.
4993 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
4994 dwarf2_per_objfile_free here.
4995 (dwarf2_per_objfile_free): Remove.
4996 (_initialize_dwarf2_read): Don't register
4997 dwarf2_per_objfile_free as a registry cleanup.
4998
b2a426e2
EZ
49992018-01-27 Eli Zaretskii <eliz@gnu.org>
5000
5001 Avoid compilation errors in MinGW native builds
5002
5003 The error is triggered by including python-internal.h, and the
5004 error message is:
5005
5006 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5007 from build-gnulib/import/math.h:27,
5008 from d:/usr/Python26/include/pyport.h:235,
5009 from d:/usr/Python26/include/Python.h:58,
5010 from python/python-internal.h:94,
5011 from python/py-arch.c:24:
5012 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5013 using ::hypot;
5014 ^~~~~
5015
5016 This happens because Python headers define 'hypot' to expand t
5017 '_hypot' in the Windows builds.
5018 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5019 'hypoth'. This avoids a compilation error.
5020
0bdd8eac
AH
50212018-01-26 Alan Hayward <alan.hayward@arm.com>
5022
5023 * MAINTAINERS (Write After Approval): Fix ordering.
5024
56ae9dc3
AH
50252018-01-26 Alan Hayward <alan.hayward@arm.com>
5026
5027 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5028
7433498b
AM
50292018-01-26 Alan Modra <amodra@gmail.com>
5030
5031 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5032 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5033 Remove nop. Make const. Comment.
5034 (powerpc32_plt_stub_so_2): New.
5035 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5036 Correct count. Update uses.
5037 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5038 Move common code reading PLT entry word. Correct
5039 powerpc32_plt_stub PLT address calculation.
5040 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5041 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5042 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5043 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5044 (ppc64_standard_linkage8): Likewise.
5045 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5046 Correct insns description.
5047 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5048
0f59d5fc
PA
50492018-01-24 Pedro Alves <palves@redhat.com>
5050
5051 GCC PR libstdc++/83906
5052 * gdbtypes.c (operator==(const dynamic_prop &,
5053 const dynamic_prop &)): New.
5054 (operator==(const range_bounds &, const range_bounds &)): New.
5055 (check_types_equal): Use them instead of memcmp.
5056 * gdbtypes.h (operator==(const dynamic_prop &,
5057 const dynamic_prop &)): Declare.
5058 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5059 (operator==(const range_bounds &, const range_bounds &)): Declare.
5060 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5061
ef8914a4
PR
50622018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5063
5064 * s390-linux-tdep.c (s390_record_address_mask)
5065 (s390_record_calc_disp_common, s390_record_calc_disp)
5066 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5067 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5068 (s390_process_record): Move to s390-tdep.c.
5069 (s390_linux_init_abi_any): Adjust.
5070 * s390-tdep.c (s390_record_address_mask)
5071 (s390_record_calc_disp_common, s390_record_calc_disp)
5072 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5073 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5074 (s390_process_record): Moved from s390-linux-tdep.c
5075 (s390_gdbarch_init): Adjust.
5076
d6e58945
PR
50772018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5078
5079 * s390-linux-nat.c (s390-tdep.h): New include.
5080 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5081 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5082 (ALLDEPFILES): Add s390-tdep.c.
5083 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5084 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5085 * s390-tdep.h: ...this. New file.
5086 * s390-linux-tdep.c (s390-tdep.h): New include.
5087 (_initialize_s390_tdep): Rename to...
5088 (_initialize_s390_linux_tdep): ...this and adjust.
5089 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5090 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5091 s390-tdep.h.
5092 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5093 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5094 (s390_is_partial_instruction, s390_software_single_step)
5095 (is_non_branch_ril, s390_displaced_step_copy_insn)
5096 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5097 (s390_prologue_data, s390_addr, s390_store, s390_load)
5098 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5099 (s390_register_call_saved, s390_guess_tracepoint_registers)
5100 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5101 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5102 (s390_pseudo_register_name, s390_pseudo_register_type)
5103 (s390_pseudo_register_read, s390_pseudo_register_write)
5104 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5105 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5106 (s390_addr_bits_remove, s390_address_class_type_flags)
5107 (s390_address_class_type_flags_to_name)
5108 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5109 (s390_function_arg_float, s390_function_arg_vector)
5110 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5111 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5112 (s390_frame_align, s390_register_return_value, s390_return_value)
5113 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5114 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5115 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5116 (s390_trad_frame_prev_register, s390_unwind_cache)
5117 (s390_prologue_frame_unwind_cache)
5118 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5119 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5120 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5121 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5122 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5123 (s390_frame_base_address, s390_local_base_address)
5124 (s390_frame_base, s390_gcc_target_options)
5125 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5126 (s390_validate_reg_range, s390_tdesc_valid)
5127 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5128 * s390-tdep.c: ...this. New file.
5129
9c0b896e
PR
51302018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5131
5132 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5133 (s390_process_record, s390_gdbarch_tdep_alloc)
5134 (s390_linux_init_abi_any): Use/set new hook.
5135
7042632b
PR
51362018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5137
5138 * s390-linux-tdep.c (osabi.h): New include.
5139 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5140 (s390_linux_init_abi_any): New functions.
5141 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5142
650f5e13
PR
51432018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5144
5145 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5146 tdesc_has_registers check
5147
47c9317e
PR
51482018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5149
5150 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5151 (s390_validate_reg_range): New macro.
5152 (s390_gdbarch_init): Adjust.
5153
095085d8
PR
51542018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5155
5156 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5157 (s390_gdbarch_tdep_alloc): Adjust.
5158 (s390_gdbarch_init): Adjust.
5159
ab9bcc67
PR
51602018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5161
5162 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5163 <have_tdb>: Change type to bool.
5164 (s390_gdbarch_tdep_alloc): Adjust.
5165 (s390_gdbarch_init): Adjust.
5166
21f6f5ff
PR
51672018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5168
5169 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5170 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5171 (s390_gdbarch_tdep_alloc): New function.
5172 (s390_gdbarch_init): Allocate tdep at start and use its fields
5173 instead of separate variables.
5174
0eb97953
PR
51752018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5176
5177 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5178 when looking for cached gdbarch and add comment for remaining.
5179
5c319bb2
PA
51802018-01-22 Pedro Alves <palves@redhat.com>
5181 Sergio Durigan Junior <sergiodj@redhat.com>
5182
5183 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5184 case.
5185
d65ce302
MR
51862018-01-22 Maciej W. Rozycki <macro@mips.com>
5187
5188 * MAINTAINERS: Update my company e-mail address.
5189
ec7a5fcb
YQ
51902018-01-22 Yao Qi <yao.qi@linaro.org>
5191
5192 * regcache.c (cooked_write_test): New function.
5193 (_initialize_regcache): Register the test.
5194
11f57cb6
YQ
51952018-01-22 Yao Qi <yao.qi@linaro.org>
5196
5197 * ia64-tdep.c (ia64_pseudo_register_read): Call
5198 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5199 * m32c-tdep.c (m32c_cat_read): Likewise.
5200 (m32c_r3r2r1r0_read): Likewise.
5201 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5202 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5203
03f50fc8
YQ
52042018-01-22 Yao Qi <yao.qi@linaro.org>
5205
5206 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5207 method raw_read instead of regcache_raw_read.
5208 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5209 * arm-tdep.c (arm_neon_quad_read): Likewise.
5210 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5211 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5212 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5213 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5214 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5215 (i386_pseudo_register_read_into_value): Likewise.
5216 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5217 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5218 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5219 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5220 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5221 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5222 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5223 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5224 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5225
dc711524
YQ
52262018-01-22 Yao Qi <yao.qi@linaro.org>
5227
5228 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5229 * configure.tgt: Remove target mt.
5230 * mt-tdep.c: Remove.
5231 * regcache.c (cooked_read_test): Remove the check for mt.
5232
3f5a868b
YQ
52332018-01-22 Yao Qi <yao.qi@linaro.org>
5234
5235 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5236 instead of gdbarch_pseudo_register_read_value.
5237
de4cb04a
JB
52382018-01-22 Joel Brobecker <brobecker@adacore.com>
5239
5240 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5241 language is Ada.
5242
a9e40818
JB
52432018-01-22 Joel Brobecker <brobecker@adacore.com>
5244
5245 * linespec.c (create_sals_line_offset): Remove code that preserved
5246 the symtab_and_line's line number.
5247
e707fc44
AB
52482018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5249
5250 * varobj.c (varobj_create): Don't set valid_block when creating a
5251 floating varobj.
5252
03d0bf7b
AB
52532018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5254
5255 * varobj.c (varobj_create): Remove out of date comment.
5256
ae451627
AB
52572018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5258
5259 PR mi/20395
5260 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5261 updating innermost block.
5262 * parse.c (innermost_block_tracker::update): Take extra type
5263 parameter, and check types match before updating innermost block.
5264 (write_dollar_variable): Update innermost block for registers.
5265 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5266 (innermost_block_tracker::innermost_block_tracker): Initialise
5267 m_types member.
5268 (innermost_block_tracker::reset): Take type parameter.
5269 (innermost_block_tracker::update): Take type parameter, and pass
5270 type through as needed.
5271 (innermost_block_tracker::m_types): New member.
5272 * varobj.c (varobj_create): Pass type when reseting innermost
5273 block.
5274
aee1fcdf
AB
52752018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5276
5277 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5278 * ada-lang.c (resolve_subexp): Likewise.
5279 * breakpoint.c (set_breakpoint_condition) Likewise.
5280 (watch_command_1) Likewise.
5281 * c-exp.y (variable): Likewise.
5282 * d-exp.y (PrimaryExpression): Likewise.
5283 * f-exp.y (variable): Likewise.
5284 * go-exp.y (variable): Likewise.
5285 * m2-exp.y (variable): Likewise.
5286 * objfiles.c (objfile::~objfile): Likewise.
5287 * p-exp.y (variable): Likewise.
5288 * parse.c (innermost_block): Change type.
5289 * parser-defs.h (class innermost_block_tracker): New.
5290 (innermost_block): Change to innermost_block_tracker.
5291 * printcmd.c (display_command): Switch to innermost_block API.
5292 (do_one_display): Likewise.
5293 * rust-exp.y (do_one_display): Likewise.
5294 * symfile.c (clear_symtab_users): Likewise.
5295 * varobj.c (varobj_create): Switch to innermost_block API, replace
5296 use of innermost_block with block stored on varobj object.
5297
396af9a1
AB
52982018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5299
5300 * expression.h (innermost_block): Remove declaration.
5301 * varobj.c: Add 'parser-defs.h' include.
5302
fcfcc376
TT
53032018-01-19 Tom Tromey <tom@tromey.com>
5304
5305 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5306 symbols in the static and global blocks.
5307
5a6c3296
JC
53082018-01-19 James Clarke <jrtc27@jrtc27.com>
5309
5310 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5311 gdb_ptrace.h, and move including gdb_wait.h ...
5312 * nat/linux-ptrace.h: ... to here.
5313
bc09b0c1
SM
53142018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5315
5316 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5317 inf_ptrace_detach_success.
5318 (inf_ptrace_detach_success): Add inferior parameter, use it
5319 instead of inferior_ptid, pass it to detach_inferior.
5320 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5321 parameter.
5322 * inferior.c (detach_inferior): Add overload that takes an
5323 inferior object.
5324 * inferior.h (detach_inferior): Likewise.
5325 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5326 use inferior_ptid, adjust call to inf_ptrace_detach_success.
5327 * linux-thread-db.c (thread_db_detach): Use inf parameter.
5328
6e1e1966
SM
53292018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5330
5331 * target.h (struct target_ops) <to_detach>: Add inferior
5332 parameter.
5333 (target_detach): Likewise.
5334 * target.c (dispose_inferior): Pass inferior down.
5335 (target_detach): Pass inferior down. Assert that it is equal to
5336 the current inferior.
5337 * aix-thread.c (aix_thread_detach): Pass inferior down.
5338 * corefile.c (core_file_command): Pass current_inferior() down.
5339 * corelow.c (core_detach): Add inferior parameter.
5340 * darwin-nat.c (darwin_detach): Likewise.
5341 * gnu-nat.c (gnu_detach): Likewise.
5342 * inf-ptrace.c (inf_ptrace_detach): Likewise.
5343 * infcmd.c (detach_command): Pass current_inferior() down to
5344 target_detach.
5345 * infrun.c (follow_fork_inferior): Pass parent_inf to
5346 target_detach.
5347 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5348 target_detach.
5349 * linux-nat.c (linux_nat_detach): Add inferior parameter.
5350 * linux-thread-db.c (thread_db_detach): Likewise.
5351 * nto-procfs.c (procfs_detach): Likewise.
5352 * procfs.c (procfs_detach): Likewise.
5353 * record.c (record_detach): Likewise.
5354 * record.h (struct inferior): Forward-declare.
5355 (record_detach): Add inferior parameter.
5356 * remote-sim.c (gdbsim_detach): Likewise.
5357 * remote.c (remote_detach_1): Likewise.
5358 (remote_detach): Likewise.
5359 (extended_remote_detach): Likewise.
5360 * sol-thread.c (sol_thread_detach): Likewise.
5361 * target-debug.h (target_debug_print_inferior_p): New macro.
5362 * target-delegates.c: Re-generate.
5363 * top.c (kill_or_detach): Pass inferior down to target_detach.
5364 * windows-nat.c (windows_detach): Add inferior parameter.
5365
6bd6f3b6
SM
53662018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5367
5368 * target.h (struct target_ops) <to_detach>: Remove args
5369 parameter.
5370 (target_detach): Likewise.
5371 * target.c (dispose_inferior): Adjust.
5372 (target_detach): Remove args parameter, adjust.
5373 * aix-thread.c (aix_thread_detach): Adjust.
5374 * corefile.c (core_file_command): Adjust.
5375 * corelow.c (core_detach): Adjust.
5376 * darwin-nat.c (darwin_detach): Adjust.
5377 * gnu-nat.c (gnu_detach): Adjust.
5378 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5379 * infcmd.c (detach_command): Adjust
5380 * infrun.c (follow_fork_inferior): Adjust.
5381 (handle_vfork_child_exec_or_exit): Adjust.
5382 * linux-fork.c (linux_fork_detach): Remove args parameter.
5383 * linux-fork.h (linux_fork_detach): Likewise.
5384 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5385 * linux-thread-db.c (thread_db_detach): Likewise.
5386 * nto-procfs.c (procfs_detach): Likewise.
5387 * procfs.c (procfs_detach): Likewise.
5388 (do_detach): Remove signo parameter.
5389 * record.c (record_detach): Remove args parameter.
5390 * record.h (record_detach): Likewise.
5391 * remote-sim.c (gdbsim_detach): Likewise.
5392 * remote.c (remote_detach_1): Likewise.
5393 (remote_detach): Likewise.
5394 (extended_remote_detach): Likewise.
5395 * sol-thread.c (sol_thread_detach): Likewise.
5396 * target-delegates.c: Re-generate.
5397 * top.c (struct qt_args) <args>: Remove field.
5398 (kill_or_detach): Don't pass args.
5399 (quit_force): Don't set args.
5400 * windows-nat.c (windows_detach): Remove args parameter.
5401
88af8ea8
YQ
54022018-01-19 Yao Qi <yao.qi@linaro.org>
5403
5404 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5405 (arm_linux_init_abi): Install it.
5406
dea445b9
YQ
54072018-01-19 Yao Qi <yao.qi@linaro.org>
5408
5409 * osabi.c (gdb_osabi_names): Extend the regexp for
5410 arm-linux-gnueabihf.
5411
4a17f768
YQ
54122018-01-18 Yao Qi <yao.qi@linaro.org>
5413
5414 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5415 m_abbrevs.
5416 (abbrev_table::add_abbrev): Update.
5417 (abbrev_table::lookup_abbrev): Update.
5418
d679c21a
YQ
54192018-01-18 Yao Qi <yao.qi@linaro.org>
5420
5421 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5422
7d937cad
SDJ
54232018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
5424
5425 * compile/compile.c (compile_to_object): Convert "triplet_rx"
5426 to "std::string".
5427
9e14690d
TT
54282018-01-17 Tom Tromey <tom@tromey.com>
5429
5430 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
5431
50a82047
TT
54322018-01-17 Tom Tromey <tom@tromey.com>
5433
5434 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5435 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5436 (create_array_type_with_stride): Update.
5437 * dwarf2read.c (set_die_type): Update.
5438
c89b44cd
TT
54392018-01-17 Tom Tromey <tom@tromey.com>
5440
5441 * dwarf2read.c (delayed_method_info): Remove typedef.
5442 (dwarf2_cu::method_info): Now a std::vector.
5443 (add_to_method_list): Update.
5444 (free_delayed_list): Remove.
5445 (compute_delayed_physnames): Update.
5446 (process_full_comp_unit, process_full_type_unit): Clear the method
5447 list. Remove cleanups.
5448 (psymtab_include_file_name): Add name_holder parameter. Use
5449 unique_xmalloc_ptr.
5450 (dwarf_decode_lines): Update.
5451
fcd3b13d
SM
54522018-01-17 Tom Tromey <tom@tromey.com>
5453 Simon Marchi <simon.marchi@ericsson.com>
5454
5455 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5456 (dwarf2_per_objfile::free_cached_comp_units)
5457 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5458 (init_cutu_and_read_dies_no_follow): Update.
5459 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5460 (dwarf2_cu::~dwarf2_cu): New.
5461 (free_heap_comp_unit, free_stack_comp_unit): Remove.
5462 (age_cached_comp_units, free_one_cached_comp_unit): Update.
5463
685af9cd
TT
54642018-01-17 Tom Tromey <tom@tromey.com>
5465 Simon Marchi <simon.marchi@ericsson.com>
5466
5467 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5468 (struct die_reader_specs) <abbrev_table>: New member.
5469 (struct abbrev_table): Add constructor.
5470 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5471 <abbrev_obstack>: Now an auto_obstack.
5472 (abbrev_table_up): New typedef.
5473 (init_cu_die_reader): Add abbrev_table parameter.
5474 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5475 Add result_dwo_abbrev_table.
5476 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5477 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5478 Update.
5479 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5480 parameter.
5481 (skip_children): Update.
5482 (abbrev_table::alloc_abbrev): Rename from
5483 abbrev_table_alloc_abbrev.
5484 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5485 (abbrev_table::lookup_abbrev): Rename from
5486 abbrev_table_lookup_abbrev.
5487 (abbrev_table_read_table): Return abbrev_table_up.
5488 (abbrev_table_free, abbrev_table_free_cleanup)
5489 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5490 (load_partial_dies): Update.
5491
5e2db402
TT
54922018-01-17 Tom Tromey <tom@tromey.com>
5493
5494 * dwarf2read.c (dwarf2_compute_name): Update comment.
5495 (read_func_scope, read_variable): Update.
5496 (new_symbol): Remove.
5497 (new_symbol_full): Rename to new_symbol.
5498
ee7f689e 54992018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
5500
5501 PR gdb/16577
5502 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5503 a warning instead of throwing an error, set section size to 0 and return
5504 NULL.
5505 * gdb_bfd.h (gdb_bfd_map_section): Update description.
5506
4d9b86e1
SM
55072018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5510 std::string.
5511 (linux_ptrace_attach_fail_reason_string): Likewise.
5512 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5513 Likewise.
5514 (linux_ptrace_attach_fail_reason_string): Likewise.
5515 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5516
a7b2d0fb
SM
55172018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5518
5519 * linux-nat.c (linux_nat_attach): Remove xstrdup.
5520
f517c180
EA
55212018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5522
5523 PR gdb/21559
5524 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5525 checking for fs_base/gs_base fields in struct user_regs_struct.
5526 * configure: Regenerate.
5527
7045b1ca
YQ
55282018-01-17 Yao Qi <yao.qi@linaro.org>
5529
5530 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5531 function.
5532 (aarch64_linux_init_abi): Install it to gdbarch hook
5533 gcc_target_options.
5534
db422fb2
PA
55352018-01-15 Pedro Alves <palves@redhat.com>
5536
5537 * common/signals-state-save-restore.c
5538 (save_original_signals_state): Fix typos.
5539
ba643918
SDJ
55402017-01-12 Tom Tromey <tom@tromey.com>
5541 Sergio Durigan Junior <sergiodj@redhat.com>
5542
5543 * Makefile.in (install-only): Install gdb-add-index.
5544
906b4aac
JB
55452018-01-12 John Baldwin <jhb@FreeBSD.org>
5546
5547 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5548
bdf2a94a
AA
55492018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5550
5551 * infrun.c (keep_going_pass_signal): Clear step-over info when
5552 insert_breakpoints fails.
5553
71d378ae
PA
55542018-01-11 Pedro Alves <palves@redhat.com>
5555
5556 PR gdb/22583
5557 * infrun.c (resume): Rename to ...
5558 (resume_1): ... this.
5559 (resume): Reimplement as wrapper around resume_1.
5560
3cada740
PA
55612018-01-11 Pedro Alves <palves@redhat.com>
5562
5563 PR remote/22597
5564 * remote.c (remote_parse_stop_reply): Default to the last-set
5565 general thread instead of to 'magic_null_ptid'.
5566
618daa93
PA
55672018-01-10 Pedro Alves <palves@redhat.com>
5568
5569 * language.h (language_get_symbol_name_matcher): Rename ...
5570 (get_symbol_name_matcher): ... this.
5571 * language.c (language_get_symbol_name_matcher): Ditto.
5572 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5573 callers adjusted.
5574
c63d3e8d
PA
55752018-01-10 Pedro Alves <palves@redhat.com>
5576
5577 PR gdb/22670
5578 * dwarf2read.c
5579 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5580 Adjust to use language_get_symbol_name_matcher instead of
5581 language_defn::la_get_symbol_name_matcher.
5582 * language.c (language_get_symbol_name_matcher): If in Ada mode
5583 and the lookup name is a verbatim match, return Ada's matcher.
5584 * language.h (language_get_symbol_name_matcher): Adjust comment.
5585 (ada_lookup_name_info::verbatim_p):: New method.
5586
d4c2a405
PA
55872018-01-10 Pedro Alves <palves@redhat.com>
5588
5589 PR gdb/22670
5590 * ada-lang.c (ada_collect_symbol_completion_matches): If the
5591 minsym's language is language_auto or language_cplus, pass down
5592 language_ada instead.
5593 * symtab.c (compare_symbol_name): Don't frob symbol language here.
5594
8825213e
PA
55952018-01-10 Pedro Alves <palves@redhat.com>
5596
5597 PR gdb/22670
5598 * minsyms.c (linkage_name_str): New function.
5599 (iterate_over_minimal_symbols): Use it.
5600
2d97a5d9
JB
56012018-01-09 John Baldwin <jhb@FreeBSD.org>
5602
5603 * NEWS: Document that 'info proc' now works on FreeBSD.
5604
92fce24d
JB
56052018-01-09 John Baldwin <jhb@FreeBSD.org>
5606
5607 * configure.ac: Check for kinfo_getfile in libutil.
5608 * configure: Regenerate.
5609 * config.in: Regenerate.
5610 * fbsd-nat.c: Include "fbsd-tdep.h".
5611 (fbsd_fetch_cmdline): New.
5612 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5613 rather than calling error.
5614 (fbsd_info_proc): New.
5615 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5616 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5617 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5618
262f62f5
JB
56192018-01-09 John Baldwin <jhb@FreeBSD.org>
5620
5621 * fbsd-nat.c (struct free_deleter): Remove.
5622 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5623
b999e203
JB
56242018-01-09 John Baldwin <jhb@FreeBSD.org>
5625
5626 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5627 NULL for an empty pathname.
5628
d2176225
JB
56292018-01-09 John Baldwin <jhb@FreeBSD.org>
5630
5631 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5632 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5633 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5634 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5635 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5636 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5637 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5638 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5639 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5640 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5641 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5642 (fbsd_core_fetch_timeval, fbsd_print_sigset)
5643 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5644 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
5645 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5646
9c4ac400
ST
56472018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
5648
5649 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5650 (gnu_xfer_auxv): New function.
5651 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5652 TARGET_OBJECT_AUXV.
5653
1e5ded6c
YQ
56542018-01-08 Yao Qi <yao.qi@linaro.org>
5655 Simon Marchi <simon.marchi@ericsson.com>
5656
5657 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5658 common/selftest.c.
5659 (COMMON_OBS): Remove selftest.o.
5660 * configure.ac: Append selftest-arch.c and common/selftest.c to
5661 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
5662 * configure: Re-generated.
5663 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5664 GDB_SELF_TEST.
5665 (maintenance_info_selftests): Likewise.
5666
04bafb1e
XR
56672018-01-08 Xavier Roirand <roirand@adacore.com>
5668
5669 * ada-valprint.c (val_print_packed_array_elements): Use
5670 proper number of elements when printing an array indexed
5671 by an enumeration type.
5672
518817b3
SM
56732018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5674
5675 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5676 (dw2_get_file_names_reader): Adjust.
5677 (lookup_dwo_signatured_type): Adjust.
5678 (lookup_dwp_signatured_type): Adjust.
5679 (lookup_signatured_type): Adjust.
5680 (create_type_unit_group): Adjust.
5681 (get_type_unit_group): Adjust.
5682 (process_psymtab_comp_unit_reader): Adjust.
5683 (build_type_psymtabs_reader): Adjust.
5684 (scan_partial_symbols): Adjust.
5685 (add_partial_symbol): Adjust.
5686 (add_partial_subprogram): Adjust.
5687 (peek_die_abbrev): Adjust.
5688 (fixup_go_packaging): Adjust.
5689 (process_imported_unit_die): Adjust.
5690 (dwarf2_compute_name): Adjust.
5691 (dwarf2_physname): Adjust.
5692 (read_import_statement): Adjust.
5693 (handle_DW_AT_stmt_list): Adjust.
5694 (read_file_scope): Adjust.
5695 (read_func_scope): Adjust.
5696 (read_lexical_block_scope): Adjust.
5697 (read_call_site_scope): Adjust.
5698 (read_variable): Adjust.
5699 (dwarf2_rnglists_process): Adjust.
5700 (dwarf2_ranges_process): Adjust.
5701 (dwarf2_ranges_read): Adjust.
5702 (dwarf2_get_pc_bounds): Adjust.
5703 (dwarf2_record_block_ranges): Adjust.
5704 (dwarf2_add_field): Adjust.
5705 (dwarf2_add_member_fn): Adjust.
5706 (read_structure_type): Adjust.
5707 (process_structure_scope): Adjust.
5708 (read_enumeration_type): Adjust.
5709 (read_array_type): Adjust.
5710 (mark_common_block_symbol_computed): Adjust.
5711 (read_common_block): Adjust.
5712 (read_namespace_type): Adjust.
5713 (read_namespace): Adjust.
5714 (read_module_type): Adjust.
5715 (read_tag_pointer_type): Adjust.
5716 (read_tag_ptr_to_member_type): Adjust.
5717 (read_tag_string_type): Adjust.
5718 (read_subroutine_type): Adjust.
5719 (read_typedef): Adjust.
5720 (read_base_type): Adjust.
5721 (attr_to_dynamic_prop): Adjust.
5722 (read_subrange_type): Adjust.
5723 (read_unspecified_type): Adjust.
5724 (dwarf2_read_abbrevs): Adjust.
5725 (load_partial_dies): Adjust.
5726 (read_partial_die): Adjust.
5727 (find_partial_die): Adjust.
5728 (guess_partial_die_structure_name): Adjust.
5729 (fixup_partial_die): Adjust.
5730 (read_attribute_value): Adjust.
5731 (read_addr_index): Adjust.
5732 (read_addr_index_from_leb128): Adjust.
5733 (read_str_index): Adjust.
5734 (dwarf2_string_attr): Adjust.
5735 (get_debug_line_section): Adjust.
5736 (dwarf_decode_line_header): Adjust.
5737 (lnp_state_machine::check_line_address): Adjust.
5738 (dwarf_decode_lines_1): Adjust.
5739 (dwarf_decode_lines): Adjust.
5740 (dwarf2_start_symtab): Adjust.
5741 (var_decode_location): Adjust.
5742 (new_symbol_full): Adjust.
5743 (dwarf2_const_value_data): Adjust.
5744 (dwarf2_const_value_attr): Adjust.
5745 (dwarf2_const_value): Adjust.
5746 (die_type): Adjust.
5747 (die_containing_type): Adjust.
5748 (build_error_marker_type): Adjust.
5749 (lookup_die_type): Adjust.
5750 (guess_full_die_structure_name): Adjust.
5751 (anonymous_struct_prefix): Adjust.
5752 (determine_prefix): Adjust.
5753 (dwarf2_name): Adjust.
5754 (follow_die_ref_or_sig): Adjust.
5755 (follow_die_offset): Adjust.
5756 (follow_die_ref): Adjust.
5757 (follow_die_sig_1): Adjust.
5758 (follow_die_sig): Adjust.
5759 (get_signatured_type): Adjust.
5760 (get_DW_AT_signature_type): Adjust.
5761 (decode_locdesc): Adjust.
5762 (dwarf_decode_macros): Adjust.
5763 (cu_debug_loc_section): Adjust.
5764 (fill_in_loclist_baton): Adjust.
5765 (dwarf2_symbol_mark_computed): Adjust.
5766 (init_one_comp_unit): Don't assign
5767 dwarf2_cu::dwarf2_per_objfile.
5768 (set_die_type): Adjust.
5769
ed2dc618
SM
57702018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5771
5772 * dwarf2read.c (struct mapped_debug_names): Add constructor.
5773 <dwarf2_per_objfile>: New field.
5774 (dwarf2_per_objfile): Remove global.
5775 (get_dwarf2_per_objfile): New function.
5776 (set_dwarf2_per_objfile): New function.
5777 (dwarf2_build_psymtabs_hard): Change objfile parameter to
5778 dwarf2_per_objfile.
5779 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5780 (read_abbrev_offset): Likewise.
5781 (read_indirect_string): Likewise.
5782 (read_indirect_line_string): Likewise.
5783 (read_indirect_string_at_offset): Likewise.
5784 (read_indirect_string_from_dwz): Likewise.
5785 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5786 dwarf2_per_objfile.
5787 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5788 (create_all_comp_units): Change objfile parameter to
5789 dwarf2_per_objfile.
5790 (create_all_type_units): Likewise.
5791 (process_queue): Add dwarf2_per_objfile parameter.
5792 (read_and_check_comp_unit_head): Likewise.
5793 (lookup_dwo_unit_in_dwp): Likewise.
5794 (get_dwp_file): Likewise.
5795 (process_cu_includes): Likewise.
5796 (struct free_dwo_file_cleanup_data): New struct.
5797 (dwarf2_has_info): Use get_dwarf2_per_objfile and
5798 set_dwarf2_per_objfile.
5799 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5800 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5801 context, adjust calls.
5802 (dw2_instantiate_symtab): Likewise.
5803 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5804 (dw2_get_cu): Likewise.
5805 (create_cu_from_index_list): Change objfile parameter to
5806 dwarf2_per_objfile.
5807 (create_cus_from_index_list): Get dwarf2_per_objfile from
5808 context, adjust calls.
5809 (create_cus_from_index): Likewise.
5810 (create_signatured_type_table_from_index): Change objfile
5811 parameter to dwarf2_per_objfile.
5812 (create_signatured_type_table_from_debug_names): Change objfile
5813 parameter to dwarf2_per_objfile.
5814 (create_addrmap_from_index): Likewise.
5815 (create_addrmap_from_aranges): Likewise.
5816 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5817 (dw2_setup): Remove.
5818 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5819 context.
5820 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5821 get_dwarf2_per_objfile.
5822 (dw2_forget_cached_source_info): Likewise.
5823 (dw2_map_symtabs_matching_filename): Likewise.
5824 (struct dw2_symtab_iterator) <index>: Remove.
5825 <dwarf2_per_objfile>: New field.
5826 (dw2_symtab_iter_init): Replace index parameter with
5827 dwarf2_per_objfile.
5828 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5829 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5830 (dw2_print_stats): Likewise.
5831 (dw2_dump): Likewise.
5832 (dw2_expand_symtabs_for_function): Likewise.
5833 (dw2_expand_all_symtabs): Likewise.
5834 (dw2_expand_symtabs_with_fullname): Likewise.
5835 (dw2_expand_marked_cus): Replace index and objfile parameters
5836 with dwarf2_per_objfile.
5837 (dw_expand_symtabs_matching_file_matcher): Add
5838 dwarf2_per_objfile parameter and adjust calls.
5839 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
5840 adjust calls.
5841 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
5842 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
5843 adjust calls.
5844 (create_cus_from_debug_names_list): Replace objfile parameter
5845 with dwarf2_per_objfile and adjust calls.
5846 (create_cus_from_debug_names): Likewise.
5847 (dwarf2_read_debug_names): Likewise.
5848 (mapped_debug_names::namei_to_name): Adjust call.
5849 (dw2_debug_names_iterator::next): Likewise.
5850 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
5851 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
5852 (dw2_debug_names_dump): Likewise.
5853 (dw2_debug_names_expand_symtabs_for_function): Likewise.
5854 (dw2_debug_names_expand_symtabs_matching): Likewise.
5855 (dwarf2_initialize_objfile): Likewise.
5856 (dwarf2_build_psymtabs): Likewise.
5857 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
5858 this_cu.
5859 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
5860 (read_and_check_comp_unit_head): Likewise.
5861 (read_abbrev_offset): Likewise.
5862 (create_debug_type_hash_table): Likewise.
5863 (create_debug_types_hash_table): Likewise.
5864 (create_all_type_units): Replace objfile parameter with
5865 dwarf2_per_objfile.
5866 (add_type_unit): Add dwarf2_per_objfile parameter.
5867 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
5868 with dwarf2_per_objfile.
5869 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
5870 (lookup_dwp_signatured_type): Likewise.
5871 (lookup_signatured_type): Likewise.
5872 (read_cutu_die_from_dwo): Likewise.
5873 (init_tu_and_read_dwo_dies): Likewise.
5874 (init_cutu_and_read_dies): Likewise.
5875 (init_cutu_and_read_dies_no_follow): Likewise.
5876 (allocate_type_unit_groups_table): Add objfile parameter.
5877 (create_type_unit_group): Use dwarf2_per_objfile from cu.
5878 (get_type_unit_group): Likewise.
5879 (process_psymtab_comp_unit): Update call.
5880 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
5881 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
5882 (print_tu_stats): Likewise.
5883 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
5884 in void* parameter.
5885 (build_type_psymtabs): Change objfile parameter to
5886 dwarf2_per_objfile.
5887 (process_skeletonless_type_unit): Use dwarf2_per_objfile
5888 passed in void* parameter.
5889 (process_skeletonless_type_units): Change objfile parameter to
5890 dwarf2_per_objfile.
5891 (set_partial_user): Likewise.
5892 (dwarf2_build_psymtabs_hard): Likewise.
5893 (read_comp_units_from_section): Likewise.
5894 (create_all_comp_units): Likewise.
5895 (scan_partial_symbols): Update calls.
5896 (add_partial_symbol): Likewise.
5897 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
5898 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
5899 (process_queue): Add dwarf2_per_objfile parameter.
5900 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
5901 (compute_compunit_symtab_includes): Likewise.
5902 (process_cu_includes): Add dwarf2_per_objfile parameter.
5903 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
5904 (process_full_type_unit): Likewise.
5905 (process_imported_unit_die): Update call.
5906 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
5907 (read_file_scope): Likewise.
5908 (allocate_dwo_file_hash_table): Add objfile parameter.
5909 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
5910 (create_cus_hash_table): Likewise.
5911 (create_dwp_hash_table): Likewise.
5912 (create_dwo_unit_in_dwp_v1): Likewise.
5913 (create_dwp_v2_section): Likewise.
5914 (create_dwo_unit_in_dwp_v2): Likewise.
5915 (lookup_dwo_unit_in_dwp): Likewise.
5916 (try_open_dwop_file): Likewise.
5917 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
5918 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
5919 cleanup to include a reference to dwarf2_per_objfile.
5920 (open_dwp_file): Add dwarf2_per_objfile parameter.
5921 (open_and_init_dwp_file): Likewise.
5922 (get_dwp_file): Likewise.
5923 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
5924 (queue_and_load_all_dwo_tus): Update call.
5925 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
5926 data.
5927 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
5928 (dwarf2_ranges_process): Likewise.
5929 (dwarf2_get_pc_bounds): Likewise.
5930 (mark_common_block_symbol_computed): Likewise.
5931 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5932 (dwarf2_read_abbrevs): Update call.
5933 (read_partial_die): Use dwarf2_per_objfile from cu.
5934 (find_partial_die): Likewise.
5935 (fixup_partial_die): Likewise.
5936 (read_attribute_value): Likewise.
5937 (read_indirect_string_at_offset_from): Add objfile parameter.
5938 (read_indirect_string_at_offset): Add dwarf2_per_objfile
5939 parameter.
5940 (read_indirect_string_from_dwz): Add objfile parameter.
5941 (read_indirect_string): Add objfile parameter.
5942 (read_addr_index_1): Add dwarf2_per_objfile parameter.
5943 (read_addr_index): Use dwarf2_per_objfile from cu.
5944 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
5945 call dw2_setup.
5946 (read_str_index): Use dwarf2_per_objfile from cu.
5947 (get_debug_line_section): Likewise.
5948 (read_formatted_entries): Add dwarf2_per_objfile parameter.
5949 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
5950 (new_symbol_full): Use dwarf2_per_objfile from cu.
5951 (build_error_marker_type): Likewise.
5952 (lookup_die_type): Likewise.
5953 (determine_prefix): Likewise.
5954 (follow_die_offset): Likewise.
5955 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
5956 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
5957 (dwarf2_fetch_die_type_sect_off): Likewise.
5958 (dwarf2_get_die_type): Likewise.
5959 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
5960 (get_signatured_type): Likewise.
5961 (get_DW_AT_signature_type): Likewise.
5962 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
5963 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
5964 (cu_debug_loc_section): Likewise.
5965 (fill_in_loclist_baton): Likewise.
5966 (dwarf2_symbol_mark_computed): Likewise.
5967 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5968 dwarf2_per_objfile.
5969 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
5970 parameter.
5971 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5972 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
5973 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
5974 (set_die_type): Use dwarf2_free_objfile from cu.
5975 (get_die_type_at_offset): Likewise.
5976 (dwarf2_per_objfile_free): Don't assign global variable.
5977 (debug_names) <constructor>: Add dwarf2_per_objfile
5978 parameter, update m_debugstrlookup construction.
5979 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
5980 parameter.
5981 <m_dwarf2_per_objfile>: New field.
5982 <lookup>: Use m_dwarf2_per_objfile.
5983 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
5984 (psyms_seen_size): Likewise.
5985 (write_gdbindex): Replace objfile parameter with
5986 dwarf2_per_objfile.
5987 (write_debug_names): Likewise.
5988 (write_psymtabs_to_index): Likewise.
5989 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
5990 calls.
5991
e3b94546
SM
59922018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5993
5994 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
5995 <dwarf2_per_objfile>: New field.
5996 (struct dwarf2_per_cu_data) <objfile>: Remove.
5997 <dwarf2_per_objfile>: New field.
5998 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
5999 of objfile.
6000 (create_signatured_type_table_from_index): Likewise.
6001 (create_debug_type_hash_table): Likewise.
6002 (fill_in_sig_entry_from_dwo_entry): Likewise.
6003 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6004 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6005 objfile.
6006 (create_partial_symtab): Access objfile through
6007 dwarf2_per_objfile.
6008 (process_psymtab_comp_unit_reader): Likewise.
6009 (read_comp_units_from_section): Likewise.
6010 (scan_partial_symbols): Likewise.
6011 (add_partial_symbol): Likewise.
6012 (add_partial_subprogram): Likewise.
6013 (peek_die_abbrev): Likewise.
6014 (fixup_go_packaging): Likewise.
6015 (process_full_comp_unit): Likewise.
6016 (process_full_type_unit): Likewise.
6017 (process_imported_unit_die): Likewise.
6018 (dwarf2_compute_name): Likewise.
6019 (dwarf2_physname): Likewise.
6020 (read_import_statement): Likewise.
6021 (create_cus_hash_table): Assign dwarf2_physname instead of
6022 objfile.
6023 (read_func_scope): Access objfile through dwarf2_per_objfile.
6024 (read_lexical_block_scope): Likewise.
6025 (read_call_site_scope): Likewise.
6026 (read_variable): Likewise.
6027 (dwarf2_rnglists_process): Likewise.
6028 (dwarf2_ranges_process): Likewise.
6029 (dwarf2_ranges_read): Likewise.
6030 (dwarf2_record_block_ranges): Likewise.
6031 (dwarf2_add_field): Likewise.
6032 (dwarf2_add_member_fn): Likewise.
6033 (read_structure_type): Likewise.
6034 (process_structure_scope): Likewise.
6035 (read_enumeration_type): Likewise.
6036 (read_array_type): Likewise.
6037 (read_common_block): Likewise.
6038 (read_namespace_type): Likewise.
6039 (read_namespace): Likewise.
6040 (read_module_type): Likewise.
6041 (read_tag_pointer_type): Likewise.
6042 (read_tag_ptr_to_member_type): Likewise.
6043 (read_tag_string_type): Likewise.
6044 (read_subroutine_type): Likewise.
6045 (read_typedef): Likewise.
6046 (read_base_type): Likewise.
6047 (attr_to_dynamic_prop): Likewise.
6048 (read_subrange_type): Likewise.
6049 (read_unspecified_type): Likewise.
6050 (load_partial_dies): Likewise.
6051 (read_partial_die): Likewise.
6052 (find_partial_die): Likewise.
6053 (guess_partial_die_structure_name): Likewise.
6054 (fixup_partial_die): Likewise.
6055 (read_attribute_value): Likewise.
6056 (read_addr_index_from_leb128): Likewise.
6057 (dwarf2_read_addr_index): Likewise.
6058 (dwarf2_string_attr): Likewise.
6059 (lnp_state_machine::check_line_address): Likewise.
6060 (dwarf_decode_lines_1): Likewise.
6061 (dwarf_decode_lines): Likewise.
6062 (dwarf2_start_symtab): Likewise.
6063 (var_decode_location): Likewise.
6064 (new_symbol_full): Likewise.
6065 (dwarf2_const_value_data): Likewise.
6066 (dwarf2_const_value_attr): Likewise.
6067 (dwarf2_const_value): Likewise.
6068 (die_type): Likewise.
6069 (die_containing_type): Likewise.
6070 (lookup_die_type): Likewise.
6071 (guess_full_die_structure_name): Likewise.
6072 (anonymous_struct_prefix): Likewise.
6073 (dwarf2_name): Likewise.
6074 (follow_die_ref_or_sig): Likewise.
6075 (follow_die_offset): Likewise.
6076 (follow_die_ref): Likewise.
6077 (dwarf2_fetch_die_loc_sect_off): Likewise.
6078 (dwarf2_fetch_constant_bytes): Likewise.
6079 (dwarf2_fetch_die_type_sect_off): Likewise.
6080 (dwarf2_get_die_type): Likewise.
6081 (follow_die_sig): Likewise.
6082 (decode_locdesc): Likewise.
6083 (dwarf2_per_cu_objfile): Likewise.
6084 (dwarf2_per_cu_text_offset): Likewise.
6085 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6086 objfile.
6087 (set_die_type): Access objfile through
6088 dwarf2_per_objfile.
6089
b01ba14d
SM
60902018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6091
6092 * valprint.c (converted_character_d): Remove typedef.
6093 (DEF_VEC_O (converted_character_d)): Remove.
6094 (count_next_character): Use std::vector.
6095 (print_converted_chars_to_obstack): Likewise.
6096 (generic_printstr): Likewise.
6097
4d0fdd9b
SM
60982018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6099
6100 * xml-support.h (struct gdb_xml_value): Add constructor.
6101 <value>: Change type to unique_xmalloc_ptr.
6102 (gdb_xml_value_s): Remove typedef.
6103 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6104 (gdb_xml_element_start_handler): Change parameter type to
6105 std::vector.
6106 (xml_find_attribute): Likewise.
6107 * xml-support.c (xml_find_attribute): Change parameter type to
6108 std::vector and adjust.
6109 (gdb_xml_values_cleanup): Remove.
6110 (gdb_xml_parser::start_element): Adjust to std::vector.
6111 (xinclude_start_include): Change paraeter type to std::vector
6112 and adjust.
6113 * btrace.c (check_xml_btrace_version): Likewise.
6114 (parse_xml_btrace_block): Likewise.
6115 (parse_xml_btrace_pt_config_cpu): Likewise.
6116 (parse_xml_btrace_pt): Likewise.
6117 (parse_xml_btrace_conf_bts): Likewise.
6118 (parse_xml_btrace_conf_pt): Likewise.
6119 * memory-map.c (memory_map_start_memory): Likewise.
6120 (memory_map_start_property): Likewise.
6121 * osdata.c (osdata_start_osdata): Likewise.
6122 (osdata_start_item): Likewise.
6123 (osdata_start_column): Likewise.
6124 * remote.c (start_thread): Likewise.
6125 * solib-aix.c (library_list_start_library): Likewise.
6126 (library_list_start_list): Likewise.
6127 * solib-svr4.c (library_list_start_library): Likewise.
6128 (svr4_library_list_start_list): Likewise.
6129 * solib-target.c (library_list_start_segment): Likewise.
6130 (library_list_start_section): Likewise.
6131 (library_list_start_library): Likewise.
6132 (library_list_start_list): Likewise.
6133 * tracepoint.c (traceframe_info_start_memory): Likewise.
6134 (traceframe_info_start_tvar): Likewise.
6135 * xml-syscall.c (syscall_start_syscall): Likewise.
6136 * xml-tdesc.c (tdesc_start_target): Likewise.
6137 (tdesc_start_feature): Likewise.
6138 (tdesc_start_reg): Likewise.
6139 (tdesc_start_union): Likewise.
6140 (tdesc_start_struct): Likewise.
6141 (tdesc_start_flags): Likewise.
6142 (tdesc_start_enum): Likewise.
6143 (tdesc_start_field): Likewise.
6144 (tdesc_start_enum_value): Likewise.
6145 (tdesc_start_vector): Likewise.
6146
f979c73f
SM
61472018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6148
6149 * extension.h (struct xmethod_worker) <clone>: Remove.
6150 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6151 Remove.
6152 (python_xmethod_worker::clone): Remove.
6153 * valops.c (find_overload_match): Use std::move instead of
6154 clone.
6155
ba18742c
SM
61562018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6157
6158 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6159 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6160 <free_xmethod_worker_data>: Remove.
6161 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6162 <get_xmethod_arg_types>: Remove.
6163 <get_xmethod_result_type>: Remove.
6164 <invoke_xmethod>: Remove.
6165 * extension.c (new_xmethod_worker): Remove.
6166 (clone_xmethod_worker): Remove.
6167 (get_matching_xmethod_workers): Return void, pass std::vector by
6168 pointer.
6169 (get_xmethod_arg_types): Rename to...
6170 (xmethod_worker::get_arg_types): ... this, and adjust.
6171 (get_xmethod_result_type): Rename to...
6172 (xmethod_worker::get_result_type): ... this, and adjust.
6173 (invoke_xmethod): Remove.
6174 (free_xmethod_worker): Remove.
6175 (free_xmethod_worker_vec): Remove.
6176 * extension.h (enum ext_lang_rc): Move here from
6177 extension-priv.h.
6178 (struct xmethod_worker): Add constructor and destructor.
6179 <data>: Remove.
6180 <value>: Remove.
6181 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6182 virtual pure methods.
6183 <get_arg_types, get_result_type>: New methods.
6184 (xmethod_worker_ptr): Remove typedef.
6185 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6186 (xmethod_worker_vec): Remove typedef.
6187 (xmethod_worker_up): New typedef.
6188 (invoke_xmethod): Remove.
6189 (clone_xmethod_worker): Remove.
6190 (free_xmethod_worker): Remove.
6191 (free_xmethod_worker_vec): Remove.
6192 (get_xmethod_arg_types): Remove.
6193 (get_xmethod_result_type): Remove.
6194 * valops.c (find_method_list): Use std::vector, don't use
6195 intermediate vector.
6196 (value_find_oload_method_list): Use std::vector.
6197 (find_overload_match): Use std::vector.
6198 (find_oload_champ): Use std::vector.
6199 * value.c (value_free): Use operator delete.
6200 (value_of_xmethod): Rename to...
6201 (value_from_xmethod): ... this. Don't assign
6202 xmethod_worker::value, take rvalue-reference.
6203 (result_type_of_xmethod): Adjust.
6204 (call_xmethod): Adjust.
6205 * value.h: Include extension.h.
6206 (struct xmethod_worker): Don't forward-declare.
6207 (value_of_xmethod): Rename to...
6208 (value_from_xmethod): ... this, take rvalue-reference.
6209 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6210 (struct python_xmethod_worker): ... this, add constructor and
6211 destructor.
6212 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6213 (gdbpy_free_xmethod_worker_data): Rename to...
6214 (python_xmethod_worker::~python_xmethod_worker): ... this and
6215 adjust.
6216 (gdbpy_clone_xmethod_worker_data): Rename to...
6217 (python_xmethod_worker::clone): ... this and adjust.
6218 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6219 temporary vector.
6220 (gdbpy_get_xmethod_arg_types): Rename to...
6221 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6222 (gdbpy_get_xmethod_result_type): Rename to...
6223 (python_xmethod_worker::do_get_result_type): ... this and
6224 adjust.
6225 (gdbpy_invoke_xmethod): Rename to...
6226 (python_xmethod_worker::invoke): ... this and adjust.
6227 (new_python_xmethod_worker): Rename to...
6228 (python_xmethod_worker::python_xmethod_worker): ... this and
6229 adjust.
6230 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6231 Remove.
6232 (gdbpy_free_xmethod_worker_data): Remove.
6233 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6234 (gdbpy_get_xmethod_arg_types): Remove.
6235 (gdbpy_get_xmethod_result_type): Remove.
6236 (gdbpy_invoke_xmethod): Remove.
6237 * python/python.c (python_extension_ops): Remove obsolete
6238 callbacks.
6239
e379cee6
PA
62402018-01-05 Pedro Alves <palves@redhat.com>
6241
6242 PR gdb/18653
6243 * common/signals-state-save-restore.c
6244 (save_original_signals_state): New parameter 'quiet'. Warn if we
6245 find a custom handler preinstalled, instead of internal erroring.
6246 But only warn if !quiet.
6247 * common/signals-state-save-restore.h
6248 (save_original_signals_state): New parameter 'quiet'.
6249 * main.c (captured_main_1): Move save_original_signals_state call
6250 after option handling, and pass QUIET.
6251
a655456c
PA
62522018-01-05 Pedro Alves <palves@redhat.com>
6253
6254 * spu-tdep.c (spu_catch_start): Pass
6255 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6256
de63c46b
PA
62572018-01-05 Pedro Alves <palves@redhat.com>
6258
6259 PR gdb/22670
6260 * ada-lang.c (literal_symbol_name_matcher): New function.
6261 (ada_get_symbol_name_matcher): Use it for
6262 symbol_name_match_type::SEARCH_NAME.
6263 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6264 it down instead of assuming symbol_name_match_type::FULL.
6265 * block.h (block_lookup_symbol): New parameter 'match_type'.
6266 * c-valprint.c (print_unpacked_pointer): Use
6267 lookup_symbol_search_name instead of lookup_symbol.
6268 * compile/compile-object-load.c (get_out_value_type): Pass down
6269 symbol_name_match_type::SEARCH_NAME.
6270 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6271 symbol_name_match_type::FULL.
6272 * cp-support.c (cp_get_symbol_name_matcher): Handle
6273 symbol_name_match_type::SEARCH_NAME.
6274 * infrun.c (insert_exception_resume_breakpoint): Use
6275 lookup_symbol_search_name.
6276 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6277 * psymtab.c (maintenance_check_psymtabs): Use
6278 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6279 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6280 SYMBOL_SEARCH_NAME.
6281 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6282 if symbol_name_match_type::SEARCH_NAME.
6283 (lookup_symbol_in_language): Pass down
6284 symbol_name_match_type::FULL.
6285 (lookup_symbol_search_name): New.
6286 (lookup_language_this): Pass down
6287 symbol_name_match_type::SEARCH_NAME.
6288 (lookup_symbol_aux, lookup_local_symbol): New parameter
6289 'match_type'. Pass it down.
6290 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6291 (lookup_symbol_search_name): New declaration.
6292 (lookup_symbol_in_block): New 'match_type' parameter.
6293
f98fc17b
PA
62942018-01-05 Pedro Alves <palves@redhat.com>
6295
6296 PR gdb/22670
6297 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6298 ada_lookup_symbol.
6299 (ada_lookup_symbol): Reimplement in terms of
6300 ada_lookup_symbol_list, bits factored out from
6301 ada_lookup_encoded_symbol.
6302
342f8240
JB
63032018-01-05 Joel Brobecker <brobecker@adacore.com>
6304
6305 * ada-exp.y (write_object_renaming): When subscripting an array
6306 using a symbol as the index, pass the block in call to
6307 ada_lookup_encoded_symbol when looking that symbol up.
6308
7150d33c
JG
63092018-01-05 Jerome Guitton <guitton@adacore.com>
6310
6311 * ada-lang.c (ada_array_length): Use ada_index_type instead of
6312 TYPE_INDEX_TYPE.
6313
cc0e770c
JB
63142018-01-05 Joel Brobecker <brobecker@adacore.com>
6315
6316 * ada-lang.c (ada_to_fixed_value_create): Add handling of
6317 the case where VALUE_LVAL (val0) is not lval_memory.
6318
f79da888 63192018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
6320
6321 * ada-valprint.c (print_optional_low_bound): Handle
6322 character-indexed array printing like boolean-indexed array
6323 printing.
6324
cd385f94
JB
63252018-01-05 Joel Brobecker <brobecker@adacore.com>
6326
6327 * NEWS: Create a new section for the next release branch.
6328 Rename the section of the current branch, now that it has
6329 been cut.
6330
09aca949
JB
63312018-01-05 Joel Brobecker <brobecker@adacore.com>
6332
6333 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6334 * version.in: Bump version to 8.1.50.DATE-git.
6335
9f757bf7
XR
63362018-01-03 Xavier Roirand <roirand@adacore.com>
6337
6338 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6339 Add field.
6340 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6341 Add field.
6342 (default_exception_support_info) <catch_handlers_sym>: Add field.
6343 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6344 (ada_exception_name_addr_1): Add "catch handlers" handling.
6345 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6346 Update all callers.
6347 (create_excep_cond_exprs) <ex>: Add parameter.
6348 (re_set_exception): Update create_excep_cond_exprs call.
6349 (print_it_exception, print_one_exception, print_mention_exception)
6350 (print_recreate_exception): Add "catch handler" handling.
6351 (allocate_location_catch_handlers, re_set_catch_handlers)
6352 (check_status_catch_handlers, print_it_catch_handlers)
6353 (print_one_catch_handlers, print_mention_catch_handlers)
6354 (print_recreate_catch_handlers): New function.
6355 (catch_handlers_breakpoint_ops): New variable.
6356 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6357 Add parameter. Add "catch handler" handling.
6358 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6359 Add "catch handler" handling.
6360 (ada_exception_catchpoint_cond_string): Add "catch handler"
6361 handling.
6362 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6363 call.
6364 (catch_ada_handlers_command): New function.
6365 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6366 operations structure.
6367 (_initialize_ada_language): Add "catch handlers" command entry.
6368 * NEWS: Document "catch handlers" feature.
6369
9fe561ab
JB
63702018-01-02 Joel Brobecker <brobecker@adacore.com>
6371
6372 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6373 account when creating the array type of the slice.
6374 (ada_value_slice): Likewise.
6375
a405673c
JB
63762018-01-02 Joel Brobecker <brobecker@adacore.com>
6377
6378 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6379 New enum value.
6380 (create_array_type_with_stride): Add byte_stride_prop parameter.
6381 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6382 New parameter. Update all callers in this file.
6383 (array_type_has_dynamic_stride): New function.
6384 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6385 of arrays with dynamic byte strides.
6386 * dwarf2read.c (read_array_type): Add support for dynamic
6387 DW_AT_byte_stride attributes.
6388
74a2f8ff
JB
63892018-01-02 Joel Brobecker <brobecker@adacore.com>
6390
6391 * dwarf2read.c (read_unspecified_type): Treat
6392 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6393
e2882c85
JB
63942018-01-01 Joel Brobecker <brobecker@adacore.com>
6395
6396 Update copyright year range in all GDB files.
6397
1690bb24
JB
63982018-01-01 Joel Brobecker <brobecker@adacore.com>
6399
6400 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6401 and gdb/testsuite/gdb.base/step-line.c.
6402
0f0c98a8
JB
64032018-01-01 Joel Brobecker <brobecker@adacore.com>
6404
6405 * copyright.py (main): Dump the contents of
6406 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6407 even if BY_HAND is empty.
6408
82e1e79a
JB
64092018-01-01 Joel Brobecker <brobecker@adacore.com>
6410
6411 * top.c (print_gdb_version): Update Copyright year in version
6412 message.
6413
053f54e5 64142018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 6415
053f54e5 6416 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 6417
053f54e5 6418For older changes see ChangeLog-2017.
c906108c
SS
6419\f
6420Local Variables:
6421mode: change-log
6422left-margin: 8
6423fill-column: 74
6424version-control: never
57da7796 6425coding: utf-8
c906108c 6426End:
This page took 2.418275 seconds and 4 git commands to generate.