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