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