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