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