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