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