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