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