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