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