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