4 * python/py-value.c (valpy_float): Allow conversions from int or
6 (valpy_int, valpy_long): Allow conversions from float.
10 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
11 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
15 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
17 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
21 * windows-nat.c (windows_nat_target::wait): Remove a spurious
22 target_terminal::ours().
26 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
31 * breakpoint.c (update_inserted_breakpoint_locations): Remove
36 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
38 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
39 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
40 * sol-thread.c (ps_pdmodel): Don't guard definition.
42 * procfs.c: Fix formatting.
44 * procfs.c (sysset_t_alloc): Remove.
45 (create_procinfo): Use XNEW instead of sysset_t_alloc.
46 (procfs_debug_inferior): Likewise.
47 (procfs_set_exec_trap): Likewise.
48 (proc_set_traced_sysentry): Don't allocate argp dynamically.
49 (proc_set_traced_sysexit): Likewise.
51 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
52 (dead_procinfo): Likewise.
53 (proc_warn): Likewise.
54 (proc_error): Likewise.
55 (proc_get_LDT_entry): Likewise.
56 (do_attach): Likewise.
57 (procfs_target::pid_to_str): Likewise.
58 (iterate_over_mappings): Likewise.
60 * procfs.c (create_procinfo): Fix ARI warning.
61 (proc_get_status): Likewise.
62 (proc_stop_process): Likewise.
63 (proc_run_process): Likewise.
64 (proc_kill): Likewise.
65 (proc_get_LDT_entry): Likewise.
66 (procfs_find_LDT_entry): Likewise.
67 (proc_update_threads): Likewise.
68 (proc_iterate_over_threads): Likewise.
69 (do_attach): Likewise.
70 (procfs_xfer_memory): Likewise.
71 (invalidate_cache): Likewise.
72 (procfs_target::resume): Likewise.
73 (procfs_init_inferior): Likewise.
74 (procfs_set_exec_trap): Likewise.
75 (procfs_target::thread_alive): Likewise.
76 (procfs_target::pid_to_exec_file): Likewise.
77 (iterate_over_mappings): Likewise.
78 (procfs_target::make_corefile_notes): Likewise.
79 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
81 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
82 (procfs_find_LDT_entry): Likewise.
83 * sol-thread.c (ps_lgetLDT): Likewise.
88 * procfs.c (procfs_target): Declare pid_to_exec_file.
89 (procfs_target::pid_to_exec_file): New.
93 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
95 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
96 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
100 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
101 (supply_fpregset, fill_fpregset): Move ...
102 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
103 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
104 Remove references to ioctl-based procfs.
106 Remove PR_MODEL_NATIVE guards.
107 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
108 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
113 * solib-darwin.c (darwin_get_dyld_bfd): New function.
114 (darwin_solib_get_all_image_info_addr_at_init): Update call.
115 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
119 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
120 (fbsd_print_sockaddr_in6): Likewise.
125 * eval.c (skip_undetermined_arglist): Skip argument list helper.
126 (evaluate_subexp_standard): Return a dummy type when
127 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
128 OP_F77_UNDETERMINED_ARGLIST case.
129 * expression.h (enum noside): Update comment.
133 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
139 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
141 (create_procinfo): Print pids in /proc without leading zeros.
145 * nios2-tdep.c (nios2_gcc_target_options): New.
146 (nios2_gdb_arch_init): Install new hook.
150 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
152 * update-gnulib.sh: Apply patch.
153 * configure: Re-generate.
157 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
158 description. Make "info proc" command descriptions more
163 * NEWS: Mention 'info proc files' command.
167 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
168 descriptors for IP_FILES and IP_ALL.
172 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
173 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
174 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
175 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
176 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
177 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
178 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
179 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
180 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
181 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
182 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
183 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
184 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
185 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
186 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
187 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
188 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
189 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
190 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
191 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
192 (struct fbsd_sockaddr_un): New types.
193 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
194 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
195 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
196 (fbsd_core_info_proc_files): New functions.
197 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
199 * fbsd-tdep.h (fbsd_info_proc_files_header)
200 (fbsd_info_proc_files_entry): New.
204 * defs.h (enum info_proc_what) [IP_FILES]: New value.
205 * infcmd.c (info_proc_cmd_files): New function.
206 (_initialize_infcmd): Register 'info proc files' command.
210 * gnulib/aclocal-m4-deps.mk: Re-generate.
211 * gnulib/aclocal.m4: Re-generate.
212 * gnulib/config.in: Re-generate.
213 * gnulib/configure: Re-generate.
214 * gnulib/import/Makefile.am: Re-generate.
215 * gnulib/import/Makefile.in: Re-generate.
216 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
217 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
218 * gnulib/import/arpa_inet.in.h: New file.
219 * gnulib/import/inet_ntop.c: New file.
220 * gnulib/import/m4/arpa_inet_h.m4: New file.
221 * gnulib/import/m4/inet_ntop.m4: New file.
222 * gnulib/import/m4/netinet_in_h.m4: New file.
223 * gnulib/import/m4/socklen.m4: New file.
224 * gnulib/import/m4/sockpfaf.m4: New file.
225 * gnulib/import/m4/stdalign.m4: New file.
226 * gnulib/import/m4/sys_uio_h.m4: New file.
227 * gnulib/import/netinet_in.in.h: New file.
228 * gnulib/import/stdalign.in.h: New file.
229 * gnulib/import/sys_socket.c: New file.
230 * gnulib/import/sys_socket.in.h: New file.
231 * gnulib/import/sys_uio.in.h: New file.
232 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
237 * gnulib/aclocal-m4-deps.mk: New file.
238 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
243 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
248 * compile/compile-object-load.c (struct
249 link_hash_table_cleanup_data): Add constructor and destructor.
250 Use DISABLE_COPY_AND_ASSIGN.
251 (~link_hash_table_cleanup_data): Rename from
252 link_hash_table_free. Now a destructor.
253 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
257 * compile/compile-object-run.c (do_module_cleanup): Use delete.
258 * compile/compile-object-load.c (struct munmap_list): Move to
260 (munmap_list::add): Rename from munmap_list_add; rewrite.
261 (munmap_list::~munmap_list): Rename from munmap_list_free.
262 (munmap_listp_free_cleanup): Remove.
263 (compile_object_load): Update.
264 * compile/compile-object-load.h (struct munmap_list): Move from
265 compile-object-load.c. Rewrite.
269 * aarch64-tdep.c (pass_in_v): Use register size.
270 (aarch64_extract_return_value): Likewise.
271 (aarch64_store_return_value): Likewise.
275 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
280 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
286 * configure: Rebuild.
287 * configure.ac: Conditionally use -DNDEBUG for Python.
291 * configure: Rebuild.
292 * configure.ac: Use gmp as a library dependency when checking for
297 * python/py-inferior.c (find_inferior_object): Delete.
301 * compile/compile-cplus-types.c
302 (compile_cplus_instance::enter_scope): Don't use new_scope after
307 * common/pathstuff.c (get_standard_cache_dir): Use
308 ~/Library/Caches on macOS.
309 * common/pathstuff.h (get_standard_cache_dir): Update comment.
314 * breakpoint.c (commands_cmd_element): New.
315 (_initialize_breakpoint): Assign commands_cmd_element.
316 * breakpoint.h (commands_cmd_element): New.
317 * cli/cli-script.c (while_cmd_element, if_command,
318 define_cmd_element): New.
319 (command_name_equals): Remove.
320 (process_next_line): Compare commands by pointer, not by name.
321 (_initialize_cli_script): Assign the various cmd_list_element
323 * compile/compile.c (compile_cmd_element): New.
324 (_initialize_compile): Assign compile_cmd_element.
325 * compile/compile.h (compile_cmd_element): New.
326 * guile/guile.c (guile_cmd_element): New.
327 (install_gdb_commands): Assign guile_cmd_element.
328 * guile/guile.h (guile_cmd_element): New.
329 * python/python.c (python_cmd_element): New.
330 (_initialize_python): Assign python_cmd_element.
331 * python/python.h (python_cmd_element): New.
332 * tracepoint.c (while_stepping_cmd_element): New.
333 (_initialize_tracepoint): Assign while_stepping_cmd_element.
334 * tracepoint.h (while_stepping_cmd_element): New.
338 * infrun.c (save_infcall_suspend_state): Return
339 infcall_suspend_state_up.
340 (save_infcall_control_state): Return infcall_control_state_up.
341 * inferior.h (save_infcall_suspend_state)
342 (save_infcall_control_state): Declare later. Return unique
347 * infrun.c (struct stop_context): Declare constructor,
348 destructor, "changed" method.
349 (stop_context::stop_context): Rename from save_stop_context.
350 (stop_context::~stop_context): Rename from
351 release_stop_context_cleanup.
352 (normal_stop): Update.
353 (stop_context::changed): Rename from stop_context_changed. Return
358 * inferior.h (struct infcall_suspend_state_deleter): New.
359 (infcall_suspend_state_up): New typedef.
360 (struct infcall_control_state_deleter): New.
361 (infcall_control_state_up): New typedef.
362 (make_cleanup_restore_infcall_suspend_state)
363 (make_cleanup_restore_infcall_control_state): Don't declare.
364 * infcall.c (call_function_by_hand_dummy): Update.
365 * infrun.c (do_restore_infcall_suspend_state_cleanup)
366 (make_cleanup_restore_infcall_suspend_state): Remove.
367 (do_restore_infcall_control_state_cleanup)
368 (make_cleanup_restore_infcall_control_state): Remove.
372 * gdbthread.h (struct thread_control_state): Add initializer.
373 (class thread_info) <control>: Remove initializer.
374 * inferior.h (struct inferior_control_state): Add initializer.
375 (class inferior) <control>: Remove initializer.
376 (exit_inferior_1): Update.
377 * infrun.c (struct infcall_control_state): Add constructors.
378 (save_infcall_control_state): Use new.
379 (restore_infcall_control_state, discard_infcall_control_state):
384 * infrun.c (struct infcall_suspend_state) <registers>: Now a
386 <siginfo_data>: Now a unique_xmalloc_ptr.
387 (save_infcall_suspend_state, restore_infcall_suspend_state)
388 (discard_infcall_suspend_state)
389 (get_infcall_suspend_state_regcache): Update.
393 * gdbthread.h (struct thread_suspend_state): Add initializers.
394 (class thread_info) <suspend>: Remove initializer.
395 * infrun.c (struct infcall_suspend_state): Add initializers.
396 (save_infcall_suspend_state): Use new.
397 (discard_infcall_suspend_state): Use delete.
401 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
403 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
404 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
405 (py_varobj_iter_new): Likewise.
406 (py_varobj_get_iterator): Use gdbpy_ref.
410 * python/py-threadevent.c (py_get_event_thread): Simplify.
411 * python/py-inferior.c (infpy_thread_from_thread_handle):
412 Return immediately after calling thread_to_thread_object. Use
414 (thread_to_thread_object): Set the exception on a NULL return.
418 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
422 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
427 * python/python-internal.h (thread_to_thread_object): Change
429 * python/py-inferior.c (thread_to_thread_object): Return a new
431 (infpy_thread_from_thread_handle): Update.
432 * python/py-infthread.c (gdbpy_selected_thread): Update.
433 * python/py-stopevent.c (create_stop_event_object): Update.
434 * python/py-threadevent.c (py_get_event_thread): Return a new
436 (py_get_event_thread): Update.
437 * python/py-event.h (py_get_event_thread): Change return type.
438 * python/py-continueevent.c (create_continue_event_object):
443 * python/py-progspace.c (pspy_get_objfiles): Update.
444 * python/python-internal.h (objfile_to_objfile_object): Change
446 * python/py-newobjfileevent.c (create_new_objfile_event_object):
448 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
450 * python/python.c (gdbpy_get_current_objfile): Update.
451 (gdbpy_objfiles): Update.
452 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
454 (objfile_to_objfile_object): Return a new reference.
455 * python/py-symtab.c (stpy_get_objfile): Update.
456 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
461 * python/py-inferior.c (infpy_get_progspace): Update.
462 * python/python-internal.h (pspace_to_pspace_object): Change
464 * python/py-newobjfileevent.c
465 (create_clear_objfiles_event_object): Update.
466 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
468 * python/python.c (gdbpy_get_current_progspace): Update.
469 (gdbpy_progspaces): Update.
470 * python/py-progspace.c (pspace_to_pspace_object): Return a new
472 * python/py-objfile.c (objfpy_get_progspace): Update.
473 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
478 * python/lib/gdb/__init__.py (current_progspace, objfiles)
479 (solib_name, block_for_pc, find_pc_line): New functions.
480 (execute_unwinders): Update.
481 * python/py-block.c (gdbpy_block_for_pc): Remove.
482 * python/py-inferior.c (infpy_get_progspace): New function.
483 (inferior_object_getset) <progspace>: Add.
484 * python/py-progspace.c (pspy_objfiles): Rewrite.
485 (pspy_solib_name, pspy_block_for_pc)
486 (pspy_find_pc_line, pspy_is_valid): New functions.
487 (progspace_object_methods): Add entries for solib_name,
488 block_for_pc, find_pc_line, is_valid.
489 * python/python-internal.h (gdbpy_block_for_pc)
490 (build_objfiles_list): Don't declare.
491 * python/python.c: Don't include solib.h.
492 (gdbpy_solib_name, gdbpy_find_pc_line)
493 (gdbpy_get_current_progspace, build_objfiles_list)
494 (gdbpy_objfiles): Remove.
495 (GdbMethods) <current_progspace, objfiles, block_for_pc,
496 solib_name, find_pc_line>: Remove entries.
500 * top.c (new_ui_command): Use GNU style for metasyntactic
502 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
504 * maint.c (maintenance_translate_address): Remove "<>" around
506 * interps.c (interpreter_exec_cmd): Use GNU style for
507 metasyntactic variables.
508 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
509 metasyntactic variables.
510 * tracepoint.c (tfind_range_command): Use GNU style for
511 metasyntactic variables.
512 (tfind_outside_command): Likewise.
513 (_initialize_tracepoint): Likewise.
514 * remote.c (extended_remote_target::create_inferior): Use GNU
515 style for metasyntactic variables.
516 * sparc64-tdep.c (adi_examine_command): Use GNU style for
517 metasyntactic variables.
518 (adi_assign_command): Likewise.
522 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
523 metasyntactic variables. Print message if no disassembler options
528 * infcmd.c (get_inferior_args): Return const char *.
529 * inferior.h (get_inferior_args): Return type now const.
530 * linux-tdep.c (linux_fill_prpsinfo): Update.
531 * procfs.c (procfs_target::make_corefile_notes): Update.
535 * python/python.c (execute_gdb_command): Call bpstat_do_actions
540 * nios2-tdep.c (nios2_type_align): New.
541 (nios2_gdb_arch_init): Install type_align hook.
545 * eval.c (fake_method::fake_method): Call xzalloc directly for a
546 type that is neither object file owned, nor gdbarch owned.
547 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
549 (alloc_type_instance): Allocate non-objfile owned types on the
551 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
552 using TYPE_ALLOC to ensure memory is allocated on the correct
554 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
555 obstack, or the gdbarch obstack.
556 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
560 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
565 * nat/fork-inferior.c (get_startup_shell): Remove "static".
569 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
574 * exec.c (try_open_exec_file): Use std::string.
578 * utils.h (gdb_bfd_errmsg): Return std::string.
579 * exec.c (exec_file_attach): Update.
580 * compile/compile-object-load.c (compile_object_load): Update.
581 * utils.c (gdb_bfd_errmsg): Return std::string.
585 * procfs.c (struct procinfo_deleter): New.
586 (procinfo_up): New typedef.
587 (do_destroy_procinfo_cleanup): Remove.
588 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
592 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
597 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
598 (pspy_get_objfiles): New function.
599 (progspace_object_methods): New.
600 (pspace_object_type): Add tp_methods callback.
601 * python/python-internal.h (build_objfiles_list): New
603 * python/python.c (build_objfiles_list): New function.
604 (gdbpy_objfiles): Implement using build_objfiles_list.
605 * NEWS: Mention the Progspace.objfiles method.
609 * python/py-inferior.c (infpy_get_progspace): New function.
610 (inferior_object_getset): Add progspace property.
611 * NEWS: Mention the new property.
616 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
621 * rust-lang.c (rust_enum_variant): Now static.
622 (rust_empty_enum_p): New function.
623 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
628 * python/py-inferior.c (infpy_repr): New.
629 (inferior_object_type): Register infpy_repr.
630 * python/py-objfile.c (objfpy_repr): New.
631 (objfile_object_type): Register objfpy_repr.
635 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
639 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
644 * common/common-utils.c: Don't include '<sys/stat.h>'.
645 (is_regular_file): Move to...
646 * common/filestuff.c (is_regular_file): ... here.
647 * common/common-utils.h (is_regular_file): Move to...
648 * common/filestuff.h (is_regular_file): ... here.
652 * skip.c (debug_skip): New variable.
653 (skiplist_entry::do_skip_file_p): Add debug output.
654 (skiplist_entry::do_skip_gfile_p): Likewise.
655 (skiplist_entry::skip_function_p): Likewise.
656 (_initialize_step_skip): Create debug command.
657 * NEWS: Mention set/show debug skip.
661 * darwin-nat.c (should_disable_startup_with_shell):
663 (darwin_nat_target::create_inferior): Add call.
667 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
668 inf_port, msg_state>: Initialize.
669 (struct darwin_thread_info) <signaled, single_step>: Change
671 (struct darwin_thread_info) <event>: Initialize.
677 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
687 * gnulib/aclocal.m4: Regenerate.
688 * gnulib/config.in: Regenerate.
689 * gnulib/configure: Regenerate.
690 * gnulib/import/Makefile.am: Update.
691 * gnulib/import/Makefile.in: Update.
692 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
693 * gnulib/import/_Noreturn.h: ... this.
694 * gnulib/import/alloca.in.h: Update.
695 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
696 * gnulib/import/arg-nonnull.h: ... this.
697 * gnulib/import/assure.h: Update.
698 * gnulib/import/at-func.c: Update.
699 * gnulib/import/basename-lgpl.c: Update.
700 * gnulib/import/extra/snippet/c++defs.h: Rename to...
701 * gnulib/import/c++defs.h: ... this.
702 * gnulib/import/canonicalize-lgpl.c: Update.
703 * gnulib/import/cdefs.h: Update.
704 * gnulib/import/chdir-long.c: Update.
705 * gnulib/import/chdir-long.h: Update.
706 * gnulib/import/cloexec.c: Update.
707 * gnulib/import/cloexec.h: Update.
708 * gnulib/import/close.c: Update.
709 * gnulib/import/closedir.c: Update.
710 * gnulib/import/config.charset: Update.
711 * gnulib/import/dirent-private.h: Update.
712 * gnulib/import/dirent.in.h: Update.
713 * gnulib/import/dirfd.c: Update.
714 * gnulib/import/dirname-lgpl.c: Update.
715 * gnulib/import/dirname.h: Update.
716 * gnulib/import/dosname.h: Update.
717 * gnulib/import/dup-safer-flag.c: Update.
718 * gnulib/import/dup-safer.c: Update.
719 * gnulib/import/dup.c: Update.
720 * gnulib/import/dup2.c: Update.
721 * gnulib/import/errno.in.h: Update.
722 * gnulib/import/error.c: Update.
723 * gnulib/import/error.h: Update.
724 * gnulib/import/exitfail.c: Update.
725 * gnulib/import/exitfail.h: Update.
726 * gnulib/import/extra/update-copyright: Update.
727 * gnulib/import/fchdir.c: Update.
728 * gnulib/import/fcntl.c: Update.
729 * gnulib/import/fcntl.in.h: Update.
730 * gnulib/import/fd-hook.c: Update.
731 * gnulib/import/fd-hook.h: Update.
732 * gnulib/import/fd-safer-flag.c: Update.
733 * gnulib/import/fd-safer.c: Update.
734 * gnulib/import/fdopendir.c: Update.
735 * gnulib/import/filename.h: Update.
736 * gnulib/import/filenamecat-lgpl.c: Update.
737 * gnulib/import/filenamecat.h: Update.
738 * gnulib/import/flexmember.h: Update.
739 * gnulib/import/float+.h: Update.
740 * gnulib/import/float.c: Update.
741 * gnulib/import/float.in.h: Update.
742 * gnulib/import/fnmatch.c: Update.
743 * gnulib/import/fnmatch.in.h: Update.
744 * gnulib/import/fnmatch_loop.c: Update.
745 * gnulib/import/fpucw.h: Update.
746 * gnulib/import/frexp.c: Update.
747 * gnulib/import/frexpl.c: Update.
748 * gnulib/import/fstat.c: Update.
749 * gnulib/import/fstatat.c: Update.
750 * gnulib/import/getcwd-lgpl.c: Update.
751 * gnulib/import/getcwd.c: Update.
752 * gnulib/import/getdtablesize.c: Update.
753 * gnulib/import/getlogin_r.c: Update.
754 * gnulib/import/getprogname.c: Update.
755 * gnulib/import/getprogname.h: Update.
756 * gnulib/import/gettext.h: Update.
757 * gnulib/import/gettimeofday.c: Update.
758 * gnulib/import/glob-libc.h: Update.
759 * gnulib/import/glob.c: Update.
760 * gnulib/import/glob.in.h: Update.
761 * gnulib/import/glob_internal.h: Update.
762 * gnulib/import/glob_pattern_p.c: Update.
763 * gnulib/import/globfree.c: Update.
764 * gnulib/import/hard-locale.c: Update.
765 * gnulib/import/hard-locale.h: Update.
766 * gnulib/import/intprops.h: Update.
767 * gnulib/import/inttypes.in.h: Update.
768 * gnulib/import/isnan.c: Update.
769 * gnulib/import/isnand-nolibm.h: Update.
770 * gnulib/import/isnand.c: Update.
771 * gnulib/import/isnanl-nolibm.h: Update.
772 * gnulib/import/isnanl.c: Update.
773 * gnulib/import/itold.c: Update.
774 * gnulib/import/libc-config.h: Update.
775 * gnulib/import/limits.in.h: Update.
776 * gnulib/import/localcharset.c: Update.
777 * gnulib/import/localcharset.h: Update.
778 * gnulib/import/localtime-buffer.c: Update.
779 * gnulib/import/localtime-buffer.h: Update.
780 * gnulib/import/lstat.c: Update.
781 * gnulib/import/m4/00gnulib.m4: Update.
782 * gnulib/import/m4/__inline.m4: Update.
783 * gnulib/import/m4/absolute-header.m4: Update.
784 * gnulib/import/m4/alloca.m4: Update.
785 * gnulib/import/m4/builtin-expect.m4: Update.
786 * gnulib/import/m4/canonicalize.m4: Update.
787 * gnulib/import/m4/chdir-long.m4: Update.
788 * gnulib/import/m4/close.m4: Update.
789 * gnulib/import/m4/closedir.m4: Update.
790 * gnulib/import/m4/configmake.m4: Update.
791 * gnulib/import/m4/d-ino.m4: Update.
792 * gnulib/import/m4/d-type.m4: Update.
793 * gnulib/import/m4/dirent_h.m4: Update.
794 * gnulib/import/m4/dirfd.m4: Update.
795 * gnulib/import/m4/dirname.m4: Update.
796 * gnulib/import/m4/double-slash-root.m4: Update.
797 * gnulib/import/m4/dup.m4: Update.
798 * gnulib/import/m4/dup2.m4: Update.
799 * gnulib/import/m4/eealloc.m4: Update.
800 * gnulib/import/m4/environ.m4: Update.
801 * gnulib/import/m4/errno_h.m4: Update.
802 * gnulib/import/m4/error.m4: Update.
803 * gnulib/import/m4/exponentd.m4: Update.
804 * gnulib/import/m4/exponentl.m4: Update.
805 * gnulib/import/m4/extensions.m4: Update.
806 * gnulib/import/m4/extern-inline.m4: Update.
807 * gnulib/import/m4/fchdir.m4: Update.
808 * gnulib/import/m4/fcntl-o.m4: Update.
809 * gnulib/import/m4/fcntl.m4: Update.
810 * gnulib/import/m4/fcntl_h.m4: Update.
811 * gnulib/import/m4/fdopendir.m4: Update.
812 * gnulib/import/m4/filenamecat.m4: Update.
813 * gnulib/import/m4/flexmember.m4: Update.
814 * gnulib/import/m4/float_h.m4: Update.
815 * gnulib/import/m4/fnmatch.m4: Update.
816 * gnulib/import/m4/fnmatch_h.m4: Update.
817 * gnulib/import/m4/fpieee.m4: Update.
818 * gnulib/import/m4/frexp.m4: Update.
819 * gnulib/import/m4/frexpl.m4: Update.
820 * gnulib/import/m4/fstat.m4: Update.
821 * gnulib/import/m4/fstatat.m4: Update.
822 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
823 * gnulib/import/m4/getcwd-path-max.m4: Update.
824 * gnulib/import/m4/getcwd.m4: Update.
825 * gnulib/import/m4/getdtablesize.m4: Update.
826 * gnulib/import/m4/getlogin.m4: Update.
827 * gnulib/import/m4/getlogin_r.m4: Update.
828 * gnulib/import/m4/getpagesize.m4: Update.
829 * gnulib/import/m4/getprogname.m4: Update.
830 * gnulib/import/m4/gettimeofday.m4: Update.
831 * gnulib/import/m4/glibc21.m4: Update.
832 * gnulib/import/m4/glob.m4: Update.
833 * gnulib/import/m4/glob_h.m4: Update.
834 * gnulib/import/m4/gnulib-cache.m4: Update.
835 * gnulib/import/m4/gnulib-common.m4: Update.
836 * gnulib/import/m4/gnulib-comp.m4: Update.
837 * gnulib/import/m4/gnulib-tool.m4: Update.
838 * gnulib/import/m4/hard-locale.m4: Update.
839 * gnulib/import/m4/include_next.m4: Update.
840 * gnulib/import/m4/inttypes-pri.m4: Update.
841 * gnulib/import/m4/inttypes.m4: Update.
842 * gnulib/import/m4/isnand.m4: Update.
843 * gnulib/import/m4/isnanl.m4: Update.
844 * gnulib/import/m4/largefile.m4: Update.
845 * gnulib/import/m4/limits-h.m4: Update.
846 * gnulib/import/m4/localcharset.m4: Update.
847 * gnulib/import/m4/locale-fr.m4: Update.
848 * gnulib/import/m4/locale-ja.m4: Update.
849 * gnulib/import/m4/locale-zh.m4: Update.
850 * gnulib/import/m4/localtime-buffer.m4: Update.
851 * gnulib/import/m4/longlong.m4: Update.
852 * gnulib/import/m4/lstat.m4: Update.
853 * gnulib/import/m4/malloc.m4: Update.
854 * gnulib/import/m4/malloca.m4: Update.
855 * gnulib/import/m4/math_h.m4: Update.
856 * gnulib/import/m4/mbrtowc.m4: Update.
857 * gnulib/import/m4/mbsinit.m4: Update.
858 * gnulib/import/m4/mbsrtowcs.m4: Update.
859 * gnulib/import/m4/mbstate_t.m4: Update.
860 * gnulib/import/m4/memchr.m4: Update.
861 * gnulib/import/m4/memmem.m4: Update.
862 * gnulib/import/m4/mempcpy.m4: Update.
863 * gnulib/import/m4/memrchr.m4: Update.
864 * gnulib/import/m4/mkdir.m4: Update.
865 * gnulib/import/m4/mkstemp.m4: Update.
866 * gnulib/import/m4/mmap-anon.m4: Update.
867 * gnulib/import/m4/mode_t.m4: Update.
868 * gnulib/import/m4/msvc-inval.m4: Update.
869 * gnulib/import/m4/msvc-nothrow.m4: Update.
870 * gnulib/import/m4/multiarch.m4: Update.
871 * gnulib/import/m4/nocrash.m4: Update.
872 * gnulib/import/m4/off_t.m4: Update.
873 * gnulib/import/m4/onceonly.m4: Update.
874 * gnulib/import/m4/open-cloexec.m4: Update.
875 * gnulib/import/m4/open.m4: Update.
876 * gnulib/import/m4/openat.m4: Update.
877 * gnulib/import/m4/opendir.m4: Update.
878 * gnulib/import/m4/pathmax.m4: Update.
879 * gnulib/import/m4/rawmemchr.m4: Update.
880 * gnulib/import/m4/readdir.m4: Update.
881 * gnulib/import/m4/readlink.m4: Update.
882 * gnulib/import/m4/realloc.m4: Update.
883 * gnulib/import/m4/rename.m4: Update.
884 * gnulib/import/m4/rewinddir.m4: Update.
885 * gnulib/import/m4/rmdir.m4: Update.
886 * gnulib/import/m4/save-cwd.m4: Update.
887 * gnulib/import/m4/secure_getenv.m4: Update.
888 * gnulib/import/m4/setenv.m4: Update.
889 * gnulib/import/m4/signal_h.m4: Update.
890 * gnulib/import/m4/ssize_t.m4: Update.
891 * gnulib/import/m4/stat-time.m4: Update.
892 * gnulib/import/m4/stat.m4: Update.
893 * gnulib/import/m4/std-gnu11.m4: Update.
894 * gnulib/import/m4/stdbool.m4: Update.
895 * gnulib/import/m4/stddef_h.m4: Update.
896 * gnulib/import/m4/stdint.m4: Update.
897 * gnulib/import/m4/stdio_h.m4: Update.
898 * gnulib/import/m4/stdlib_h.m4: Update.
899 * gnulib/import/m4/strchrnul.m4: Update.
900 * gnulib/import/m4/strdup.m4: Update.
901 * gnulib/import/m4/strerror.m4: Update.
902 * gnulib/import/m4/string_h.m4: Update.
903 * gnulib/import/m4/strstr.m4: Update.
904 * gnulib/import/m4/strtok_r.m4: Update.
905 * gnulib/import/m4/sys_socket_h.m4: Update.
906 * gnulib/import/m4/sys_stat_h.m4: Update.
907 * gnulib/import/m4/sys_time_h.m4: Update.
908 * gnulib/import/m4/sys_types_h.m4: Update.
909 * gnulib/import/m4/tempname.m4: Update.
910 * gnulib/import/m4/time_h.m4: Update.
911 * gnulib/import/m4/unistd-safer.m4: Update.
912 * gnulib/import/m4/unistd_h.m4: Update.
913 * gnulib/import/m4/warn-on-use.m4: Update.
914 * gnulib/import/m4/wchar_h.m4: Update.
915 * gnulib/import/m4/wchar_t.m4: Update.
916 * gnulib/import/m4/wctype_h.m4: Update.
917 * gnulib/import/m4/wint_t.m4: Update.
918 * gnulib/import/malloc.c: Update.
919 * gnulib/import/malloc/scratch_buffer.h: Update.
920 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
921 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
922 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
923 * gnulib/import/malloca.c: Update.
924 * gnulib/import/malloca.h: Update.
925 * gnulib/import/malloca.valgrind: Update.
926 * gnulib/import/math.in.h: Update.
927 * gnulib/import/mbrtowc.c: Update.
928 * gnulib/import/mbsinit.c: Update.
929 * gnulib/import/mbsrtowcs-impl.h: Update.
930 * gnulib/import/mbsrtowcs-state.c: Update.
931 * gnulib/import/mbsrtowcs.c: Update.
932 * gnulib/import/memchr.c: Update.
933 * gnulib/import/memmem.c: Update.
934 * gnulib/import/mempcpy.c: Update.
935 * gnulib/import/memrchr.c: Update.
936 * gnulib/import/mkdir.c: Update.
937 * gnulib/import/mkstemp.c: Update.
938 * gnulib/import/msvc-inval.c: Update.
939 * gnulib/import/msvc-inval.h: Update.
940 * gnulib/import/msvc-nothrow.c: Update.
941 * gnulib/import/msvc-nothrow.h: Update.
942 * gnulib/import/open.c: Update.
943 * gnulib/import/openat-die.c: Update.
944 * gnulib/import/openat-priv.h: Update.
945 * gnulib/import/openat-proc.c: Update.
946 * gnulib/import/openat.c: Update.
947 * gnulib/import/openat.h: Update.
948 * gnulib/import/opendir.c: Update.
949 * gnulib/import/pathmax.h: Update.
950 * gnulib/import/pipe-safer.c: Update.
951 * gnulib/import/rawmemchr.c: Update.
952 * gnulib/import/readdir.c: Update.
953 * gnulib/import/readlink.c: Update.
954 * gnulib/import/realloc.c: Update.
955 * gnulib/import/ref-add.sin: Update.
956 * gnulib/import/ref-del.sin: Update.
957 * gnulib/import/rename.c: Update.
958 * gnulib/import/rewinddir.c: Update.
959 * gnulib/import/rmdir.c: Update.
960 * gnulib/import/same-inode.h: Update.
961 * gnulib/import/save-cwd.c: Update.
962 * gnulib/import/save-cwd.h: Update.
963 * gnulib/import/scratch_buffer.h: Update.
964 * gnulib/import/secure_getenv.c: Update.
965 * gnulib/import/setenv.c: Update.
966 * gnulib/import/signal.in.h: Update.
967 * gnulib/import/stat-time.c: Update.
968 * gnulib/import/stat-time.h: Update.
969 * gnulib/import/stat-w32.c: Update.
970 * gnulib/import/stat-w32.h: Update.
971 * gnulib/import/stat.c: Update.
972 * gnulib/import/stdbool.in.h: Update.
973 * gnulib/import/stddef.in.h: Update.
974 * gnulib/import/stdint.in.h: Update.
975 * gnulib/import/stdio.in.h: Update.
976 * gnulib/import/stdlib.in.h: Update.
977 * gnulib/import/str-two-way.h: Update.
978 * gnulib/import/strchrnul.c: Update.
979 * gnulib/import/strdup.c: Update.
980 * gnulib/import/streq.h: Update.
981 * gnulib/import/strerror-override.c: Update.
982 * gnulib/import/strerror-override.h: Update.
983 * gnulib/import/strerror.c: Update.
984 * gnulib/import/string.in.h: Update.
985 * gnulib/import/stripslash.c: Update.
986 * gnulib/import/strnlen1.c: Update.
987 * gnulib/import/strnlen1.h: Update.
988 * gnulib/import/strstr.c: Update.
989 * gnulib/import/strtok_r.c: Update.
990 * gnulib/import/sys_stat.in.h: Update.
991 * gnulib/import/sys_time.in.h: Update.
992 * gnulib/import/sys_types.in.h: Update.
993 * gnulib/import/tempname.c: Update.
994 * gnulib/import/tempname.h: Update.
995 * gnulib/import/time.in.h: Update.
996 * gnulib/import/unistd--.h: Update.
997 * gnulib/import/unistd-safer.h: Update.
998 * gnulib/import/unistd.in.h: Update.
999 * gnulib/import/unsetenv.c: Update.
1000 * gnulib/import/verify.h: Update.
1001 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1002 * gnulib/import/wchar.in.h: Update.
1003 * gnulib/import/wctype.in.h: Update.
1004 * gnulib/import/xalloc-oversized.h: Update.
1005 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1006 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1010 * record-btrace.c (get_thread_current_frame): Remove
1015 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1016 with check_tag to 1 if and only if the type is tagged and the
1017 component being searched cannot been found in the current
1018 view. Otherwise, always call ada_to_fixed_type with
1023 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1025 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1026 * ada-varobj.c (ada_varobj_get_number_of_children,
1027 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1031 * ada-valprint.c (ada_value_print): Use type instead of
1036 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1037 an array of access to unconstrained array.
1041 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1042 (ada_check_typedef): Use it.
1046 * ada-varobj.c (ada_varobj_describe_struct_child)
1047 (ada_varobj_describe_child): Handle union case like struct one.
1052 * python/python.c (_initialize_python): Make example in "python"
1053 help work in Python 3.
1057 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1058 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1059 $(EXEEXT) to the script, as it is not a program.
1063 * python/py-prettyprint.c (pretty_print_one_value): Return
1065 (print_string_repr): Adjust.
1066 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1067 * python/python-internal.h (apply_varobj_pretty_printer): Return
1069 * varobj.c (varobj_value_get_print_value): Adjust.
1074 * python/py-prettyprint.c (pretty_print_one_value): Check for
1079 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1080 replace_operator_with_call.
1084 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1088 * ada-typeprint.c (print_range): Print the bounds using TYPE
1089 rather than its TYPE_TARGET_TYPE.
1093 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1094 call to ada_to_fixed_value_create.
1098 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1102 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1107 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1108 Move update of loop variable "fi".
1112 * ada-lang.c (value_assign_to_component): In the case of
1113 big-endian targets, extract the bits of the given VAL
1114 using an src_offset of zero if container is not a scalar.
1119 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1120 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1121 * fbsd-tdep.c (fbsd_make_note_desc): New.
1122 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1123 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1124 * target.h (enum target_object) Add FreeBSD-specific
1125 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1129 * compile/compile-c.h (generate_c_for_variable_locations):
1130 Change reference to pointer.
1131 * compile/compile-c-support.c (compile_program) <compute>:
1133 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1134 (generate_c_for_for_one_variable): Likewise
1135 (generate_c_for_variable_locations): Likewise
1136 * compile/compile-c-types.c (compile_c_instance::convert_type):
1138 * compile/compile-cplus-symbols.c (convert_one_symbol):
1139 std::move the scope passed to enter_scope.
1140 * compile/compile-cplus-types.c
1141 (compile_cplus_instance::enter_scope): Make parameter
1143 (compile_cplus_instance::new_scope): Change reference to
1145 (compile_cplus_instance::convert_type): Likewise
1146 (compile_cplus_convert_typedef): std::move the scope passed to
1148 (compile_cplus_convert_struct_or_union): Likewise.
1149 (compile_cplus_convert_enum): Likewise.
1150 (compile_cplus_convert_namespace): Likewise.
1151 * compile/compile-cplus.h (compile_cplus_instance)
1152 <enter_scope>: Make parameter rvalue-reference.
1153 * compile/compile-internal.h (compile_instance)
1154 <get_cached_type>: Likewise
1155 * compile/compile-loc2c.c (push): Likewise
1159 (print_label): Likewise
1160 (pushf_register_address): Likewise
1161 (pushf_register): Likewise
1162 (do_compile_dwarf_expr_to_c): Likewise
1163 (compile_dwarf_expr_to_c): Likewise
1164 (compile_dwarf_bounds_to_c): Likewise
1165 * compile/compile.c (compile_instance::get_cached_type):
1167 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1168 (compile_dwarf_bounds_to_c): Likewise
1169 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1170 (dwarf2_compile_property_to_c): Likewise
1171 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1172 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1177 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1178 * tui/tui-data.c (init_content_element): Don't initialize it.
1182 * tui/tui-data.h (struct tui_win_info)
1183 <detail::opaque>: Remove.
1184 * tui/tui-data.c (init_win_info): Remove assignment.
1188 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1189 -Wformat-nonliteral.
1190 * target-float.c (host_float_ops<T>::to_string)
1191 (host_float_ops<T>::from_string): Use
1192 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1193 * configure: Rebuild.
1197 * printcmd.c (printf_c_string): Use
1198 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1199 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1203 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1207 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1208 with resolve_abstract_p == true.
1209 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1210 defaulting to false. Propagate resolve_abstract_p to
1211 dwarf2_fetch_die_loc_sect_off.
1212 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1213 parameter, defaulting to false.
1214 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1215 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1217 * dwarf2read.h (struct die_info): Forward-declare.
1218 (die_info_ptr): New typedef.
1219 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1228 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1229 "aclocal-m4-deps.mk". Include file here.
1230 $(srcdir)/aclocal.m4: Add "configure.ac".
1231 * gnulib/aclocal-m4-deps.mk: New file.
1232 * gnulib/update-gnulib.sh: Automatically update
1233 "aclocal-m4-deps.mk".
1237 * configure: Rebuild.
1238 * configure.ac: Remove multi-ice code.
1242 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1243 (ada-exp.o): Update.
1247 * Makefile.in (printcmd.o, target-float.o): Remove.
1248 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1252 * gnulib/Makefile.in: Remove obsolete comment.
1253 * Makefile.in: Remove obsolete comment.
1257 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1262 * riscv-tdep.c: Add 'prologue-value.h' include.
1263 (struct riscv_unwind_cache): New struct.
1264 (riscv_debug_unwinder): New global.
1265 (riscv_scan_prologue): Update arguments, capture register details
1267 (riscv_skip_prologue): Reformat arguments line, move end of
1268 prologue calculation into riscv_scan_prologue.
1269 (riscv_frame_cache): Update return type, create
1270 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1272 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1273 (riscv_frame_prev_register): Use the trad_frame within the
1275 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1280 * trad-frame.h (trad_frame_set_realreg): Declare.
1281 (trad_frame_set_addr): Declare.
1282 * trad-frame.c (trad_frame_set_realreg): Define new function.
1283 (trad_frame_set_addr): Define new function.
1284 (trad_frame_set_reg_realreg): Use new function.
1285 (trad_frame_set_reg_addr): Use new function.
1289 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1290 pulongest instead of "%lld".
1291 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1296 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1301 * gdbarch.h: Regenerate.
1305 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1306 * target.h (Hardware watchpoint interfaces): Describe
1307 continuable/steppable/non-steppable watchpoints.
1308 * gdbarch.h, gdbarch.c: Regenerate.
1312 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1315 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1316 * target.h (target_ops::have_continuable_watchpoint): Delete.
1317 (target_have_continuable_watchpoint): Delete.
1318 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1319 * target-delegates.c: Regenerate.
1323 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1324 the files present in "gnulib/import/m4/".
1328 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1329 c.sw, c.swsp, and c.sdsp.
1333 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1334 (riscv_read_misa_reg): Don't cache value read into inferior data.
1335 (riscv_new_inferior_data): Delete.
1336 (riscv_inferior_data_cleanup): Delete.
1337 (riscv_inferior_data): Delete.
1338 (riscv_invalidate_inferior_data): Delete.
1339 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1343 * compile/compile-cplus-types.c
1344 (compile_cplus_instance::leave_scope): Take the address of scope
1346 (compile_cplus_instance::convert_qualified_base): Compare quals
1351 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1352 Use "%s" and host_address_to_string instead of "%p" in printf.
1356 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1357 and compile-cplus-types.c.
1358 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1359 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1360 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1362 * compile/compile-c-support.c: Include compile-cplus.h.
1363 (load_libcompile): Templatize.
1364 (get_compile_context): "New" function.
1365 (c_get_compile_context): Use get_compile_context.
1366 (cplus_get_compile_context): New function.
1367 (cplus_push_user_expression, cplus_pop_user_expression)
1368 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1369 (cplus_compute_program): Define new structs/functions.
1370 * compile/compile-cplus-symmbols.c: New file.
1371 * compile/compile-cplus-types.c: New file.
1372 * compile/compile-cplus.h: New file.
1373 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1375 * compile/compile-object-load.c (get_out_value_type): Use
1376 strncmp_iw when comparing symbol names.
1377 (compile_object_load): Add mst_bss and mst_data.
1378 * compile/compile.c (_initialize_compile): Remove
1379 -Wno-implicit-function-declaration from `compile_args'.
1380 * compile/gcc-cp-plugin.h: New file.
1381 * NEWS: Mention C++ compile support and new debug options.
1385 * linespec.c (collect_info::add_symbol): Make virtual.
1386 (struct symbol_searcher_collect_info): New struct.
1387 (symbol_searcher::find_all_symbols): New method.
1388 * symtab.h (class symbol_searcher): New class.
1392 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1393 Change to vector of block_symbol. Update all users.
1394 (struct collect_info) <symbols>: Likewise.
1395 (collect_info::add_symbol): Take block_symbol as argument.
1397 (decode_compound_collector) <m_symbols>: Change type to vector
1398 of block_symbol. Update all users.
1399 (decode_compound_collector::operator ()): Change parameter type
1401 (find_method, find_function_symbols, find_linespec_symbols)
1402 (find_label_symbols_in_block, find_label_symbols): Change symbol
1403 vectors to block_symbol vectors.
1404 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1409 * linespec.c (symbolp): Remove typedef and VEC definitions.
1410 (bound_minimal_symbol_d): Likewise.
1414 * linespec.c (decode_compound_collector::decode_compound_collector):
1415 Remove initialization for `m_symtabs'.
1416 (decode_compound_collector::release_symbols): Change return type
1417 to std::vector. Update all callers.
1418 (class decode_compound_collector) <m_symbols>: Change type to
1420 (lookup_prefix_sym): Change return type to std::vector. Update all
1422 (compare_symbols): Remove.
1423 (std_compare_symbols): Rename to `compare_symbols'.
1424 (find_method): Change `sym_classes' parameter to std::vector.
1425 Update all callers. Use std::sort to sort sym_classes.
1426 (find_linespec_symbols): Remove cleanup.
1430 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1431 std::vector. Update all users.
1432 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1433 (struct collect_info) <minimal_symbols>: Likewise.
1434 (compare_msymbols): Return bool. Change parameters to const
1435 bound_minimal_symbol references.
1436 (find_method, find_function_symbols, find_linespec_symbols): Change
1437 `minsyms' parameter to std::vector. Update all callers.
1441 * linespec.c (struct linespec) <label_symbols>: Change type to
1442 std::vector. Update all users.
1443 (find_label_symbols_in_block): Change `result' parameter to
1444 std::vector. Update all callers.
1445 (find_label_symbols): Return std::vector. Update all callers.
1449 * linespec.c (struct linespec) <function_symbols>: Change type to
1450 std::vector. Update all users.
1451 (struct collect_info) <function_symbols>: Likewise.
1452 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1453 (std_compare_symbols): New function.
1454 (find_method, find_function_symbols, find_linespec_symbols)
1455 (find_label_symbols_in_block): Change `symbols' parameter to
1456 std::vector. Update all callers.
1457 (find_label_symbols): Likewise for `function_symbols' and
1462 * linespec.c (symtab_vector_up): Define.
1463 (struct linespec) <file_symtabs>: Change type to std::vector *.
1465 (struct collect_info) <file_symtabs>: Likewise.
1466 (collect_symtabs_from_filename): Return symtab_vector_up.
1468 (decode_objc): Remove cleanup.
1469 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1470 (symtab_collector::release_symtabs): Return symtab_vector_up.
1472 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1474 (collect_symtabs_from_filename, symtabs_from_filename): Return
1475 symtab_vector_up. Update all callers.
1479 * csky-tdep.c (csky_analyze_prologue): Use
1480 core_addr_to_string_nz.
1484 * windows-nat.c (struct xlate_exception) <them>: Change type to
1486 (xlate): Fix formatting. Remove last entry.
1487 (struct xlate_exception, xlate): Comment out.
1488 (windows_nat_target::resume): Use ranged for.
1492 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1493 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1495 (riscv_linux_nat_target::store_registers): Likewise.
1501 * gnulib/aclocal.m4: Regenerate.
1502 * gnulib/config.in: Regenerate.
1503 * gnulib/configure: Regenerate.
1504 * gnulib/import/Makefile.am: Update.
1505 * gnulib/import/Makefile.in: Update.
1506 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1507 * gnulib/import/_Noreturn.h: ... this.
1508 * gnulib/import/alloca.in.h: Update.
1509 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1510 * gnulib/import/arg-nonnull.h: ... this.
1511 * gnulib/import/assure.h: Update.
1512 * gnulib/import/at-func.c: Update.
1513 * gnulib/import/basename-lgpl.c: Update.
1514 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1515 * gnulib/import/c++defs.h: ... this.
1516 * gnulib/import/canonicalize-lgpl.c: Update.
1517 * gnulib/import/cdefs.h: Update.
1518 * gnulib/import/chdir-long.c: Update.
1519 * gnulib/import/chdir-long.h: Update.
1520 * gnulib/import/cloexec.c: Update.
1521 * gnulib/import/cloexec.h: Update.
1522 * gnulib/import/close.c: Update.
1523 * gnulib/import/closedir.c: Update.
1524 * gnulib/import/config.charset: Update.
1525 * gnulib/import/dirent-private.h: Update.
1526 * gnulib/import/dirent.in.h: Update.
1527 * gnulib/import/dirfd.c: Update.
1528 * gnulib/import/dirname-lgpl.c: Update.
1529 * gnulib/import/dirname.h: Update.
1530 * gnulib/import/dosname.h: Update.
1531 * gnulib/import/dup-safer-flag.c: Update.
1532 * gnulib/import/dup-safer.c: Update.
1533 * gnulib/import/dup.c: Update.
1534 * gnulib/import/dup2.c: Update.
1535 * gnulib/import/errno.in.h: Update.
1536 * gnulib/import/error.c: Update.
1537 * gnulib/import/error.h: Update.
1538 * gnulib/import/exitfail.c: Update.
1539 * gnulib/import/exitfail.h: Update.
1540 * gnulib/import/extra/update-copyright: Update.
1541 * gnulib/import/fchdir.c: Update.
1542 * gnulib/import/fcntl.c: Update.
1543 * gnulib/import/fcntl.in.h: Update.
1544 * gnulib/import/fd-hook.c: Update.
1545 * gnulib/import/fd-hook.h: Update.
1546 * gnulib/import/fd-safer-flag.c: Update.
1547 * gnulib/import/fd-safer.c: Update.
1548 * gnulib/import/fdopendir.c: Update.
1549 * gnulib/import/filename.h: Update.
1550 * gnulib/import/filenamecat-lgpl.c: Update.
1551 * gnulib/import/filenamecat.h: Update.
1552 * gnulib/import/flexmember.h: Update.
1553 * gnulib/import/float+.h: Update.
1554 * gnulib/import/float.c: Update.
1555 * gnulib/import/float.in.h: Update.
1556 * gnulib/import/fnmatch.c: Update.
1557 * gnulib/import/fnmatch.in.h: Update.
1558 * gnulib/import/fnmatch_loop.c: Update.
1559 * gnulib/import/fpucw.h: Update.
1560 * gnulib/import/frexp.c: Update.
1561 * gnulib/import/frexpl.c: Update.
1562 * gnulib/import/fstat.c: Update.
1563 * gnulib/import/fstatat.c: Update.
1564 * gnulib/import/getcwd-lgpl.c: Update.
1565 * gnulib/import/getcwd.c: Update.
1566 * gnulib/import/getdtablesize.c: Update.
1567 * gnulib/import/getlogin_r.c: Update.
1568 * gnulib/import/getprogname.c: Update.
1569 * gnulib/import/getprogname.h: Update.
1570 * gnulib/import/gettext.h: Update.
1571 * gnulib/import/gettimeofday.c: Update.
1572 * gnulib/import/glob-libc.h: Update.
1573 * gnulib/import/glob.c: Update.
1574 * gnulib/import/glob.in.h: Update.
1575 * gnulib/import/glob_internal.h: Update.
1576 * gnulib/import/glob_pattern_p.c: Update.
1577 * gnulib/import/globfree.c: Update.
1578 * gnulib/import/hard-locale.c: Update.
1579 * gnulib/import/hard-locale.h: Update.
1580 * gnulib/import/intprops.h: Update.
1581 * gnulib/import/inttypes.in.h: Update.
1582 * gnulib/import/isnan.c: Update.
1583 * gnulib/import/isnand-nolibm.h: Update.
1584 * gnulib/import/isnand.c: Update.
1585 * gnulib/import/isnanl-nolibm.h: Update.
1586 * gnulib/import/isnanl.c: Update.
1587 * gnulib/import/itold.c: Update.
1588 * gnulib/import/libc-config.h: Update.
1589 * gnulib/import/limits.in.h: Update.
1590 * gnulib/import/localcharset.c: Update.
1591 * gnulib/import/localcharset.h: Update.
1592 * gnulib/import/localtime-buffer.c: Update.
1593 * gnulib/import/localtime-buffer.h: Update.
1594 * gnulib/import/lstat.c: Update.
1595 * gnulib/import/m4/00gnulib.m4: Update.
1596 * gnulib/import/m4/__inline.m4: Update.
1597 * gnulib/import/m4/absolute-header.m4: Update.
1598 * gnulib/import/m4/alloca.m4: Update.
1599 * gnulib/import/m4/builtin-expect.m4: Update.
1600 * gnulib/import/m4/canonicalize.m4: Update.
1601 * gnulib/import/m4/chdir-long.m4: Update.
1602 * gnulib/import/m4/close.m4: Update.
1603 * gnulib/import/m4/closedir.m4: Update.
1604 * gnulib/import/m4/configmake.m4: Update.
1605 * gnulib/import/m4/d-ino.m4: Update.
1606 * gnulib/import/m4/d-type.m4: Update.
1607 * gnulib/import/m4/dirent_h.m4: Update.
1608 * gnulib/import/m4/dirfd.m4: Update.
1609 * gnulib/import/m4/dirname.m4: Update.
1610 * gnulib/import/m4/double-slash-root.m4: Update.
1611 * gnulib/import/m4/dup.m4: Update.
1612 * gnulib/import/m4/dup2.m4: Update.
1613 * gnulib/import/m4/eealloc.m4: Update.
1614 * gnulib/import/m4/environ.m4: Update.
1615 * gnulib/import/m4/errno_h.m4: Update.
1616 * gnulib/import/m4/error.m4: Update.
1617 * gnulib/import/m4/exponentd.m4: Update.
1618 * gnulib/import/m4/exponentl.m4: Update.
1619 * gnulib/import/m4/extensions.m4: Update.
1620 * gnulib/import/m4/extern-inline.m4: Update.
1621 * gnulib/import/m4/fchdir.m4: Update.
1622 * gnulib/import/m4/fcntl-o.m4: Update.
1623 * gnulib/import/m4/fcntl.m4: Update.
1624 * gnulib/import/m4/fcntl_h.m4: Update.
1625 * gnulib/import/m4/fdopendir.m4: Update.
1626 * gnulib/import/m4/filenamecat.m4: Update.
1627 * gnulib/import/m4/flexmember.m4: Update.
1628 * gnulib/import/m4/float_h.m4: Update.
1629 * gnulib/import/m4/fnmatch.m4: Update.
1630 * gnulib/import/m4/fnmatch_h.m4: Update.
1631 * gnulib/import/m4/fpieee.m4: Update.
1632 * gnulib/import/m4/frexp.m4: Update.
1633 * gnulib/import/m4/frexpl.m4: Update.
1634 * gnulib/import/m4/fstat.m4: Update.
1635 * gnulib/import/m4/fstatat.m4: Update.
1636 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1637 * gnulib/import/m4/getcwd-path-max.m4: Update.
1638 * gnulib/import/m4/getcwd.m4: Update.
1639 * gnulib/import/m4/getdtablesize.m4: Update.
1640 * gnulib/import/m4/getlogin.m4: Update.
1641 * gnulib/import/m4/getlogin_r.m4: Update.
1642 * gnulib/import/m4/getpagesize.m4: Update.
1643 * gnulib/import/m4/getprogname.m4: Update.
1644 * gnulib/import/m4/gettimeofday.m4: Update.
1645 * gnulib/import/m4/glibc21.m4: Update.
1646 * gnulib/import/m4/glob.m4: Update.
1647 * gnulib/import/m4/glob_h.m4: Update.
1648 * gnulib/import/m4/gnulib-cache.m4: Update.
1649 * gnulib/import/m4/gnulib-common.m4: Update.
1650 * gnulib/import/m4/gnulib-comp.m4: Update.
1651 * gnulib/import/m4/gnulib-tool.m4: Update.
1652 * gnulib/import/m4/hard-locale.m4: Update.
1653 * gnulib/import/m4/include_next.m4: Update.
1654 * gnulib/import/m4/inttypes-pri.m4: Update.
1655 * gnulib/import/m4/inttypes.m4: Update.
1656 * gnulib/import/m4/isnand.m4: Update.
1657 * gnulib/import/m4/isnanl.m4: Update.
1658 * gnulib/import/m4/largefile.m4: Update.
1659 * gnulib/import/m4/limits-h.m4: Update.
1660 * gnulib/import/m4/localcharset.m4: Update.
1661 * gnulib/import/m4/locale-fr.m4: Update.
1662 * gnulib/import/m4/locale-ja.m4: Update.
1663 * gnulib/import/m4/locale-zh.m4: Update.
1664 * gnulib/import/m4/localtime-buffer.m4: Update.
1665 * gnulib/import/m4/longlong.m4: Update.
1666 * gnulib/import/m4/lstat.m4: Update.
1667 * gnulib/import/m4/malloc.m4: Update.
1668 * gnulib/import/m4/malloca.m4: Update.
1669 * gnulib/import/m4/math_h.m4: Update.
1670 * gnulib/import/m4/mbrtowc.m4: Update.
1671 * gnulib/import/m4/mbsinit.m4: Update.
1672 * gnulib/import/m4/mbsrtowcs.m4: Update.
1673 * gnulib/import/m4/mbstate_t.m4: Update.
1674 * gnulib/import/m4/memchr.m4: Update.
1675 * gnulib/import/m4/memmem.m4: Update.
1676 * gnulib/import/m4/mempcpy.m4: Update.
1677 * gnulib/import/m4/memrchr.m4: Update.
1678 * gnulib/import/m4/mkdir.m4: Update.
1679 * gnulib/import/m4/mkstemp.m4: Update.
1680 * gnulib/import/m4/mmap-anon.m4: Update.
1681 * gnulib/import/m4/mode_t.m4: Update.
1682 * gnulib/import/m4/msvc-inval.m4: Update.
1683 * gnulib/import/m4/msvc-nothrow.m4: Update.
1684 * gnulib/import/m4/multiarch.m4: Update.
1685 * gnulib/import/m4/nocrash.m4: Update.
1686 * gnulib/import/m4/off_t.m4: Update.
1687 * gnulib/import/m4/onceonly.m4: Update.
1688 * gnulib/import/m4/open-cloexec.m4: Update.
1689 * gnulib/import/m4/open.m4: Update.
1690 * gnulib/import/m4/openat.m4: Update.
1691 * gnulib/import/m4/opendir.m4: Update.
1692 * gnulib/import/m4/pathmax.m4: Update.
1693 * gnulib/import/m4/rawmemchr.m4: Update.
1694 * gnulib/import/m4/readdir.m4: Update.
1695 * gnulib/import/m4/readlink.m4: Update.
1696 * gnulib/import/m4/realloc.m4: Update.
1697 * gnulib/import/m4/rename.m4: Update.
1698 * gnulib/import/m4/rewinddir.m4: Update.
1699 * gnulib/import/m4/rmdir.m4: Update.
1700 * gnulib/import/m4/save-cwd.m4: Update.
1701 * gnulib/import/m4/secure_getenv.m4: Update.
1702 * gnulib/import/m4/setenv.m4: Update.
1703 * gnulib/import/m4/signal_h.m4: Update.
1704 * gnulib/import/m4/ssize_t.m4: Update.
1705 * gnulib/import/m4/stat-time.m4: Update.
1706 * gnulib/import/m4/stat.m4: Update.
1707 * gnulib/import/m4/std-gnu11.m4: Update.
1708 * gnulib/import/m4/stdbool.m4: Update.
1709 * gnulib/import/m4/stddef_h.m4: Update.
1710 * gnulib/import/m4/stdint.m4: Update.
1711 * gnulib/import/m4/stdio_h.m4: Update.
1712 * gnulib/import/m4/stdlib_h.m4: Update.
1713 * gnulib/import/m4/strchrnul.m4: Update.
1714 * gnulib/import/m4/strdup.m4: Update.
1715 * gnulib/import/m4/strerror.m4: Update.
1716 * gnulib/import/m4/string_h.m4: Update.
1717 * gnulib/import/m4/strstr.m4: Update.
1718 * gnulib/import/m4/strtok_r.m4: Update.
1719 * gnulib/import/m4/sys_socket_h.m4: Update.
1720 * gnulib/import/m4/sys_stat_h.m4: Update.
1721 * gnulib/import/m4/sys_time_h.m4: Update.
1722 * gnulib/import/m4/sys_types_h.m4: Update.
1723 * gnulib/import/m4/tempname.m4: Update.
1724 * gnulib/import/m4/time_h.m4: Update.
1725 * gnulib/import/m4/unistd-safer.m4: Update.
1726 * gnulib/import/m4/unistd_h.m4: Update.
1727 * gnulib/import/m4/warn-on-use.m4: Update.
1728 * gnulib/import/m4/wchar_h.m4: Update.
1729 * gnulib/import/m4/wchar_t.m4: Update.
1730 * gnulib/import/m4/wctype_h.m4: Update.
1731 * gnulib/import/m4/wint_t.m4: Update.
1732 * gnulib/import/malloc.c: Update.
1733 * gnulib/import/malloc/scratch_buffer.h: Update.
1734 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1735 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1736 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1737 * gnulib/import/malloca.c: Update.
1738 * gnulib/import/malloca.h: Update.
1739 * gnulib/import/malloca.valgrind: Update.
1740 * gnulib/import/math.in.h: Update.
1741 * gnulib/import/mbrtowc.c: Update.
1742 * gnulib/import/mbsinit.c: Update.
1743 * gnulib/import/mbsrtowcs-impl.h: Update.
1744 * gnulib/import/mbsrtowcs-state.c: Update.
1745 * gnulib/import/mbsrtowcs.c: Update.
1746 * gnulib/import/memchr.c: Update.
1747 * gnulib/import/memmem.c: Update.
1748 * gnulib/import/mempcpy.c: Update.
1749 * gnulib/import/memrchr.c: Update.
1750 * gnulib/import/mkdir.c: Update.
1751 * gnulib/import/mkstemp.c: Update.
1752 * gnulib/import/msvc-inval.c: Update.
1753 * gnulib/import/msvc-inval.h: Update.
1754 * gnulib/import/msvc-nothrow.c: Update.
1755 * gnulib/import/msvc-nothrow.h: Update.
1756 * gnulib/import/open.c: Update.
1757 * gnulib/import/openat-die.c: Update.
1758 * gnulib/import/openat-priv.h: Update.
1759 * gnulib/import/openat-proc.c: Update.
1760 * gnulib/import/openat.c: Update.
1761 * gnulib/import/openat.h: Update.
1762 * gnulib/import/opendir.c: Update.
1763 * gnulib/import/pathmax.h: Update.
1764 * gnulib/import/pipe-safer.c: Update.
1765 * gnulib/import/rawmemchr.c: Update.
1766 * gnulib/import/readdir.c: Update.
1767 * gnulib/import/readlink.c: Update.
1768 * gnulib/import/realloc.c: Update.
1769 * gnulib/import/ref-add.sin: Update.
1770 * gnulib/import/ref-del.sin: Update.
1771 * gnulib/import/rename.c: Update.
1772 * gnulib/import/rewinddir.c: Update.
1773 * gnulib/import/rmdir.c: Update.
1774 * gnulib/import/same-inode.h: Update.
1775 * gnulib/import/save-cwd.c: Update.
1776 * gnulib/import/save-cwd.h: Update.
1777 * gnulib/import/scratch_buffer.h: Update.
1778 * gnulib/import/secure_getenv.c: Update.
1779 * gnulib/import/setenv.c: Update.
1780 * gnulib/import/signal.in.h: Update.
1781 * gnulib/import/stat-time.c: Update.
1782 * gnulib/import/stat-time.h: Update.
1783 * gnulib/import/stat-w32.c: Update.
1784 * gnulib/import/stat-w32.h: Update.
1785 * gnulib/import/stat.c: Update.
1786 * gnulib/import/stdbool.in.h: Update.
1787 * gnulib/import/stddef.in.h: Update.
1788 * gnulib/import/stdint.in.h: Update.
1789 * gnulib/import/stdio.in.h: Update.
1790 * gnulib/import/stdlib.in.h: Update.
1791 * gnulib/import/str-two-way.h: Update.
1792 * gnulib/import/strchrnul.c: Update.
1793 * gnulib/import/strdup.c: Update.
1794 * gnulib/import/streq.h: Update.
1795 * gnulib/import/strerror-override.c: Update.
1796 * gnulib/import/strerror-override.h: Update.
1797 * gnulib/import/strerror.c: Update.
1798 * gnulib/import/string.in.h: Update.
1799 * gnulib/import/stripslash.c: Update.
1800 * gnulib/import/strnlen1.c: Update.
1801 * gnulib/import/strnlen1.h: Update.
1802 * gnulib/import/strstr.c: Update.
1803 * gnulib/import/strtok_r.c: Update.
1804 * gnulib/import/sys_stat.in.h: Update.
1805 * gnulib/import/sys_time.in.h: Update.
1806 * gnulib/import/sys_types.in.h: Update.
1807 * gnulib/import/tempname.c: Update.
1808 * gnulib/import/tempname.h: Update.
1809 * gnulib/import/time.in.h: Update.
1810 * gnulib/import/unistd--.h: Update.
1811 * gnulib/import/unistd-safer.h: Update.
1812 * gnulib/import/unistd.in.h: Update.
1813 * gnulib/import/unsetenv.c: Update.
1814 * gnulib/import/verify.h: Update.
1815 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1816 * gnulib/import/wchar.in.h: Update.
1817 * gnulib/import/wctype.in.h: Update.
1818 * gnulib/import/xalloc-oversized.h: Update.
1819 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1820 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1825 * gdb/main.c (captured_main_1): Exit with nonzero status
1826 in batch mode if the last command to be executed failed.
1827 * NEWS: Mention the above.
1831 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1832 end of warning message.
1837 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1838 (aarch64_extract_return_value): Use
1839 aapcs_is_vfp_call_or_return_candidate.
1840 (aarch64_return_in_memory): Likewise.
1841 (aarch64_store_return_value): Likewise.
1846 (aapcs_is_vfp_call_or_return_candidate): Make static
1847 (pass_in_v_or_stack): Remove function.
1848 (pass_in_v_vfp_candidate): New function.
1849 (aarch64_push_dummy_call): Check for float register candidates.
1853 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1854 (aapcs_is_vfp_call_or_return_candidate_1): New function.
1855 (aapcs_is_vfp_call_or_return_candidate): Likewise.
1860 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1861 (struct ipa_sym_addresses): Rename to...
1862 (struct ipa_sym_addresses_common): ... this.
1863 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1867 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1868 (token_fifo): Now a std::vector.
1869 (yylex, c_parse): Update.
1870 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1871 (token_fifo): Now a std::vector.
1872 (yylex, d_parse): Update.
1873 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1874 (token_fifo): Now a std::vector.
1875 (yylex, go_parse): Update.
1879 * parser-defs.h (struct type_stack) <elements>: Change type to
1880 std::vector<union type_stack_elt>.
1881 <depth, size>: Remove.
1882 * parse.c (parse_exp_in_context_1): Adjust.
1883 (type_stack_reserve): Remove.
1884 (check_type_stack_depth): Remove.
1885 (insert_into_type_stack): Adjust to std::vector.
1886 (insert_type): Likewise.
1887 (push_type): Likewise.
1888 (push_type_int): Likewise.
1889 (insert_type_address_space): Likewise.
1890 (pop_type): Likewise.
1891 (pop_type_int): Likewise.
1892 (pop_typelist): Likewise.
1893 (pop_type_stack): Likewise.
1894 (append_type_stack): Likewise.
1895 (push_type_stack): Likewise.
1896 (get_type_stack): Likewise.
1897 (type_stack_cleanup): Likewise.
1898 (push_typelist): Likewise.
1899 (follow_types): Likewise.
1900 (_initialize_parse): Likewise.
1904 * NEWS: Mention csky target.
1910 * csky-linux-tdep.c: New file.
1911 * csky-tdep.c: Likewise.
1912 * csky-tdep.h: Likewise.
1913 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1915 (HFILES_NO_SRCDIR): Add csky-tdep.h.
1916 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1917 * configure.tgt: Add csky support.
1921 * python/py-framefilter.c (py_print_frame): Print frame architecture
1922 when printing on an MI output.
1927 * configure: Rebuild.
1928 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1932 * aarch64-linux-tdep.c
1933 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1938 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1940 (ppc64_standard_linkage1, ppc64_standard_linkage2)
1941 (ppc64_standard_linkage3, ppc64_standard_linkage4)
1942 (ppc64_standard_linkage5, ppc64_standard_linkage6)
1943 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1948 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1949 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1953 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1954 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1956 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1958 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1960 * sparc-linux-tdep.c (sparc32_linux_sigframe)
1961 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1962 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1964 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1965 (ppc64_linux_sigaction_tramp_frame)
1966 (ppc32_linux_sighandler_tramp_frame)
1967 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1968 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1969 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1970 * mn10300-linux-tdep.c (am33_linux_sigframe)
1971 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1972 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1973 * mips-linux-tdep.c (mips_linux_o32_sigframe)
1974 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1975 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1976 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1977 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1978 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1979 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1980 * microblaze-linux-tdep.c
1981 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1982 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1983 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1984 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1985 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1986 * common/common-types.h (ULONGEST_MAX): New define.
1987 (CORE_ADDR_MAX): Fix formatting.
1988 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1989 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1990 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1991 (arm_linux_rt_sigreturn_tramp_frame)
1992 (arm_eabi_linux_sigreturn_tramp_frame)
1993 (arm_eabi_linux_rt_sigreturn_tramp_frame)
1994 (thumb2_eabi_linux_sigreturn_tramp_frame)
1995 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1996 (arm_linux_restart_syscall_tramp_frame)
1997 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1998 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1999 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2001 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2005 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2007 * mips-tdep.c (mips_deal_with_atomic_sequence)
2008 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2009 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2010 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2011 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2013 * aarch64-tdep.c (aarch64_software_single_step): Use
2018 * linespec.c (complete_linespec_component): Add cast to "char".
2019 * completer.c (completion_tracker::build_completion_result): Add
2024 * solist.h (struct solist, struct target_so_ops): Fix
2029 * ada-tasks.c (ada_task_info_s): Remove typedef.
2030 (DEF_VEC_O(ada_task_info_s)): Remove.
2031 (struct ada_tasks_inferior_data): Initialize fields.
2032 <task_list>: Make an std::vector.
2033 (get_ada_tasks_inferior_data): Allocate with new.
2034 (ada_get_task_number): Adjust.
2035 (get_task_number_from_id): Likewise.
2036 (valid_task_id): Likewise.
2037 (ada_get_task_info_from_ptid): Likewise.
2038 (iterate_over_live_ada_tasks): Likewise.
2039 (add_ada_task): Likewise.
2040 (read_known_tasks): Likewise.
2041 (ada_build_task_list): Likewise.
2042 (print_ada_task_info): Likewise.
2043 (info_task): Likewise.
2044 (task_command_1): Likewise.
2048 * ada-lang.c (add_angle_brackets): Return std::string.
2052 * python/py-threadevent.c (py_get_event_thread): Initialize
2057 * python/py-bpevent.c (create_breakpoint_event_object): Use
2058 copy-initialization.
2059 * python/py-continueevent.c (emit_continue_event): Use
2060 copy-initialization.
2061 * python/py-exitedevent.c (create_exited_event_object): Return a
2063 (emit_exited_event): Use copy-initialization.
2064 * python/py-inferior.c (python_new_inferior)
2065 (python_inferior_deleted, add_thread_object): Use
2066 copy-initialization.
2067 * python/py-infevents.c (create_inferior_call_event_object)
2068 (create_register_changed_event_object)
2069 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2070 (emit_inferior_call_event, emit_memory_changed_event)
2071 (emit_register_changed_event): Use copy-initialization.
2072 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2073 Return a gdbpy_ref<>.
2074 (emit_new_objfile_event): Use copy-initialization.
2075 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2076 (emit_clear_objfiles_event): Use copy-initialization.
2077 * python/py-signalevent.c (create_signal_event_object): Use
2078 copy-initialization.
2079 * python/py-threadevent.c (create_thread_event_object): Use
2080 copy-initialization.
2086 * python/py-continueevent.c: Include "gdbthread.h".
2087 (create_continue_event_object): Add intro comment. Add 'ptid'
2088 parameter. Use it to find thread to pass to
2089 create_thread_event_object.
2090 (emit_continue_event): Pass PTID down to
2091 create_continue_event_object.
2092 * python/py-event.h (py_get_event_thread): Declare.
2093 (create_thread_event_object): Remove default from 'thread'
2095 * python/py-stopevent.c (create_stop_event_object): Use
2096 py_get_event_thread.
2097 * python/py-threadevent.c (get_event_thread): Rename to ...
2098 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2099 and use it to find the thread.
2100 (create_thread_event_object): Assert that THREAD isn't null.
2101 Don't find the event thread here.
2105 * block.h (blockrange, blockranges): New struct declarations.
2106 (struct block): Add new field named `ranges'.
2107 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2108 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2109 macros for accessing ranges in struct block.
2110 (make_blockranges): New declaration.
2111 block.c (make_blockranges): New function.
2112 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2114 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2115 * blockframe.c (cache_pc_function_block): New static global.
2116 (clear_pc_function_cache): Clear cache_pc_function_block.
2117 (find_pc_partial_function): Move comment to symtab.h. Add
2118 support for non-contiguous blocks.
2119 * cli/cli-cmds.c (block.h): Include.
2120 (print_disassembly): Handle printing of non-contiguous blocks.
2121 (disassemble_current_function): Likewise.
2122 (disassemble_command): Likewise.
2124 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2126 * blockframe.c (get_pc_function_start): Likewise.
2127 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2128 (gcc_symbol_address): Likewise.
2129 * compile/compile-object-run.c (compile_object_run): Likewise.
2130 * compile/compile.c (get_expr_block_and_pc): Likewise.
2131 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2132 (func_addr_to_tail_call_list): Likewise.
2133 * findvar.c (default_read_var_value): Likewise.
2134 * inline-frame.c (inline_frame_this_id): Likewise.
2135 (skip-inline_frames): Likewise.
2136 * infcmd.c (until_next_command): Likewise.
2137 * linespec.c (convert_linespec_to_sals): Likewise.
2138 * parse.c (parse_exp_in_context_1): Likewise.
2139 * printcmd.c (build_address_symbolic): likewise.
2140 (info_address_command): Likewise.
2141 symtab.c (find_function_start_sal): Likewise.
2142 (skip_prologue_sal): Likewise.
2143 (find_function_alias_target): Likewise.
2144 (find_gnu_ifunc): Likewise.
2145 * stack.c (find_frame_funname): Likewise.
2146 * symtab.c (fixup_symbol_section): Likewise.
2147 (find_function_start_sal): Likewise.
2148 (skip_prologue_sal): Likewsie.
2149 (find_function_alias_target): Likewise.
2150 (find_gnu_ifunc): Likewise.
2151 * tracepoint.c (info_scope_command): Likewise.
2152 * value.c (value_fn_field): Likewise.
2154 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2155 in place of find_pc_partial_function.
2156 * blockframe.c (find_function_entry_range_from_pc): New function.
2157 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2158 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2159 for each range in a block.
2164 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2169 * solib-svr4.c (read_program_headers_from_bfd): Return
2170 gdb::optional<gdb::byte_vector>.
2171 (svr4_exec_displacement): Adjust.
2175 * solib-svr4.c (read_program_header): Return
2176 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2177 (find_program_interpreter): Return
2178 gdb::optional<gdb::byte_vector>.
2179 (scan_dyntag_auxv): Adjust.
2180 (enable_break): Adjust.
2181 (svr4_exec_displacement): Adjust.
2185 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2186 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2190 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2192 * guile/scm-utils.c (gdbscm_printf): Likewise.
2193 * serial.c (serial_printf): Likewise.
2194 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2198 * stack.c (print_frame): Print frame architecture when printing on
2200 * NEWS: Mention new "arch" attribute in frame output.
2204 * arch/aarch64.h (aarch64_regnum): Update comment.
2208 * NEWS: Add SVE to 8.2 section.
2212 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2213 out from gdbscm_parse_function_args.
2214 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2215 gdbscm_parse_function_args_1.
2220 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2225 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2230 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2231 for PT_TLS segments.
2235 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2236 dwarf_variable_value.
2237 * dwarf2-frame.c (class dwarf_expr_executor):
2238 Add override for dwarf_variable_value.
2239 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2240 (class symbol_needs_eval_context): Likewise.
2241 (indirect_synthetic_pointer): Add forward declaration.
2242 (sect_variable_value): New function.
2243 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2244 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2245 for DW_OP_GNU_variable_value.
2249 * top.c (read_command_file): Update.
2250 (command_line_input): Remove "repeat" argument.
2251 * ada-lang.c (get_selections): Update.
2252 * linespec.c (decode_line_2): Update.
2253 * defs.h (command_line_input): Remove argument.
2254 * cli/cli-script.c (read_next_line): Update.
2255 * python/py-gdb-readline.c: Update.
2259 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2264 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2268 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2269 If used, use find_pc_partial_function to find address range
2271 * mi/mi-main.c (mi_cmd_list_features): Report
2272 "data-disassemble-a-option" feature.
2273 * NEWS: Mention new -data-disassemble option -a.
2277 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2281 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2282 (aarch64_linux_collect_sve_regset): Likewise.
2283 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2284 * regcache.h (regcache_map_entry_size): New function.
2288 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2289 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2290 (SVE_HEADER_VL_LENGTH): Likewise.
2291 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2292 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2293 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2294 (SVE_HEADER_SIZE_OFFSET): Likewise.
2295 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2296 (SVE_HEADER_VL_OFFSET): Likewise.
2297 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2298 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2299 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2300 (SVE_HEADER_SIZE): Likewise.
2301 (aarch64_linux_core_read_vq): Add function.
2302 (aarch64_linux_core_read_description): Check for SVE section.
2306 * aarch64-fbsd-tdep.c
2307 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2309 * aarch64-linux-tdep.c
2310 (aarch64_linux_iterate_over_regset_sections): Likewise.
2311 * alpha-linux-tdep.c
2312 (alpha_linux_iterate_over_regset_sections):
2314 (alphanbsd_iterate_over_regset_sections): Likewise.
2316 (amd64fbsd_iterate_over_regset_sections): Likewise.
2317 * amd64-linux-tdep.c
2318 (amd64_linux_iterate_over_regset_sections): Likewise.
2320 (armbsd_iterate_over_regset_sections): Likewise.
2322 (arm_fbsd_iterate_over_regset_sections): Likewise.
2324 (arm_linux_iterate_over_regset_sections): Likewise.
2325 * corelow.c (get_core_registers_cb): Likewise.
2326 (core_target::fetch_registers): Likewise.
2327 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2328 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2329 * gdbarch.h (void): Regenerate.
2330 * gdbarch.sh: Add supply_size and collect_size.
2331 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2332 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2333 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2334 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2335 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2336 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2337 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2338 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2339 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2340 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2341 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2342 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2343 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2344 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2345 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2346 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2347 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2348 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2349 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2350 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2351 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2352 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2353 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2354 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2355 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2356 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2357 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2358 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2359 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2360 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2364 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2369 * compile/compile-c-support.c (add_code_header, add_code_footer):
2370 Move into policy class.
2371 (c_push_user_expression, pop_user_expression_nop)
2372 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2373 (compile_program): New host class.
2374 (c_compile_program): New typedef.
2375 (c_compute_porgram): Use c_compile_program.
2379 * compile/compile-internal.h (compile_instance::~compile_instance):
2380 Remove calls to htab_delete.
2381 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2382 * compile.c (compile_instance::compile_instance): Initialize
2383 htab unique pointers.
2384 (compile_instance::get_cached_type, compile_instance::insert_type)
2385 (compile_instance::error_symbol_once): Update for unique_ptr.
2389 * compile/compile-c-symbols.c (struct symbol_error)
2390 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2391 (compile_instance::insert_symbol_error)
2392 (compile_instance::error_symbol_once): Move to ...
2393 * compile/compile.c: ... here.
2397 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2398 instead of `new_compile_instance'.
2399 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2401 If the symbol error map is not initialized, create it.
2402 (generate_c_for_for_one_symbol): Do not check/initialize
2403 the symbol error map.
2404 * compile/compile-c-types.c (compile_c_instance): Make a class.
2406 (compile_instance::compile_instance): Initialize the type cache.
2407 (get_cached_type): New function.
2408 (insert_type): Update description.
2409 (compile_c_instance::m_default_cflags): Define.
2410 (convert_type): Update description. Use get_cached_type.
2411 (delete_instance): Moved to destructor.
2412 (new_compile_instance): Moved to constructor.
2413 * compile/compile-c.h (compile_c_instance): Make class inheriting
2414 from compile_instance.
2415 <base>: Remove field.
2416 <type_map, symbol_err_map>: Move to base class.
2417 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2418 * compile/compile-internal.h (compile_instance): Make class.
2419 <type_map_t, symbol_err_map_t>: Define.
2420 <fe>: Rename to `m_gcc_fe'.
2421 <scope, block, gcc_target_options>: Add `m_' prefix.
2422 <m_type_map, m_symbol_err_map>: New fields, moved from
2425 (convert_type, new_compile_instance): Remove.
2426 * compile/compile.c (cleanup_compile_instance): Remove.
2427 (compile_to_object): Use unique_ptr to eliminate cleanups.
2428 (compile_instance::set_print_callback, compile_instance::version)
2429 (compile_instance::set_verbose)
2430 (compile_instance::set_driver_filename)
2431 (compile_instance::set_triplet_regexp)
2432 (compile_instance::set_arguments)
2433 (compile_instance::set_source_file)
2434 (compile_instance::compile): Define.
2438 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2439 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2440 gcc-c-fe.def to define C plugin.
2441 (delete_instance): Delete `c_plugin'.
2442 (new_compile_instance): Initialize `c_plugin'.
2443 * compile/compile-c.h: Include gcc_c_plugin.h.
2444 (struct compile_c_instance) <c_plugin>: New member.
2445 * gcc-c-plugin.h: New file.
2446 Update all callers with API change.
2450 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2451 (HFILES_NO_SRCDIR): ... to here.
2452 Add compile-internal.h and compile-c.h.
2453 * compile/compile-c-support.c: Include compile-c.h.
2454 * compile/compile-c-symbols.c: Include compile-c.h.
2455 (generate_c_for_variable_locations): Update comment.
2456 * compile/compile-c-types.c: Include compile-c.h.
2457 * compile/compile-c.h: New file -- moved C language declarations
2458 from other files here.
2459 * compile/compile-internal.h: Do not include hashtab.h or
2460 common/enum-flags.h.
2461 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2462 (gcc_convert_symbol, gcc_symbol_address)
2463 (generate_c_for_variable_locations, c_get_mode_for_size)
2464 (c_get_range_decl_name): Definitions moved to compile-c.h.
2465 * compile/compile-loc2c.c: Include compile-c.h.
2469 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2470 (c_symbol_substitution_name): ... this.
2475 * compile/compile-c-support.c (c_compute_program): Use
2476 unique_xmalloc_ptr to eliminate cleanup.
2477 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2478 Return a unique_xmalloc_ptr and eliminate cleanup.
2479 * compile/compile-internal.h (generate_c_for_variable_locations):
2480 Return unique_xmalloc_ptr and update description.
2484 * corelow.c (core_target::get_core_register_section): Rename
2485 min_size to section_min_size.
2489 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2490 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2491 * NEWS: Mention new GNU/Linux RISC-V target.
2492 * configure.host: Add riscv*-*-linux*.
2493 * configure.nat: Add riscv*.
2494 * configure.tgt: Add riscv*-*-linux*.
2495 * riscv-linux-nat.c: New file.
2496 * riscv-linux-tdep.c: New file.
2500 * infrun.c (resume): Make static, add forward declaration.
2501 (proceed): Update header comment.
2502 * infrun.h (resume): Delete declaration.
2506 * riscv-tdep.h: Minor formatting fixes.
2510 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2511 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2512 (test_mkdir_recursive): Likewise.
2513 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2517 * valarith.c (value_subscripted_rvalue): If an array is not in
2518 memory, and we don't know the upper bound, then we can't know that
2519 the requested element exists or not.
2523 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2524 (target_options_to_string): Add comment.
2528 * unittests/scoped_mmap-selftests.c: Check result of "write".
2532 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2533 (decode_register_index_short): New.
2534 (decode_j_type_insn, decode_cj_type_insn): New.
2535 (decode_b_type_insn, decode_cb_type_insn): New.
2536 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2537 local xlen. Check xlen when decoding ambiguous compressed insns. In
2538 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2539 is_c_sw_insn instead of is_sw_insn.
2540 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2541 (riscv_software_single_step): New.
2542 * riscv-tdep.h (riscv_software_single_step): Declare.
2544 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2545 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2550 * target.c (dispose_inferior): Don't dispose of inferiors that are
2555 * remote.c (remote_target::download_tracepoint): Change char* to
2560 * target.h (target_options_to_string): Return an std::string.
2561 * target.c (str_comma_list_concat_elem): Return void, use
2563 (do_option): Likewise.
2564 (target_options_to_string): Return an std::string.
2565 * linux-nat.c (linux_nat_target::wait): Adjust.
2566 * target-debug.h (target_debug_print_options): Adjust.
2570 * Makefile.in (CPPFLAGS): New variable.
2571 (INTERNAL_CPPFLAGS): Use it.
2575 * NEWS: Mention the index cache.
2579 * common/pathstuff.h (get_standard_cache_dir): New.
2580 * common/pathstuff.c (get_standard_cache_dir): New.
2581 * build-id.h (build_id_to_string): New.
2582 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2583 DEBUG_STR_SUFFIX): Move to here.
2584 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2585 DEBUG_STR_SUFFIX): Move from there.
2586 (write_psymtabs_to_index): Make non-static, add basename
2587 parameter. Write to temporary files, rename when done.
2588 (save_gdb_index_command): Adjust call to
2589 write_psymtabs_to_index.
2590 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2592 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2593 (get_gdb_index_contents_from_cache): New.
2594 (get_gdb_index_contents_from_cache_dwz): New.
2595 (dwarf2_initialize_objfile): Read index from cache.
2596 (dwarf2_build_psymtabs): Save to index.
2597 * dwarf-index-cache.h: New file.
2598 * dwarf-index-cache.c: New file.
2599 * dwarf-index-write.h: New file.
2603 * gnulib/aclocal.m4: Re-generate.
2604 * gnulib/config.in: Re-generate.
2605 * gnulib/configure: Re-generate.
2606 * gnulib/import/Makefile.am: Re-generate.
2607 * gnulib/import/Makefile.in: Re-generate.
2608 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2609 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2610 * gnulib/import/m4/mkdir.m4: New file.
2611 * gnulib/import/mkdir.c: New file.
2612 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2617 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2618 * common/scoped_mmap.c: New file.
2619 * common/scoped_mmap.h (destroy): New method.
2620 (~scoped_mmap, reset): Use destroy.
2621 (scoped_mmap): New move constructor.
2622 (mmap_file): New declaration.
2623 * unittests/scoped_mmap-selftests.c (test_normal,
2624 test_invalid_filename, run_tests): New functions.
2625 (_initialize_scoped_mmap_selftests): Register selftest.
2629 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2630 (read_gdb_index_from_buffer): ... this. Remove section
2631 parameter, add buffer parameter.
2632 (get_gdb_index_contents_ftype,
2633 get_gdb_index_contents_dwz_ftype): New typedefs.
2634 (dwarf2_read_gdb_index): Add callback parameters to get the
2636 (get_gdb_index_contents_from_section): New.
2637 (dwarf2_initialize_objfile): Update call to
2638 dwarf2_read_gdb_index.
2642 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2643 (gdb_open_cloexec): Likewise.
2644 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2645 (commandline_from_pid): Likewise.
2646 (linux_xfer_osdata_threads): Likewise.
2647 (linux_xfer_osdata_fds): Likewise.
2648 * ada-lang.c (is_package_name): Likewise.
2649 * auxv.c (procfs_xfer_auxv): Likewise.
2650 * breakpoint.c (print_one_breakpoint_location): Use
2652 (print_one_catch_solib): Use string_printf.
2653 * coff-pe-read.c (add_pe_exported_sym): Likewise.
2654 (add_pe_forwarded_sym): Likewise.
2655 * dwarf2read.c (create_type_unit_group): Likewise.
2656 (build_error_marker_type): Likewise.
2657 * infcall.c (get_function_name): Likewise.
2658 * valprint.c (print_converted_chars_to_obstack): Likewise.
2659 * xtensa-tdep.c (xtensa_register_type): Likewise.
2663 * remote.c (remote_target::download_tracepoint): Fix format
2668 * tracefile.c: Include common/byte-vector.h.
2669 (trace_save): Change type of buf to gdb::byte_vector. Initialize
2670 with trace_regblock_size if needed. Update uses of buf.
2674 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2675 std::vector<unsigned char>.
2676 * tracepoint.c (collection_list::collection_list): Remove
2677 m_regs_mask initializer from initializer list. Resize
2678 m_regs_mask using the largest remote register number.
2679 (collection_list::add_remote_register): Remove size check on
2680 m_regs_mask. Use at to access element.
2681 (collection_list::stringify): Change type of temp_buf to
2682 gdb::char_vector. Update uses of temp_buf. Resize if needed to
2683 stringify the register mask. Use pack_hex_byte for the register
2688 * tracepoint.h (class collection_list) <add_register>: Remove.
2689 <add_remote_register, add_ax_registers, add_local_register>:
2691 <add_memrange>: Add scope parameter.
2692 * tracepoint.c (encode_actions_1): Likewise.
2693 (collection_list::add_register): Rename to ...
2694 (collection_list::add_remote_register): ... this. Update
2696 (collection_list::add_ax_registers, add_local_register): New
2698 (collection_list::add_memrange): Add scope parameter. Call
2699 add_local_register instead of add_register.
2700 (finalize_tracepoint_aexpr): New function.
2701 (collection_list::collect_symbol): Update calls to add_memrange.
2702 Call add_local_register instead of add_register. Call
2703 add_ax_registers. Call finalize_tracepoint_aexpr.
2704 (encode_actions_1): Get remote regnos for $reg action. Call
2705 add_remote_register, add_ax_registers, and add_local_register.
2706 Update call to add_memrange. Call finalize_tracepoint_aexpr.
2707 (validate_actionline): Call finalize_tracepoint_aexpr.
2711 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2712 Replace array buf with gdb::char_vector buf, of size
2713 get_remote_packet_size (). Replace references to buf and
2714 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
2715 and xsnprintf with snprintf. Raise errors if the buffer is too
2720 * remote.c (remote_target::download_tracepoint): Fix the has_more
2721 predicate in the QTDP action list iteration.
2725 * remote.c (remote_target::download_tracepoint): Fix indentation
2730 * proc-api.c (_initialize_proc_api): Remove c, unused.
2731 * procfs.c (procfs_init_inferior): Remove signals, unused.
2732 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2738 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2739 'W_STOPCODE (0)' as this could be ambiguous.
2743 * ser-tcp.c (net_open): Fix thinko when deciding whether to
2744 disable TCP's Nagle algorithm (use "ai_protocol" instead of
2750 * dwarf2read.c (read_func_scope): Set symtab on template parameter
2752 (process_structure_scope): Likewise.
2757 * darwin-nat.c (darwin_kill_inferior): Fix handling of
2762 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2763 (darwin_suspend_inferior, darwin_resume_inferior)
2764 (darwin_decode_notify_message, darwin_resume_inferior_threads)
2765 (darwin_check_new_threads): Check result of get_darwin_inferior.
2773 * varobj.c (varobj_get_path_expr_parent): Report an error if
2774 parent is a dynamic varobj.
2778 * gnulib/aclocal.m4: Re-generate.
2779 * gnulib/config.in: Re-generate.
2780 * gnulib/configure: Re-generate.
2781 * gnulib/import/Makefile.in: Re-generate.
2782 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2783 * gnulib/import/m4/onceonly.m4: Re-generate.
2787 * target-descriptions.c (struct xml_test_tdesc): New.
2788 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2789 (record_xml_tdesc): Update.
2790 (maintenance_check_xml_descriptions): Update.
2791 * target-descriptions.h (record_xml_tdesc): Update comment.
2795 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2796 checking array bounds are defined.
2800 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2801 irreflexivity violation.
2805 * cli/cli-decode.c (lookup_cmd): Remove lint code.
2806 * value.c (unpack_long): Remove lint code.
2807 * valops.c (value_ind): Remove lint code.
2808 * valarith.c (value_x_binop, value_x_unop, value_equal)
2809 (value_pos): Remove lint code.
2813 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2814 with undefined upper bound as <optimized out>.
2818 * gcore.in: Rename variable "name" to "prefix". Expand
2823 * windows-nat.c (windows_nat_target::create_inferior): Update to
2824 call close() in global namespace.
2828 * dwarf-index-write.c (add_address_entry): Don't add objfile
2830 * dbxread.c (find_stab_function): Rename from
2831 find_stab_function_addr. Return a bound_minimal_symbol.
2832 (read_dbx_symtab): Use raw_text_low, raw_text_high.
2833 Don't add objfile offsets.
2834 (end_psymtab): Use raw_text_low, raw_text_high,
2835 MSYMBOL_VALUE_RAW_ADDRESS.
2836 (read_ofile_symtab): Update.
2837 (process_one_symbol): Update.
2838 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2840 (dw2_relocate): Remove.
2841 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2843 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2845 (process_psymtab_comp_unit_reader, add_partial_symbol)
2846 (add_partial_subprogram, dwarf2_ranges_read): Update.
2847 (load_partial_dies): Update.
2848 (add_address_entry): Don't add objfile offsets.
2849 (dwarf2_build_include_psymtabs): Update.
2850 (create_addrmap_from_aranges): Don't add objfile offsets.
2851 (dw2_find_pc_sect_compunit_symtab): Update.
2852 * mdebugread.c (parse_symbol): Don't add objfile offsets.
2853 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2855 (parse_partial_symbols): Don't add objfile offsets. Use
2856 raw_text_low, raw_text_high. Update.
2857 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2858 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2859 or call 'relocate' quick function. Clear psymbol_map.
2860 * psympriv.h (struct partial_symbol) <address>: Add section
2862 <set_unrelocated_address>: Rename from set_address.
2863 <raw_text_low, raw_text_high>: New methods.
2864 <text_low, text_high>: Add objfile parameter.
2865 (add_psymbol_to_bcache): Add 'section' parameter. Call
2866 set_unrelocated_address.
2867 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2868 (find_pc_psymbol): Update.
2869 (fixup_psymbol_section, relocate_psymtabs): Remove.
2870 (dump_psymtab, psym_functions): Update.
2871 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2873 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2874 (start_psymtab_common): Update.
2875 * symfile-debug.c (debug_qf_relocate): Remove.
2876 (debug_sym_quick_functions): Update.
2877 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2878 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2883 * dbxread.c (end_psymtab): Use text_high_valid and
2885 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2886 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2887 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2889 <text_low_valid, text_high_valid>: New fields.
2890 <set_text_low, set_text_high>: Update.
2891 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2895 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2897 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2898 textlow and texthigh fields.
2899 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2901 * mdebugread.c (parse_lines, parse_partial_symbols)
2902 (psymtab_to_symtab_1): Update.
2903 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2904 Rename fields. Update comment. Now private.
2905 <text_low, text_high, set_text_low, set_text_high>: New methods.
2906 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2907 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2908 (start_psymtab_common, maintenance_info_psymtabs)
2909 (maintenance_check_psymtabs): Update.
2910 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2912 (scan_xcoff_symtab): Update.
2916 * psympriv.h (struct partial_symbol) <unrelocated_address,
2917 address, set_address>: New methods.
2918 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2919 (fixup_psymbol_section, relocate_psymtabs): Update.
2920 (print_partial_symbols): Add 'objfile' parameter. Update.
2921 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2926 * dwarf-index-write.c (write_psymbols, debug_names::insert)
2927 (debug_names::write_psymbols): Update.
2928 * psympriv.h (struct partial_symbol): Derive from
2929 general_symbol_info.
2930 <obj_section>: New method.
2931 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2932 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2933 (find_pc_sect_psymbol, fixup_psymbol_section)
2934 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2935 (print_partial_symbols, recursively_search_psymtabs)
2936 (compare_psymbols, psymbol_hash, psymbol_compare)
2937 (add_psymbol_to_bcache, maintenance_check_psymtabs)
2938 (psymbol_name_matches, psym_fill_psymbol_map): Update.
2942 * dbxread.c (end_psymtab): Remove dead code.
2946 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2947 DWARF unwinders are disabled.
2948 * dwarf2-frame.c: Add dwarf2read.h include.
2949 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2951 (dwarf2_frame_unwinders_enabled_p): Define.
2952 (show_dwarf_unwinders_enabled_p): New function.
2953 (_initialize_dwarf2_frame): Register switch to control DWARF
2955 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2956 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2957 (show_dwarf_cmdlist): Remove static keyword.
2958 * dwarf2read.h (set_dwarf_cmdlist): Declare.
2959 (show_dwarf_cmdlist): Declare.
2960 * NEWS: Document new feature.
2964 PR breakpoints/23366
2965 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2969 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2970 DW_AT_count can't be translated to a dynamic prop.
2974 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2979 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2983 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2988 * dwarf2read.c (dw2_add_symbol_to_list): New function.
2989 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2990 instead of add_symbol_to_list.
2991 (read_file_scope): Call prepare_one_comp_unit before reading
2996 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3000 * utils.c (malloc, realloc, free): Don't declare.
3001 * configure, config.in: Rebuild.
3002 * configure.ac: Don't check for declarations of free, malloc, or
3007 * aarch64-linux-nat.c
3008 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3010 * arm-linux-nat.c (fetch_regs): Likewise.
3011 (store_regs): Likewise.
3012 (fetch_vfp_regs): Likewise.
3013 (store_vfp_regs): Likewise.
3014 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3015 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3016 (arm_linux_nat_target::insert_watchpoint): Likewise.
3017 (arm_linux_nat_target::remove_watchpoint): Likewise.
3018 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3020 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3022 * ppc-linux-nat.c (fetch_register): Likewise.
3023 (fetch_all_gp_regs): Likewise.
3024 (fetch_ppc_registers): Likewise.
3025 (store_all_gp_regs): Likewise.
3026 (store_ppc_registers): Likewise.
3027 (hwdebug_insert_point): Likewise.
3028 (can_use_watchpoint_cond_accel): Likewise.
3029 * remote-sim.c (gdb_os_write_stdout): Likewise.
3034 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3036 * configure: Rebuild.
3040 * regformats/regdat.sh: Define xmltarget_${name} inside
3041 #ifndef IN_PROCESS_AGENT.
3045 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3049 * symfile.c (reread_symbols): Notify iter, not objfile.
3053 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3055 (ravenscar_thread_target::prepare_to_store): Likewise.
3059 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3060 unused variable. Call value_fetch_lazy when needed.
3061 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3062 Remove unused variable. Call value_fetch_lazy when needed.
3066 * m32c-tdep.c (mark_dma): Return void.
3067 (make_regs): Remove unused declarations.
3071 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3072 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3073 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3074 bkscm_get_valid_block_smob_arg_unsafe for effect.
3078 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3083 * windows-nat.c (saved_context): Conditionally define.
3084 * remote.c (remote_target::remote_btrace_maybe_reopen):
3085 Conditionally declare "warned".
3086 * inflow.c (sigquit_ours): Conditionally define.
3087 (new_tty): Move "tty" declaration inside #if.
3088 * guile/guile.c (guile_datadir): Conditionally define.
3089 * charset.c (set_be_le_names): Move some declarations inside #if.
3090 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3092 (parse_xml_btrace_conf): Likewise.
3096 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3100 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3101 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3102 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3103 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3104 * stack.c (frame_apply_level_command): Remove unused variable.
3105 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3106 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3107 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3109 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3110 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3111 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3113 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3114 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3116 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3117 Remove unused variable.
3118 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3120 * common/tdesc.c (print_xml_feature::visit): Remove unused
3122 * compile/compile-object-load.c (store_regs): Remove unused
3124 * complaints.c (clear_complaints): Remove unused variable.
3125 * corelow.c (core_target_open): Remove unused variable.
3126 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3128 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3130 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3132 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3134 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3136 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3138 * ia64-tdep.c (examine_prologue): Remove unused variable.
3139 * infcall.c (run_inferior_call): Remove unused variable.
3140 * inferior.c (exit_inferior): Remove unused variable.
3141 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3142 * linespec.c (decode_line_2): Remove unused variable.
3143 * linux-nat.c (super_close): Remove.
3144 * linux-tdep.c (linux_info_proc): Remove unused variable.
3145 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3146 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3147 Remove unused variable.
3148 * parse.c (find_minsym_type_and_address): Remove unused variable.
3149 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3151 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3153 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3155 * record-btrace.c (record_btrace_target::store_registers): Remove
3157 (cmd_show_record_btrace_cpu): Remove unused variable.
3158 * riscv-tdep.c (riscv_register_reggroup_p)
3159 (riscv_push_dummy_call, riscv_return_value): Remove unused
3161 * rust-exp.y (literal): Remove unused variable.
3162 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3164 <STRUCTOP_ANONYMOUS>: Likewise.
3165 * s390-linux-tdep.c (s390_linux_init_abi_31)
3166 (s390_linux_init_abi_64): Remove unused variable.
3167 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3168 (file_select_thread, net_windows_open, _initialize_ser_windows):
3169 Remove unused variables.
3170 * symtab.c (find_pc_sect_line): Remove unused variable.
3171 * target-memory.c (compute_garbled_blocks): Remove unused
3173 (target_write_memory_blocks): Remove unused variable.
3174 * target.c (target_stack::unpush): Remove unused variables.
3175 * tracepoint.c (start_tracing, all_tracepoint_actions)
3176 (merge_uploaded_trace_state_variables)
3177 (print_one_static_tracepoint_marker): Remove unused variable.
3178 * unittests/basic_string_view/element_access/char/1.cc (test01):
3179 Remove unused variable.
3180 * windows-nat.c (windows_continue, windows_add_all_dlls)
3181 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3182 Remove unused variables.
3186 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3187 attr_profile in HAVE_ELF.
3188 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3193 * frame.c (frame_register_unwind): Change parameter name.
3194 (frame_unwind_register): Likewise.
3195 (frame_unwind_register_value): Likewise.
3196 (frame_unwind_register_signed): Likewise.
3197 (frame_unwind_register_unsigned): Likewise.
3198 * frame.h (frame_register_unwind): Likewise.
3199 (frame_unwind_register): Likewise.
3200 (frame_unwind_register_value): Likewise.
3201 (frame_unwind_register_signed): Likewise.
3202 (frame_unwind_register_unsigned): Likewise.
3203 (frame_unwind_arch): Likewise.
3207 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3212 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3213 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3218 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3219 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3220 m_compunit_symtab, m_language>: Add "m_" prefix.
3222 * buildsym.c: Update all uses.
3226 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3227 * buildsym.h (record_line_ftype): Remove typedef.
3231 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3232 (end_expandable_symtab): Likewise.
3233 (end_symtab_get_static_block): Likewise.
3234 (end_symtab_from_static_block): Likewise.
3235 * buildsym-legacy.c (augment_type_symtab): Remove.
3236 (end_expandable_symtab): Remove.
3237 (end_symtab_get_static_block): Remove.
3238 (end_symtab_from_static_block): Remove.
3242 * dwarf2read.c: Include buildsym.h.
3243 (struct dwarf2_cu) <builder>: New method.
3244 (fixup_go_packaging): Update.
3245 (process_full_comp_unit, process_full_type_unit): Update. Don't
3246 use scoped_free_pendings.
3247 (using_directives): Add "cu" parameter, remove "language".
3248 (read_import_statement, setup_type_unit_groups, )
3249 (read_func_scope, read_lexical_block_scope)
3250 (dwarf2_record_block_ranges, read_namespace): Update.
3251 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3252 (lnp_state_machine::handle_end_sequence): Update.
3253 (class lnp_state_machine) <m_cu>: New member.
3254 <m_record_line_callback>: Remove.
3255 <m_currently_recording_lines>: New member.
3256 (lnp_state_machine::handle_set_file): Update.
3257 (noop_record_line): Remove.
3258 (dwarf_record_line_p): Add cu parameter.
3259 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3260 (lnp_state_machine::record_line)
3261 (lnp_state_machine::lnp_state_machine)
3262 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3263 (dwarf_decode_lines): Update.
3264 (dwarf2_start_subfile): Add cu parameter.
3265 (dwarf2_start_symtab, new_symbol): Update.
3266 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3267 Remove dwarf2_per_objfile parameter.
3268 (dwarf_decode_macros): Update.
3272 * stabsread.c (define_symbol): Update.
3273 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3274 * dwarf2read.c (new_symbol): Update.
3275 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3276 * cp-namespace.c: Include buildsym.h.
3277 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3278 * buildsym-legacy.c (get_buildsym_compunit): New function.
3282 * xcoffread.c: Include buildsym-legacy.h.
3283 * windows-nat.c: Include buildsym-legacy.h.
3284 * stabsread.c: Include buildsym-legacy.h.
3285 * mdebugread.c: Include buildsym-legacy.h.
3286 * buildsym-legacy.h: New file.
3287 * buildsym-legacy.c: New file, from buildsym.c.
3288 * go32-nat.c: Include buildsym-legacy.h.
3289 * dwarf2read.c: Include buildsym-legacy.h.
3290 * dbxread.c: Include buildsym-legacy.h.
3291 * cp-namespace.c: Include buildsym-legacy.h.
3292 * coffread.c: Include buildsym-legacy.h.
3293 * buildsym.h: Move some contents to buildsym-legacy.h.
3294 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3296 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3300 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3301 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3302 (buildsym_compunit::buildsym_compunit)
3303 (buildsym_compunit::~buildsym_compunit)
3304 (buildsym_compunit::get_macro_table): Define.
3308 * buildsym.c (reset_symtab_globals): Remove.
3309 (buildsym_compunit::end_symtab_from_static_block): Update.
3310 (buildsym_compunit::augment_type_symtab): Update.
3311 (end_symtab_from_static_block): Call free_buildsym_compunit.
3312 (augment_type_symtab, end_symtab, end_expandable_symtab):
3317 * arch-utils.c: Do not include buildsym.h.
3318 * mipsread.c: Do not include buildsym.h.
3319 * machoread.c: Do not include buildsym.h.
3320 * elfread.c: Do not include buildsym.h.
3324 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3326 (buildsym_compunit): Add new constructor.
3327 (struct buildsym_compunit) <get_last_source_file, finish_block,
3328 record_block_range, start_subfile, patch_subfile_names,
3329 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3330 set_last_source_start_addr, get_last_source_start_addr,
3331 get_local_using_directives, set_local_using_directives,
3332 get_global_using_directives, outermost_context_p,
3333 get_current_context_stack, get_context_stack_depth,
3334 get_current_subfile, get_local_symbols, get_file_symbols,
3335 get_global_symbols, record_debugformat, record_producer,
3336 push_context, pop_context, end_symtab_get_static_block,
3337 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3339 <record_pending_block, finish_block_internal, make_blockvector,
3340 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3346 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3348 (finish_block_internal): Update.
3352 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3354 (finish_block_internal): Update.
3358 * buildsym.h (EXTERN): Don't define or undef.
3359 * buildsym.c (EXTERN): Don't define.
3363 * buildsym.c: Remove TODO comment.
3367 * coffread.c (coff_symtab_read): Update.
3368 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3369 (xcoff_new_init): Update.
3370 * mipsread.c (mipscoff_new_init): Update.
3371 * mdebugread.c (mdebug_build_psymtabs): Update.
3372 * elfread.c (elf_new_init): Update.
3373 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3375 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3376 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3377 (stabsect_build_psymtabs): Update.
3378 * buildsym.h (buildsym_init): Don't declare.
3379 * buildsym.c: Update comment.
3380 (prepare_for_building): Remove.
3381 (start_symtab, restart_symtab): Update.
3382 (reset_symtab_globals): Update comment.
3383 (buildsym_init): Remove.
3387 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3388 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3389 (read_enum_type, common_block_start, common_block_end)
3390 (cleanup_undefined_types_1, finish_global_stabs): Update.
3391 * mdebugread.c (psymtab_to_symtab_1): Update.
3392 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3393 (read_lexical_block_scope, new_symbol): Update.
3394 * dbxread.c (process_one_symbol): Update.
3395 * coffread.c (coff_symtab_read, process_coff_symbol)
3396 (coff_read_enum_type): Update.
3397 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3399 (get_local_symbols, get_file_symbols, get_global_symbols): New
3401 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3403 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3404 (~scoped_free_pendings): Update.
3405 (finish_block, prepare_for_building, reset_symtab_globals)
3406 (end_symtab_get_static_block, end_symtab_with_blockvector)
3407 (augment_type_symtab, push_context): Update.
3408 (get_local_symbols, get_file_symbols, get_global_symbols): New
3410 (buildsym_init): Update.
3414 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3415 (process_full_type_unit): Likewise.
3416 (dwarf2_start_symtab): Set list_in_scope.
3420 * dwarf2read.c (process_psymtab_comp_unit_reader)
3421 (build_type_psymtabs_reader): Do not set list_in_scope.
3425 * buildsym.c (free_pendings): Remove.
3426 (add_symbol_to_list, scoped_free_pendings)
3427 (finish_block_internal, buildsym_init): Update.
3431 * xcoffread.c (read_xcoff_symtab): Update.
3432 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3434 * dbxread.c (process_one_symbol): Update.
3435 * coffread.c (coff_symtab_read): Update.
3436 * buildsym.h (finish_block): Update.
3437 * buildsym.c (finish_block): Remove "listhead" argument.
3438 (end_symtab_get_static_block): Update.
3442 * buildsym.h (class scoped_free_pendings): Remove constructor.
3443 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3445 <m_pending_block_obstack, m_pending_blocks>: New members.
3446 (pending_block_obstack, pending_blocks): Remove.
3447 (scoped_free_pendings::scoped_free_pendings): Default.
3448 (~scoped_free_pendings): Update.
3449 (free_pending_blocks): Remove.
3450 (finish_block_internal, record_pending_block, make_blockvector)
3451 (end_symtab_get_static_block, augment_type_symtab, push_context)
3452 (buildsym_init): Update.
3456 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3457 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3459 (pending_addrmap, pending_addrmap_obstack)
3460 (pending_addrmap_interesting): Remove.
3461 (scoped_free_pendings, record_block_range, make_blockvector)
3462 (prepare_for_building, reset_symtab_globals, buildsym_init):
3467 * xcoffread.c (process_linenos): Update.
3468 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3469 * mdebugread.c (psymtab_to_symtab_1): Update.
3470 * dwarf2read.c (setup_type_unit_groups)
3471 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3472 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3473 * dbxread.c (process_one_symbol): Update.
3474 * coffread.c (coff_symtab_read, enter_linenos)
3475 (process_coff_symbol): Update.
3476 * buildsym.h (current_subfile): Don't declare.
3477 (get_current_subfile): Declare.
3478 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3480 (start_subfile, free_buildsym_compunit, push_subfile)
3481 (prepare_for_building, start_symtab): Update.
3482 (get_current_subfile): New function.
3486 * coffread.c (coff_symtab_read): Update.
3487 * xcoffread.c (read_xcoff_symtab): Update.
3488 * dwarf2read.c (new_symbol): Update.
3489 (read_func_scope, read_lexical_block_scope): Update.
3490 * dbxread.c (process_one_symbol): Update.
3491 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3492 (outermost_context_p): Remove macro.
3493 (outermost_context_p, get_current_context_stack)
3494 (get_context_stack_depth): Declare.
3495 (pop_context): Return struct context_stack.
3496 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3498 (context_stack_size): Remove.
3499 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3500 (prepare_for_building, end_symtab_get_static_block)
3501 (augment_type_symtab, push_context): Update.
3502 (pop_context): Return struct context_stack.
3503 (outermost_context_p, get_current_context_stack)
3504 (get_context_stack_depth): New functions.
3505 (buildsym_init): Update.
3509 * rust-exp.y: Now a pure parser. Update all rules.
3510 (%union): Move earlier.
3511 (current_parser, work_obstack): Remove globals.
3512 (rust_parser, ~rust_parser): Update.
3513 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3514 lex_character, lex_number, lex_string, lex_identifier,
3515 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3516 convert_name, convert_params_to_expression,
3517 convert_ast_to_expression, ast_basic_type, ast_operation,
3518 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3519 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3520 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3521 ast_array_type, ast_slice_type, ast_reference_type,
3522 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3523 (rust_parse): Update.
3524 (rustyyerror, rustyylex): Add parser parameter.
3525 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3526 (rust_lex_stringish_test, rust_lex_test_sequence)
3527 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3528 (rust_lex_test_push_back, rust_lex_tests): Update.
3532 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3533 gdb::unique_xmalloc_ptr.
3534 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3535 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3536 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3537 copy-initialization.
3538 * guile/scm-pretty-print.c (ppscm_print_children): Use
3539 gdb::unique_xmalloc_ptr instead of cleanups.
3540 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3541 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3542 gdb::unique_xmalloc_ptr.
3543 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3544 Adjust to use gdb::unique_xmalloc_ptr.
3545 * guile/scm-utils.c (extract_arg): Adjust.
3546 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3547 gdb::unique_xmalloc_ptr instead of a cleanup.
3551 * utils.c (do_value_free_to_mark)
3552 (make_cleanup_value_free_to_mark): Remove.
3553 * utils.h (make_cleanup_value_free_to_mark): Remove.
3557 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3558 forwarding reference.
3562 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3563 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3568 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3570 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3572 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3573 directly instead of a cleanup.
3574 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3575 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3576 (vlscm_binop_gdbthrow): New, factored out from ...
3577 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3578 (vlscm_rich_compare): Use gdbscm_wrap.
3579 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3580 instead of a cleanup.
3581 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3583 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3584 Use xfree directly instead of a cleanup.
3585 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3586 Adjust to use gdbscm_wrap and scoped_value_mark.
3587 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3588 (gdbscm_value_address, gdbscm_value_dereference)
3589 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3591 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3592 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3594 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3595 gdbscm_wrap and scoped_value_mark.
3596 (gdbscm_value_to_string): Use xfree directly instead of a
3597 cleanup. Move 'buffer' unique_ptr to TRY scope.
3598 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3599 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3601 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3602 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3604 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3609 * findvar.c (default_read_var_value): Also resolve dynamic type for
3610 LOC_OPTIMIZED_OUT vars.
3614 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3619 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3620 (compute_enum_list, pascm_set_param_value_x)
3621 (gdbscm_parameter_value): Update.
3622 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3623 (gdbscm_scm_to_host_string): Update.
3624 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3626 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3627 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3628 * guile/scm-string.c (gdbscm_scm_to_string): Return
3630 (gdbscm_scm_to_host_string): Likewise.
3634 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3635 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3636 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3637 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3642 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3643 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3645 * guile/scm-cmd.c (cmdscm_function): Update.
3646 * guile/scm-pretty-print.c
3647 (ppscm_print_exception_unless_memory_error): Update.
3648 * guile/scm-exception.c (gdbscm_exception_message_to_string):
3649 Return unique_xmalloc_ptr.
3653 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3658 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3659 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
3660 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
3661 unecessary braces after EF_RISCV_RVC test. Delete call to
3662 set_gdbarch_decr_pc_after_break.
3664 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3665 RISCV_LAST_FP_REGNUM + 1.
3666 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3670 * configure.ac: Remove --disable-gdbcli.
3671 * configure: Rebuild.
3672 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3673 (SUBDIR_CLI_CFLAGS): Remove.
3674 (SFILES): Use SUBDIR_CLI_SRCS.
3675 (COMMON_OBS): Use SUBDIR_CLI_OBS.
3680 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3684 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3688 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3690 (libunwind_frame_sniffer): Likewise.
3691 (libunwind_frame_prev_register): Likewise.
3692 (libunwind_sigtramp_frame_sniffer): Likewise.
3693 * ia64-tdep.c (ia64_access_reg): Likewise.
3694 (ia64_access_rse_reg): Likewise.
3695 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3696 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3700 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3704 * remote-sim.c (gdbsim_target::close,
3705 gdbsim_target::mourn_inferior): Remove unused variables.
3709 * ia64-tdep.c (ktab_buf): New global.
3710 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3711 (get_kernel_table): Adjust.
3715 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3716 * dwarf2read.c (using_directives, new_symbol): Use
3717 outermost_context_p.
3718 * dbxread.c (process_one_symbol): Use outermost_context_p.
3719 * coffread.c (coff_symtab_read): Use outermost_context_p.
3723 * dwarf2read.c (using_directives, read_func_scope)
3724 (read_lexical_block_scope): Update.
3725 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3726 * buildsym.h (local_using_directives, global_using_directives):
3728 (get_local_using_directives, set_local_using_directives)
3729 (get_global_using_directives): Declare.
3730 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3731 m_global_using_directives>: New members.
3732 (finish_block_internal, prepare_for_building)
3733 (reset_symtab_globals, end_symtab_get_static_block)
3734 (push_context): Update.
3735 (get_local_using_directives, set_local_using_directives)
3736 (get_global_using_directives): New functions.
3737 (buildsym_init): Update.
3741 * xcoffread.c (xcoff_initial_scan): Don't call
3742 free_pending_blocks.
3743 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3744 * buildsym.h (class scoped_free_pendings): Add constructor.
3745 (free_pending_blocks): Don't declare.
3746 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3747 (free_pending_blocks): Now static.
3751 * buildsym.h (push_subfile, pop_subfile): Update declarations.
3752 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3754 (struct subfile_stack): Remove.
3755 (subfile_stack): Remove.
3756 (push_subfile, pop_subfile, buildsym_init): Update.
3760 * buildsym.c (push_subfile): Use gdb_assert.
3761 (pop_subfile): Use gdb_assert.
3765 * buildsym.h (merge_symbol_lists): Remove.
3766 * buildsym.c (merge_symbol_lists): Remove.
3770 * stabsread.c (scan_file_globals): Update comment.
3771 * stabsread.h (scan_file_globals): Move from buildsym.h.
3772 * buildsym.h (scan_file_globals): Move to stabsread.h.
3776 * xcoffread.c (xcoff_new_init): Update.
3777 * mipsread.c (mipscoff_new_init): Update.
3778 * mdebugread.c (mdebug_build_psymtabs): Update.
3779 * elfread.c (elf_new_init): Update.
3780 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3781 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3782 * buildsym.h (buildsym_new_init): Don't declare.
3783 * buildsym.c (buildsym_new_init): Remove.
3787 * stabsread.h (within_function): Move from buildsym.h.
3788 * stabsread.c (start_stabs): Clear within_function.
3789 * coffread.c (coff_start_symtab): Clear within_function.
3790 * buildsym.h (within_function): Move to stabsread.h.
3791 * buildsym.c (prepare_for_building): Update.
3795 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3796 * dwarf2read.c (dwarf2_start_symtab): Don't set
3797 processing_gcc_compilation.
3798 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3802 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3803 (next_symbol_text_func): Move from buildsym.h.
3804 * stabsread.c (hashname): Move from buildsym.c.
3805 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3806 (next_symbol_text_func, hashname): Move to stabsread.h.
3807 * buildsym.c: Don't include bcache.h
3808 (hashname): Move to stasbread.c.
3812 * buildsym.h (context_stack_size): Don't declare.
3813 * buildsym.c (context_stack_size): New global.
3817 * dbxread.c (processing_acc_compilation): New global.
3818 * buildsym.h (processing_acc_compilation): Don't declare.
3822 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3823 * dbxread.c (read_ofile_symtab): Update.
3824 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3825 * buildsym.h (last_source_start_addr): Remove.
3826 (set_last_source_start_addr, get_last_source_start_addr):
3828 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3830 (struct buildsym_compunit) <m_last_source_start_addr>: New
3832 (prepare_for_building): Remove start_addr parameter.
3833 (start_symtab, restart_symtab, end_symtab_get_static_block)
3834 (end_symtab_with_blockvector): Update.
3835 (set_last_source_start_addr, get_last_source_start_addr): New
3840 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3842 (have_line_numbers): Remove.
3843 (record_line, prepare_for_building, end_symtab_get_static_block)
3844 (augment_type_symtab): Update.
3848 * buildsym.c (~buildsym_compunit): Free the macro table.
3849 (struct buildsym_compunit) <get_macro_table, release_macros>: New
3851 <m_pending_macros>: New member.
3852 (pending_macros): Remove.
3853 (~scoped_free_pendings, get_macro_table, prepare_for_building)
3854 (reset_symtab_globals, end_symtab_get_static_block)
3855 (end_symtab_with_blockvector, augment_type_symtab)
3856 (buildsym_init): Update.
3860 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3862 (buildsym_compunit::set_last_source_file): New method.
3863 <m_last_source_file>: New member.
3864 (prepare_for_building): Remove "name" parameter.
3865 (start_symtab, restart_symtab, reset_symtab_globals): Update.
3866 (last_source_file): Remove.
3867 (set_last_source_file, get_last_source_file): Update.
3871 * buildsym.c (prepare_for_building): Add assert.
3875 * buildsym.c (~buildsym_compunit): Update.
3876 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3877 (start_subfile, patch_subfile_names)
3878 (end_symtab_with_blockvector): Update.
3882 * buildsym.c (struct buildsym_compunit): Add constructor,
3883 destructor, initializers.
3884 (start_buildsym_compunit): Remove.
3885 (free_buildsym_compunit): Use "delete".
3886 (start_symtab, restart_symtab): Use "new".
3890 * symfile.c (set_objfile_default_section_offset): Remove struct
3895 * (Responsible Maintainers): Add myself as or1k maintainer.
3899 * symfile.c (set_objfile_default_section_offset): Use extra braces
3904 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3909 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3910 unittests/cli-utils-selftests.c
3911 * unittests/cli-utils-selftests.c: New file.
3915 * NEWS: Mention new commands. Mention change to 'thread apply'.
3919 * thread.c (thr_try_catch_cmd): New function.
3920 (thread_apply_all_command): Handle qcs flags.
3921 (thread_apply_command): Handle qcs flags.
3922 (taas_command): New function.
3923 (tfaas_command): New function.
3924 (_initialize_thread): Update to setup the new commands 'taas
3925 and 'tfaas'. Change doc string for 'thread apply'.
3929 * stack.c: (trailing_outermost_frame): New function, mostly
3930 extracted from backtrace_command_1.
3931 (leading_innermost_frame): New function.
3932 (backtrace_command_1): Update to call trailing_outermost_frame.
3933 (frame_apply_command_count): New function.
3934 (frame_apply_level_command): New function.
3935 (frame_apply_all_command): New function.
3936 (frame_apply_command): New function.
3937 (faas_command): New function.
3938 (frame_cmd_list): New variable.
3939 (_initialize_stack): Update to setup the new commands 'frame apply'
3944 * cli-utils.c (number_or_range_parser::get_number): Only handle
3945 numbers or convenience var as numbers.
3946 (parse_flags): New function.
3947 (parse_flags_qcs): New function.
3948 (number_or_range_parser::finished): Ensure parsing end is detected
3949 before end of string.
3950 * cli-utils.h (parse_flags): New function.
3951 (parse_flags_qcs): New function.
3952 (number_or_range_parser): Remove m_finished bool.
3953 (number_or_range_parser::skip_range): Set m_in_range to false.
3957 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3966 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3967 'unittests/parse-connection-spec-selftests.c'.
3968 (COMMON_SFILES): Add 'common/netstuff.c'.
3969 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3970 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3971 * common/netstuff.c: New file.
3972 * common/netstuff.h: New file.
3973 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3974 (wait_for_connect): Update comment. New parameter
3975 'gdb::optional<int> sock' instead of 'struct serial *scb'.
3976 Use 'sock' directly instead of 'scb->fd'.
3977 (try_connect): New function, with code from 'net_open'.
3978 (net_open): Rewrite main loop to deal with multiple
3979 sockets/addresses. Handle IPv6-style hostnames; implement
3980 support for IPv6 connections.
3981 * unittests/parse-connection-spec-selftests.c: New file.
3986 * remote.c (remote_target::remote_detach_pid): Call
3987 set_current_process.
3991 * h8300-tdep.c (h8300_gdbarch_init): Remove
3992 set_gdbarch_ecoff_reg_to_regnum calls.
3997 * c-typeprint.c (c_type_print_base_struct_union): Don't print
3998 offsets/sizes for static members of a class/struct.
4002 * target-descriptions.c (tdesc_register_bitsize): Rename.
4003 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4004 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4005 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4009 * breakpoint.c (moribund_locations): Now static and a
4011 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4012 (build_bpstat_chain, update_global_location_list)
4013 (breakpoint_retire_moribund): Update.
4014 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4019 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4020 (riscv_register_reggroup_p): Use new function, remove unneeded
4022 (riscv_push_dummy_call): Extend assert to compare against xlen or
4023 flen based on register type.
4027 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4031 * remote.c (show_hardware_watchpoint_limit): New function.
4032 (show_hardware_watchpoint_length_limit): New function.
4033 (show_hardware_breakpoint_limit): New function.
4034 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4035 where appropriate, update help text.
4039 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4040 (CLIBS): Don't mention NAT_CLIBS.
4044 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4045 (LIBGDB_OBS, clean mostlyclean): Update.
4046 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4050 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4051 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4052 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4056 * Makefile.in (ALLDEPFILES): Remove exec.c.
4057 (COMMON_OBS): Remove exec.o.
4058 (COMMON_SFILES): Add exec.c.
4062 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4066 * Makefile.in (clean mostlyclean): Remove stamp-version.
4067 (version.c): Depend on stamp-version.
4068 (stamp-version): New rule, from version.c rule.
4072 * Makefile.in (init.c): Depend on stamp-init.
4073 (stamp-init): New rule, from init.c rule.
4074 (clean mostlyclean): Remove stamp-init.
4078 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4079 SUBDIR_GCC_COMPILE_SRCS.
4083 * Makefile.in (init.c): Remove some unused sed rules.
4087 * Makefile.in (TSOBS): Remove.
4088 (INIT_FILES): Update.
4089 (LIBGDB_OBS): Update.
4090 (COMMON_SFILES): Add inflow.c.
4091 (SFILES): Remove inflow.c.
4095 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4099 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4100 get_saveloc_name, is_signal_frame_name, step_name,
4101 init_remote_name, create_addr_space_name,
4102 destroy_addr_space_name, search_unwind_table_name,
4103 find_dyn_list_name): Constify.
4107 * darwin-nat.c (darwin_pthread_kill): New function.
4108 (darwin_resume_thread): Use darwin_pthread_kill.
4112 * macroexp.c (macro_buffer) <operator=>: New member function.
4116 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4120 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4121 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4122 * maint.c: Likewise.
4127 * NEWS: Create a new section for the next release branch.
4128 Rename the section of the current branch, now that it has
4133 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4134 * version.in: Bump version to 8.2.50.DATE-git.
4139 * linux-nat.c (linux_init_ptrace): Rename to ...
4140 (linux_init_ptrace_procfs): ... this. Call
4141 linux_proc_init_warnings.
4142 (linux_nat_target::post_attach)
4143 (linux_nat_target::post_startup_inferior): Adjust.
4144 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4145 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4149 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4151 (read_comp_unit_head): ... here.
4155 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4156 (stop_tracing, tstatus_command)
4157 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4158 (print_one_static_tracepoint_marker): Update.
4159 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4161 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4163 (all_tracepoints, static_tracepoints_here): Return std::vector.
4167 * common/ptid.c (ptid_equal): Remove.
4168 * common/ptid.h (ptid_equal): Don't declare.
4169 * ada-tasks.c: Update.
4170 * breakpoint.c: Update.
4171 * common/agent.c: Update.
4172 * corelow.c: Update.
4173 * darwin-nat-info.c: Update.
4174 * darwin-nat.c: Update.
4176 * dtrace-probe.c: Update.
4177 * dummy-frame.c: Update.
4178 * fbsd-nat.c: Update.
4180 * gdbthread.h: Update.
4181 * gnu-nat.c: Update.
4182 * go32-nat.c: Update.
4183 * inf-loop.c: Update.
4184 * inf-ptrace.c: Update.
4185 * infcall.c: Update.
4189 * linux-fork.c: Update.
4190 * linux-nat.c: Update.
4191 * linux-thread-db.c: Update.
4192 * mi/mi-cmd-var.c: Update.
4193 * mi/mi-interp.c: Update.
4194 * mi/mi-main.c: Update.
4195 * nto-procfs.c: Update.
4196 * ppc-linux-tdep.c: Update.
4198 * python/py-inferior.c: Update.
4199 * python/py-record-btrace.c: Update.
4200 * python/py-record.c: Update.
4201 * ravenscar-thread.c: Update.
4202 * regcache.c: Update.
4203 * remote-sim.c: Update.
4205 * sol-thread.c: Update.
4208 * tui/tui-stack.c: Update.
4210 * windows-nat.c: Update.
4211 * windows-tdep.c: Update.
4215 * common/ptid.c (ptid_match): Remove.
4216 * common/ptid.h (ptid_match): Don't declare.
4217 * fbsd-nat.c: Update.
4220 * linux-nat.c: Update.
4221 * record-btrace.c: Update.
4222 * regcache.c: Update.
4227 * common/ptid.c (ptid_tid_p): Remove.
4228 * common/ptid.h (ptid_tid_p): Don't declare.
4229 * sol-thread.c: Update.
4233 * common/ptid.c (ptid_lwp_p): Remove.
4234 * common/ptid.h (ptid_lwp_p): Don't declare.
4235 * fbsd-nat.c: Update.
4236 * linux-nat.c: Update.
4237 * nat/linux-procfs.c: Update.
4238 * nat/x86-linux-dregs.c: Update.
4239 * sol-thread.c: Update.
4243 * common/ptid.c (ptid_is_pid): Remove.
4244 * common/ptid.h (ptid_is_pid): Don't declare.
4246 * linux-nat.c: Update.
4247 * mi/mi-interp.c: Update.
4253 * common/ptid.c (ptid_get_tid): Remove.
4254 * common/ptid.h (ptid_get_tid): Don't declare.
4255 * ada-tasks.c: Update.
4256 * aix-thread.c: Update.
4257 * bsd-uthread.c: Update.
4258 * darwin-nat.c: Update.
4259 * fbsd-nat.c: Update.
4260 * i386-darwin-nat.c: Update.
4262 * linux-tdep.c: Update.
4263 * nto-procfs.c: Update.
4264 * ppc-ravenscar-thread.c: Update.
4265 * python/py-infthread.c: Update.
4266 * ravenscar-thread.c: Update.
4267 * sol-thread.c: Update.
4268 * sparc-ravenscar-thread.c: Update.
4269 * windows-nat.c: Update.
4273 * common/ptid.c (ptid_get_lwp): Remove.
4274 * common/ptid.h (ptid_get_lwp): Don't declare.
4275 * aarch64-linux-nat.c: Update.
4276 * ada-tasks.c: Update.
4277 * aix-thread.c: Update.
4278 * amd64-linux-nat.c: Update.
4279 * arm-linux-nat.c: Update.
4280 * corelow.c: Update.
4281 * fbsd-nat.c: Update.
4282 * fbsd-tdep.c: Update.
4283 * gnu-nat.c: Update.
4284 * i386-cygwin-tdep.c: Update.
4285 * i386-gnu-nat.c: Update.
4286 * i386-linux-nat.c: Update.
4287 * ia64-linux-nat.c: Update.
4288 * inf-ptrace.c: Update.
4290 * linux-fork.c: Update.
4291 * linux-nat.c: Update.
4292 * linux-tdep.c: Update.
4293 * linux-thread-db.c: Update.
4294 * mips-linux-nat.c: Update.
4295 * nat/aarch64-linux-hw-point.c: Update.
4296 * nat/aarch64-linux.c: Update.
4297 * nat/linux-btrace.c: Update.
4298 * nat/linux-osdata.c: Update.
4299 * nat/linux-procfs.c: Update.
4300 * nat/x86-linux-dregs.c: Update.
4301 * obsd-nat.c: Update.
4302 * ppc-fbsd-nat.c: Update.
4303 * ppc-linux-nat.c: Update.
4305 * python/py-infthread.c: Update.
4306 * ravenscar-thread.c: Update.
4308 * s390-linux-nat.c: Update.
4309 * sol-thread.c: Update.
4310 * sol2-tdep.c: Update.
4311 * spu-linux-nat.c: Update.
4312 * x86-linux-nat.c: Update.
4313 * xtensa-linux-nat.c: Update.
4317 * common/ptid.c (ptid_get_pid): Remove.
4318 * common/ptid.h (ptid_get_pid): Don't declare.
4319 * aarch64-linux-nat.c: Update.
4320 * ada-lang.c: Update.
4321 * aix-thread.c: Update.
4322 * alpha-bsd-nat.c: Update.
4323 * amd64-fbsd-nat.c: Update.
4324 * amd64-linux-nat.c: Update.
4325 * arm-linux-nat.c: Update.
4326 * arm-nbsd-nat.c: Update.
4328 * break-catch-syscall.c: Update.
4329 * breakpoint.c: Update.
4330 * bsd-uthread.c: Update.
4331 * corelow.c: Update.
4333 * darwin-nat.c: Update.
4334 * fbsd-nat.c: Update.
4335 * fbsd-tdep.c: Update.
4337 * gnu-nat.c: Update.
4338 * hppa-nbsd-nat.c: Update.
4339 * hppa-obsd-nat.c: Update.
4340 * i386-fbsd-nat.c: Update.
4341 * ia64-linux-nat.c: Update.
4342 * inf-ptrace.c: Update.
4344 * inferior.c: Update.
4345 * inferior.h: Update.
4348 * linux-fork.c: Update.
4349 * linux-nat.c: Update.
4350 * linux-tdep.c: Update.
4351 * linux-thread-db.c: Update.
4352 * m68k-bsd-nat.c: Update.
4353 * mi/mi-interp.c: Update.
4354 * mi/mi-main.c: Update.
4355 * mips-linux-nat.c: Update.
4356 * mips-nbsd-nat.c: Update.
4357 * mips64-obsd-nat.c: Update.
4358 * nat/aarch64-linux-hw-point.c: Update.
4359 * nat/aarch64-linux.c: Update.
4360 * nat/linux-btrace.c: Update.
4361 * nat/linux-osdata.c: Update.
4362 * nat/linux-procfs.c: Update.
4363 * nat/x86-linux-dregs.c: Update.
4364 * nto-procfs.c: Update.
4365 * obsd-nat.c: Update.
4366 * ppc-linux-nat.c: Update.
4367 * ppc-nbsd-nat.c: Update.
4368 * ppc-obsd-nat.c: Update.
4369 * proc-service.c: Update.
4371 * python/py-inferior.c: Update.
4372 * python/py-infthread.c: Update.
4373 * ravenscar-thread.c: Update.
4375 * remote-sim.c: Update.
4377 * rs6000-nat.c: Update.
4378 * s390-linux-nat.c: Update.
4379 * sh-nbsd-nat.c: Update.
4380 * sol-thread.c: Update.
4381 * sparc-nat.c: Update.
4382 * sparc64-tdep.c: Update.
4383 * spu-linux-nat.c: Update.
4384 * spu-tdep.c: Update.
4385 * target-debug.h: Update.
4388 * tid-parse.c: Update.
4389 * tracefile-tfile.c: Update.
4390 * vax-bsd-nat.c: Update.
4391 * windows-nat.c: Update.
4392 * x86-linux-nat.c: Update.
4393 * x86-nat.c: Update.
4397 * common/ptid.c (pid_to_ptid): Remove.
4398 * common/ptid.h (pid_to_ptid): Don't declare.
4399 * aix-thread.c: Update.
4400 * arm-linux-nat.c: Update.
4401 * common/ptid.c: Update.
4402 * common/ptid.h: Update.
4403 * corelow.c: Update.
4405 * darwin-nat.c: Update.
4406 * fbsd-nat.c: Update.
4407 * fork-child.c: Update.
4408 * gnu-nat.c: Update.
4409 * go32-nat.c: Update.
4410 * inf-ptrace.c: Update.
4412 * inferior.c: Update.
4414 * linux-fork.c: Update.
4415 * linux-nat.c: Update.
4416 * nat/aarch64-linux-hw-point.c: Update.
4417 * nat/fork-inferior.c: Update.
4418 * nat/x86-linux-dregs.c: Update.
4419 * nto-procfs.c: Update.
4420 * obsd-nat.c: Update.
4422 * progspace.c: Update.
4424 * rs6000-nat.c: Update.
4425 * s390-linux-nat.c: Update.
4426 * sol-thread.c: Update.
4427 * spu-linux-nat.c: Update.
4430 * tracefile-tfile.c: Update.
4431 * windows-nat.c: Update.
4435 * common/ptid.h (ptid_build): Don't declare.
4436 * common/ptid.c (ptid_build): Remove.
4437 * aix-thread.c: Update.
4438 * bsd-kvm.c: Update.
4439 * bsd-uthread.c: Update.
4440 * common/agent.c: Update.
4441 * common/ptid.c: Update.
4442 * common/ptid.h: Update.
4443 * corelow.c: Update.
4444 * darwin-nat.c: Update.
4445 * fbsd-nat.c: Update.
4446 * gnu-nat.c: Update.
4447 * linux-fork.c: Update.
4448 * linux-nat.c: Update.
4449 * linux-thread-db.c: Update.
4450 * nat/linux-osdata.c: Update.
4451 * nat/linux-procfs.c: Update.
4452 * nto-procfs.c: Update.
4453 * obsd-nat.c: Update.
4454 * proc-service.c: Update.
4456 * ravenscar-thread.c: Update.
4457 * remote-sim.c: Update.
4459 * sol-thread.c: Update.
4461 * windows-nat.c: Update.
4465 * infrun.c (follow_exec): Use exit_inferior_silent.
4466 * inferior.c (exit_inferior_num_silent): Remove.
4467 * inferior.h (exit_inferior_num_silent): Don't declare.
4472 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4473 inferior_ptid on error.
4479 * disasm.h (gdb_disassembler): Add
4480 `m_disassembler_options_holder'. member
4481 * disasm.c (get_all_disassembler_options): New function.
4482 (gdb_disassembler::gdb_disassembler): Use it.
4483 (gdb_buffered_insn_length_init_dis): Likewise.
4484 (gdb_buffered_insn_length): Adjust accordingly.
4485 (set_disassembler_options): Handle options with arguments.
4486 (show_disassembler_options_sfunc): Likewise. Add a leading new
4487 line if showing options with descriptions.
4488 (disassembler_options_completer): Adapt to using the
4489 `disasm_options_and_args_t' structure.
4490 * mips-tdep.c (mips_disassembler_options): New variable.
4491 (mips_disassembler_options_o32): Likewise.
4492 (mips_disassembler_options_n32): Likewise.
4493 (mips_disassembler_options_n64): Likewise.
4494 (gdb_print_insn_mips): Don't set `disassembler_options'.
4495 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4497 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4498 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4499 `gdbarch_disassembler_options_implicit' and
4500 `gdbarch_valid_disassembler_options'.
4501 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4502 `disasm_options_and_args_t' structure.
4503 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4505 (valid_disassembler_options): Switch from `disasm_options_t' to
4506 the `disasm_options_and_args_t' structure.
4507 * NEWS: Document `set disassembler-options' support for the MIPS
4509 * gdbarch.h: Regenerate.
4510 * gdbarch.c: Regenerate.
4514 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4518 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4519 parameter in call to amd64_target_description.
4520 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4521 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4522 (amd64fbsd_init_abi): Likewise.
4523 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4524 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4525 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4526 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4530 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4531 "segments" parameter.
4532 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4533 (_initialize_amd64_tdep): Update call to
4534 amd64_create_target_description.
4535 (amd64_target_description): Add "segments" parameter. Adjust
4536 the implementation to use it.
4537 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4538 call to amd64_create_target_description.
4539 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4540 * gdb/arch/amd64.h (amd64_create_target_description): Add
4541 "segments" register.
4542 * gdb/arch/amd64.c (amd64_create_target_description): Add
4543 "segments" parameter. Call create_feature_i386_64bit_segments
4544 only if SEGMENTS is true.
4545 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4546 call to amd64_create_target_description.
4550 * thread.c (thread_target_id_str): New, factored out from ...
4551 (print_thread_info_1): ... here. Use it to compute the max
4552 "Target Id" column width.
4556 * remote.c (remote_target::extra_thread_info): Delete
4557 'display_buf' and 'n' locals. from the cache, regardless of
4558 packet mechanims is in use. Use cache for qThreadExtra and qP
4563 * blockframe.c (find_pc_sect_containing_function): New function.
4564 * breakpoint.c (print_breakpoint_location): Don't call
4565 find_pc_sect_function.
4566 * linespec.c (create_sals_line_offset): Record the location's
4568 * linespec.c (convert_address_location_to_sals): Fill in sal's
4569 symbol with find_pc_sect_containing_function.
4570 * symtab.c (find_function_start_sal): Rename to ...
4571 (find_function_start_sal_1): ... this.
4572 (find_function_start_sal): Reimplement as wrapper around
4573 find_function_start_sal_1, and use
4574 find_pc_sect_containing_function to fill in the sal's symbol.
4575 (find_function_start_sal(symbol*, bool)): Adjust.
4576 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4578 (find_pc_sect_containing_function): Declare.
4582 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4583 true if the the location has no symbol.
4587 * NEWS: Mention --enable-codesign.
4588 * silent-rules.mk (ECHO_SIGN): New variable.
4589 * configure.ac: Add --enable-codesign.
4590 * configure: Rebuild.
4591 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4592 (gdb$(EXEEXT)): Optionally invoke codesign.
4596 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4598 (switch_to_thread_no_regs): Adjust comment.
4599 * infcmd.c (stop_pc): Delete.
4600 (post_create_inferior, info_program_command): Replace references
4601 to stop_pc with references to thread_info->suspend.stop_pc.
4602 * inferior.h (stop_pc): Delete declaration.
4603 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4604 (handle_inferior_event_1, handle_signal_stop)
4605 (process_event_stop_test, keep_going_stepped_thread)
4606 (handle_step_into_function, handle_step_into_function_backward)
4607 (print_stop_location): Replace references to stop_pc with
4608 references to thread_info->suspend.stop_pc.
4609 (struct infcall_suspend_state) <stop_pc>: Delete field.
4610 (save_infcall_suspend_state, restore_infcall_suspend_state):
4611 Remove references to inf_stat->stop_pc.
4612 * linux-fork.c (fork_load_infrun_state): Likewise.
4613 * record-btrace.c (record_btrace_set_replay): Likewise.
4614 * record-full.c (record_full_goto_entry): Likewise.
4615 * remote.c (print_one_stopped_thread): Likewise.
4616 * target.c (target_resume): Extend comment.
4617 * thread.c (set_executing_thread): New.
4618 (set_executing): Use it.
4619 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4620 Remove references to stop_pc.
4624 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4625 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4629 * coffread.c (coff_symfile_finish): Update.
4630 * xcoffread.c (xcoff_symfile_finish): Update.
4631 * elfread.c (elf_symfile_finish): Update.
4632 * symfile.h (dwarf2_free_objfile): Don't declare.
4633 * dwarf2read.c (_initialize_dwarf2_read): Use
4634 register_objfile_data_with_cleanup.
4635 (dwarf2_free_objfile): Now static. Change signature.
4639 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4640 option "-o" to add-symbol-file-load to add an offset to each
4641 section's load address.
4642 * symfile.c (set_objfile_default_section_offset): New function.
4646 * symfile.c (add_symbol_file_command): Make sure that sections
4647 with the same name are sorted in the same order.
4651 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4652 require the second argument. If omitted, load sections at the
4653 addresses specified in the file.
4657 * symfile.c (symbol_file_command, symbol_file_add_main_1)
4658 (_initialize_symfile): Add option "-o" to symbol-file to add an
4659 offset to each section of the symbol file.
4663 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4667 * stack.c (_initialize_stack): Update "func" help text.
4671 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4673 (unwind_infopy_str, pyuw_create_unwind_info)
4674 (unwind_infopy_add_saved_register, pyuw_sniffer)
4675 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4677 (struct saved_reg): Add constructor.
4678 <value>: Now a gdbpy_ref<>.
4682 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4686 * gdb-gdb.py.in: Format using autopep8.
4690 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4691 (type_lookup_function): Recognize CORE_ADDR values.
4695 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4700 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4705 * gdb-gdb.py: Move to...
4706 * gdb-gdb.py.in: ... here.
4707 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4708 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4710 (distclean): Remove gdb-gdb.py when cleaning.
4711 (gdb-gdb.py, gdb-gdb.gdb): New rules.
4712 * configure: Re-generate.
4716 * proc-service.c (get_ps_regcache): New.
4717 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4718 (ps_lsetfpregs): Use it.
4723 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4724 (dwarf_decode_lines_1): Adjust.
4728 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4730 <info_proc>: Likewise.
4734 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4735 to windows_fetch_one_register, and only handle the case of
4736 fetching one register. Move the code that reloads the context
4737 and iterates over all registers if R is negative to...
4738 (windows_nat_target::fetch_registers): ... here.
4739 (do_windows_store_inferior_registers): Rename to
4740 windows_store_one_register, and only handle the case of storing
4741 one register. Move the code that handles the case where r is
4743 (windows_nat_target::store_registers) ... here.
4748 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4749 * rust-lang.c (rust_print_struct_def): Add podata parameter.
4751 (rust_internal_print_type): Add podata parameter.
4752 (rust_print_type): Update.
4756 * typeprint.h (struct print_offset_data) <update, finish,
4757 maybe_print_hole>: New methods.
4758 <indentation>: New constant.
4759 * typeprint.c (print_offset_data::indentation): Define.
4760 (print_offset_data::maybe_print_hole, print_offset_data::update)
4761 (print_offset_data::finish): Move from c-typeprint.c and rename.
4762 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4763 (print_spaces_filtered_with_print_options): Update.
4764 (c_print_type_union_field_offset, maybe_print_hole)
4765 (c_print_type_struct_field_offset): Move to typeprint.c and
4767 (c_type_print_base_struct_union): Update.
4771 * gdbthread.h (thread_info_ref, delete_thread)
4772 (delete_thread_silent, first_thread_of_inferior)
4773 (any_thread_of_inferior, switch_to_thread)
4774 (enable_thread_stack_temporaries)
4775 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4776 (get_last_thread_stack_temporary)
4777 (value_in_thread_stack_temporaries, can_access_registers_thread):
4778 Spell out "struct thread_info" instead of just "thread_info".
4779 * inferior.h (notice_new_inferior): Likewise.
4783 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4784 pass thread_info pointer to delete_thread.
4785 (windows_nat_target::detach): Pass inferior pointer to
4787 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4789 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4790 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4791 and pass a thread_info pointer to delete_thread.
4792 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4793 pass thread_info pointer to delete_thread.
4794 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4795 delete_thread_silent call.
4796 * procfs.c (procfs_target::detach): Pass inferior pointer to
4798 (procfs_target::wait): Pass thread_info pointer to delete_thread.
4799 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4800 delete_thread_silent call.
4801 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4802 pass thread_info pointer to delete_thread.
4803 (windows_nat_target::detach): Pass inferior pointer to
4808 * regcache.c (readable_regcache::read_part): Fix asserts.
4809 (reg_buffer::raw_collect_part): New function.
4810 (regcache::write_part): Fix asserts.
4811 (reg_buffer::raw_supply_part): New function.
4812 (regcache::transfer_regset_register): New helper function.
4813 (regcache::transfer_regset): Call new functions.
4814 (regcache_supply_regset): Use gdb_byte*.
4815 (regcache::supply_regset): Likewise.
4816 (regcache_collect_regset): Likewise.
4817 (regcache::collect_regset): Likewise.
4818 * regcache.h (reg_buffer::raw_collect_part): New declaration.
4819 (reg_buffer::raw_supply_part): Likewise.
4820 (regcache::transfer_regset_register): Likewise.
4821 (regcache::transfer_regset): Use gdb_byte*.
4825 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4829 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4830 instead of a ptid_t. All callers adjusted.
4831 * ada-tasks.c (ada_get_task_number): Likewise. All callers
4833 (print_ada_task_info, display_current_task_id, task_command_1):
4835 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4837 (breakpoint_kind): Adjust.
4838 (remove_breakpoints_pid): Rename to ...
4839 (remove_breakpoints_inf): ... this. Adjust to take an inferior
4840 pointer. All callers adjusted.
4841 (bpstat_clear_actions): Use inferior_thread.
4842 (get_bpstat_thread): New.
4843 (bpstat_do_actions): Use it.
4844 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4845 to take a thread_info pointer. All callers adjusted.
4846 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4847 (breakpoint_re_set_thread): Use inferior_thread.
4848 * breakpoint.h (struct inferior): Forward declare.
4849 (bpstat_stop_status): Update.
4850 (remove_breakpoints_pid): Delete.
4851 (remove_breakpoints_inf): New.
4852 * bsd-uthread.c (bsd_uthread_target::wait)
4853 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4854 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4855 (maint_btrace_packet_history_cmd)
4856 (maint_btrace_clear_packet_history_cmd): Adjust.
4857 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4859 * cli/cli-interp.c: Include "inferior.h".
4860 * common/refcounted-object.h (struct
4861 refcounted_object_ref_policy): New.
4862 * compile/compile-object-load.c: Include gdbthread.h.
4863 (store_regs): Use inferior_thread.
4864 * corelow.c (core_target::close): Use current_inferior.
4865 (core_target_open): Adjust to use first_thread_of_inferior and use
4866 the current inferior.
4867 * ctf.c (ctf_target::close): Adjust to use current_inferior.
4868 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4869 <thread>: ... this new field. All references adjusted.
4870 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4871 Take a thread_info pointer instead of a ptid_t.
4872 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4873 (dummy_frame_discard, register_dummy_frame_dtor): Take a
4874 thread_info pointer instead of a ptid_t.
4875 * elfread.c: Include "inferior.h".
4876 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4877 Use inferior_thread.
4878 * eval.c (evaluate_subexp): Likewise.
4879 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4881 * gdb_proc_service.h (struct thread_info): Forward declare.
4882 (struct ps_prochandle) <ptid>: Delete, replaced by ...
4883 <thread>: ... this new field. All references adjusted.
4884 * gdbarch.h, gdbarch.c: Regenerate.
4885 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4886 'thread' parameter. All implementations and callers adjusted.
4887 * gdbthread.h (thread_info) <set_running>: New method.
4888 (delete_thread, delete_thread_silent): Take a thread_info pointer
4890 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4891 (first_thread_of_process): Delete, replaced by ...
4892 (first_thread_of_inferior): ... this new function. All callers
4894 (any_live_thread_of_process): Delete, replaced by ...
4895 (any_live_thread_of_inferior): ... this new function. All callers
4897 (switch_to_thread, switch_to_no_thread): Declare.
4898 (is_executing): Delete.
4899 (enable_thread_stack_temporaries): Update comment.
4900 <enable_thread_stack_temporaries>: Take a thread_info pointer
4901 instead of a ptid_t. Incref the thread.
4902 <~enable_thread_stack_temporaries>: Decref the thread.
4905 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4906 (get_last_thread_stack_temporary)
4907 (value_in_thread_stack_temporaries, can_access_registers_thread):
4908 Take a thread_info pointer instead of a ptid_t. All callers
4910 * infcall.c (get_call_return_value): Use inferior_thread.
4911 (run_inferior_call): Work with thread pointers instead of ptid_t.
4912 (call_function_by_hand_dummy): Work with thread pointers instead
4913 of ptid_t. Use thread_info_ref.
4914 * infcmd.c (proceed_thread_callback): Access thread's state
4916 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4917 access thread's state directly.
4918 (continue_command): Use inferior_thread.
4919 (info_program_command): Use find_thread_ptid and access thread
4921 (proceed_after_attach_callback): Use thread state directly.
4922 (notice_new_inferior): Take a thread_info pointer instead of a
4923 ptid_t. All callers adjusted.
4924 (exit_inferior): Take an inferior pointer instead of a pid. All
4926 (exit_inferior_silent): New.
4927 (detach_inferior): Delete.
4928 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4929 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4930 (detach_inferior_command, kill_inferior_command): Use
4931 find_inferior_id instead of valid_gdb_inferior_id and
4932 gdb_inferior_id_to_pid.
4933 (inferior_command): Use inferior and thread pointers.
4934 * inferior.h (struct thread_info): Forward declare.
4935 (notice_new_inferior): Take a thread_info pointer instead of a
4936 ptid_t. All callers adjusted.
4937 (detach_inferior): Delete declaration.
4938 (exit_inferior, exit_inferior_silent): Take an inferior pointer
4939 instead of a pid. All callers adjusted.
4940 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4941 (valid_gdb_inferior_id): Delete.
4942 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4943 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4944 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4946 <inf>: ... this new field.
4947 <step_ptid>: Delete, replaced by ...
4948 <step_thread>: ... this new field.
4949 (get_displaced_stepping_state): Take an inferior pointer instead
4950 of a pid. All callers adjusted.
4951 (displaced_step_in_progress_any_inferior): Adjust.
4952 (displaced_step_in_progress_thread): Take a thread pointer instead
4953 of a ptid_t. All callers adjusted.
4954 (displaced_step_in_progress, add_displaced_stepping_state): Take
4955 an inferior pointer instead of a pid. All callers adjusted.
4956 (get_displaced_step_closure_by_addr): Adjust.
4957 (remove_displaced_stepping_state): Take an inferior pointer
4958 instead of a pid. All callers adjusted.
4959 (displaced_step_prepare_throw, displaced_step_prepare)
4960 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4961 All callers adjusted.
4962 (start_step_over): Adjust.
4963 (infrun_thread_ptid_changed): Remove bit updating ptids in the
4964 displaced step queue.
4965 (do_target_resume): Adjust.
4966 (fetch_inferior_event): Use inferior_thread.
4967 (context_switch, get_inferior_stop_soon): Take an
4968 execution_control_state pointer instead of a ptid_t. All callers
4970 (switch_to_thread_cleanup): Delete.
4971 (stop_all_threads): Use scoped_restore_current_thread.
4972 * inline-frame.c: Include "gdbthread.h".
4973 (inline_state) <inline_state>: Take a thread pointer instead of a
4974 ptid_t. All callers adjusted.
4975 <ptid>: Delete, replaced by ...
4976 <thread>: ... this new field.
4977 (find_inline_frame_state): Take a thread pointer instead of a
4978 ptid_t. All callers adjusted.
4979 (skip_inline_frames, step_into_inline_frame)
4980 (inline_skipped_frames, inline_skipped_symbol): Take a thread
4981 pointer instead of a ptid_t. All callers adjusted.
4982 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4983 (inline_skipped_frames, inline_skipped_symbol): Likewise.
4984 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4986 * linux-nat.c (get_detach_signal): Likewise.
4987 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4988 (thread_db_notice_clone): Adjust.
4989 (thread_db_find_new_threads_silently)
4990 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4991 a thread pointer instead of a ptid_t. All callers adjusted.
4992 * mi/mi-cmd-var.c: Include "inferior.h".
4993 (mi_cmd_var_update_iter): Update to use thread pointers.
4994 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4996 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4998 (mi_output_running): ... this new function.
4999 (mi_on_resume_1): Adjust to use it.
5000 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5001 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5003 (interrupt_thread_callback): : Adjust to use thread and inferior
5005 * proc-service.c: Include "gdbthread.h".
5006 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5007 * progspace-and-thread.c: Include "inferior.h".
5008 * progspace.c: Include "inferior.h".
5009 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5010 hold a reference to an inferior_object.
5011 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5013 * python/py-inferior.c (struct inferior_object): Give the type a
5014 tag name instead of a typedef.
5015 (python_on_normal_stop): No need to check if the current thread is
5017 (inferior_to_inferior_object): Change return type to
5018 inferior_object. All callers adjusted.
5019 (find_thread_object): Delete, bits factored out to ...
5020 (thread_to_thread_object): ... this new function.
5021 * python/py-infthread.c (create_thread_object): Use
5022 inferior_to_inferior_object.
5023 (thpy_is_stopped): Use thread pointer directly.
5024 (gdbpy_selected_thread): Use inferior_thread.
5025 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5026 field, replaced with ...
5027 <thread>: ... this new field. All users adjusted.
5028 (btpy_insn_or_gap_new): Drop const.
5029 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5031 * python/py-record.c: Include "gdbthread.h".
5032 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5033 a ptid_t. All callers adjusted.
5034 (gdbpy_current_recording): Use inferior_thread.
5035 * python/py-record.h (recpy_record_object) <ptid>: Delete
5036 field, replaced with ...
5037 <thread>: ... this new field. All users adjusted.
5038 (recpy_element_object) <ptid>: Delete
5039 field, replaced with ...
5040 <thread>: ... this new field. All users adjusted.
5041 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5042 a ptid_t. All callers adjusted.
5043 * python/py-threadevent.c: Include "gdbthread.h".
5044 (get_event_thread): Use thread_to_thread_object.
5045 * python/python-internal.h (struct inferior_object): Forward
5047 (find_thread_object, find_inferior_object): Delete declarations.
5048 (thread_to_thread_object, inferior_to_inferior_object): New
5050 * record-btrace.c: Include "inferior.h".
5051 (require_btrace_thread): Use inferior_thread.
5052 (record_btrace_frame_sniffer)
5053 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5054 (get_thread_current_frame): Use scoped_restore_current_thread and
5056 (get_thread_current_frame): Use thread pointer directly.
5057 (record_btrace_replay_at_breakpoint): Use thread's inferior
5059 * record-full.c: Include "inferior.h".
5060 * regcache.c: Include "gdbthread.h".
5061 (get_thread_arch_regcache): Use the inferior's address space
5063 (get_thread_regcache, registers_changed_thread): New.
5064 * regcache.h (get_thread_regcache(thread_info *thread)): New
5066 (registers_changed_thread): New.
5067 (remote_target) <remote_detach_1>: Swap order of parameters.
5068 (remote_add_thread): <remote_add_thread>: Return the new thread.
5069 (get_remote_thread_info(ptid_t)): New overload.
5070 (remote_target::remote_notice_new_inferior): Use thread pointers
5072 (remote_target::process_initial_stop_replies): Use
5073 thread_info::set_running.
5074 (remote_target::remote_detach_1, remote_target::detach)
5075 (extended_remote_target::detach): Adjust.
5076 * stack.c (frame_show_address): Use inferior_thread.
5077 * target-debug.h (target_debug_print_thread_info_pp): New.
5078 * target-delegates.c: Regenerate.
5079 * target.c (default_thread_address_space): Delete.
5080 (memory_xfer_partial_1): Use current_inferior.
5081 (target_detach): Use current_inferior.
5082 (target_thread_address_space): Delete.
5083 (generic_mourn_inferior): Use current_inferior.
5084 * target.h (struct target_ops) <thread_address_space>: Delete.
5085 (target_thread_address_space): Delete.
5086 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5088 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5089 thread pointer instead of a ptid_t. Adjust all callers.
5090 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5091 (first_thread_of_process): Delete, replaced by ...
5092 (first_thread_of_inferior): ... this new function. All callers
5094 (any_thread_of_process): Rename to ...
5095 (any_thread_of_inferior): ... this, and take an inferior pointer.
5096 (any_live_thread_of_process): Rename to ...
5097 (any_live_thread_of_inferior): ... this, and take an inferior
5099 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5100 (value_in_thread_stack_temporaries)
5101 (get_last_thread_stack_temporary): Take a thread pointer instead
5102 of a ptid_t. Adjust all callers.
5103 (thread_info::set_running): New.
5104 (validate_registers_access): Use inferior_thread.
5105 (can_access_registers_ptid): Rename to ...
5106 (can_access_registers_thread): ... this, and take a thread
5108 (print_thread_info_1): Adjust to compare thread pointers instead
5110 (switch_to_no_thread, switch_to_thread): Make extern.
5111 (scoped_restore_current_thread::~scoped_restore_current_thread):
5112 Use m_thread pointer directly.
5113 (scoped_restore_current_thread::scoped_restore_current_thread):
5114 Use inferior_thread.
5115 (thread_command): Use thread pointer directly.
5116 (thread_num_make_value_helper): Use inferior_thread.
5117 * top.c (execute_command): Use inferior_thread.
5118 * tui/tui-interp.c: Include "inferior.h".
5119 * varobj.c (varobj_create): Use inferior_thread.
5120 (value_of_root_1): Use find_thread_global_id instead of
5121 global_thread_id_to_ptid.
5125 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5127 (regcache::write_part): Likewise.
5128 (readable_regcache::cooked_read_part): Update comment.
5129 (readable_regcache::cooked_write_part): Likewise.
5130 * regcache.h: (readable_regcache::read_part): Likewise.
5131 (regcache::write_part): Likewise.
5136 * aarch64-linux-nat.c (post_attach): New.
5137 (aarch64_linux_nat_target::post_attach): Override post_attach to
5138 record the number of hardware debug registers.
5142 * python/py-param.c (add_setshow_generic): Make parameters const.
5143 (parmpy_init): Update.
5147 * regcache.h (regcache_cooked_read_ftype): Rename to...
5148 (register_read_ftype): ...this, change type to function_view.
5149 (class reg_buffer) <save>: Remove src parameter.
5150 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5151 parameter non-const in first overload. Remove src parameter in
5153 * regcache.c (do_cooked_read): Remove.
5154 (readonly_detached_regcache::readonly_detached_regcache): Make
5155 parameter non-const, adjust call to other constructor.
5156 (reg_buffer::save): Remove src parameter.
5157 * frame.c (do_frame_register_read): Remove.
5158 (frame_save_as_regcache): Use lambda function.
5159 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5160 parameter to ppu2spu_data *.
5161 (ppu2spu_sniffer): Use lambda function.
5165 * record-full.c (record_full_target::insert_breakpoint): Remove
5166 "struct" keyword, add const.
5170 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5171 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5172 * configure.ac: Remove AC_PREREQ, add missing quoting.
5173 * gnulib/configure.ac: Modernize usage of
5174 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5175 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5176 (AUTOMAKE_VERSION): Bump to 1.15.1.
5177 * configure: Re-generate.
5178 * config.in: Re-generate.
5179 * aclocal.m4: Re-generate.
5180 * gnulib/aclocal.m4: Re-generate.
5181 * gnulib/config.in: Re-generate.
5182 * gnulib/configure: Re-generate.
5183 * gnulib/import/Makefile.in: Re-generate.
5187 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5188 (lookup_minimal_symbol_by_pc_section): ... here with
5189 gdb_assert_not_reached added.
5193 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5194 parameter with a block parameter. Compare location's block symbol
5195 with the frame's block instead of addresses.
5196 (skip_inline_frames): Pass the current block instead of the
5197 frame's address. Break out as soon as we determine the frame
5198 should not be skipped.
5202 * solib-aix.c (solib_aix_get_section_offsets): Return
5204 (solib_aix_solib_create_inferior_hook): Update.
5208 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5212 * solib-frv.c (frv_relocate_main_executable): Use
5214 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5219 * objfiles.h (inhibit_section_map_updates): Update.
5220 (resume_section_map_updates, resume_section_map_updates_cleanup):
5222 * solib-svr4.c (svr4_handle_solib_event): Update.
5223 * objfiles.c (inhibit_section_map_updates): Return
5224 scoped_restore_tmpl<int>.
5225 (resume_section_map_updates, resume_section_map_updates_cleanup):
5230 * valprint.h (read_string): Update.
5231 * valprint.c (read_string): Change type of "buffer".
5232 (val_print_string): Update.
5233 * python/py-value.c (valpy_string): Update.
5234 * language.h (struct language_defn) <la_get_string>: Change
5236 (default_get_string, c_get_string): Update.
5237 * language.c (default_get_string): Change type of "buffer".
5238 * guile/scm-value.c (gdbscm_value_to_string): Update.
5239 * c-lang.c (c_get_string): Change type of "buffer".
5243 * ser-mingw.c (struct pipe_state_destroyer): New.
5244 (pipe_state_up): New typedef.
5245 (cleanup_pipe_state): Remove.
5246 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5250 * rust-lang.h (rust_yyerror): Don't declare.
5251 * rust-lang.c (rust_language_defn): Update.
5252 * rust-exp.y (yyerror): Now static.
5253 * parse.c (parse_exp_in_context_1): Update.
5254 * p-lang.h (p_yyerror): Don't declare.
5255 * p-lang.c (p_language_defn): Update.
5256 * p-exp.y (yyerror): Now static.
5257 * opencl-lang.c (opencl_language_defn): Update.
5258 * objc-lang.c (objc_language_defn): Update.
5259 * m2-lang.h (m2_yyerror): Don't declare.
5260 * m2-lang.c (m2_language_defn): Update.
5261 * m2-exp.y (yyerror): Now static.
5262 * language.h (struct language_defn) <la_error>: Remove.
5263 * language.c (unk_lang_error): Remove.
5264 (unknown_language_defn, auto_language_defn): Remove.
5265 * go-lang.h (go_yyerror): Don't declare.
5266 * go-lang.c (go_language_defn): Update.
5267 * go-exp.y (yyerror): Now static.
5268 * f-lang.h (f_yyerror): Don't declare.
5269 * f-lang.c (f_language_defn): Update.
5270 * f-exp.y (yyerror): Now static.
5271 * d-lang.h (d_yyerror): Don't declare.
5272 * d-lang.c (d_language_defn): Update.
5273 * d-exp.y (yyerror): Now static.
5274 * c-lang.h (c_yyerror): Don't declare.
5275 * c-lang.c (c_language_defn, cplus_language_defn)
5276 (asm_language_defn, minimal_language_defn): Update.
5277 * c-exp.y (yyerror): Now static.
5278 * ada-lang.h (ada_yyerror): Don't declare.
5279 * ada-lang.c (ada_language_defn): Update.
5280 * ada-exp.y (yyerror): Now static.
5284 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5285 (store_sveregs_to_thread): Likewise.
5286 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5287 (aarch64_linux_store_inferior_registers): Likewise.
5288 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5290 (aarch64_sve_regs_copy_to_regcache): Likewise.
5291 (aarch64_sve_regs_copy_from_regcache): Likewise.
5292 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5294 (aarch64_sve_regs_copy_to_regcache): Likewise.
5295 (aarch64_sve_regs_copy_from_regcache): Likewise.
5296 (sve_context): Structure from Linux headers.
5297 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5298 (SVE_SIG_ZREG_SIZE): Likewise.
5299 (SVE_SIG_PREG_SIZE): Likewise.
5300 (SVE_SIG_FFR_SIZE): Likewise.
5301 (SVE_SIG_REGS_OFFSET): Likewise.
5302 (SVE_SIG_ZREGS_OFFSET): Likewise.
5303 (SVE_SIG_ZREG_OFFSET): Likewise.
5304 (SVE_SIG_ZREGS_SIZE): Likewise.
5305 (SVE_SIG_PREGS_OFFSET): Likewise.
5306 (SVE_SIG_PREG_OFFSET): Likewise.
5307 (SVE_SIG_PREGS_SIZE): Likewise.
5308 (SVE_SIG_FFR_OFFSET): Likewise.
5309 (SVE_SIG_REGS_SIZE): Likewise.
5310 (SVE_SIG_CONTEXT_SIZE): Likewise.
5311 (SVE_PT_REGS_MASK): Likewise.
5312 (SVE_PT_REGS_FPSIMD): Likewise.
5313 (SVE_PT_REGS_SVE): Likewise.
5314 (SVE_PT_VL_INHERIT): Likewise.
5315 (SVE_PT_VL_ONEXEC): Likewise.
5316 (SVE_PT_REGS_OFFSET): Likewise.
5317 (SVE_PT_FPSIMD_OFFSET): Likewise.
5318 (SVE_PT_FPSIMD_SIZE): Likewise.
5319 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5320 (SVE_PT_SVE_PREG_SIZE): Likewise.
5321 (SVE_PT_SVE_FFR_SIZE): Likewise.
5322 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5323 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5324 (__SVE_SIG_TO_PT): Likewise.
5325 (SVE_PT_SVE_OFFSET): Likewise.
5326 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5327 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5328 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5329 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5330 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5331 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5332 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5333 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5334 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5335 (SVE_PT_SVE_SIZE): Likewise.
5336 (SVE_PT_SIZE): Likewise.
5337 (HAS_SVE_STATE): New define.
5341 * nat/aarch64-sve-linux-sigcontext.h: New file.
5342 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5344 (SVE_VQ_MIN): Likewise.
5345 (SVE_VQ_MAX): Likewise.
5346 (SVE_VL_MIN): Likewise.
5347 (SVE_VL_MAX): Likewise.
5348 (SVE_NUM_ZREGS): Likewise.
5349 (SVE_NUM_PREGS): Likewise.
5350 (sve_vl_valid): Likewise.
5351 (struct user_sve_header): Likewise.
5356 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5357 was requested by GDB.
5361 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5365 * gnulib/update-gnulib.sh: Print expected versions of
5370 * arch-utils.c (default_type_align): Use type_length_units.
5371 * gdbtypes.c (type_align): Use type_length_units.
5375 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5376 of 'define' command.
5381 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5382 get_no_prettyformat_print_options.
5386 * sparc-nat.h: Include target.h.
5387 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5388 <fetch_registers>: Remove this argument in function call.
5389 <store_registers>: Remove this argument in function call, remove
5391 <low_forget_process>: Call sparc64_forget_process instead of
5392 sparc_forget_process.
5396 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5397 (procfs_target::make_corefile_notes): Adjust to new
5398 target_read_alloc return type.
5404 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5405 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5406 Move should_notify_stop local into more inner scope.
5412 * infrun.c (resume_1): Add call to mark_async_event_handler.
5416 * infrun.c (do_target_wait): Change old version of $pc printed.
5420 * dwarf2read.c (read_index_from_section): Rename to...
5421 (read_gdb_index_from_section): ... this, update all callers.
5422 (dwarf2_read_index): Rename to...
5423 (dwarf2_read_gdb_index): ... this, update all callers.
5427 * gdb/hppa-linux-nat.c
5428 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5429 hppa_linux_nat_target::fetch_registers.
5433 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5434 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5435 (AARCH64_DWARF_SVE_FFR): Likewise.
5436 (AARCH64_DWARF_SVE_P0): Likewise.
5437 (AARCH64_DWARF_SVE_Z0): Likewise.
5441 * common/common-regcache.h (raw_compare): New function.
5442 * regcache.c (regcache::raw_compare): Likewise.
5443 * regcache.h (regcache::raw_compare): New declaration.
5447 * common/common-regcache.h (reg_buffer_common): New structure.
5448 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5449 (reg_buffer::raw_supply): Likewise.
5450 (reg_buffer::raw_supply_integer): Likewise.
5451 (reg_buffer::raw_supply_zeroed): Likewise.
5452 (reg_buffer::raw_collect): Likewise.
5453 (reg_buffer::raw_collect_integer): Likewise.
5454 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5455 (reg_buffer::raw_supply): Likewise.
5456 (reg_buffer::raw_supply_integer): Likewise.
5457 (reg_buffer::raw_supply_zeroed): Likewise.
5458 (reg_buffer::raw_collect): Likewise.
5459 (reg_buffer::raw_collect_integer): Likewise.
5463 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5464 (class remote_state) <stop_reply_queue>: Now std::vector.
5465 (remote_state::~remote_state)
5466 (remote_target::stop_reply_queue_length): Update.
5467 (struct queue_iter_param, remove_child_of_pending_fork)
5468 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5469 (check_pending_event_prevents_wildcard_vcont_callback)
5470 (remove_stop_reply_for_inferior)
5471 (remove_stop_reply_of_remote_state)
5472 (remote_notif_remove_once_on_match)
5473 (stop_reply_match_ptid_and_ws)
5474 (remote_kill_child_of_pending_fork): Remove.
5475 (remote_target::remove_new_fork_children)
5476 (remote_target::check_pending_events_prevent_wildcard_vcont)
5477 (remote_target::discard_pending_stop_replies)
5478 (remote_target::discard_pending_stop_replies_in_queue)
5479 (remote_target::remote_notif_remove_queued_reply)
5480 (remote_target::queued_stop_reply)
5481 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5482 (remote_target::wait, remote_target::kill_new_fork_children)
5483 (remote_target::async): Update.
5487 * record-full.c (record_full_arch_list_cleanups): Remove.
5488 (record_full_message): Use try/catch.
5489 (record_full_wait_cleanups): Remove.
5490 (record_full_wait_1): Use try/catch.
5491 (record_full_restore): Likewise.
5495 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5496 declare VEC. Add constructor.
5497 <in_target_beneath>: Now bool.
5498 (record_full_breakpoints): Now a std::vector, static.
5499 (record_full_sync_record_breakpoints)
5500 (record_full_init_record_breakpoints)
5501 (record_full_target::insert_breakpoint)
5502 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5506 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5507 * serial.c (serial_interface_lookup): Remove struct keyword.
5511 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5513 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5515 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5517 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5518 "beneath" as a method.
5519 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5520 Use "beneath" as a method.
5524 * tracefile.c (struct trace_file_writer_deleter): New.
5525 <operator()>: Rename from trace_file_writer_xfree.
5526 (trace_file_writer_up): New typedef.
5527 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5531 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5532 <m_registers, m_register_status>: Change type to
5534 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5539 * common/common-regcache.h (enum register_status): Add
5540 underlying type "signed char".
5541 * regcache.h (reg_buffer) <m_register_status>: Change type to
5543 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5544 register_status instead of signed char.
5545 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5546 (reg_buffer::get_register_status): Remove cast.
5547 (readable_regcache::raw_read): Remove cast.
5548 (readable_regcache::cooked_read): Remove cast.
5552 * source.c (reverse_search_command, forward_search_command): Use
5557 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5558 (serial_ops_list): Now static, std::vector.
5559 (serial_interface_lookup, serial_add_interface): Update.
5563 * dwarf2read.c (process_cu_includes): Update.
5564 (process_full_comp_unit): Update.
5565 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5572 * python/python.c (do_start_initialization):
5573 Avoid call to internal Python API.
5574 (init__gdb_module): New function.
5578 * linux-thread-db.c (valprint.h): New include.
5579 (struct check_thread_db_info): New structure.
5580 (check_thread_db_on_load, tdb_testinfo): New static globals.
5581 (check_thread_db, check_thread_db_callback): New functions.
5582 (try_thread_db_load_1): Run integrity checks if requested.
5583 (maintenance_check_libthread_db): New function.
5584 (_initialize_thread_db): Register "maint check libthread-db"
5585 and "maint set/show check-libthread-db".
5586 * NEWS: Mention the above new commands.
5590 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5595 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5599 * common/btrace-common.h (struct btrace_data): Add constructor,
5600 destructor, move assignment operator.
5601 <empty, clear, fini>: New methods.
5602 <format>: Initialize.
5603 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5604 (btrace_data_empty): Don't declare.
5605 * common/btrace-common.c (btrace_data_init): Remove.
5606 (btrace_data::fini): Rename from btrace_data_fini.
5607 (btrace_data::empty): Rename from btrace_data_empty.
5608 (btrace_data::clear): Rename from btrace_data_clear. Return
5610 * btrace.h (make_cleanup_btrace_data): Don't declare.
5611 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5612 (parse_xml_btrace): Update.
5613 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5614 (maint_btrace_clear_packet_history_cmd): Update.
5618 * target.h (target_ops) <beneath>: Now a method. All references
5620 (class target_stack): New.
5621 * target.c (g_target_stack): New.
5622 (g_current_top_target): Delete.
5623 (current_top_target): Get the top target out of g_target_stack.
5624 (target_stack::push, target_stack::unpush): New.
5625 (push_target, unpush_target): Reimplement.
5626 (target_is_pushed): Reimplement in terms of g_target_stack.
5627 (target_ops::beneath, target_stack::find_beneath): New.
5631 * target.h (find_target_beneath): Delete declaration.
5632 * target.c (find_target_beneath): Delete definition.
5633 * aix-thread.c: All callers of find_target_beneath adjusted to
5634 call target_ops::beneath instead.
5635 * bsd-uthread.c: Likewise.
5636 * linux-thread-db.c: Likewise.
5637 * ravenscar-thread.c: Likewise.
5638 * sol-thread.c: Likewise.
5639 * spu-multiarch.c: Likewise.
5643 * target.h (target_ops) <beneath>: Now a method. All references
5645 (target_ops) <m_beneath>: New.
5646 * target.c (target_ops::beneath): New.
5647 * corelow.c: Adjust all references to target_ops::beneath.
5648 * linux-thread-db.c: Likewise.
5649 * make-target-delegates: Likewise.
5650 * record-btrace.c: Likewise.
5651 * record-full.c: Likewise.
5652 * remote.c: Likewise.
5653 * target.c: Likewise.
5654 * target-delegates.c: Regenerate.
5658 * target.h (target_stack): Delete.
5659 (current_top_target): Declare function.
5660 * target.c (target_stack): Delete.
5661 (g_current_top_target): New.
5662 (current_top_target): New function.
5663 * auxv.c: Use current_top_target instead of target_stack
5665 * avr-tdep.c: Likewise.
5666 * breakpoint.c: Likewise.
5667 * corefile.c: Likewise.
5668 * elfread.c: Likewise.
5670 * exceptions.c: Likewise.
5671 * frame.c: Likewise.
5672 * gdbarch-selftests.c: Likewise.
5673 * gnu-v3-abi.c: Likewise.
5674 * ia64-tdep.c: Likewise.
5675 * ia64-vms-tdep.c: Likewise.
5676 * infcall.c: Likewise.
5677 * infcmd.c: Likewise.
5678 * infrun.c: Likewise.
5679 * linespec.c: Likewise.
5680 * linux-tdep.c: Likewise.
5681 * minsyms.c: Likewise.
5682 * ppc-linux-nat.c: Likewise.
5683 * ppc-linux-tdep.c: Likewise.
5684 * procfs.c: Likewise.
5685 * regcache.c: Likewise.
5686 * remote.c: Likewise.
5687 * rs6000-tdep.c: Likewise.
5688 * s390-linux-nat.c: Likewise.
5689 * s390-tdep.c: Likewise.
5690 * solib-aix.c: Likewise.
5691 * solib-darwin.c: Likewise.
5692 * solib-dsbt.c: Likewise.
5693 * solib-spu.c: Likewise.
5694 * solib-svr4.c: Likewise.
5695 * solib-target.c: Likewise.
5696 * sparc-tdep.c: Likewise.
5697 * sparc64-tdep.c: Likewise.
5698 * spu-tdep.c: Likewise.
5699 * symfile.c: Likewise.
5700 * symtab.c: Likewise.
5701 * target-descriptions.c: Likewise.
5702 * target-memory.c: Likewise.
5703 * target.c: Likewise.
5704 * target.h: Likewise.
5705 * tracefile-tfile.c: Likewise.
5706 * tracepoint.c: Likewise.
5707 * valops.c: Likewise.
5708 * valprint.c: Likewise.
5709 * value.c: Likewise.
5710 * windows-tdep.c: Likewise.
5711 * mi/mi-main.c: Likewise.
5715 * valprint.h (build_address_symbolic): Declare.
5716 * printcmd.c (print_address_symbolic): Update.
5717 (build_address_symbolic): Change "name" and "filename" to
5719 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5721 * defs.h (build_address_symbolic): Remove declaration.
5725 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5726 (aarch64_vnv_type): Add function.
5727 (aarch64_pseudo_register_name): Add V regs for SVE.
5728 (aarch64_pseudo_register_type): Likewise.
5729 (aarch64_pseudo_register_reggroup_p): Likewise.
5730 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5731 (aarch64_pseudo_read_value): Add V regs for SVE.
5732 (aarch64_pseudo_write_2): Use V0 offset for SVE
5733 (aarch64_pseudo_write): Add V regs for SVE.
5734 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5738 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5739 (sve_vl_from_vq): Likewise.
5743 * cli/cli-cmds.c (show_version): Update.
5744 * top.c (print_gdb_version): Add "interactive" parameter.
5746 * main.c (captured_main_1): Update.
5747 * top.h (print_gdb_version): Add "interactive" parameter and a
5752 * common/enum-flags.h: Add trailing semicolon to example in
5758 * NEWS: Add entry about pager.
5759 * utils.c (pagination_disabled_for_command): New global.
5760 (prompt_for_continue): Allow "c" response to prompt.
5761 (reinitialize_more_filter): Clear
5762 pagination_disabled_for_command.
5763 (fputs_maybe_filtered): Check pagination_disabled_for_command.
5767 * ada-lang.h (ada_lookup_symbol_list): Update.
5768 * ada-lang.c (resolve_subexp): Update.
5769 (symbols_are_identical_enums): Change type of syms. Remove nsyms
5771 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5772 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5773 results parameter to std::vector.
5774 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5776 * ada-exp.y (block_lookup): Update.
5777 (select_possible_type_sym): Change type of syms. Remove nsyms
5779 (write_var_or_type, write_name_assoc): Update.
5783 * windows-nat.c (windows_nat_target::xfer_partial): Return
5784 TARGET_XFER_E_IO if we need to delegate to the target beneath
5785 but BENEATH is NULL.
5789 * Makefile.in (config.status): Add configure.nat as a
5794 * cp-name-parser.y (cpname_state): Add method declarations.
5795 (HANDLE_QUAL): Update.
5796 (cpname_state::d_grab, cpname_state::fill_comp)
5797 (cpname_state::make_operator, cpname_state::make_dtor)
5798 (cpname_state::make_builtin_type, cpname_state::make_name)
5799 (cpname_state::d_qualify, cpname_state::d_int_type)
5800 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5801 (%union): Move earlier.
5805 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5809 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5810 (aarch64_pseudo_write_1): Likewise.
5811 (aarch64_pseudo_read_value): Use helper.
5812 (aarch64_pseudo_write): Likewise.
5816 * darwin-nat.c (darwin_ops): Delete.
5817 (darwin_attach_pid): Use get_native_target.
5821 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5822 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5826 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5827 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5828 (aarch64_gdbarch_init): Check for SVE.
5829 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5833 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5834 * aarch64-tdep.h (aarch64_read_description): Likewise.
5835 * arch/aarch64.c (aarch64_create_target_description): Likewise.
5836 * arch/aarch64.h (aarch64_create_target_description): Likewise.
5837 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5838 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5839 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5843 * value.c (value_fetch_lazy_bitfield): New.
5844 (value_fetch_lazy_memory): New.
5845 (value_fetch_lazy_register): New.
5846 (value_fetch_lazy): Factor out to smaller functions.
5850 * cp-name-parser.y (backslashable, represented): Now const.
5854 * cp-name-parser.y: Include parser-defs.h.
5855 (parser_fprintf): Remove declaration.
5859 * cp-name-parser.y: Use %pure-parser, %lex-param, and
5861 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5862 (global_result): Remove globals.
5863 (struct cpname_state): New.
5864 (yyparse): Don't declare.
5865 (yylex, yyerror): Move declarations after %union.
5866 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5867 (make_name): Add state parameter.
5869 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5871 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5873 (yylex): Add lvalp, state parameters.
5874 (yyerror): Add state parameter.
5875 (cp_demangled_name_to_comp): Update.
5879 * cp-name-parser.y (parser_fprintf): Declare.
5880 (GDB_YY_REMAP_PREFIX): Define.
5881 Include yy-remap.h. Don't redefine yy* identifiers.
5885 * python/py-type.c (typy_legacy_template_argument): Update.
5886 * cp-support.h (cp_demangled_name_to_comp): Update.
5887 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5888 parameter to be a "std::string *".
5893 * ada-lex.l: Include "diagnostics.h" instead of
5894 "common/diagnostics.h".
5895 * unittests/environ-selftests.c: Likewise.
5896 * common/diagnostics.h: Moved to ../include.
5900 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5901 to language_mode_manual while calling breakpoint_re_set_one.
5905 * valops.c (value_cast_structs, destructor_name_p): Update.
5906 * symtab.c (gdb_mangle_name): Update.
5907 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5909 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5910 (pascal_object_print_value_fields, pascal_object_print_value):
5912 * p-typeprint.c (pascal_type_print_derivation_info): Update.
5913 * linespec.c (find_methods): Update.
5914 * gdbtypes.h (type_name_no_tag): Remove.
5915 (type_name_or_error): Rename from type_name_no_tag_or_error.
5916 * gdbtypes.c (type_name_no_tag): Remove.
5917 (type_name_or_error): Rename from type_name_no_tag_or_error.
5918 (lookup_struct_elt_type, check_typedef): Update.
5919 * expprint.c (print_subexp_standard): Update.
5920 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5921 * d-namespace.c (d_lookup_nested_symbol): Update.
5922 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5923 (cp_print_class_member): Update.
5924 * cp-namespace.c (cp_lookup_nested_symbol): Update.
5925 * completer.c (add_struct_fields): Update.
5926 * c-typeprint.c (cp_type_print_derivation_info)
5927 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5929 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5930 (ada_prefer_type, ada_is_exception_sym): Update.
5934 * valops.c (enum_constant_from_type, value_namespace_elt)
5935 (value_maybe_namespace_elt): Update.
5936 * valarith.c (find_size_for_pointer_math): Update.
5937 * target-descriptions.c (make_gdb_type): Update.
5938 * symmisc.c (print_symbol): Update.
5939 * stabsread.c (define_symbol, read_type)
5940 (complain_about_struct_wipeout, add_undefined_type)
5941 (cleanup_undefined_types_1): Update.
5942 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5943 (rust_range_type_p, val_print_struct, rust_print_struct_def)
5944 (rust_internal_print_type, rust_composite_type)
5945 (rust_evaluate_funcall, rust_evaluate_subexp)
5946 (rust_inclusive_range_type_p): Update.
5947 * python/py-type.c (typy_get_tag): Update.
5948 * p-typeprint.c (pascal_type_print_base): Update.
5949 * mdebugread.c (parse_symbol, parse_type): Update.
5950 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5952 * guile/scm-type.c (gdbscm_type_tag): Update.
5953 * go-lang.c (sixg_string_p): Update.
5954 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5956 * gdbtypes.h (struct main_type) <tag_name>: Remove.
5957 (TYPE_TAG_NAME): Remove.
5958 * gdbtypes.c (type_name_no_tag): Simplify.
5959 (check_typedef, check_types_equal, recursive_dump_type)
5960 (copy_type_recursive, arch_composite_type): Update.
5961 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
5962 in summary mode when needed.
5963 * eval.c (evaluate_funcall): Update.
5964 * dwarf2read.c (fixup_go_packaging, read_structure_type)
5965 (process_structure_scope, read_enumeration_type)
5966 (read_namespace_type, read_module_type, determine_prefix): Update.
5967 * cp-support.c (inspect_type): Update.
5968 * coffread.c (process_coff_symbol, decode_base_type): Update.
5969 * c-varobj.c (c_is_path_expr_parent): Update.
5970 * c-typeprint.c (c_type_print_base_struct_union): Update.
5971 (c_type_print_base_1): Update. Print struct/class/union/enum in
5972 summary when using C language.
5973 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5974 (gen_maybe_namespace_elt): Update.
5975 * ada-lang.c (ada_type_name): Simplify.
5976 (empty_record, ada_template_to_fixed_record_type_1)
5977 (template_to_static_fixed_type)
5978 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5982 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5984 * c-typeprint.c (c_print_type_1): Add "language" parameter.
5985 (c_print_type): Update.
5986 (c_print_type): New overload.
5987 (c_type_print_varspec_prefix, c_type_print_args)
5988 (c_type_print_varspec_suffix, c_print_type_no_offsets)
5989 (c_type_print_base_struct_union, c_type_print_base_1)
5990 (cp_type_print_method_args): Add "language" parameter.
5991 (c_type_print_base): Update.
5992 * c-lang.h (c_print_type): Add new overload.
5996 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5997 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6001 * aarch64-tdep.c (aarch64_sve_register_names): New const
6003 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6004 (AARCH64_SVE_Z_REGS_NUM): New define.
6005 (AARCH64_SVE_P_REGS_NUM): Likewise.
6006 (AARCH64_SVE_NUM_REGS): Likewise.
6010 * nat/linux-ptrace.h [__alpha__]
6011 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6016 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6017 the endianness selected.
6018 * NEWS: Document `set endian auto' mode operation update.
6022 * Makefile.in: Add new header.
6023 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6024 (sve_vl_from_vg): Likewise.
6025 (sve_vq_from_vl): Likewise.
6026 (sve_vl_from_vq): Likewise.
6027 (sve_vq_from_vg): Likewise.
6028 (sve_vg_from_vq): Likewise.
6029 * configure.nat: Add new c file.
6030 * nat/aarch64-sve-linux-ptrace.c: New file.
6031 * nat/aarch64-sve-linux-ptrace.h: New file.
6035 * aarch64-linux-nat.c (aarch64_linux_read_description):
6037 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6039 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6040 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6041 (aarch64_gdbarch_init): Add parmeter zero.
6042 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6043 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6044 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6046 * doc/gdb.texinfo: Describe SVE feature
6047 * features/aarch64-sve.c: New file.
6052 * gdbarch.sh (significant_addr_bit): Default to zero when
6053 not set by target architecture.
6054 * gdbarch.c: Re-generated.
6055 * utils.c (address_significant): Update.
6059 * stack.c (func_command): Remove trailing newline in call to error.
6063 * regcache.h (regcache_raw_collect): Remove, update callers to
6064 use regcache::raw_collect.
6065 * regcache.c (regcache_raw_collect): Remove.
6069 * regcache.h (regcache_raw_supply): Remove, update callers to
6070 use detached_regcache::raw_supply.
6071 * regcache.c (regcache_raw_supply): Remove.
6075 * regcache.h (regcache_cooked_write_part): Remove, update
6076 callers to use regcache::cooked_write_part.
6077 * regcache.c (regcache_cooked_write_part): Remove.
6081 * regcache.h (regcache_cooked_read_part): Remove, update callers
6082 to use readable_regcache::cooked_read_part.
6083 * regcache.c (regcache_cooked_read_part): Remove.
6087 * regcache.h (regcache_cooked_read_value): Remove, update
6088 callers to use readable_regcache::cooked_read_value.
6089 * regcache.c (regcache_cooked_read_value): Remove.
6093 * regcache.h (regcache_cooked_write): Remove, update callers to
6094 use regcache::cooked_write.
6095 * regcache.c (regcache_cooked_write): Remove.
6099 * regcache.h (regcache_invalidate): Remove, update callers to
6100 use detached_regcache::invalidate instead.
6101 * regcache.c (regcache_invalidate): Remove.
6105 * regcache.h (regcache_raw_write_part): Remove, update callers
6106 to use regcache::raw_write_part instead.
6107 * regcache.c (regcache_raw_write_part): Remove.
6111 * regcache.h (regcache_raw_read_part): Remove, update callers to
6112 use readable_regcache::raw_read_part instead.
6113 * regcache.c (regcache_raw_read_part): Remove.
6117 * regcache.h (regcache_cooked_read): Remove, update callers to
6118 use readable_regcache::cooked_read instead.
6119 * regcache.c (regcache_cooked_read): Remove.
6123 * regcache.h (regcache_raw_write): Remove, update callers to use
6124 regcache::raw_write instead.
6125 * regcache.c (regcache_raw_write): Remove.
6129 * regcache.h (regcache_raw_read): Remove, update callers to use
6130 readable_regcache::raw_read instead.
6131 * regcache.c (regcache_raw_read): Remove.
6135 * regcache.h (regcache_raw_update): Remove, update callers to
6136 use readable_regcache::raw_update instead.
6137 * regcache.c (regcache_raw_update): Remove.
6141 * regcache.h (regcache_register_status): Remove, update callers
6142 to use reg_buffer::get_register_status directly instead.
6143 * regcache.c (regcache_register_status): Remove.
6147 * regcache.h (regcache_get_ptid): Remove, update all callers to
6148 call regcache::ptid instead.
6149 * regcache.c (regcache_get_ptid): Remove.
6153 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6157 * common/common-exceptions.h (exception_rethrow): Use
6162 * breakpoint.c (print_solib_event, check_status_catch_solib):
6163 Remove struct keyword in range-based for loops.
6164 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6165 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6167 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6169 * symfile.c (addr_info_make_relative): Likewise.
6170 * thread.c (value_in_thread_stack_temporaries): Likewise.
6175 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6176 aggregate type to get its real type before accessing it.
6180 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6181 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6182 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6183 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6184 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6185 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6186 * printcmd.c (info_address_command): Likewise.
6190 * windows-nat.c (handle_exception): Update fall-through comment.
6194 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6195 (struct program_space) <added_solibs>: Now a std::vector.
6196 * breakpoint.c (print_solib_event): Update.
6197 (check_status_catch_solib): Update.
6198 * progspace.c (clear_program_space_solib_cache): Update.
6199 * solib.c (update_solib_list): Update.
6203 * python/py-type.c (typy_richcompare): Update.
6204 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6205 * gdbtypes.h (types_deeply_equal): Return bool.
6206 (types_equal): Likewise.
6207 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6209 (check_types_equal): Change worklist to std::vector. Return
6211 (struct type_equality_entry): Add constructor.
6212 (compare_maybe_null_strings): Return bool.
6213 (check_types_worklist): Return bool. Change worklist to
6215 (types_deeply_equal): Use std::vector.
6216 (types_equal): Return bool.
6217 (compare_maybe_null_strings): Simplify.
6221 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6225 * objc-lang.h: Don't include cp-support.h.
6226 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6231 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6235 * value.c (value::location): Initialize.
6239 * dbxread.c (init_bincl_list): Remove.
6240 (bincl_list): Now a std::vector.
6241 (bincls_allocated, next_bincl): Remove.
6242 (free_bincl_list, do_free_bincl_list_cleanup)
6243 (make_cleanup_free_bincl_list): Remove.
6244 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6246 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6247 (struct header_file_location): Add constructor.
6248 (add_bincl_to_list): Remove.
6252 * tui/tui.c (tui_enable): Update.
6253 * mi/mi-interp.c (mi_interp::init): Update.
6254 * interps.h (class interp) <name>: New method.
6255 <m_name>: Rename from name.
6256 (~scoped_restore_interp): Update.
6257 * interps.c (interp::interp): Update.
6258 (interp_add, interp_set, interp_lookup_existing)
6259 (current_interp_named_p): Update.
6263 * interps.c (interp_name): Remove.
6264 * mi/mi-interp.c (mi_interp::init): Update.
6265 * interps.h (interp_name): Remove.
6266 (~scoped_restore_interp): Update.
6267 * tui/tui.c (tui_enable): Update.
6271 * utils.c (fputs_maybe_filtered): Update.
6272 * linespec.c (decode_line_full): Update.
6273 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6274 (mi_print_breakpoint_for_event, mi_solib_loaded)
6275 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6276 (mi_user_selected_context_changed): Update.
6277 * mi/mi-main.c (mi_execute_command): Update.
6278 * cli/cli-script.c (execute_control_command): Update.
6279 * python/python.c (execute_gdb_command): Update.
6280 * solib.c (info_sharedlibrary_command): Update.
6281 * interps.c (interp_ui_out): Remove.
6282 * interps.h (interp_ui_out): Remove.
6286 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6287 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6288 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6292 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6293 * interps.c (interp_exec): Use scoped_restore.
6297 * remote.c (remote_target::remote_file_get): Use
6299 (remote_target::remote_file_put): Likewise.
6303 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6305 (get_pe_section_index, add_pe_exported_sym): Update.
6306 (read_pe_exported_syms): Use gdb::def_vector.
6310 * frame.c (remove_prev_frame): Remove.
6311 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6315 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6317 * mips-linux-nat.c (supply_fpregset): Always call
6318 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6319 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6320 `mips_fill_fpregset'.
6321 * mips-linux-tdep.c (mips_supply_fpregset)
6322 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6323 (mips_fill_fpregset_wrapper): Remove functions.
6324 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6325 (mips_linux_fpregset): Remove variable.
6326 (mips_linux_iterate_over_regset_sections): Use
6327 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6328 (mips_linux_o32_sigframe_init): Remove comment.
6332 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6333 (struct readahead_cache, struct packet_reg, struct
6334 remote_arch_state, class remote_state): Move higher up in the
6336 (remote_target::m_remote_state): Now an object instead of a pointer.
6337 (remote_target::get_remote_state): Adjust.
6341 * stack.c (select_and_print_frame): Delete.
6342 (struct function_bounds): Move struct within function.
6343 (func_command): Most content moved into new function
6344 find_frame_for_function, use new function, print result, add
6346 (find_frame_for_function): New function, now returns a result.
6350 * stack.c (iterate_over_block_arg_vars): Fix comment.
6351 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6357 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6359 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6361 * frame.h (class scoped_restore_selected_frame): New class.
6362 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6363 of any exception, use scoped_restore_selected_frame to restore the
6368 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6373 * complaints.c (struct complaints): Remove.
6374 (symfile_complaint_book): Remove.
6375 (series): New global.
6376 (complaint_internal): Update.
6377 (clear_complaints): Update.
6381 * complaints.c (counters): New global.
6382 (struct complain): Remove.
6383 (struct complaints) <root>: Remove.
6384 (complaint_sentinel): Remove.
6385 (symfile_complaint_book): Update.
6386 (find_complaint) Remove.
6387 (complaint_internal, clear_complaints): Update.
6391 * complaints.c (struct complain) <file, line>: Remove.
6392 (find_complaint): Remove file, line parameters.
6393 (complaint_internal): Update.
6397 * complaints.c (vcomplaint): Remove.
6398 (complaint_internal) Merge in contents of vcomplaint.
6402 * complaints.c (struct complaints) <explanation>: Remove.
6403 (symfile_explanations): Remove.
6404 (symfile_complaint_book): Update.
6405 (vcomplaint): Update.
6406 (struct explanation): Remove.
6410 * complaints.c (symfile_complaints): Remove.
6411 (complaint_internal): Remove "complaints" parameter.
6412 (clear_complaints, vcomplaint): Remove "c" parameter.
6413 (get_complaints): Remove.
6414 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6415 (dwarf2_debug_line_missing_file_complaint)
6416 (dwarf2_debug_line_missing_end_sequence_complaint)
6417 (dwarf2_complex_location_expr_complaint)
6418 (dwarf2_const_value_length_mismatch_complaint)
6419 (dwarf2_section_buffer_overflow_complaint)
6420 (dwarf2_macro_malformed_definition_complaint)
6421 (dwarf2_invalid_attrib_class_complaint)
6422 (create_addrmap_from_index, dw2_symtab_iter_next)
6423 (dw2_expand_marked_cus)
6424 (dw2_debug_names_iterator::find_vec_in_debug_names)
6425 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6426 (create_debug_type_hash_table, init_cutu_and_read_dies)
6427 (partial_die_parent_scope, add_partial_enumeration)
6428 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6429 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6430 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6431 (create_cus_hash_table, create_dwp_hash_table)
6432 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6433 (dwarf2_rnglists_process, dwarf2_ranges_process)
6434 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6435 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6436 (handle_struct_member_die, process_structure_scope)
6437 (read_array_type, read_common_block, read_module_type)
6438 (read_tag_pointer_type, read_typedef, read_base_type)
6439 (read_subrange_type, load_partial_dies, partial_die_info::read)
6440 (partial_die_info::read, partial_die_info::read)
6441 (partial_die_info::read, read_checked_initial_length_and_offset)
6442 (dwarf2_string_attr, read_formatted_entries)
6443 (dwarf_decode_line_header)
6444 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6445 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6446 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6447 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6448 (get_signatured_type, get_DW_AT_signature_type)
6449 (decode_locdesc, file_file_name, consume_improper_spaces)
6450 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6451 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6452 (dwarf2_symbol_mark_computed, set_die_type)
6453 (read_attribute_value): Update.
6454 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6456 * dbxread.c (unknown_symtype_complaint)
6457 (lbrac_mismatch_complaint, repeated_header_complaint)
6458 (set_namestring, function_outside_compilation_unit_complaint)
6459 (read_dbx_symtab, process_one_symbol): Update.
6460 * gdbtypes.c (stub_noname_complaint): Update.
6461 * windows-nat.c (handle_unload_dll): Update.
6462 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6463 (decode_base_type): Update.
6464 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6465 (eb_complaint, record_include_begin, record_include_end)
6466 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6467 (process_xcoff_symbol, read_symbol)
6468 (function_outside_compilation_unit_complaint)
6469 (scan_xcoff_symtab): Update.
6470 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6471 * buildsym.c (finish_block_internal, make_blockvector)
6472 (end_symtab_get_static_block, augment_type_symtab): Update.
6473 * dtrace-probe.c (dtrace_process_dof)
6474 (dtrace_static_probe_ops::get_probes): Update.
6475 * complaints.h (struct complaint): Don't declare.
6476 (symfile_complaints): Remove.
6477 (complaint_internal): Remove "complaints" parameter.
6478 (complaint): Likewise.
6479 (clear_complaints): Likewise.
6480 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6481 (reread_symbols): Update.
6482 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6483 (dwarf2_frame_cache, decode_frame_entry): Update.
6484 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6485 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6486 (info_selectors_command): Update.
6487 * macrotab.c (macro_include, check_for_redefinition)
6488 (macro_undef): Update.
6489 * objfiles.c (filter_overlapping_sections): Update.
6490 * stabsread.c (invalid_cpp_abbrev_complaint)
6491 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6492 (define_symbol, error_type, read_type, rs6000_builtin_type)
6493 (stabs_method_name_from_physname, read_member_functions)
6494 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6495 (attach_fields_to_type, complain_about_struct_wipeout)
6496 (read_range_type, read_args, common_block_start)
6497 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6499 * mdebugread.c (index_complaint, unknown_ext_complaint)
6500 (basic_type_complaint, bad_tag_guess_complaint)
6501 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6502 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6503 (parse_procedure, parse_lines)
6504 (function_outside_compilation_unit_complaint)
6505 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6506 (bad_tag_guess_complaint, reg_value_complaint): Update.
6507 * cp-support.c (demangled_name_complaint): Update.
6508 * macroscope.c (sal_macro_scope): Update.
6509 * dwarf-index-write.c (class debug_names): Update.
6513 * complaints.c (clear_complaints): Remove "noisy" parameter.
6514 * complaints.h (clear_complaints): Update.
6515 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6516 (reread_symbols): Update.
6520 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6522 (vcomplaint, clear_complaints): Update.
6523 (symfile_explanations): Remove some messages.
6527 * complaints.c (internal_complaint): Remove.
6528 * complaints.h (internal_complaint): Remove.
6532 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6536 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6537 (remote_fileio_badfd, remote_fileio_return_errno)
6538 (remote_fileio_return_success, remote_fileio_func_open)
6539 (remote_fileio_func_open, remote_fileio_func_close)
6540 (remote_fileio_func_read, remote_fileio_func_write)
6541 (remote_fileio_func_lseek, remote_fileio_func_rename)
6542 (remote_fileio_func_unlink, remote_fileio_func_stat)
6543 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6544 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6545 remote_target parameter.
6546 (remote_fio_func_map) <func>: Add remote_target parameter.
6547 (do_remote_fileio_request, remote_fileio_request):
6548 * remote-fileio.h (remote_fileio_request):
6549 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6550 remote_target parameter.
6551 (remote_notif_process, handle_notification): Adjust to pass down
6553 (remote_notif_state_allocate): Add remote_target parameter. Save
6555 * remote-notif.h (struct remote_target): Forward declare.
6556 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6557 remote_target parameter.
6558 (struct remote_notif_state) <remote>: New field.
6559 (remote_notif_ack, remote_notif_parse): Add remote_target
6561 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6562 remote_target parameter.
6563 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6564 (threads_listing_context, rmt_thread_action, protocol_feature)
6565 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6566 (packet_result, struct threads_listing_context, remote_state):
6567 Move definitions and declarations higher up.
6568 (remote_target) <~remote_target>: Declare.
6569 (remote_download_command_source, remote_file_put, remote_file_get)
6570 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6571 (remote_hostio_pread_vFile, remote_hostio_send_command)
6572 (remote_hostio_set_filesystem, remote_hostio_open)
6573 (remote_hostio_close, remote_hostio_unlink, remote_state)
6574 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6575 (get_memory_write_packet_size, get_memory_read_packet_size)
6576 (append_pending_thread_resumptions, remote_detach_1)
6577 (append_resumption, remote_resume_with_vcont)
6578 (add_current_inferior_and_thread, wait_ns, wait_as)
6579 (process_stop_reply, remote_notice_new_inferior)
6580 (process_initial_stop_replies, remote_add_thread)
6581 (btrace_sync_conf, remote_btrace_maybe_reopen)
6582 (remove_new_fork_children, kill_new_fork_children)
6583 (discard_pending_stop_replies, stop_reply_queue_length)
6584 (check_pending_events_prevent_wildcard_vcont)
6585 (discard_pending_stop_replies_in_queue, stop_reply)
6586 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6587 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6588 (remote_interrupt_as, remote_interrupt_ns)
6589 (remote_get_noisy_reply, remote_query_attached)
6590 (remote_add_inferior, remote_current_thread, get_current_thread)
6591 (set_thread, set_general_thread, set_continue_thread)
6592 (set_general_process, write_ptid)
6593 (remote_unpack_thread_info_response, remote_get_threadinfo)
6594 (parse_threadlist_response, remote_get_threadlist)
6595 (remote_threadlist_iterator, remote_get_threads_with_ql)
6596 (remote_get_threads_with_qxfer)
6597 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6598 (get_offsets, remote_check_symbols, remote_supported_packet)
6599 (remote_query_supported, remote_packet_size)
6600 (remote_serial_quit_handler, remote_detach_pid)
6601 (remote_vcont_probe, remote_resume_with_hc)
6602 (send_interrupt_sequence, interrupt_query)
6603 (remote_notif_get_pending_events, fetch_register_using_p)
6604 (send_g_packet, process_g_packet, fetch_registers_using_g)
6605 (store_register_using_P, store_registers_using_G)
6606 (set_remote_traceframe, check_binary_download)
6607 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6608 (remote_xfer_live_readonly_partial, remote_read_bytes)
6609 (remote_send_printf, remote_flash_write, readchar)
6610 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6611 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6612 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6613 (extended_remote_disable_randomization, extended_remote_run)
6614 (send_environment_packet, extended_remote_environment_support)
6615 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6616 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6617 (packet_command): Now methods of ...
6618 (remote_target): ... this class.
6619 (m_remote_state) <remote_target>: New field.
6620 (struct remote_state) <stop_reply_queue,
6621 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6623 (remote_state::remote_state): Allocate stop_reply_queue.
6624 (remote_state): Delete global.
6625 (get_remote_state_raw): Delete.
6626 (remote_target::get_remote_state): Allocate m_remote_state on
6628 (get_current_remote_target): New.
6629 (remote_ops, extended_remote_ops): Delete.
6630 (wait_forever_enabled_p, remote_async_inferior_event_token):
6631 Delete, moved to struct remote_state.
6632 (remote_target::close): Delete self. Destruction bits split to
6634 (remote_target::~remote_target): ... this.
6635 (show_memory_packet_size): Adjust to use
6636 get_current_remote_target.
6637 (struct protocol_feature) <func>: Add remote_target parameter.
6638 All callers adjusted.
6639 (curr_quit_handler_target): New.
6640 (remote_serial_quit_handler): Reimplement.
6641 (remote_target::open_1): Adjust to use get_current_remote_target.
6642 Heap-allocate remote_target/extended_remote_target instances.
6643 (vcont_builder::vcont_builder): Add remote_target parameter, and
6644 save it in m_remote. All callers adjusted.
6645 (vcont_builder::m_remote): New field.
6646 (vcont_builder::restart, vcont_builder::flush)
6647 (vcont_builder::push_action): Use it.
6648 (remote_target::commit_resume): Use it.
6649 (struct queue_iter_param) <remote>: New field.
6650 (remote_target::remove_new_fork_children): Fill in 'remote' field.
6651 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6652 (check_pending_event_prevents_wildcard_vcont_callback)
6653 (remote_target::check_pending_events_prevent_wildcard_vcont)
6654 (remote_target::discard_pending_stop_replies)
6655 (remote_target::discard_pending_stop_replies_in_queue)
6656 (remote_target::remote_notif_remove_queued_reply): Fill in
6658 (remote_notif_get_pending_events): New.
6659 (remote_target::readchar, remote_target::remote_serial_write):
6660 Save/restore curr_quit_handler_target.
6662 (kill_new_fork_children): Fill in 'remote' field.
6663 (packet_command): Use get_current_remote_target, defer to
6664 remote_target method of same name.
6665 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6666 parameter, and save it in m_remote. All callers adjusted.
6667 (scoped_remote_fd::release): Use m_remote.
6668 (scoped_remote_fd::m_remote): New field.
6669 (remote_file_put, remote_file_get, remote_file_delete): Use
6670 get_current_remote_target, defer to remote_target method of same
6672 (remote_btrace_reset): Add remote_state paremeter. Update all
6674 (remote_async_inferior_event_handler). Pass down 'data'.
6675 (remote_new_objfile): Use get_current_remote_target.
6676 (remote_target::vcont_r_supported): New.
6677 (set_range_stepping): Use get_current_remote_target and
6678 remote_target::vcont_r_supported.
6679 (_initialize_remote): Don't allocate 'remote_state' and
6680 'stop_reply_queue' globals.
6681 * remote.h (struct remote_target): Forward declare.
6682 (getpkt, putpkt, remote_notif_get_pending_events): Add
6683 'remote_target' parameter.
6687 * remote.c (vcont_builder): Now a class. Make all data members
6689 (vcont_builder) <vcont_builder, restart, flush, push_action>:
6691 (vcont_builder_restart): Rename to ...
6692 (vcont_builder::restart): ... this.
6693 (vcont_builder_flush): Rename to ...
6694 (vcont_builder::flush): ... this.
6695 (vcont_builder_push_action): Rename to ...
6696 (vcont_builder::push_action): ... this.
6697 (remote_target::commit_resume): Adjust.
6701 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6702 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6703 (get_fixed_memory_packet_size): New.
6704 (get_memory_packet_size): Use it.
6705 (set_memory_packet_size): Don't override the config size with
6706 DEFAULT_MAX_MEMORY_PACKET_SIZE.
6707 (show_memory_packet_size): Use get_fixed_memory_packet_size.
6708 Don't refer to get_memory_packet_size if not connected to a remote
6709 target. Show "(default)" if configured size is 0.
6713 * remote.c (remote_target::mourn_inferior): Move
6714 discard_pending_stop_replies call here from ...
6715 (_initialize_remote): ... here.
6719 * remote.c (compare_section_command): Remove set_general_process
6724 * remote.c (struct packet_reg, struct remote_arch_state):
6725 Move higher up in the file.
6726 (remote_state) <m_arch_states>: Store remote_arch_state values
6727 instead of remote_arch_state pointers.
6728 (remote_state::get_remote_arch_state): Adjust.
6732 * remote.c: Include <unordered_map>.
6733 (remote_state): Now a class.
6734 (remote_state) <get_remote_arch_state>: Declare method.
6735 <get_remote_arch_state>: New field.
6736 (remote_arch_state) <remote_arch_state>: Declare ctor.
6737 <regs>: Now a unique_ptr.
6738 (remote_gdbarch_data_handle): Delete.
6739 (get_remote_arch_state): Delete.
6740 (remote_state::get_remote_arch_state): New.
6741 (get_remote_state): Adjust to call remote_state's
6742 get_remote_arch_state method.
6743 (init_remote_state): Delete, bits factored out to ...
6744 (remote_arch_state::remote_arch_state): ... this new method.
6745 (get_remote_packet_size, get_memory_packet_size)
6746 (process_g_packet, remote_target::fetch_registers)
6747 (remote_target::prepare_to_store, store_registers_using_G)
6748 (remote_target::store_registers, remote_target::get_trace_status):
6749 Adjust to call remote_state's method.
6750 (_initialize_remote): Remove reference to
6751 remote_gdbarch_data_handle.
6755 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6756 pread>: New method declarations.
6757 (remote_target::open_1): Adjust.
6758 (readahead_cache_invalidate): Rename to ...
6759 (readahead_cache::invalidate): ... this, and adjust to be a class
6761 (readahead_cache_invalidate_fd): Rename to ...
6762 (readahead_cache::invalidate_fd): ... this, and adjust to be a
6764 (remote_hostio_pwrite): Adjust.
6765 (remote_hostio_pread_from_cache): Rename to ...
6766 (readahead_cache::pread): ... this, and adjust to be a class
6768 (remote_hostio_close): Adjust.
6772 * remote.c (remote_hostio_close_cleanup): Delete.
6773 (class scoped_remote_fd): New.
6774 (remote_file_put, remote_file_get): Use it.
6778 (struct vCont_action_support): Use bool and initialize all fields.
6779 (struct readahead_cache): Initialize all fields.
6780 (remote_state): Use bool and initialize all fields.
6781 (remote_state::remote_state, remote_state::~remote_state): New.
6782 (new_remote_state): Delete.
6783 (_initialize_remote): Use new to allocate remote_state.
6789 * c-exp.y: Include "c-support.h".
6790 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6791 of tolower. Use c_ident_is_alpha to scan names.
6792 * c-lang.c: Include "c-support.h".
6793 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6794 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6795 * c-support.h: New file, with bits factored out from ...
6796 * cp-name-parser.y: ... this file.
6797 Include "c-support.h".
6798 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6799 c-support.h and renamed.
6800 (symbol_end, yylex): Adjust.
6804 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6805 parameter type to CORE_ADDR.
6806 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6807 parameter type in declaration to CORE_ADDR.
6808 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6809 target_auxv_search to get AT_HWCAP and use the result to get the
6811 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6812 to CORE_ADDR. Remove the cast of the return value to unsigned
6813 long. Fix error predicate of target_auxv_search.
6814 (ppc_linux_nat_target::read_description): Change the type of the
6815 hwcap variable to CORE_ADDR.
6819 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6820 if the size of fpscr is larger than 32 bits.
6824 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6825 (ppc32_linux_vsxregmap): New global.
6826 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6827 regcache_supply_regset, and regcache_collect_regset.
6828 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6829 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6830 (fetch_vsx_register, store_vsx_register): Remove.
6831 (fetch_vsx_registers): Add regno parameter. Get regset using
6832 ppc_linux_vsxregset. Use regset to supply registers.
6833 (store_vsx_registers): Add regno parameter. Get regset using
6834 ppc_linux_vsxregset. Use regset to collect registers.
6835 (fetch_register): Call fetch_vsx_registers instead of
6837 (store_register): Call store_vsx_registers instead of
6839 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6840 new regno parameter.
6841 (store_ppc_registers): Call store_vsx_registers with -1 for the
6842 new regno parameter.
6843 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6844 (ppc_collect_vsxregset): Remove.
6848 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6850 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6851 for vector register offset fields.
6852 (ppc64_fbsd_reg_offsets): Likewise.
6853 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6854 to vector register offset fields.
6855 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6856 to vector register offset fields.
6857 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6858 vector register offset fields.
6859 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6860 initializers for vector register offset fields.
6861 (rs6000_aix64_reg_offsets): Likewise.
6862 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6863 (ppc_supply_vrregset): Remove.
6864 (ppc_collect_vrregset): Remove.
6865 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6866 (ppc_linux_vrregset) : New function.
6867 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6868 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6869 (ppc32_linux_vrregset): Remove.
6870 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6871 and use result instead of ppc32_linux_vrregset.
6872 (ppc32_linux_reg_offsets): Remove initializers for vector register
6874 (ppc64_linux_reg_offsets): Likewise.
6875 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6876 * ppc-linux-nat.c: Include regset.h.
6877 (gdb_vrregset_t): Adjust comment to account for little-endian
6879 (supply_vrregset, fill_vrregset): Remove.
6880 (fetch_altivec_register, store_altivec_register): Remove.
6881 (fetch_altivec_registers): Add regno parameter. Get regset using
6882 ppc_linux_vrregset. Use regset to supply registers.
6883 (store_altivec_registers): Add regno parameter. Get regset using
6884 ppc_linux_vrregset. Use regset to collect registers.
6885 (fetch_register): Call fetch_altivec_registers instead of
6886 fetch_altivec_register.
6887 (store_register): Call store_altivec_registers instead of
6888 store_altivec_register.
6889 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6890 the new regno parameter.
6891 (store_ppc_registers): Call store_altivec_registers with -1 for
6892 the new regno parameter.
6896 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6897 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6898 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6899 (gdb_vrregset_t): Change array type size to
6900 PPC_LINUX_SIZEOF_VRREGSET.
6901 (gdb_vsxregset_t): Change array type size to
6902 PPC_LINUX_SIZEOF_VSXREGSET.
6903 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6904 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6905 PPC_LINUX_SIZEOF_VSXREGSET.
6909 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6910 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6912 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6913 ppc_linux_target_wordsize with tid.
6914 (ppc_linux_nat_target::read_description): Call ppc_linux_target
6916 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6917 (ppc64_64bit_inferior_p): Add static and inline specifiers.
6918 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6919 tid parameter. Remove static specifier.
6920 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6921 (ppc_linux_target_wordsize): New declaration.
6925 * arch/ppc-linux-common.c: New file.
6926 * arch/ppc-linux-common.h: New file.
6927 * arch/ppc-linux-tdesc.h: New file.
6928 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6929 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6930 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6931 arch/ppc-linux-tdesc.h.
6932 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6933 arch/ppc-linux-tdesc.h.
6934 (ppc_linux_nat_target::read_description): Remove target
6935 description matching code. Fill a ppc_linux_features struct and
6936 call ppc_linux_match_description with it. Move comment about ISA
6937 2.05 to ppc-linux-common.c.
6938 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6939 arch/ppc-linux-tdesc.h.
6940 (ppc_linux_core_read_description): Remove target description
6941 matching code. Fill a ppc_linux_features struct and call
6942 ppc_linux_match_description with it.
6943 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6944 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6945 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6946 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6947 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6948 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6949 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6950 (tdesc_powerpc_e500l): Remove.
6954 * ada-lang.c (catch_assert_command): Pass empty string instead
6955 of NULL for excep_string argument.
6959 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6960 the width of the requested register exceeds the width of the
6965 * printcmd.c (output_command): Remove.
6966 (output_command_const): Rename to output_command.
6967 * valprint.h (output_command): Rename from output_command_const.
6968 * tracepoint.c (trace_dump_actions): Call output_command.
6972 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6973 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6974 * ada-lang.h (create_ada_exception_catchpoint): Update.
6975 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6977 (create_excep_cond_exprs, ~ada_catchpoint)
6978 (should_stop_exception, print_one_exception)
6979 (print_mention_exception, print_recreate_exception): Update.
6980 (ada_get_next_arg): Remove.
6981 (catch_ada_exception_command_split): Use std::string. Change type
6982 of "excep_string", "cond_string".
6983 (catch_ada_exception_command): Update.
6984 (create_ada_exception_catchpoint): Change type of excep_string.
6985 (ada_exception_sal): Remove excep_string parameter.
6986 (~ada_catchpoint): Remove.
6990 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6995 * ada-lang.c (ada_exception_message_1, ada_exception_message):
6996 Return unique_xmalloc_ptr.
6997 (print_it_exception): Update.
7001 * tracepoint.c (trace_dump_actions): Use std::string.
7005 * symfile.c (reread_symbols): Use std::string for original_name.
7009 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7010 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7015 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7017 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7018 * objfiles.c (get_objfile_bfd_data): Allocate
7019 objfile_per_bfd_storage with obstack_new when allocating on
7024 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7026 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7027 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7028 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7029 (add_pending): Likewise.
7030 (parse_symbol): Likewise.
7031 (parse_partial_symbols): Likewise.
7032 (psymtab_to_symtab_1): Likewise.
7033 (new_psymtab): Likewise.
7034 (elfmdebug_build_psymtabs): Likewise.
7035 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7036 * objfiles.c (get_objfile_bfd_data): Likewise.
7037 (objfile_register_static_link): Likewise.
7038 * psymtab.c (allocate_psymtab): Likewise.
7039 * stabsread.c (read_member_functions): Likewise.
7040 * xcoffread.c (xcoff_end_psymtab): Likewise.
7044 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7045 compiler supports std::is_trivially_constructible.
7046 * common/poison.h: Include obstack.h.
7047 (IsMallocable): Define to is_trivially_constructible if the
7048 compiler supports it, define to true_type otherwise.
7052 (XOBNEWVEC): Redefine.
7053 * gdb_obstack.h (obstack_zalloc): New.
7054 (OBSTACK_ZALLOC): Redefine.
7055 (obstack_calloc): New.
7056 (OBSTACK_CALLOC): Redefine.
7058 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7059 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7061 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7062 obstack_calloc/obstack_zalloc.
7063 (gdbarch_obstack_zalloc): Remove.
7064 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7068 * stack.c (backtrace_command_1): Remove useless variable int i.
7072 * stack.c (print_frame_info): Fix comment.
7076 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7077 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7078 (~dwarf2_per_objfile): Update
7079 (dwarf2_get_dwz_file): Use new.
7080 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7085 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7087 * dwarf2read.c (struct dwp_file): Add constructor and
7089 (open_and_init_dwp_file): Return a unique_ptr.
7090 (dwarf2_per_objfile, create_dwp_hash_table)
7091 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7092 (lookup_dwo_unit_in_dwp): Update.
7093 (open_and_init_dwp_file, get_dwp_file): Update.
7097 * dwarf2read.c (dwarf2_per_objfile): Update.
7098 (struct mapped_index): Add initializers.
7099 (dwarf2_read_index): Use new.
7100 (dw2_symtab_iter_init): Update.
7101 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7106 * dwarf2read.c (mapped_index) <total_size>: Remove.
7110 * unittests/format_pieces-selftests.c (test_format_specifier):
7115 * c-typeprint.c (maybe_print_hole): New function.
7116 (c_print_type_struct_field_offset): Update.
7117 (c_type_print_base_struct_union): Call maybe_print_hole.
7121 * breakpoint.c (build_bpstat_chain): New function, moved from
7123 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7124 If no stop chain is passed, call build_bpstat_chain to build it.
7125 * breakpoint.h (build_bpstat_chain): Declare.
7126 (bpstat_stop_status): Move documentation here from breakpoint.c.
7127 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7128 build the stop chain and pass it to skip_inline_frames.
7129 Pass this stop chain to bpstat_stop_status.
7130 * inline-frame.c: Include breakpoint.h.
7131 (stopped_by_user_bp_inline_frame): New function.
7132 (skip_inline_frames): Add parameter `stop_chain'.
7133 Move documention to inline-frame.h.
7134 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7135 whether the frame should be elided.
7136 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7137 Add moved documentation and update for new parameter.
7142 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7143 unittests/format_pieces-selftests.c.
7144 * common/format.h (format_piece) <operator==>: New.
7145 (format_pieces) <operator[]>: Remove.
7146 * common/format.c (format_pieces::format_pieces): Handle \e.
7147 * unittests/format_pieces-selftests.c: New.
7152 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7153 (dw2_instantiate_symtab): Add skip_partial parameter.
7154 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7155 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7156 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7157 (dw2_expand_symtabs_matching_one)
7158 (dw2_find_pc_sect_compunit_symtab)
7159 (dw2_debug_names_lookup_symbol)
7160 (dw2_debug_names_expand_symtabs_for_function): Update.
7161 (init_cutu_and_read_dies): Add skip_partial parameter.
7162 (process_psymtab_comp_unit, build_type_psymtabs_1)
7163 (process_skeletonless_type_unit, load_partial_comp_unit)
7164 (psymtab_to_symtab_1): Update.
7165 (load_full_comp_unit): Add skip_partial parameter.
7166 (process_imported_unit_die, dwarf2_read_addr_index)
7167 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7168 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7169 (read_signatured_type): Update.
7173 * value.c (release_value): Remove unused variable.
7174 (record_latest_value): Likewise.
7175 (access_value_history): Likewise.
7176 (preserve_values): Likewise.
7180 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7186 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7187 Also handle registers whose width is not a multiple of
7189 (linux_nat_trad_target::store_register): Likewise.
7193 * gdbcore.h (core_bfd): Redefine.
7194 * corelow.c (core_target::close): Update.
7195 (core_target_open): Update.
7196 * progspace.h (struct program_space) <cbfd>: Now a
7202 * symfile-add-flags.h (enum symfile_add_flags)
7203 <SYMFILE_NOT_FILENAME>: New constant.
7204 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7205 objfile name from BFD.
7206 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7207 * minidebug.c (find_separate_debug_file_in_section): Put
7208 ".gnu_debugdata" into BFD's file name.
7212 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7218 * aarch64-tdep.c (aarch64_analyze_prologue,
7219 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7220 Indicate not interested in errors.
7224 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7225 Supply the MIPS_ZERO_REGNUM register.
7229 * mips-tdep.c (mask_address_var): Make variable static.
7233 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7237 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7238 FXSAVE_ADDR for the mxcsr register.
7242 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7246 * corelow.c (core_target) <core_target>: No longer inline.
7247 Initialize m_core_gdbarch, m_core_vec and build the section table
7249 <~core_target>: New.
7250 <core_gdbarch, get_core_register_section>: New methods.
7251 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7252 factored out from ...
7253 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7255 (sniff_core_bfd): Add gdbarch parameter.
7256 (core_close): Delete, merged into ...
7257 (core_target::close): ... here. Delete self.
7258 (core_close_cleanup): Delete.
7259 (core_target_open): Allocate a core_target on the heap. Use a
7260 unique_ptr instead of a cleanup. Bits moved into the core_target
7261 ctor. Adjust to use core_target methods instead of globals.
7262 (get_core_register_section): Rename to ...
7263 (core_target::get_core_register_section): ... this and adjust.
7264 (struct get_core_registers_cb_data): New.
7265 (get_core_registers_cb): Use it. Use bool.
7266 (core_target::fetch_registers, core_target::files_info)
7267 (core_target::xfer_partial, core_target::read_description)
7268 (core_target::pid_to, core_target::thread_name): Adjust to
7269 reference class fields instead of globals.
7270 * target.h (struct target_ops_deleter, target_ops_up): New.
7274 * corefile.c (core_file_command): Move to corelow.c.
7275 * corelow.c (the_core_target): Delete.
7276 (core_file_command): Moved from corefile.c. Check exec_bfd
7277 instead of the_core_target. Use target_detach instead of calling
7278 into the_core_target directly.
7279 (maybe_say_no_core_file_now): New.
7280 (core_target::detach): Use it.
7281 (_initialize_corelow): Remove references to the_core_target.
7282 * gdbcore.h (the_core_target): Delete.
7287 * corefile.c (core_bfd): Remove.
7288 * gdbcore.h (core_bfd): Now a macro.
7289 * progspace.h (struct program_space) <cbfd>: New field.
7293 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7298 * configure: Rebuild.
7299 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7304 * regformats/regdat.sh: Adjust script, following the addition
7305 of the new expedite_regs parameter to init_target_desc.
7310 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7311 set_gdbarch_significant_addr_bit.
7312 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7313 set_gdbarch_significant_addr_bit.
7314 * utils.c (address_significant): Update to sign extend addr.
7318 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7319 (xtensa_linux_init_abi): Limit tdep->num_regs by
7320 tdep->num_nopriv_regs.
7321 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7322 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7327 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7331 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7332 (I387_MXCSR_INIT_VAL): New constant.
7333 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7334 buffer if it was supplied by the inferior.
7335 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7336 (i387_xsave_get_clear_bv): New function.
7337 (i387_supply_xsave): Only read x87 control registers from the
7338 xsave buffer if the feature is enabled, and the state will have
7339 been written, otherwise, provide a suitable default.
7340 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7341 including x87 control registers. Update control registers if they
7342 have changed from the default value, and mark features as enabled
7344 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7348 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7352 * configure: Rebuild.
7353 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7358 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7359 bit. Use correct value for VDIV.
7363 * configure: Rebuild.
7364 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7368 * linux-record.c (record_linux_system_call) <case
7369 RECORD_SYS_RECVFROM>: Add "break".
7373 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7374 Add missing "break".
7375 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7376 Add missing "break".
7380 * rs6000-tdep.c (ppc_process_record_op4)
7381 (ppc_process_record_op63): Add fall-through comment.
7385 * i386-tdep.c (i386_process_record): Add fall-through comment.
7389 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7394 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7395 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7396 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7398 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7400 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7405 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7409 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7410 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7411 * symfile.c (section_is_mapped): Fix fall-through comment.
7412 * stabsread.c (define_symbol, read_member_functions): Fix
7413 fall-through comment.
7414 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7416 * remote.c (remote_wait_as): Fix fall-through comment.
7417 * p-exp.y (yylex): Fix fall-through comment.
7418 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7420 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7421 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7422 * jv-exp.y (yylex): Fix fall-through comment.
7423 * go-exp.y (lex_one_token): Fix fall-through comment.
7424 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7425 fall-through comment.
7426 * f-exp.y (yylex): Fix fall-through comment.
7427 * dwarf2read.c (process_die): Fix fall-through comments.
7428 * dbxread.c (process_one_symbol): Fix fall-through comment.
7429 * d-exp.y (lex_one_token): Fix fall-through comment.
7430 * cp-name-parser.y (yylex): Fix fall-through comment.
7431 * coffread.c (coff_symtab_read): Fix fall-through comment.
7432 * c-exp.y (lex_one_token): Fix fall-through comment.
7433 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7435 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7441 * NEWS: Mention gdb.execute change.
7442 * gdbcmd.h (execute_control_command): Don't declare.
7443 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7444 execute_control_commands, execute_control_commands_to_string.
7445 * cli/cli-script.h (execute_control_commands)
7446 (execute_control_commands_to_string): Declare.
7447 (execute_control_command): Add from_tty parameter.
7448 * cli/cli-script.c (execute_control_commands)
7449 (execute_control_commands_to_string): New functions.
7450 (execute_user_command): Use execute_control_commands.
7451 (execute_control_command_1): Add "from_tty" parameter. Update.
7452 (execute_control_command): Likewise.
7457 * NEWS: Mention that breakpoint commands are writable.
7458 * python/py-breakpoint.c (bppy_set_commands): New function.
7459 (breakpoint_object_getset) <"commands">: Use it.
7463 * tracepoint.c (actions_command): Update.
7464 * mi/mi-cmd-break.c (mi_command_line_array)
7465 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7466 (mi_read_next_line): Remove.
7467 (mi_cmd_break_commands): Update.
7468 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7470 * cli/cli-script.c (get_command_line): Update.
7471 (process_next_line): Use function_view. Constify.
7472 (recurse_read_control_structure, read_command_lines)
7473 (read_command_lines_1): Change argument types to function_view.
7474 (do_define_command, document_command): Update.
7475 * breakpoint.h (check_tracepoint_command): Don't declare.
7476 * breakpoint.c (check_tracepoint_command): Remove.
7477 (commands_command_1, create_tracepoint_from_upload): Update.
7482 * cli/cli-script.h (enum command_control_type) <define_control>:
7484 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7485 (build_command_line, execute_control_command_1)
7486 (process_next_line): Likewise.
7487 (do_define_command): New function, extracted from define_command.
7488 (define_command): Use it.
7492 * tracepoint.c (actions_command): Update.
7493 * cli/cli-script.h (read_command_lines): Update.
7494 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7495 (MAX_TMPBUF): Remove define.
7496 (define_command): Use string_printf.
7497 (document_command): Likewise.
7498 * breakpoint.c (commands_command_1): Update.
7502 * top.c (execute_command): Update.
7503 * cli/cli-script.h (print_command_lines): Now varargs.
7504 * cli/cli-script.c (print_command_lines): Now varargs.
7505 (execute_control_command_1) <case while_control, case if_control>:
7510 * tracepoint.c (all_tracepoint_actions): Rename from
7511 all_tracepoint_actions_and_cleanup. Change return type.
7512 (actions_command, encode_actions_1, encode_actions)
7513 (trace_dump_actions, tdump_command): Update.
7514 * remote.c (remote_download_command_source): Update.
7515 * python/python.c (gdbpy_eval_from_control_command)
7516 (python_command, python_interactive_command): Update.
7517 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7518 * guile/guile.c (guile_command)
7519 (gdbscm_eval_from_control_command, guile_command): Update.
7520 * compile/compile.c (compile_code_command)
7521 (compile_print_command, compile_to_object): Update.
7522 * cli/cli-script.h (struct command_lines_deleter): New.
7523 (counted_command_line): New typedef.
7524 (struct command_line): Add constructor, destructor.
7525 <body_list>: Remove.
7526 <body_list_0, body_list_1>: New members.
7527 (command_line_up): Remove typedef.
7528 (read_command_lines, read_command_lines_1, get_command_line):
7530 (copy_command_lines): Don't declare.
7531 * cli/cli-script.c (build_command_line): Use "new".
7532 (get_command_line): Return counted_command_line.
7533 (print_command_lines, execute_user_command)
7534 (execute_control_command_1, while_command, if_command): Update.
7535 (realloc_body_list): Remove.
7536 (process_next_line, recurse_read_control_structure): Update.
7537 (read_command_lines, read_command_lines_1): Return counted_command_line.
7538 (free_command_lines): Use "delete".
7539 (copy_command_lines): Remove.
7540 (define_command, document_command, show_user_1): Update.
7541 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7542 a counted_command_line.
7543 * breakpoint.h (counted_command_line): Remove typedef.
7544 (breakpoint_set_commands): Update.
7545 * breakpoint.c (check_no_tracepoint_commands)
7546 (validate_commands_for_breakpoint): Update.
7547 (breakpoint_set_commands): Change commands to be a
7548 counted_command_line.
7549 (commands_command_1, update_dprintf_command_list)
7550 (create_tracepoint_from_upload): Update.
7554 * cli/cli-decode.h (cmd_list_element): New constructor.
7555 (~cmd_list_element): New destructor.
7556 (struct cmd_list_element): Add initializers.
7557 * cli/cli-decode.c (do_add_cmd): Use "new".
7558 (delete_cmd): Use "delete".
7563 PR breakpoints/19806 and support for PR external/20207.
7564 * NEWS: Mention Aarch64 watchpoint improvements.
7565 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7566 watchpoints and PR external/20207 watchpoints.
7567 * nat/aarch64-linux-hw-point.c
7568 (kernel_supports_any_contiguous_range): New.
7569 (aarch64_watchpoint_offset): New.
7570 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7571 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7572 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7573 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7574 next_addr_orig_p. Support PR external/20207 watchpoints.
7575 (aarch64_downgrade_regs): New.
7576 (aarch64_dr_state_insert_one_point): New parameters offset and
7578 (aarch64_dr_state_remove_one_point): Likewise.
7579 (aarch64_handle_breakpoint): Update caller.
7580 (aarch64_handle_aligned_watchpoint): Likewise.
7581 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7583 (aarch64_linux_set_debug_regs): Remove const from state. Call
7584 aarch64_downgrade_regs.
7585 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7586 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7587 (DR_CONTROL_MASK): ... this.
7588 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7589 (unsigned int aarch64_watchpoint_offset): New prototype.
7590 (aarch64_linux_set_debug_regs): Remove const from state.
7591 * utils.c (align_up, align_down): Move to ...
7592 * common/common-utils.c (align_up, align_down): ... here.
7593 * utils.h (align_up, align_down): Move to ...
7594 * common/common-utils.h (align_up, align_down): ... here.
7598 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7599 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7600 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7601 Re-implement to match the ABI as summarized in GCC's
7602 gcc/config/sparc/sparc.c. All callers updated.
7603 (sparc32_store_arguments): Remove assertion.
7607 * printcmd.c: Don't include tui.h.
7608 (decode_format): Use skip_spaces.
7613 * printcmd.c (last_count): New global.
7614 (x_command): Use saved count when repeating.
7618 * nto-procfs.c (do_closedir_cleanup): Remove.
7619 (procfs_pidlist): Use gdb_dir_up.
7620 * procfs.c (do_closedir_cleanup): Remove.
7621 (proc_update_threads): Use gdb_dir_up.
7622 * common/filestuff.h (struct gdb_dir_deleter): New.
7623 (gdb_dir_up): New typedef.
7627 * ada-lang.c (print_mention_exception): Use std::string.
7631 * ada-lang.c (create_excep_cond_exprs): Update.
7632 (ada_exception_catchpoint_cond_string): Use std::string.
7636 * ada-lang.c (xget_renaming_scope): Return std::string.
7637 (old_renaming_is_invisible): Update.
7641 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7642 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7646 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7650 * remote.c (remote_query_supported_append): Change type.
7651 (remote_check_symbols): Update.
7656 * configure.ac: Prepend libpython.
7657 * python/python-config.py: Likewise.
7658 * configure: Regenerate.
7662 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7667 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7668 override. Write 'true' instead of '1'.
7669 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7674 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7675 add_inf_child_target.
7676 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7677 add_inf_child_target.
7678 * aix-thread.c (aix_thread_target_info): New.
7679 (aix_thread_target) <shortname, longname, doc>: Delete.
7681 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7682 add_inf_child_target.
7683 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7684 add_inf_child_target.
7685 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7686 add_inf_child_target.
7687 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7688 add_inf_child_target.
7689 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7690 add_inf_child_target.
7691 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7692 add_inf_child_target.
7693 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7694 add_inf_child_target.
7695 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7696 add_inf_child_target.
7697 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7698 add_inf_child_target.
7699 * bfd-target.c (target_bfd_target_info): New.
7700 (target_bfd) <shortname, longname, doc>: Delete.
7702 * bsd-kvm.c (bsd_kvm_target_info): New.
7703 (bsd_kvm_target) <shortname, longname, doc>: Delete.
7705 (bsd_kvm_target::open): Rename to ...
7706 (bsd_kvm_target_open): ... this. Adjust.
7707 * bsd-uthread.c (bsd_uthread_target_info): New.
7708 (bsd_uthread_target) <shortname, longname, doc>: Delete.
7710 * corefile.c (core_file_command): Adjust.
7711 * corelow.c (core_target_info): New.
7712 (core_target) <shortname, longname, doc>: Delete.
7714 (core_target::open): Rename to ...
7715 (core_target_open): ... this. Adjust.
7716 * ctf.c (ctf_target_info): New.
7717 (ctf_target) <shortname, longname, doc>: Delete.
7719 (ctf_target::open): Rename to ...
7720 (ctf_target_open): ... this.
7721 (_initialize_ctf): Adjust.
7722 * exec.c (exec_target_info): New.
7723 (exec_target) <shortname, longname, doc>: Delete.
7725 (exec_target::open): Rename to ...
7726 (exec_target_open): ... this.
7727 * gdbcore.h (core_target_open): Declare.
7728 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7729 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7730 add_inf_child_target.
7731 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7732 add_inf_child_target.
7733 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7734 add_inf_child_target.
7735 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7736 add_inf_child_target.
7737 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7738 add_inf_child_target.
7739 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7740 add_inf_child_target.
7741 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7742 add_inf_child_target.
7743 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7744 add_inf_child_target.
7745 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7746 add_inf_child_target.
7747 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7748 add_inf_child_target.
7749 * inf-child.c (inf_child_target_info): New.
7750 (inf_child_target::info): New.
7751 (inf_child_open_target): Remove 'target' parameter. Use
7752 get_native_target instead.
7753 (inf_child_target::open): Delete.
7754 (add_inf_child_target): New.
7755 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7758 (add_inf_child_target): Declare.
7759 (inf_child_open_target): Declare.
7760 * linux-thread-db.c (thread_db_target_info): New.
7761 (thread_db_target) <shortname, longname, doc>: Delete.
7763 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7764 add_inf_child_target.
7765 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7766 add_inf_child_target.
7767 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7768 add_inf_child_target.
7769 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7770 add_inf_child_target.
7771 * make-target-delegates (print_class): Adjust.
7772 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7773 add_inf_child_target.
7774 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7775 add_inf_child_target.
7776 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7777 add_inf_child_target.
7778 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7779 add_inf_child_target.
7780 * nto-procfs.c (nto_native_target_info): New.
7781 (nto_procfs_target_native) <shortname, longname, doc>:
7784 (nto_procfs_target_info): New.
7785 (nto_procfs_target_procfs) <shortname, longname, doc>:
7788 (init_procfs_targets): Adjust.
7789 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7790 add_inf_child_target.
7791 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7792 add_inf_child_target.
7793 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7794 add_inf_child_target.
7795 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7796 add_inf_child_target.
7797 * ravenscar-thread.c (ravenscar_target_info): New.
7798 (ravenscar_thread_target) <shortname, longname, doc>:
7801 * record-btrace.c (record_btrace_target_info):
7802 (record_btrace_target) <shortname, longname, doc>: Delete.
7804 (record_btrace_target::open): Rename to ...
7805 (record_btrace_target_open): ... this. Adjust.
7806 * record-full.c (record_longname, record_doc): New.
7807 (record_full_base_target) <shortname, longname, doc>: Delete.
7809 (record_full_target_info): New.
7810 (record_full_target): <shortname>: Delete.
7812 (record_full_core_open_1, record_full_open_1): Update comments.
7813 (record_full_base_target::open): Rename to ...
7814 (record_full_open): ... this.
7815 (cmd_record_full_restore): Update.
7816 (_initialize_record_full): Update.
7817 * remote-sim.c (remote_sim_target_info): New.
7818 (gdbsim_target) <shortname, longname, doc>: Delete.
7820 (gdbsim_target::open): Rename to ...
7821 (gdbsim_target_open): ... this.
7822 (_initialize_remote_sim): Adjust.
7823 * remote.c (remote_doc): New.
7824 (remote_target_info): New.
7825 (remote_target) <shortname, longname, doc>: Delete.
7827 (extended_remote_target_info): New.
7828 (extended_remote_target) <shortname, longname, doc>: Delete.
7830 (remote_target::open_1): Make static. Adjust.
7831 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7832 * s390-linux-nat.c (_initialize_s390_nat): Use
7833 add_inf_child_target.
7834 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7835 add_inf_child_target.
7836 * sol-thread.c (thread_db_target_info): New.
7837 (sol_thread_target) <shortname, longname, doc>: Delete.
7839 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7840 add_inf_child_target.
7841 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7842 add_inf_child_target.
7843 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7844 add_inf_child_target.
7845 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7846 add_inf_child_target.
7847 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7848 add_inf_child_target.
7849 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7850 add_inf_child_target.
7851 * spu-linux-nat.c (_initialize_spu_nat): Use
7852 add_inf_child_target.
7853 * spu-multiarch.c (spu_multiarch_target_info): New.
7854 (spu_multiarch_target) <shortname, longname, doc>: Delete.
7856 * target-delegates.c: Regenerate.
7857 * target.c: Include <unordered_map>.
7858 (target_ops_p): Delete.
7859 (DEF_VEC_P(target_ops_p)): Delete.
7860 (target_factories): New.
7861 (test_target_info): New.
7862 (test_target_ops::info): New.
7863 (open_target): Adjust to use target_factories.
7864 (add_target_with_completer): Rename to ...
7865 (add_target): ... this. Change prototype. Register target_info
7866 and open callback in target_factories. Register target_info in
7867 command context instead of target_ops.
7868 (add_target): Delete old implementation.
7869 (add_deprecated_target_alias): Change prototype. Adjust.
7870 (the_native_target): New.
7871 (set_native_target, get_native_target): New.
7872 (find_default_run_target): Use the_native_target.
7873 (find_attach_target, find_run_target): Simplify.
7874 (target_ops::open): Delete.
7875 (dummy_target_info): New.
7876 (dummy_target::shortname, dummy_target::longname)
7877 (dummy_target::doc): Delete.
7878 (dummy_target::info): New.
7879 (debug_target::shortname, debug_target::longname)
7880 (debug_target::doc): Delete.
7881 (debug_target::info): New.
7882 * target.h (struct target_info): New.
7883 (target_ops::~target_ops): Add comment.
7884 (target_ops::info): New.
7885 (target_ops::shortname, target_ops::longname, target_ops::doc): No
7886 longer virtual. Implement in terms of target_info.
7887 (set_native_target, get_native_target): Declare.
7888 (target_open_ftype): New.
7889 (add_target, add_target_with_completer)
7890 (add_deprecated_target_alias): Change prototype.
7891 (test_target) <shortname, longname, doc>: Delete.
7893 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7894 add_inf_child_target.
7895 * tracefile-tfile.c (tfile_target_info): New.
7896 (tfile_target) <shortname, longname, doc>: Delete.
7898 (tfile_target::open): Rename to ...
7899 (tfile_target_open): ... this.
7900 (_initialize_tracefile_tfile): Adjust.
7901 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7902 add_inf_child_target.
7903 * windows-nat.c (_initialize_windows_nat): Use
7904 add_inf_child_target.
7905 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7906 add_inf_child_target.
7910 * linux-nat.h (linux_nat_target) <low_new_thread,
7911 low_delete_thread, low_new_fork, low_forget_process,
7912 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7913 New virtual methods.
7914 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7915 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7916 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7917 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7918 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7920 * linux-fork.c (delete_fork): Adjust to call low method.
7921 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7922 (linux_nat_new_fork, linux_nat_forget_process_hook)
7923 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7924 (linux_nat_status_is_event):
7925 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7926 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7928 (sigtrap_is_event): Rename to ...
7929 (linux_nat_target::low_status_is_event): ... this.
7930 (linux_nat_set_status_is_event): Delete.
7931 (save_stop_reason, linux_nat_wait_1)
7932 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7934 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7935 (linux_nat_set_new_fork, linux_nat_set_forget_process)
7936 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7937 (linux_nat_set_prepare_to_resume): Delete.
7938 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7939 low virtual methods.
7940 * amd64-linux-nat.c: Likewise.
7941 * arm-linux-nat.c: Likewise.
7942 * i386-linux-nat.c: Likewise.
7943 * ia64-linux-nat.c: Likewise.
7944 * mips-linux-nat.c: Likewise.
7945 * ppc-linux-nat.c: Likewise.
7946 * s390-linux-nat.c: Likewise.
7947 * sparc64-linux-nat.c: Likewise.
7948 * x86-linux-nat.c: Likewise.
7949 * x86-linux-nat.h: Include "nat/x86-linux.h".
7950 (x86_linux_nat_target) <low_new_fork, low_forget_process,
7951 low_prepare_to_resume, low_new_thread, low_delete_thread>:
7956 * target.h (target_ops)
7957 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7958 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7959 stopped_by_watchpoint, have_continuable_watchpoint,
7960 stopped_data_address, watchpoint_addr_within_range,
7961 can_accel_watchpoint_condition, can_run, thread_alive,
7962 has_all_memory, has_memory, has_stack, has_registers,
7963 has_execution, can_async_p, is_async_p, supports_non_stop,
7964 always_non_stop_p, can_execute_reverse, supports_multi_process,
7965 supports_enable_disable_tracepoint,
7966 supports_disable_randomization, supports_string_tracing,
7967 supports_evaluation_of_breakpoint_conditions,
7968 can_run_breakpoint_commands, filesystem_is_local,
7969 can_download_tracepoint, get_trace_state_variable_value,
7970 set_trace_notes, get_tib_address, use_agent, can_use_agent,
7971 record_is_replaying, record_will_replay,
7972 augmented_libraries_svr4_read>: Adjust to return bool.
7973 * aarch64-linux-nat.c: All implementations adjusted.
7974 * aix-thread.c: All implementations adjusted.
7975 * arm-linux-nat.c: All implementations adjusted.
7976 * breakpoint.c: All implementations adjusted.
7977 * bsd-kvm.c: All implementations adjusted.
7978 * bsd-uthread.c: All implementations adjusted.
7979 * corelow.c: All implementations adjusted.
7980 * ctf.c: All implementations adjusted.
7981 * darwin-nat.c: All implementations adjusted.
7982 * darwin-nat.h: All implementations adjusted.
7983 * exec.c: All implementations adjusted.
7984 * fbsd-nat.c: All implementations adjusted.
7985 * fbsd-nat.h: All implementations adjusted.
7986 * gnu-nat.c: All implementations adjusted.
7987 * gnu-nat.h: All implementations adjusted.
7988 * go32-nat.c: All implementations adjusted.
7989 * ia64-linux-nat.c: All implementations adjusted.
7990 * inf-child.c: All implementations adjusted.
7991 * inf-child.h: All implementations adjusted.
7992 * inf-ptrace.c: All implementations adjusted.
7993 * inf-ptrace.h: All implementations adjusted.
7994 * linux-nat.c: All implementations adjusted.
7995 * linux-nat.h: All implementations adjusted.
7996 * mips-linux-nat.c: All implementations adjusted.
7997 * nto-procfs.c: All implementations adjusted.
7998 * ppc-linux-nat.c: All implementations adjusted.
7999 * procfs.c: All implementations adjusted.
8000 * ravenscar-thread.c: All implementations adjusted.
8001 * record-btrace.c: All implementations adjusted.
8002 * record-full.c: All implementations adjusted.
8003 * remote-sim.c: All implementations adjusted.
8004 * remote.c: All implementations adjusted.
8005 * s390-linux-nat.c: All implementations adjusted.
8006 * sol-thread.c: All implementations adjusted.
8007 * spu-multiarch.c: All implementations adjusted.
8008 * target-delegates.c: All implementations adjusted.
8009 * target.c: All implementations adjusted.
8010 * target.h: All implementations adjusted.
8011 * tracefile-tfile.c: All implementations adjusted.
8012 * tracefile.c: All implementations adjusted.
8013 * tracefile.h: All implementations adjusted.
8014 * windows-nat.c: All implementations adjusted.
8015 * x86-linux-nat.h: All implementations adjusted.
8016 * x86-nat.h: All implementations adjusted.
8020 * make-target-delegates (scan_target_h): Don't trim lines here.
8021 Replace sequences of tabs and/or whitespace with a single
8023 (top level, parsing methods): Trim each line before processing it
8029 * target.h (enum strata) <debug_stratum>: New.
8030 (struct target_ops) <all delegation methods>: Replace by C++
8031 virtual methods, and drop "to_" prefix. All references updated
8033 <to_shortname, to_longname, to_doc, to_data,
8034 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8035 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8036 virtual methods. All references updated throughout.
8037 <can_attach, supports_terminal_ours, can_create_inferior,
8038 get_thread_control_capabilities, attach_no_wait>: New
8040 <insert_breakpoint, remove_breakpoint>: Now
8041 TARGET_DEFAULT_NORETURN methods.
8042 <info_proc>: Now returns bool.
8044 (OPS_MAGIC): Delete.
8045 (current_target): Delete. All references replaced by references
8047 (target_stack): ... this. New.
8048 (target_shortname, target_longname): Adjust.
8049 (target_can_run): Now a function declaration.
8050 (default_child_has_all_memory, default_child_has_memory)
8051 (default_child_has_stack, default_child_has_registers)
8052 (default_child_has_execution): Remove target_ops parameter.
8053 (complete_target_initialization): Delete.
8054 (memory_breakpoint_target): New template class.
8055 (test_target_ops): Refactor as a C++ class with virtual methods.
8056 * make-target-delegates (NAME_PART): Tighten.
8057 (POINTER_PART, CP_SYMBOL): New.
8058 (SIMPLE_RETURN_PART): Reimplement.
8059 (VEC_RETURN_PART): Expect less.
8060 (RETURN_PART, VIRTUAL_PART): New.
8061 (METHOD): Adjust to C++ virtual methods.
8062 (scan_target_h): Remove reference to C99.
8063 (dname): Output "target_ops::" prefix.
8064 (write_function_header): Adjust to output a C++ class method.
8065 (write_declaration): New.
8066 (write_delegator): Adjust to output a C++ class method.
8067 (tdname): Output "dummy_target::" prefix.
8068 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8070 (tdefault_names, debug_names): Delete.
8071 (return_types, tdefaults, styles, argtypes_array): New.
8072 (top level): All methods are delegators.
8074 (top level): Print dummy_target and debug_target classes.
8075 * target-delegates.c: Regenerate.
8076 * target-debug.h (target_debug_print_enum_info_proc_what)
8077 (target_debug_print_thread_control_capabilities)
8078 (target_debug_print_thread_info_p): New.
8079 * target.c (dummy_target): Delete.
8080 (the_dummy_target, the_debug_target): New.
8081 (target_stack): Now extern.
8082 (set_targetdebug): Push/unpush debug target.
8083 (default_child_has_all_memory, default_child_has_memory)
8084 (default_child_has_stack, default_child_has_registers)
8085 (default_child_has_execution): Remove target_ops parameter.
8086 (complete_target_initialization): Delete.
8087 (add_target_with_completer): No longer call
8088 complete_target_initialization.
8089 (target_supports_terminal_ours): Use regular delegation.
8090 (update_current_target): Delete.
8091 (push_target): No longer check magic number. Don't call
8092 update_current_target.
8093 (unpush_target): Don't call update_current_target.
8094 (target_is_pushed): No longer check magic number.
8095 (target_require_runnable): Skip for all stratums over
8097 (target_ops::info_proc): New.
8098 (target_info_proc): Use find_target_at and
8099 find_default_run_target.
8100 (target_supports_disable_randomization): Use regular delegation.
8101 (target_get_osdata): Use find_target_at.
8102 (target_ops::open, target_ops::close, target_ops::can_attach)
8103 (target_ops::attach, target_ops::can_create_inferior)
8104 (target_ops::create_inferior, target_ops::can_run)
8105 (target_can_run): New.
8106 (default_fileio_target): Use regular delegation.
8107 (target_ops::fileio_open, target_ops::fileio_pwrite)
8108 (target_ops::fileio_pread, target_ops::fileio_fstat)
8109 (target_ops::fileio_close, target_ops::fileio_unlink)
8110 (target_ops::fileio_readlink): New.
8111 (target_fileio_open_1, target_fileio_unlink)
8112 (target_fileio_readlink): Always call the target method. Handle
8114 (return_zero, return_zero_has_execution): Delete.
8115 (init_dummy_target): Delete.
8116 (dummy_target::dummy_target, dummy_target::shortname)
8117 (dummy_target::longname, dummy_target::doc)
8118 (debug_target::debug_target, debug_target::shortname)
8119 (debug_target::longname, debug_target::doc): New.
8120 (target_supports_delete_record): Use regular delegation.
8121 (setup_target_debug): Delete.
8122 (maintenance_print_target_stack): Skip debug_stratum.
8123 (initialize_targets): Instantiate the_dummy_target and
8125 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8127 (target_auxv_search, fprint_target_auxv): Adjust.
8128 (info_auxv_command): Adjust to use target_stack.
8129 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8130 * exceptions.c (print_flush): Handle a NULL target_stack.
8131 * regcache.c (target_ops_no_register): Refactor as class with
8134 * exec.c (exec_target): New class.
8135 (exec_ops): Now an exec_target.
8136 (exec_open, exec_close_1, exec_get_section_table)
8137 (exec_xfer_partial, exec_files_info, exec_has_memory)
8138 (exec_make_note_section): Refactor as exec_target methods.
8139 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8141 (exec_target::find_memory_regions): New.
8142 (_initialize_exec): Don't call init_exec_ops.
8143 * gdbcore.h (exec_file_clear): Delete.
8145 * corefile.c (core_target): Delete.
8146 (core_file_command): Adjust.
8147 * corelow.c (core_target): New class.
8148 (the_core_target): New.
8149 (core_close): Remove target_ops parameter.
8150 (core_close_cleanup): Adjust.
8151 (core_target::close): New.
8152 (core_open, core_detach, get_core_registers, core_files_info)
8153 (core_xfer_partial, core_thread_alive, core_read_description)
8154 (core_pid_to_str, core_thread_name, core_has_memory)
8155 (core_has_stack, core_has_registers, core_info_proc): Rework as
8156 core_target methods.
8157 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8158 (_initialize_corelow): Initialize the_core_target.
8159 * gdbcore.h (core_target): Delete.
8160 (the_core_target): New.
8162 * ctf.c: (ctf_target): New class.
8163 (ctf_ops): Now a ctf_target.
8164 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8165 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8166 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8168 (init_ctf_ops): Delete.
8169 (_initialize_ctf): Don't call it.
8170 * tracefile-tfile.c (tfile_target): New class.
8171 (tfile_ops): Now a tfile_target.
8172 (tfile_open, tfile_close, tfile_files_info)
8173 (tfile_get_tracepoint_status, tfile_trace_find)
8174 (tfile_fetch_registers, tfile_xfer_partial)
8175 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8176 Refactor as tfile_target methods.
8177 (tfile_xfer_partial_features): Remove target_ops parameter.
8178 (init_tfile_ops): Delete.
8179 (_initialize_tracefile_tfile): Don't call it.
8180 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8181 (tracefile_has_stack, tracefile_has_registers)
8182 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8183 tracefile_target methods.
8184 (init_tracefile_ops): Delete.
8185 (tracefile_target::tracefile_target): New.
8186 * tracefile.h: Include "target.h".
8187 (tracefile_target): New class.
8188 (init_tracefile_ops): Delete.
8190 * spu-multiarch.c (spu_multiarch_target): New class.
8191 (spu_ops): Now a spu_multiarch_target.
8192 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8193 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8194 (spu_search_memory, spu_mourn_inferior): Refactor as
8195 spu_multiarch_target methods.
8196 (init_spu_ops): Delete.
8197 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8198 complete_target_initialization.
8200 * ravenscar-thread.c (ravenscar_thread_target): New class.
8201 (ravenscar_ops): Now a ravenscar_thread_target.
8202 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8203 (ravenscar_thread_alive, ravenscar_pid_to_str)
8204 (ravenscar_fetch_registers, ravenscar_store_registers)
8205 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8206 (ravenscar_stopped_by_hw_breakpoint)
8207 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8208 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8209 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8211 (init_ravenscar_thread_ops): Delete.
8212 (_initialize_ravenscar): Remove references to
8213 init_ravenscar_thread_ops and complete_target_initialization.
8215 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8216 (bsd_uthread_target): New class.
8217 (bsd_uthread_ops): Now a bsd_uthread_target.
8218 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8219 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8220 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8221 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8222 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8223 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8224 (bsd_uthread_target): Delete function.
8225 (_initialize_bsd_uthread): Remove reference to
8226 complete_target_initialization.
8228 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8229 (target_bfd): ... this new class.
8230 (target_bfd_xfer_partial, target_bfd_get_section_table)
8231 (target_bfd_close): Refactor as target_bfd methods.
8232 (target_bfd::~target_bfd): New.
8233 (target_bfd_reopen): Adjust.
8234 (target_bfd::close): New.
8236 * record-btrace.c (record_btrace_target): New class.
8237 (record_btrace_ops): Now a record_btrace_target.
8238 (record_btrace_open, record_btrace_stop_recording)
8239 (record_btrace_disconnect, record_btrace_close)
8240 (record_btrace_async, record_btrace_info)
8241 (record_btrace_insn_history, record_btrace_insn_history_range)
8242 (record_btrace_insn_history_from, record_btrace_call_history)
8243 (record_btrace_call_history_range)
8244 (record_btrace_call_history_from, record_btrace_record_method)
8245 (record_btrace_is_replaying, record_btrace_will_replay)
8246 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8247 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8248 (record_btrace_store_registers, record_btrace_prepare_to_store)
8249 (record_btrace_to_get_unwinder)
8250 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8251 (record_btrace_commit_resume, record_btrace_wait)
8252 (record_btrace_stop, record_btrace_can_execute_reverse)
8253 (record_btrace_stopped_by_sw_breakpoint)
8254 (record_btrace_supports_stopped_by_sw_breakpoint)
8255 (record_btrace_stopped_by_hw_breakpoint)
8256 (record_btrace_supports_stopped_by_hw_breakpoint)
8257 (record_btrace_update_thread_list, record_btrace_thread_alive)
8258 (record_btrace_goto_begin, record_btrace_goto_end)
8259 (record_btrace_goto, record_btrace_stop_replaying_all)
8260 (record_btrace_execution_direction)
8261 (record_btrace_prepare_to_generate_core)
8262 (record_btrace_done_generating_core): Refactor as
8263 record_btrace_target methods.
8264 (init_record_btrace_ops): Delete.
8265 (_initialize_record_btrace): Remove reference to
8266 init_record_btrace_ops.
8267 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8268 the execution_direction global.
8269 (record_full_base_target, record_full_target)
8270 (record_full_core_target): New classes.
8271 (record_full_ops): Now a record_full_target.
8272 (record_full_core_ops): Now a record_full_core_target.
8273 (record_full_target::detach, record_full_target::disconnect)
8274 (record_full_core_target::disconnect)
8275 (record_full_target::mourn_inferior, record_full_target::kill):
8277 (record_full_open, record_full_close, record_full_async): Refactor
8278 as methods of the record_full_base_target class.
8279 (record_full_resume, record_full_commit_resume): Refactor
8280 as methods of the record_full_target class.
8281 (record_full_wait, record_full_stopped_by_watchpoint)
8282 (record_full_stopped_data_address)
8283 (record_full_stopped_by_sw_breakpoint)
8284 (record_full_supports_stopped_by_sw_breakpoint)
8285 (record_full_stopped_by_hw_breakpoint)
8286 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8287 methods of the record_full_base_target class.
8288 (record_full_store_registers, record_full_xfer_partial)
8289 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8290 Refactor as methods of the record_full_target class.
8291 (record_full_can_execute_reverse, record_full_get_bookmark)
8292 (record_full_goto_bookmark, record_full_execution_direction)
8293 (record_full_record_method, record_full_info, record_full_delete)
8294 (record_full_is_replaying, record_full_will_replay)
8295 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8296 (record_full_stop_replaying): Refactor as methods of the
8297 record_full_base_target class.
8298 (record_full_core_resume, record_full_core_kill)
8299 (record_full_core_fetch_registers)
8300 (record_full_core_prepare_to_store)
8301 (record_full_core_store_registers, record_full_core_xfer_partial)
8302 (record_full_core_insert_breakpoint)
8303 (record_full_core_remove_breakpoint)
8304 (record_full_core_has_execution): Refactor
8305 as methods of the record_full_core_target class.
8306 (record_full_base_target::supports_delete_record): New.
8307 (init_record_full_ops): Delete.
8308 (init_record_full_core_ops): Delete.
8309 (record_full_save): Refactor as method of the
8310 record_full_base_target class.
8311 (_initialize_record_full): Remove references to
8312 init_record_full_ops and init_record_full_core_ops.
8314 * remote.c (remote_target, extended_remote_target): New classes.
8315 (remote_ops): Now a remote_target.
8316 (extended_remote_ops): Now an extended_remote_target.
8317 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8318 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8319 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8320 (remote_pass_signals, remote_set_syscall_catchpoint)
8321 (remote_program_signals, )
8322 (remote_thread_always_alive): Remove target_ops parameter.
8323 (remote_thread_alive, remote_thread_name)
8324 (remote_update_thread_list, remote_threads_extra_info)
8325 (remote_static_tracepoint_marker_at)
8326 (remote_static_tracepoint_markers_by_strid)
8327 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8328 (remote_open): Refactor as methods of remote_target.
8329 (extended_remote_open, extended_remote_detach)
8330 (extended_remote_attach, extended_remote_post_attach):
8331 (extended_remote_supports_disable_randomization)
8332 (extended_remote_create_inferior): : Refactor as method of
8333 extended_remote_target.
8334 (remote_set_permissions, remote_open_1, remote_detach)
8335 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8336 (remote_resume, remote_commit_resume, remote_stop)
8337 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8338 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8339 (remote_prepare_to_store, remote_store_registers)
8340 (remote_flash_erase, remote_flash_done, remote_files_info)
8341 (remote_kill, remote_mourn, remote_insert_breakpoint)
8342 (remote_remove_breakpoint, remote_insert_watchpoint)
8343 (remote_watchpoint_addr_within_range)
8344 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8345 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8346 (remote_supports_stopped_by_sw_breakpoint)
8347 (remote_stopped_by_hw_breakpoint)
8348 (remote_supports_stopped_by_hw_breakpoint)
8349 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8350 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8351 (remote_verify_memory): Refactor as methods of remote_target.
8352 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8354 (remote_xfer_partial, remote_get_memory_xfer_limit)
8355 (remote_search_memory, remote_rcmd, remote_memory_map)
8356 (remote_pid_to_str, remote_get_thread_local_address)
8357 (remote_get_tib_address, remote_read_description): Refactor as
8358 methods of remote_target.
8359 (remote_target::fileio_open, remote_target::fileio_pwrite)
8360 (remote_target::fileio_pread, remote_target::fileio_close): New.
8361 (remote_hostio_readlink, remote_hostio_fstat)
8362 (remote_filesystem_is_local, remote_can_execute_reverse)
8363 (remote_supports_non_stop, remote_supports_disable_randomization)
8364 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8365 (remote_supports_enable_disable_tracepoint)
8366 (remote_supports_string_tracing)
8367 (remote_can_run_breakpoint_commands, remote_trace_init)
8368 (remote_download_tracepoint, remote_can_download_tracepoint)
8369 (remote_download_trace_state_variable, remote_enable_tracepoint)
8370 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8371 (remote_trace_start, remote_get_trace_status)
8372 (remote_get_tracepoint_status, remote_trace_stop)
8373 (remote_trace_find, remote_get_trace_state_variable_value)
8374 (remote_save_trace_data, remote_get_raw_trace_data)
8375 (remote_set_disconnected_tracing, remote_core_of_thread)
8376 (remote_set_circular_trace_buffer, remote_traceframe_info)
8377 (remote_get_min_fast_tracepoint_insn_len)
8378 (remote_set_trace_buffer_size, remote_set_trace_notes)
8379 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8380 (remote_disable_btrace, remote_teardown_btrace)
8381 (remote_read_btrace, remote_btrace_conf)
8382 (remote_augmented_libraries_svr4_read, remote_load)
8383 (remote_pid_to_exec_file, remote_can_do_single_step)
8384 (remote_execution_direction, remote_thread_handle_to_thread_info):
8385 Refactor as methods of remote_target.
8386 (init_remote_ops, init_extended_remote_ops): Delete.
8387 (remote_can_async_p, remote_is_async_p, remote_async)
8388 (remote_thread_events, remote_upload_tracepoints)
8389 (remote_upload_trace_state_variables): Refactor as methods of
8391 (_initialize_remote): Remove references to init_remote_ops and
8392 init_extended_remote_ops.
8394 * remote-sim.c (gdbsim_target): New class.
8395 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8396 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8397 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8398 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8399 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8400 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8401 Refactor as methods of gdbsim_target.
8402 (gdbsim_ops): Now a gdbsim_target.
8403 (init_gdbsim_ops): Delete.
8404 (gdbsim_cntrl_c): Adjust.
8405 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8407 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8408 (the_amd64_linux_nat_target): New.
8409 (amd64_linux_fetch_inferior_registers)
8410 (amd64_linux_store_inferior_registers): Refactor as methods of
8411 amd64_linux_nat_target.
8412 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8413 * i386-linux-nat.c: Don't include "linux-nat.h".
8414 (i386_linux_nat_target): New class.
8415 (the_i386_linux_nat_target): New.
8416 (i386_linux_fetch_inferior_registers)
8417 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8418 as methods of i386_linux_nat_target.
8419 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8420 * inf-child.c (inf_child_ops): Delete.
8421 (inf_child_fetch_inferior_registers)
8422 (inf_child_store_inferior_registers): Delete.
8423 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8424 methods of inf_child_target.
8425 (inf_child_target::supports_terminal_ours)
8426 (inf_child_target::terminal_init)
8427 (inf_child_target::terminal_inferior)
8428 (inf_child_target::terminal_ours_for_output)
8429 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8430 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8432 (inf_child_open, inf_child_disconnect, inf_child_close)
8433 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8434 (inf_child_post_startup_inferior, inf_child_can_run)
8435 (inf_child_pid_to_exec_file): Refactor as methods of
8437 (inf_child_follow_fork): Delete.
8438 (inf_child_target::can_create_inferior)
8439 (inf_child_target::can_attach): New.
8440 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8441 (inf_child_target::has_stack, inf_child_target::has_registers)
8442 (inf_child_target::has_execution): New.
8443 (inf_child_fileio_open, inf_child_fileio_pwrite)
8444 (inf_child_fileio_pread, inf_child_fileio_fstat)
8445 (inf_child_fileio_close, inf_child_fileio_unlink)
8446 (inf_child_fileio_readlink, inf_child_use_agent)
8447 (inf_child_can_use_agent): Refactor as methods of
8449 (return_zero, inf_child_target): Delete.
8450 (inf_child_target::inf_child_target): New.
8451 * inf-child.h: Include "target.h".
8452 (inf_child_target): Delete function prototype.
8453 (inf_child_target): New class.
8454 (inf_child_open_target, inf_child_mourn_inferior)
8455 (inf_child_maybe_unpush_target): Delete.
8456 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8457 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8458 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8459 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8460 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8461 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8462 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8463 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8464 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8465 methods of inf_ptrace_target.
8466 (inf_ptrace_target): Delete function.
8467 * inf-ptrace.h: Include "inf-child.h".
8468 (inf_ptrace_target): Delete function declaration.
8469 (inf_ptrace_target): New class.
8470 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8471 * linux-nat.c (linux_target): New.
8472 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8473 (linux_nat_target::~linux_nat_target): New.
8474 (linux_child_post_attach, linux_child_post_startup_inferior)
8475 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8476 (linux_child_remove_fork_catchpoint)
8477 (linux_child_insert_vfork_catchpoint)
8478 (linux_child_remove_vfork_catchpoint)
8479 (linux_child_insert_exec_catchpoint)
8480 (linux_child_remove_exec_catchpoint)
8481 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8482 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8483 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8484 (linux_nat_stopped_data_address)
8485 (linux_nat_stopped_by_sw_breakpoint)
8486 (linux_nat_supports_stopped_by_sw_breakpoint)
8487 (linux_nat_stopped_by_hw_breakpoint)
8488 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8489 (linux_nat_kill, linux_nat_mourn_inferior)
8490 (linux_nat_xfer_partial, linux_nat_thread_alive)
8491 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8492 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8493 (linux_child_static_tracepoint_markers_by_strid)
8494 (linux_nat_is_async_p, linux_nat_can_async_p)
8495 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8496 (linux_nat_supports_multi_process)
8497 (linux_nat_supports_disable_randomization, linux_nat_async)
8498 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8499 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8500 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8501 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8502 methods of linux_nat_target.
8503 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8504 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8506 (check_stopped_by_watchpoint): Adjust.
8507 (linux_xfer_partial): Delete.
8508 (linux_target_install_ops, linux_target, linux_nat_add_target):
8510 (linux_nat_target::linux_nat_target): New.
8511 * linux-nat.h: Include "inf-ptrace.h".
8512 (linux_nat_target): New.
8513 (linux_target, linux_target_install_ops, linux_nat_add_target):
8514 Delete function declarations.
8515 (linux_target): Declare global.
8516 * linux-thread-db.c (thread_db_target): New.
8517 (thread_db_target::thread_db_target): New.
8518 (thread_db_ops): Delete.
8519 (the_thread_db_target): New.
8520 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8521 (thread_db_update_thread_list, thread_db_pid_to_str)
8522 (thread_db_extra_thread_info)
8523 (thread_db_thread_handle_to_thread_info)
8524 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8525 (thread_db_resume): Refactor as methods of thread_db_target.
8526 (init_thread_db_ops): Delete.
8527 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8528 * x86-linux-nat.c: Don't include "linux-nat.h".
8529 (super_post_startup_inferior): Delete.
8530 (x86_linux_nat_target::~x86_linux_nat_target): New.
8531 (x86_linux_child_post_startup_inferior)
8532 (x86_linux_read_description, x86_linux_enable_btrace)
8533 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8534 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8535 methods of x86_linux_nat_target.
8536 (x86_linux_create_target): Delete. Bits folded ...
8537 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8539 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8540 (x86_linux_nat_target): New class.
8541 (x86_linux_create_target): Delete.
8542 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8543 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8544 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8545 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8546 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8547 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8549 (x86_use_watchpoints): Delete.
8550 * x86-nat.h: Include "breakpoint.h" and "target.h".
8551 (x86_use_watchpoints): Delete.
8552 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8553 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8554 (x86_insert_watchpoint, x86_remove_watchpoint)
8555 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8556 (x86_stopped_by_hw_breakpoint): New declarations.
8557 (x86_nat_target): New template class.
8559 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8560 (the_ppc_linux_nat_target): New.
8561 (ppc_linux_fetch_inferior_registers)
8562 (ppc_linux_can_use_hw_breakpoint)
8563 (ppc_linux_region_ok_for_hw_watchpoint)
8564 (ppc_linux_ranged_break_num_registers)
8565 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8566 (ppc_linux_insert_mask_watchpoint)
8567 (ppc_linux_remove_mask_watchpoint)
8568 (ppc_linux_can_accel_watchpoint_condition)
8569 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8570 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8571 (ppc_linux_watchpoint_addr_within_range)
8572 (ppc_linux_masked_watch_num_registers)
8573 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8574 (ppc_linux_read_description): Refactor as methods of
8575 ppc_linux_nat_target.
8576 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8578 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8579 (procfs_target): New class.
8580 (the_procfs_target): New.
8581 (procfs_target): Delete function.
8582 (procfs_auxv_parse, procfs_attach, procfs_detach)
8583 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8584 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8585 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8586 (procfs_create_inferior, procfs_update_thread_list)
8587 (procfs_thread_alive, procfs_pid_to_str)
8588 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8589 (procfs_stopped_data_address, procfs_insert_watchpoint)
8590 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8591 (proc_find_memory_regions, procfs_info_proc)
8592 (procfs_make_note_section): Refactor as methods of procfs_target.
8593 (_initialize_procfs): Adjust.
8594 * sol-thread.c (sol_thread_target): New class.
8595 (sol_thread_ops): Now a sol_thread_target.
8596 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8597 (sol_thread_fetch_registers, sol_thread_store_registers)
8598 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8599 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8600 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8601 (init_sol_thread_ops): Delete.
8602 (_initialize_sol_thread): Adjust. Remove references to
8603 init_sol_thread_ops and complete_target_initialization.
8605 * windows-nat.c (windows_nat_target): New class.
8606 (windows_fetch_inferior_registers)
8607 (windows_store_inferior_registers, windows_resume, windows_wait)
8608 (windows_attach, windows_detach, windows_pid_to_exec_file)
8609 (windows_files_info, windows_create_inferior)
8610 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8611 (windows_close, windows_pid_to_str, windows_xfer_partial)
8612 (windows_get_tib_address, windows_get_ada_task_ptid)
8613 (windows_thread_name, windows_thread_alive): Refactor as
8614 windows_nat_target methods.
8615 (do_initial_windows_stuff): Adjust.
8616 (windows_target): Delete function.
8617 (_initialize_windows_nat): Adjust.
8619 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8620 (darwin_mourn_inferior, darwin_kill_inferior)
8621 (darwin_create_inferior, darwin_attach, darwin_detach)
8622 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8623 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8624 (darwin_supports_multi_process): Refactor as darwin_nat_target
8626 (darwin_resume_to, darwin_files_info): Delete.
8627 (_initialize_darwin_inferior): Rename to ...
8628 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8629 * darwin-nat.h: Include "inf-child.h".
8630 (darwin_nat_target): New class.
8631 (darwin_complete_target): Delete.
8632 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8633 (darwin_target): New.
8634 (i386_darwin_fetch_inferior_registers)
8635 (i386_darwin_store_inferior_registers): Refactor as methods of
8637 (darwin_complete_target): Delete, with ...
8638 (_initialize_i386_darwin_nat): ... bits factored out here.
8640 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8641 (the_alpha_linux_nat_target): New.
8642 (alpha_linux_register_u_offset): Refactor as
8643 alpha_linux_nat_target method.
8644 (_initialize_alpha_linux_nat): Adjust.
8645 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8646 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8647 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8648 methods of linux_nat_trad_target.
8649 (linux_trad_target): Delete.
8650 * linux-nat-trad.h (linux_trad_target): Delete function.
8651 (linux_nat_trad_target): New class.
8652 * mips-linux-nat.c (mips_linux_nat_target): New class.
8653 (super_fetch_registers, super_store_registers, super_close):
8655 (the_mips_linux_nat_target): New.
8656 (mips64_linux_regsets_fetch_registers)
8657 (mips64_linux_regsets_store_registers)
8658 (mips64_linux_fetch_registers, mips64_linux_store_registers)
8659 (mips_linux_register_u_offset, mips_linux_read_description)
8660 (mips_linux_can_use_hw_breakpoint)
8661 (mips_linux_stopped_by_watchpoint)
8662 (mips_linux_stopped_data_address)
8663 (mips_linux_region_ok_for_hw_watchpoint)
8664 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8665 (mips_linux_close): Refactor as methods of mips_linux_nat.
8666 (_initialize_mips_linux_nat): Adjust to C++ification.
8668 * aix-thread.c (aix_thread_target): New class.
8669 (aix_thread_ops): Now an aix_thread_target.
8670 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8671 (aix_thread_fetch_registers, aix_thread_store_registers)
8672 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8673 (aix_thread_thread_alive, aix_thread_pid_to_str)
8674 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8675 Refactor as methods of aix_thread_target.
8676 (init_aix_thread_ops): Delete.
8677 (_initialize_aix_thread): Remove references to init_aix_thread_ops
8678 and complete_target_initialization.
8679 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8680 (rs6000_nat_target): New class.
8681 (the_rs6000_nat_target): New.
8682 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8683 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8684 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8685 (super_create_inferior): Delete.
8686 (_initialize_rs6000_nat): Adjust to C++ification.
8688 * arm-linux-nat.c (arm_linux_nat_target): New class.
8689 (the_arm_linux_nat_target): New.
8690 (arm_linux_fetch_inferior_registers)
8691 (arm_linux_store_inferior_registers, arm_linux_read_description)
8692 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8693 (arm_linux_remove_hw_breakpoint)
8694 (arm_linux_region_ok_for_hw_watchpoint)
8695 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8696 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8697 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8698 arm_linux_nat_target.
8699 (_initialize_arm_linux_nat): Adjust to C++ification.
8701 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8702 (the_aarch64_linux_nat_target): New.
8703 (aarch64_linux_fetch_inferior_registers)
8704 (aarch64_linux_store_inferior_registers)
8705 (aarch64_linux_child_post_startup_inferior)
8706 (aarch64_linux_read_description)
8707 (aarch64_linux_can_use_hw_breakpoint)
8708 (aarch64_linux_insert_hw_breakpoint)
8709 (aarch64_linux_remove_hw_breakpoint)
8710 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8711 (aarch64_linux_region_ok_for_hw_watchpoint)
8712 (aarch64_linux_stopped_data_address)
8713 (aarch64_linux_stopped_by_watchpoint)
8714 (aarch64_linux_watchpoint_addr_within_range)
8715 (aarch64_linux_can_do_single_step): Refactor as methods of
8716 aarch64_linux_nat_target.
8717 (super_post_startup_inferior): Delete.
8718 (_initialize_aarch64_linux_nat): Adjust to C++ification.
8720 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8721 (the_hppa_linux_nat_target): New.
8722 (hppa_linux_fetch_inferior_registers)
8723 (hppa_linux_store_inferior_registers): Refactor as methods of
8724 hppa_linux_nat_target.
8725 (_initialize_hppa_linux_nat): Adjust to C++ification.
8727 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8728 (the_ia64_linux_nat_target): New.
8729 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8730 (ia64_linux_stopped_data_address)
8731 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8732 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8733 ia64_linux_nat_target methods.
8734 (super_xfer_partial): Delete.
8735 (_initialize_ia64_linux_nat): Adjust to C++ification.
8737 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8738 (the_m32r_linux_nat_target): New.
8739 (m32r_linux_fetch_inferior_registers)
8740 (m32r_linux_store_inferior_registers): Refactor as
8741 m32r_linux_nat_target methods.
8742 (_initialize_m32r_linux_nat): Adjust to C++ification.
8744 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8745 (the_m68k_linux_nat_target): New.
8746 (m68k_linux_fetch_inferior_registers)
8747 (m68k_linux_store_inferior_registers): Refactor as
8748 m68k_linux_nat_target methods.
8749 (_initialize_m68k_linux_nat): Adjust to C++ification.
8751 * s390-linux-nat.c (s390_linux_nat_target): New class.
8752 (the_s390_linux_nat_target): New.
8753 (s390_linux_fetch_inferior_registers)
8754 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8755 (s390_insert_watchpoint, s390_remove_watchpoint)
8756 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8757 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8758 (s390_auxv_parse, s390_read_description): Refactor as methods of
8759 s390_linux_nat_target.
8760 (_initialize_s390_nat): Adjust to C++ification.
8762 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8763 (the_sparc_linux_nat_target): New.
8764 (_initialize_sparc_linux_nat): Adjust to C++ification.
8765 * sparc-nat.c (sparc_fetch_inferior_registers)
8766 (sparc_store_inferior_registers): Remove target_ops parameter.
8767 * sparc-nat.h (sparc_fetch_inferior_registers)
8768 (sparc_store_inferior_registers): Remove target_ops parameter.
8769 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8770 (the_sparc64_linux_nat_target): New.
8771 (_initialize_sparc64_linux_nat): Adjust to C++ification.
8773 * spu-linux-nat.c (spu_linux_nat_target): New class.
8774 (the_spu_linux_nat_target): New.
8775 (spu_child_post_startup_inferior, spu_child_post_attach)
8776 (spu_child_wait, spu_fetch_inferior_registers)
8777 (spu_store_inferior_registers, spu_xfer_partial)
8778 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8780 (_initialize_spu_nat): Adjust to C++ification.
8782 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8783 (the_tilegx_linux_nat_target): New.
8784 (fetch_inferior_registers, store_inferior_registers):
8785 Refactor as methods.
8786 (_initialize_tile_linux_nat): Adjust to C++ification.
8788 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8789 (the_xtensa_linux_nat_target): New.
8790 (xtensa_linux_fetch_inferior_registers)
8791 (xtensa_linux_store_inferior_registers): Refactor as
8792 xtensa_linux_nat_target methods.
8793 (_initialize_xtensa_linux_nat): Adjust to C++ification.
8795 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8796 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8797 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8798 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8799 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8800 (fbsd_stopped_by_sw_breakpoint)
8801 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8802 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8803 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8804 (fbsd_post_startup_inferior, fbsd_post_attach)
8805 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8806 (fbsd_set_syscall_catchpoint)
8807 (super_xfer_partial, super_resume, super_wait)
8808 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8809 (fbsd_handle_debug_trap): Remove target_ops parameter.
8810 (fbsd_nat_add_target): Delete.
8811 * fbsd-nat.h: Include "inf-ptrace.h".
8812 (fbsd_nat_add_target): Delete.
8813 (USE_SIGTRAP_SIGINFO): Define.
8814 (fbsd_nat_target): New class.
8816 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8817 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8818 (amd64bsd_target): Delete.
8819 * amd64-bsd-nat.h: New file.
8820 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8822 (amd64_fbsd_nat_target): New class.
8823 (the_amd64_fbsd_nat_target): New.
8824 (amd64fbsd_read_description): Refactor as method of
8825 amd64_fbsd_nat_target.
8826 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8827 (_initialize_amd64fbsd_nat): Adjust to C++ification.
8828 * amd64-nat.h (amd64bsd_target): Delete function declaration.
8829 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8830 (i386bsd_store_inferior_registers): Remove target_ops parameter.
8831 (i386bsd_target): Delete.
8832 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8833 (i386bsd_fetch_inferior_registers)
8834 (i386bsd_store_inferior_registers): Declare.
8835 (i386_bsd_nat_target): New class.
8836 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8837 (the_i386_fbsd_nat_target): New.
8838 (i386fbsd_resume, i386fbsd_read_description): Refactor as
8839 i386_fbsd_nat_target methods.
8840 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8841 (_initialize_i386fbsd_nat): Adjust to C++ification.
8842 * x86-bsd-nat.c (super_mourn_inferior): Delete.
8843 (x86bsd_mourn_inferior, x86bsd_target): Delete.
8844 (_initialize_x86_bsd_nat): Adjust to C++ification.
8845 * x86-bsd-nat.h: Include "x86-nat.h".
8846 (x86bsd_target): Delete declaration.
8847 (x86bsd_nat_target): New class.
8849 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8850 (the_aarch64_fbsd_nat_target): New.
8851 (aarch64_fbsd_fetch_inferior_registers)
8852 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8853 aarch64_fbsd_nat_target.
8854 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8855 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8856 (the_alpha_bsd_nat_target): New.
8857 (alphabsd_fetch_inferior_registers)
8858 (alphabsd_store_inferior_registers): Refactor as
8859 alpha_bsd_nat_target methods.
8860 (_initialize_alphabsd_nat): Refactor as methods of
8861 alpha_bsd_nat_target.
8862 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8863 (the_amd64_nbsd_nat_target): New.
8864 (_initialize_amd64nbsd_nat): Adjust to C++ification.
8865 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8866 (the_amd64_obsd_nat_target): New.
8867 (_initialize_amd64obsd_nat): Adjust to C++ification.
8868 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8869 (the_arm_fbsd_nat_target): New.
8870 (arm_fbsd_fetch_inferior_registers)
8871 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8872 (_initialize_arm_fbsd_nat): Refactor as methods of
8873 arm_fbsd_nat_target.
8874 (_initialize_arm_fbsd_nat): Adjust to C++ification.
8875 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8876 (the_arm_netbsd_nat_target): New.
8877 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8878 arm_netbsd_nat_target.
8879 (_initialize_arm_netbsd_nat): Adjust to C++ification.
8880 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8881 (the_hppa_nbsd_nat_target): New.
8882 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8883 hppa_nbsd_nat_target methods.
8884 (_initialize_hppanbsd_nat): Adjust to C++ification.
8885 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8886 (the_hppa_obsd_nat_target): New.
8887 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8888 methods of hppa_obsd_nat_target.
8889 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
8891 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8892 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
8894 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8895 (_initialize_i386obsd_nat): Use add_target.
8896 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8897 (the_m68k_bsd_nat_target): New.
8898 (m68kbsd_fetch_inferior_registers)
8899 (m68kbsd_store_inferior_registers): Refactor as methods of
8900 m68k_bsd_nat_target.
8901 (_initialize_m68kbsd_nat): Adjust to C++ification.
8902 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8903 (the_mips_fbsd_nat_target): New.
8904 (mips_fbsd_fetch_inferior_registers)
8905 (mips_fbsd_store_inferior_registers): Refactor as methods of
8906 mips_fbsd_nat_target.
8907 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
8909 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8910 (the_mips_nbsd_nat_target): New.
8911 (mipsnbsd_fetch_inferior_registers)
8912 (mipsnbsd_store_inferior_registers): Refactor as methods of
8913 mips_nbsd_nat_target.
8914 (_initialize_mipsnbsd_nat): Adjust to C++ification.
8915 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8916 (the_mips64_obsd_nat_target): New.
8917 (mips64obsd_fetch_inferior_registers)
8918 (mips64obsd_store_inferior_registers): Refactor as methods of
8919 mips64_obsd_nat_target.
8920 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
8922 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8924 * nbsd-nat.h: Include "inf-ptrace.h".
8925 (nbsd_nat_target): New class.
8926 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8927 (obsd_wait): Refactor as methods of obsd_nat_target.
8928 (obsd_add_target): Delete.
8929 * obsd-nat.h: Include "inf-ptrace.h".
8930 (obsd_nat_target): New class.
8931 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8932 (the_ppc_fbsd_nat_target): New.
8933 (ppcfbsd_fetch_inferior_registers)
8934 (ppcfbsd_store_inferior_registers): Refactor as methods of
8935 ppc_fbsd_nat_target.
8936 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
8938 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8939 (the_ppc_nbsd_nat_target): New.
8940 (ppcnbsd_fetch_inferior_registers)
8941 (ppcnbsd_store_inferior_registers): Refactor as methods of
8942 ppc_nbsd_nat_target.
8943 (_initialize_ppcnbsd_nat): Adjust to C++ification.
8944 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8945 (the_ppc_obsd_nat_target): New.
8946 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8947 methods of ppc_obsd_nat_target.
8948 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
8950 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8951 (the_sh_nbsd_nat_target): New.
8952 (shnbsd_fetch_inferior_registers)
8953 (shnbsd_store_inferior_registers): Refactor as methods of
8955 (_initialize_shnbsd_nat): Adjust to C++ification.
8956 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8957 (inf_ptrace_xfer_partial): Delete.
8958 (sparc_xfer_partial, sparc_target): Delete.
8959 * sparc-nat.h (sparc_fetch_inferior_registers)
8960 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8961 (sparc_target): Delete function declaration.
8962 (sparc_target): New template class.
8963 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8964 (_initialize_sparcnbsd_nat): Adjust to C++ification.
8965 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8966 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
8968 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8969 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8970 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8971 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
8973 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8974 (the_vax_bsd_nat_target): New.
8975 (vaxbsd_fetch_inferior_registers)
8976 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8978 (_initialize_vaxbsd_nat): Adjust to C++ification.
8980 * bsd-kvm.c (bsd_kvm_target): New class.
8981 (bsd_kvm_ops): Now a bsd_kvm_target.
8982 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8983 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8984 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8986 (bsd_kvm_return_one): Delete.
8987 (bsd_kvm_add_target): Adjust to C++ification.
8989 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8990 (nto_procfs_target_procfs): New classes.
8991 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8992 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8993 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8994 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8995 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8996 (procfs_remove_hw_breakpoint, procfs_resume)
8997 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8998 (procfs_kill_inferior, procfs_store_registers)
8999 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9000 as methods of nto_procfs_target.
9001 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9002 (nto_native_ops): Delete.
9003 (procfs_open, procfs_native_open): Delete.
9004 (nto_native_ops): Now an nto_procfs_target_native.
9005 (init_procfs_targets): Adjust to C++ification.
9006 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9007 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9008 Refactor as methods of nto_procfs_target.
9010 * go32-nat.c (go32_nat_target): New class.
9011 (the_go32_nat_target): New.
9012 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9013 (go32_store_registers, go32_xfer_partial, go32_files_info)
9014 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9015 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9016 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9017 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9018 (go32_target): Delete.
9019 (_initialize_go32_nat): Adjust to C++ification.
9021 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9022 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9023 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9024 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9026 (gnu_target): Delete.
9027 * gnu-nat.h (gnu_target): Delete.
9028 (gnu_nat_target): New class.
9029 * i386-gnu-nat.c (gnu_base_target): New.
9030 (i386_gnu_nat_target): New class.
9031 (the_i386_gnu_nat_target): New.
9032 (_initialize_i386gnu_nat): Adjust to C++ification.
9036 * bfd-target.c (target_bfd_xclose): Rename to ...
9037 (target_bfd_close): ... this.
9038 (target_bfd_reopen): Adjust.
9039 * target.c (target_close): Remove references to to_xclose.
9040 * target.h (target_ops::to_xclose): Delete.
9041 (target_ops::to_close): Update comments.
9045 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9047 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9048 * inf-ptrace.c (inf_ptrace_register_u_offset)
9049 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9050 (inf_ptrace_store_register, inf_ptrace_store_registers)
9051 (inf_ptrace_trad_target): Move to ...
9052 * linux-nat-trad.c: ... this new file.
9053 * linux-nat-trad.h: New file.
9054 * linux-nat.c (linux_target_install_ops): Make extern.
9055 (linux_trad_target): Delete.
9056 * linux-nat.h (linux_trad_target): Delete declaration.
9057 (linux_target_install_ops): Declare.
9058 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9063 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9064 procfs_target/add_target here.
9065 * procfs.c (procfs_target): Make static.
9066 (_initialize_procfs): Call add_target here.
9067 * procfs.h (struct target_ops): Remove forward declaration.
9068 (procfs_target): Remove declaration.
9069 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9073 * procfs.c (procfs_stopped_by_watchpoint)
9074 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9075 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9077 (procfs_use_watchpoints): Delete, move contents...
9078 (procfs_target): ... here.
9079 * procfs.h (procfs_use_watchpoints): Delete declaration.
9080 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9081 procfs_use_watchpoints.
9082 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9083 procfs_use_watchpoints.
9088 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9089 and var_zuinteger_unlimited.
9090 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9091 and PARAM_ZUINTEGER_UNLIMITED.
9092 (set_parameter_value): Handle var_zuinteger and
9093 var_zuinteger_unlimited.
9094 (add_setshow_generic): Likewise.
9095 (parmpy_init): Likewise.
9100 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9101 pointer is not null before dereferencing it.
9105 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9110 * breakpoint.c (mention): Remove use of is_mi_like_p.
9111 (print_mention_ranged_breakpoint): Likewise.
9112 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9117 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9121 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9122 (info_spu_event_command): Remove some uses of is_mi_like_p.
9126 * python/py-framefilter.c (py_print_single_arg)
9127 (enumerate_locals, py_print_args, py_print_frame): Remove some
9128 uses of is_mi_like_p.
9133 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9134 * ui-out.h (ui_out::is_mi_like_p): Now const.
9135 (ui_out::do_is_mi_like_p): Now const.
9136 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9140 * varobj.c (varobj_set_visualizer): Use new_reference.
9141 * python/python.c (gdbpy_decode_line): Use new_reference.
9142 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9147 * varobj.c (install_new_value): Use new_reference.
9148 * value.h (value_incref): Return void. Swap intro comment with
9150 * value.c (set_value_parent): Use new_reference.
9151 (value_incref): Return void. Update intro comment.
9152 (release_value): Use new_reference.
9153 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9157 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9158 * gdb_bfd.h (new_bfd_ref): Remove.
9159 (gdb_bfd_open): Update comment.
9160 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9161 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9162 (gdb_bfd_fdopenr): Use new_reference.
9163 * exec.c (exec_file_attach): Use new_reference.
9167 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9172 * jit.c (jit_read_code_entry): Use type_align.
9173 * i386-tdep.c (i386_gdbarch_init): Don't call
9174 set_gdbarch_long_long_align_bit.
9175 * gdbarch.sh: Remove long_long_align_bit.
9176 * gdbarch.c, gdbarch.h: Rebuild.
9177 * arc-tdep.c (arc_type_align): New function.
9178 (arc_gdbarch_init): Use arc_type_align. Don't call
9179 set_gdbarch_long_long_align_bit.
9183 * rust-lang.c (rust_type_alignment): Remove.
9184 (rust_composite_type): Use type_align.
9188 * NEWS: Mention Type.align.
9189 * python/py-type.c (typy_get_alignof): New function.
9190 (type_object_getset): Add "alignof".
9196 * std-operator.def (UNOP_ALIGNOF): New operator.
9197 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9199 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9200 * c-lang.c (c_op_print_tab): Add alignof.
9201 * c-exp.y (ALIGNOF): New token.
9202 (exp): Add "ALIGNOF" production.
9203 (ident_tokens): Add _Alignof and alignof.
9207 * i386-tdep.c (i386_type_align): New function.
9208 (i386_gdbarch_init): Update.
9209 * gdbarch.sh (type_align): New method.
9210 * gdbarch.c, gdbarch.h: Rebuild.
9211 * arch-utils.h (default_type_align): Declare.
9212 * arch-utils.c (default_type_align): New function.
9213 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9214 (struct type) <align_log2>: New field.
9215 <instance_flags>: Now a bitfield.
9216 (TYPE_RAW_ALIGN): New macro.
9217 (type_align, type_raw_align, set_type_align): Declare.
9218 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9220 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9221 (get_alignment, maybe_set_alignment): New functions.
9222 (read_structure_type, read_enumeration_type, read_array_type)
9223 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9224 (read_subrange_type, read_base_type): Set type alignment.
9228 * dwarf2read.c (read_index_from_section): Use bool.
9233 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9239 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9240 last step, and do it atomically.
9244 * compile/compile-c-types.c (convert_int, convert_float):
9250 * rust-lang.c (rust_inclusive_range_type_p): New function.
9251 (rust_range): Handle inclusive ranges.
9252 (rust_compute_range): Likewise.
9253 * rust-exp.y (struct rust_op) <inclusive>: New field.
9254 (DOTDOTEQ): New constant.
9255 (range_expr): Add "..=" productions.
9256 (operator_tokens): Add "..=" token.
9257 (ast_range): Add "inclusive" parameter.
9258 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9260 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9262 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9263 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9265 * expprint.c (print_subexp_standard): Handle new bounds values.
9266 (dump_subexp_body_standard): Likewise.
9270 * configure: Rebuild.
9271 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9272 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9274 (class symbol_needs_eval_context): Likewise.
9275 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9276 (mock_mapped_index::symbol_name_at): Use "override". Remove
9278 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9280 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9281 * aarch64-tdep.c (instruction_reader::read): Use "override".
9282 (instruction_reader_test::read): Likewise.
9283 * arm-tdep.c (instruction_reader::read): Use "override".
9284 (instruction_reader_thumb::read): Likewise.
9289 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9290 instead of remote_send.
9291 (remote_send): Remove.
9295 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9296 find_function_start_sal instead of find_pc_line.
9300 * breakpoint.c (set_breakpoint_location_function): Handle
9302 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9303 * elfread.c (elf_symtab_read): Give data symbols with
9304 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9305 (elf_rel_plt_read): Update comment.
9306 * linespec.c (convert_linespec_to_sals): Handle
9308 (minsym_found): Handle mst_data_gnu_ifunc.
9309 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9310 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9311 * parse.c (find_minsym_type_and_address): Handle
9313 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9314 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9315 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9317 <mst_data_gnu_ifunc>: New enumerator.
9321 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9322 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9323 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9325 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9326 (lookup_minimal_symbol_by_pc): Adjust.
9327 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9328 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9329 * minsyms.h (lookup_msym_prefer): New enum.
9330 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9331 parameter by a lookup_msym_prefer parameter.
9335 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9336 ends in "@plt" instead of looking at the symbol's section.
9340 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9342 (find_pc_partial_function_gnu_ifunc): Rename to ...
9343 (find_pc_partial_function): ... this, and remove references to
9345 (find_pc_partial_function): Delete old implementation.
9346 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9350 * linespec.c (struct bound_minimal_symbol_search_key): New.
9351 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9352 skip first line if we found a GNU ifunc minimal symbol by name.
9353 (compare_msymbols): Change parameters to work with a destructured
9355 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9360 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9361 ifunc targets here. Instead, if we have an ifunc minsym, use its
9363 (add_location_to_breakpoint): Store the minsym and the objfile in
9364 the breakpoint location.
9365 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9366 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9367 Record the minsym in the sal.
9368 * symtab.h (symtab_and_line) <msymbol>: New field.
9372 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9373 unless we actually resolved the ifunc.
9377 * c-exp.y (variable production): Prefer ifunc minsyms over
9378 regular function symbols.
9379 * symtab.c (find_gnu_ifunc): New function.
9380 * minsyms.h (lookup_msym_prefer): New enum.
9381 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9382 parameter by a lookup_msym_prefer parameter.
9383 * symtab.h (find_gnu_ifunc): New declaration.
9387 * blockframe.c (find_gnu_ifunc_target_type): New function.
9388 (find_function_type): New.
9389 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9390 return a value with a memory address.
9391 (eval_call): For calls to GNU ifunc functions, try to find the
9392 type of the target function from the type that the resolver
9394 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9396 * infcall.c (find_function_return_type): Delete.
9397 (find_function_addr): Add 'function_type' parameter. For calls to
9398 GNU ifunc functions, try to find the type of the target function
9399 from the type that the resolver returns, and return it via
9401 (call_function_by_hand_dummy): Adjust to use the function type
9402 returned by find_function_addr.
9403 (find_function_addr): Add 'function_type' parameter and move
9405 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9410 * c-exp.y (variable production): Skip finding an alias for ifunc
9415 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9419 * infcmd.c (kill_command): Print the pid as string, not the whole
9420 thread's ptid. Add comment. s/has been killed/killed/ in output
9422 * remote.c (remote_detach_1): Print the pid as string, not the
9423 whole thread's ptid.
9429 * infcmd.c (kill_command): Print message when inferior has
9431 * inferior.c (print_inferior_events): Remove 'static'. Set as
9433 (add_inferior): Improve message printed when
9434 'print_inferior_events' is on.
9435 (exit_inferior): Remove message printed when
9436 'print_inferior_events' is on.
9437 (detach_inferior): Improve message printed when
9438 'print_inferior_events' is on.
9439 (initialize_inferiors): Use 'add_inferior_silent' to set
9440 'current_inferior_'.
9441 * inferior.h (print_inferior_events): Declare here as
9443 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9444 '[Detaching...]' messages when 'print_inferior_events' is on.
9445 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9446 as prefix/suffix for messages. Remove periods. Fix erroneous
9447 'Detaching after fork from child...', replace it by '... from
9449 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9450 prefix/suffix when printing 'Detaching...' messages. Print
9451 them when 'print_inferior_events' is on.
9452 * remote.c (remote_detach_1): Print message when detaching
9453 from inferior and '!is_fork_parent'.
9457 * cli-out.h: Reindent.
9461 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9462 (cli_ui_out::do_field_string): Use fputs_filtered.
9463 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9467 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9468 gdb::unique_xmalloc_ptr.
9472 * configure: Rebuild.
9477 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9478 prepare_for_testing. Set normal_bp to r_debug_state if target
9484 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9485 * remote.c (extended_remote_attach): In all-stop mode, mark the
9486 thread as executing.
9490 * thread.c (thread_apply_all_command): Fix comment.
9491 (thread_command): Fix comment.
9495 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9497 * features/aarch64-core.c (create_feature_aarch64_core):
9499 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9501 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9503 * features/i386/32bit-avx512.c
9504 (create_feature_i386_32bit_avx512): Likewise.
9505 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9507 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9509 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9511 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9513 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9515 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9517 * features/i386/64bit-avx512.c
9518 (create_feature_i386_64bit_avx512): Likewise.
9519 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9521 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9523 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9525 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9527 * features/i386/64bit-segments.c
9528 (create_feature_i386_64bit_segments): Likewise.
9529 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9531 * features/i386/x32-core.c
9532 (create_feature_i386_x32_core): Likewise.
9533 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9534 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9535 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9536 * target-descriptions.c: In generated code, don't pass xml
9541 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9542 (print_xml_feature::visit_post): Likewise.
9543 (print_xml_feature::visit): Likewise.
9544 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9545 (print_xml_feature): Add new class.
9546 * regformats/regdat.sh: Null xmltarget on feature targets.
9547 * target-descriptions.c (struct target_desc): Add xmltarget.
9548 (maintenance_check_tdesc_xml_convert): Add unittest function.
9549 (tdesc_get_features_xml): Add function to get xml.
9550 (maintenance_check_xml_descriptions): Test xml generation.
9551 * xml-tdesc.c (string_read_description_xml): Add function.
9552 * xml-tdesc.h (string_read_description_xml): Add declaration.
9556 * features/Makefile: Add feature marker to targets with new style
9557 target descriptions.
9558 * regformats/aarch64.dat: Regenerate.
9559 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9560 * regformats/i386/amd64-avx-linux.dat: Likewise.
9561 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9562 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9563 * regformats/i386/amd64-linux.dat: Likewise.
9564 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9565 * regformats/i386/amd64.dat: Likewise.
9566 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9567 * regformats/i386/i386-avx-linux.dat: Likewise.
9568 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9569 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9570 * regformats/i386/i386-linux.dat: Likewise.
9571 * regformats/i386/i386-mmx-linux.dat: Likewise.
9572 * regformats/i386/i386-mpx-linux.dat: Likewise.
9573 * regformats/i386/i386.dat: Likewise.
9574 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9575 * regformats/i386/x32-avx-linux.dat: Likewise.
9576 * regformats/i386/x32-linux.dat: Likewise.
9577 * regformats/tic6x-c62x-linux.dat: Likewise.
9578 * regformats/tic6x-c64x-linux.dat: Likewise.
9579 * regformats/tic6x-c64xp-linux.dat: Likewise.
9580 * regformats/regdat.sh: Parse feature marker.
9584 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9585 (tdesc_osabi_name): Likewise.
9586 * target-descriptions.c (tdesc_architecture_name): Add new
9588 (tdesc_osabi_name): Likewise.
9592 * common/tdesc.c (tdesc_predefined_type): Move to here.
9593 (tdesc_named_type): Likewise.
9594 (tdesc_create_vector): Likewise.
9595 (tdesc_create_struct): Likewise.
9596 (tdesc_set_struct_size): Likewise.
9597 (tdesc_create_union): Likewise.
9598 (tdesc_create_flags): Likewise.
9599 (tdesc_create_enum): Likewise.
9600 (tdesc_add_field): Likewise.
9601 (tdesc_add_typed_bitfield): Likewise.
9602 (tdesc_add_bitfield): Likewise.
9603 (tdesc_add_flag): Likewise.
9604 (tdesc_add_enum_value): Likewise.
9605 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9606 (struct tdesc_type_vector): Likewise.
9607 (struct tdesc_type_field): Likewise.
9608 (struct tdesc_type_with_fields): Likewise.
9609 (tdesc_create_enum): Add declaration.
9610 (tdesc_add_typed_bitfield): Likewise.
9611 (tdesc_add_enum_value): Likewise.
9612 * target-descriptions.c (tdesc_type_field): Move from here.
9613 (tdesc_type_builtin): Likewise.
9614 (tdesc_type_vector): Likewise.
9615 (tdesc_type_with_fields): Likewise.
9616 (tdesc_predefined_types): Likewise.
9617 (tdesc_named_type): Likewise.
9618 (tdesc_create_vector): Likewise.
9619 (tdesc_create_struct): Likewise.
9620 (tdesc_set_struct_size): Likewise.
9621 (tdesc_create_union): Likewise.
9622 (tdesc_create_flags): Likewise.
9623 (tdesc_create_enum): Likewise.
9624 (tdesc_add_field): Likewise.
9625 (tdesc_add_typed_bitfield): Likewise.
9626 (tdesc_add_bitfield): Likewise.
9627 (tdesc_add_flag): Likewise.
9628 (tdesc_add_enum_value): Likewise.
9629 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9630 (tdesc_add_typed_bitfield): Likewise.
9631 (tdesc_add_enum_value): Likewise.
9635 * common/tdesc.c (tdesc_feature::accept): Move to here.
9636 (tdesc_feature::operator==): Likewise.
9637 (tdesc_create_reg): Likewise.
9638 * common/tdesc.h (tdesc_type_kind): Likewise.
9639 (struct tdesc_type): Likewise.
9640 (struct tdesc_feature): Likewise.
9641 * regformats/regdat.sh: Create a feature.
9642 * target-descriptions.c (tdesc_type_kind): Move from here.
9643 (tdesc_type): Likewise.
9644 (tdesc_type_up): Likewise.
9645 (tdesc_feature): Likewise.
9646 (tdesc_create_reg): Likewise.
9650 * Makefile.in: Add arch/tdesc.c
9651 * common/tdesc.c: New file.
9652 * common/tdesc.h (tdesc_element_visitor): Move to here.
9653 (tdesc_element): Likewise.
9654 (tdesc_reg): Likewise.
9655 (tdesc_reg_up): Likewise.
9656 * regformats/regdef.h (reg): Add offset to constructors.
9657 * target-descriptions.c (tdesc_element_visitor): Move from here.
9658 (tdesc_element): Likewise.
9659 (tdesc_reg): Likewise.
9660 (tdesc_reg_up): Likewise.
9664 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9669 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9673 * symtab.c (print_symbol_info): Skip printing filename and line
9674 number when `last' is NULL.
9675 (symtab_symbol_info): Use empty string instead of NULL for first
9676 invocation of print_symbol_info.
9677 (rbreak_command): Pass NULL to `last' parameter of
9682 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9687 * MAINTAINERS (sh): Remove.
9688 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9689 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9690 (ALLDEPFILES): Remove sh64-tdep.c.
9691 * NEWS: Mentions that support for SH-5/SH64 is removed.
9692 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9693 (sh*-*-openbsd*): Ditto.
9694 (sh64-*-elf*): Remove.
9696 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9697 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9698 * sh-tdep.c: No longer include "sh64-tdep.h".
9699 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9700 * sh64-tdep.c, sh64-tdep.h: Remove files.
9704 * MAINTAINERS: Remove m88k.
9705 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9706 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9707 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9708 * NEWS: Mention that support for m88k was removed.
9709 * configure.host (m88*-*-*): Remove support.
9710 * configure.nat (m88k-*-*): Remove support.
9711 * configure.tgt (m88*-*-openbsd*): Remove.
9712 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9716 * configure.tgt (x86_tobjs): New variable.
9717 (amd64_tobjs, i386_tobjs): Use it.
9721 * symtab.c (print_symbol_info): Precede the symbol definition by
9722 the line number when available.
9723 * NEWS: Advertise this enhancement.
9727 * NEWS (New options): announce set/show record btrace cpu.
9728 * btrace.c: Include record-btrace.h.
9729 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9730 the vendor is unknown.
9731 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
9732 Maybe overwrite the btrace configuration's cpu.
9733 (btrace_compute_ftrace): Add cpu parameter. Update callers.
9734 (btrace_fetch): Add cpu parameter. Update callers.
9735 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9736 Maybe overwrite the btrace configuration's cpu. Skip enabling
9737 errata workarounds if the vendor is unknown.
9738 * python/py-record-btrace.c: Include record-btrace.h.
9739 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9740 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9741 * record-btrace.c (record_btrace_cpu_state_kind): New.
9742 (record_btrace_cpu): New.
9743 (set_record_btrace_cpu_cmdlist): New.
9744 (record_btrace_get_cpu): New.
9745 (require_btrace_thread, record_btrace_info)
9746 (record_btrace_resume_thread): Call record_btrace_get_cpu.
9747 (cmd_set_record_btrace_cpu_none): New.
9748 (cmd_set_record_btrace_cpu_auto): New.
9749 (cmd_set_record_btrace_cpu): New.
9750 (cmd_show_record_btrace_cpu): New.
9751 (_initialize_record_btrace): Initialize set/show record btrace cpu
9753 * record-btrace.h (record_btrace_get_cpu): New.
9757 * record.c (set_record_command): Fix typo in message.
9761 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9765 * infrun.c (process_event_stop_test): Call
9766 gdbarch_in_indirect_branch_thunk.
9767 * gdbarch.sh (in_indirect_branch_thunk): New.
9768 * gdbarch.c: Regenerated.
9769 * gdbarch.h: Regenerated.
9772 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9773 (HFILES_NO_SRCDIR): Add x86-tdep.h.
9774 (ALLDEPFILES): Add x86-tdep.c.
9775 * arch-utils.h (default_in_indirect_branch_thunk): New.
9776 * arch-utils.c (default_in_indirect_branch_thunk): New.
9777 * i386-tdep: Include x86-tdep.h.
9778 (i386_in_indirect_branch_thunk): New.
9779 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9781 * amd64-tdep: Include x86-tdep.h.
9782 (amd64_in_indirect_branch_thunk): New.
9783 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9788 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9789 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9790 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9795 * rust-lang.c (rust_print_struct_def): Remove univariant code.
9796 (rust_evaluate_subexp): Likewise.
9800 * procfs.c (procfs_detach): Make forward declaration's prototype
9801 match definition's protototype.
9802 (proc_get_LDT_entry): Remove stale do_cleanups call.
9806 * target.h (target_ops::to_has_exited): Delete.
9807 (target_has_exited): Delete.
9808 * target-delegates.c: Regenerate.
9812 * target.c (fileio_fh_t::t): Add comment.
9813 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9814 (target_fileio_close): Handle a NULL target.
9815 (invalidate_fileio_fh): New.
9816 (target_close): Call it.
9817 * remote.c (remote_hostio_send_command): No longer check whether
9818 remote_desc is open.
9822 * target.c (fileio_fh_t): Make it a named struct instead of a
9824 (fileio_fh_t::is_closed): New method.
9825 (DEF_VEC_O (fileio_fh_t)): Remove.
9826 (fileio_fhandles): Now a std::vector.
9827 (is_closed_fileio_fh): Delete.
9828 (acquire_fileio_fd): Adjust. Rename parameters.
9829 (release_fileio_fd): Adjust.
9830 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9831 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9832 (target_fileio_close): Adjust.
9836 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9841 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9842 (scoped_finish_thread_state): New class.
9843 * infcmd.c (run_command_1): Use it instead of finish_thread_state
9845 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9846 (fetch_inferior_event, normal_stop): Likewise.
9847 * thread.c (finish_thread_state_cleanup): Delete.
9852 * value.c: Include "selftest.h" and "common/array-view.h".
9853 (struct range) <operator ==>: New.
9854 (test_ranges_contain): New.
9855 (check_ranges_vector): New.
9856 (test_insert_into_bit_range_vector): New.
9857 (_initialize_values): Register selftests.
9858 * common/array-view.h (operator==, operator!=): New.
9862 * common/gdb_vecs.h (unordered_remove): Add overload that takes
9864 * inline-frame.c: Include <algorithm>.
9865 (struct inline_state): Add constructor.
9866 (inline_state_s): Remove.
9867 (DEF_VEC_O(inline_state_s)): Remove.
9868 (inline_states): Change type to std::vector.
9869 (find_inline_frame_state): Adjust to std::vector.
9870 (allocate_inline_frame_state): Remove.
9871 (clear_inline_frame_state): Adjust to std::vector.
9872 (skip_inline_frames): Adjust to std::vector.
9876 * tracepoint.h (struct trace_state_variable): Add constructor.
9877 <name>: Change type to std::string.
9878 * tracepoint.c (tsv_s): Remove.
9879 (DEF_VEC_O(tsv_s)): Remove.
9880 (tvariables): Change to std::vector.
9881 (create_trace_state_variable): Adjust to std::vector.
9882 (find_trace_state_variable): Likewise.
9883 (find_trace_state_variable_by_number): Likewise.
9884 (delete_trace_state_variable): Likewise.
9885 (trace_variable_command): Adjust to std::string.
9886 (delete_trace_variable_command): Likewise.
9887 (tvariables_info_1): Adjust to std::vector.
9888 (save_trace_state_variables): Likewise.
9889 (start_tracing): Likewise.
9890 (merge_uploaded_trace_state_variables): Adjust to std::vector
9892 * target.h (struct target_ops)
9893 <to_download_trace_state_variable>: Pass reference to
9894 trace_state_variable.
9895 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9896 * target-delegates.c: Re-generate.
9897 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9898 (mi_tsv_deleted): Likewise.
9899 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9900 * remote.c (remote_download_trace_state_variable): Change
9901 pointer to reference and adjust.
9902 * make-target-delegates (parse_argtypes): Handle references.
9903 (write_function_header): Likewise.
9904 (munge_type): Likewise.
9908 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9909 string_view-selftests.c.
9910 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9912 * unittests/basic_string_view/cons/char/1.cc: Likewise.
9913 * unittests/basic_string_view/cons/char/2.cc: Likewise.
9914 * unittests/basic_string_view/cons/char/3.cc: Likewise.
9915 * unittests/basic_string_view/element_access/char/1.cc:
9917 * unittests/basic_string_view/element_access/char/empty.cc:
9919 * unittests/basic_string_view/element_access/char/front_back.cc:
9921 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9922 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9924 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9926 * unittests/basic_string_view/modifiers/swap/char/1.cc:
9928 * unittests/basic_string_view/operations/compare/char/1.cc:
9930 * unittests/basic_string_view/operations/compare/char/13650.cc:
9932 * unittests/basic_string_view/operations/copy/char/1.cc:
9934 * unittests/basic_string_view/operations/data/char/1.cc:
9936 * unittests/basic_string_view/operations/find/char/1.cc:
9938 * unittests/basic_string_view/operations/find/char/2.cc:
9940 * unittests/basic_string_view/operations/find/char/3.cc:
9942 * unittests/basic_string_view/operations/find/char/4.cc:
9944 * unittests/basic_string_view/operations/rfind/char/1.cc:
9946 * unittests/basic_string_view/operations/rfind/char/2.cc:
9948 * unittests/basic_string_view/operations/rfind/char/3.cc:
9950 * unittests/basic_string_view/operations/substr/char/1.cc:
9952 * unittests/basic_string_view/operators/char/2.cc: Likewise.
9953 * unittests/string_view-selftests.c: New file.
9957 * unittests/basic_string_view/capacity/1.cc: New file.
9958 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9959 * unittests/basic_string_view/cons/char/1.cc: New file.
9960 * unittests/basic_string_view/cons/char/2.cc: New file.
9961 * unittests/basic_string_view/cons/char/3.cc: New file.
9962 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9963 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9964 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9965 * unittests/basic_string_view/element_access/char/1.cc: New file.
9966 * unittests/basic_string_view/element_access/char/2.cc: New file.
9967 * unittests/basic_string_view/element_access/char/empty.cc: New file.
9968 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9969 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9970 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9971 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9972 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9973 * unittests/basic_string_view/include.cc: New file.
9974 * unittests/basic_string_view/inserters/char/1.cc: New file.
9975 * unittests/basic_string_view/inserters/char/2.cc: New file.
9976 * unittests/basic_string_view/inserters/char/3.cc: New file.
9977 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9978 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9979 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9980 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9981 * unittests/basic_string_view/literals/types.cc: New file.
9982 * unittests/basic_string_view/literals/values.cc: New file.
9983 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9984 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9985 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9986 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9987 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9988 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9989 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9990 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9991 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9992 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9993 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9994 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9995 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9996 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9997 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9998 * unittests/basic_string_view/operations/data/char/1.cc: New file.
9999 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10000 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10001 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10002 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10003 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10004 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10005 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10006 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10007 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10008 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10009 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10010 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10011 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10012 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10013 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10014 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10015 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10016 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10017 * unittests/basic_string_view/operators/char/2.cc: New file.
10018 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10019 * unittests/basic_string_view/range_access/char/1.cc: New file.
10020 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10021 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10022 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10023 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10024 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10025 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10026 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10027 * unittests/basic_string_view/typedefs.cc: New file.
10028 * unittests/basic_string_view/types/1.cc: New file.
10032 * common/gdb_string_view.h: Remove libstdc++ implementation
10033 details, adjust to gdb reality.
10034 * common/gdb_string_view.tcc: Likewise.
10035 * cli/cli-script.c (struct string_view): Remove.
10036 (user_args) <m_args>: Change element type to gdb::string_view.
10037 (user_args::insert_args): Adjust.
10041 * common/gdb_string_view.h: New file.
10042 * common/gdb_string_view.tcc: New file.
10046 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10047 * configure: Re-generate.
10051 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10052 (set_target_gdbarch): Call
10053 gdb::observers::architecture_changed.notify instead of
10054 observer_notify_architecture_changed.
10058 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10059 (do_restore_current_traceframe_cleanup): Remove.
10060 (restore_current_traceframe_cleanup_dtor): Remove.
10061 (make_cleanup_restore_current_traceframe): Remove.
10062 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10064 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10065 * infrun.c (fetch_inferior_event): Use
10066 scoped_restore_current_traceframe.
10070 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10072 <n_allocated_type_units>: Remove.
10073 <all_type_units>: Change to std::vector.
10074 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10075 to std::vector change.
10076 (dwarf2_per_objfile::get_cutu): Likewise.
10077 (dwarf2_per_objfile::get_tu): Likewise.
10078 (create_signatured_type_table_from_index): Likewise.
10079 (create_signatured_type_table_from_debug_names): Likewise.
10080 (dw2_symtab_iter_next): Likewise.
10081 (dw2_print_stats): Likewise.
10082 (dw2_expand_all_symtabs): Likewise.
10083 (dw2_expand_marked_cus): Likewise.
10084 (dw2_debug_names_iterator::next): Likewise.
10085 (dwarf2_initialize_objfile): Likewise.
10086 (add_signatured_type_cu_to_table): Likewise.
10087 (create_all_type_units): Likewise.
10088 (add_type_unit): Likewise.
10089 (struct tu_abbrev_offset): Add constructor.
10090 (build_type_psymtabs_1): Adjust to std::vector change.
10091 (print_tu_stats): Likewise.
10092 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10093 (write_debug_names): Likewise.
10097 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10098 Make an std::vector.
10099 <n_comp_units>: Remove.
10100 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10101 to std::vector change.
10102 (dwarf2_per_objfile::get_cutu): Likewise.
10103 (dwarf2_per_objfile::get_cu): Likewise.
10104 (create_cus_from_index): Likewise.
10105 (create_addrmap_from_index): Likewise.
10106 (create_addrmap_from_aranges): Likewise.
10107 (dwarf2_read_index): Likewise.
10108 (dw2_find_last_source_symtab): Likewise.
10109 (dw2_map_symtabs_matching_filename): Likewise.
10110 (dw2_symtab_iter_next): Likewise.
10111 (dw2_print_stats): Likewise.
10112 (dw2_expand_all_symtabs): Likewise.
10113 (dw2_expand_symtabs_with_fullname): Likewise.
10114 (dw2_expand_marked_cus): Likewise.
10115 (dw2_map_symbol_filenames): Likewise.
10116 (create_cus_from_debug_names): Likewise.
10117 (dwarf2_read_debug_names): Likewise.
10118 (dw2_debug_names_iterator::next): Likewise.
10119 (dwarf2_initialize_objfile): Likewise.
10120 (set_partial_user): Likewise.
10121 (dwarf2_build_psymtabs_hard): Likewise.
10122 (read_comp_units_from_section): Remove arguments, adjust to
10123 std::vector change.
10124 (create_all_comp_units): Adjust to std::vector and
10125 read_comp_units_from_section changes.
10126 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10128 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10129 (psyms_seen_size): Likewise.
10130 (write_gdbindex): Likewise.
10131 (write_debug_names): Likewise.
10135 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10136 with dwarf2_per_objfile.
10137 (create_cus_from_index): Likewise.
10138 (create_signatured_type_table_from_index): Likewise.
10139 (dwarf2_read_index): Likewise.
10140 (dwarf2_initialize_objfile): Likewise.
10141 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10142 per_cu rather than get_dwarf2_per_objfile.
10146 * dwarf2read.h (struct signatured_type): Forward declare.
10147 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10149 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10150 (dw2_get_cutu): ...this.
10151 (dwarf2_per_objfile::get_cu): Rename from...
10152 (dw2_get_cu): ...this.
10153 (dwarf2_per_objfile::get_tu): New.
10154 (create_addrmap_from_index): Adjust.
10155 (create_addrmap_from_aranges): Adjust.
10156 (dw2_find_last_source_symtab): Adjust.
10157 (dw2_map_symtabs_matching_filename): Adjust.
10158 (dw2_symtab_iter_next): Adjust.
10159 (dw2_print_stats): Adjust.
10160 (dw2_expand_all_symtabs): Adjust.
10161 (dw2_expand_symtabs_with_fullname): Adjust.
10162 (dw2_expand_marked_cus): Adjust.
10163 (dw_expand_symtabs_matching_file_matcher): Adjust.
10164 (dw2_map_symbol_filenames): Adjust.
10165 (dw2_debug_names_iterator::next): Adjust.
10166 (dwarf2_initialize_objfile): Adjust.
10167 (set_partial_user): Adjust.
10168 (dwarf2_build_psymtabs_hard): Adjust.
10172 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10173 Remove unused variables.
10174 (dw2_map_symtabs_matching_filename): Likewise.
10175 (dwarf2_record_block_ranges): Likewise.
10176 (dwarf2_read_addr_index): Likewise.
10177 (follow_die_offset): Likewise.
10181 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10182 to symbol_file_add_main.
10187 * mi/mi-console.c (do_fputc_async_safe): New.
10188 (mi_console_file::write_async_safe): New.
10189 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10190 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10192 * ui-file.c (ui_file::putstrn): Adjust call to
10193 fputstrn_unfiltered.
10194 * utils.c (printchar): Replace do_fputs and do_fprintf
10195 parameters by do_fputc.
10196 (fputstr_filtered): Adjust call to printchar.
10197 (fputstr_unfiltered): Likewise.
10198 (fputstrn_filtered): Likewise.
10199 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10201 * utils.h (do_fputc_ftype): New typedef.
10202 (fputstrn_unfiltered): Add do_fputc parameter.
10206 * regformats/i386/i386-avx.dat: Remove.
10211 * amd64-tdep.c (amd64_none_init_abi): New function.
10212 (amd64_x32_none_init_abi): New function.
10213 (_initialize_amd64_tdep): Register handlers for x86-64 and
10214 x64_32 with GDB_OSABI_NONE.
10215 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10216 GDB_OSABI_NONE osabi.
10221 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10223 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10224 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10228 * common/byte-vector.h (char_vector): New type.
10229 * target.h (target_read_alloc): Return
10230 gdb::optional<byte_vector>.
10231 (target_read_stralloc): Return gdb::optional<char_vector>.
10232 (target_get_osdata): Return gdb::optional<char_vector>.
10233 * target.c (target_read_alloc_1): Templatize. Replacement
10234 manual memory management with vector.
10235 (target_read_alloc): Change return type, adjust.
10236 (target_read_stralloc): Change return type, adjust.
10237 (target_get_osdata): Change return type, adjust.
10238 * auxv.c (struct auxv_info) <length>: Remove.
10239 <data>: Change type to gdb::optional<byte_vector>.
10240 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10241 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10242 (target_auxv_search): Adjust.
10243 (fprint_target_auxv): Adjust.
10244 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10245 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10246 (linux_make_corefile_notes): Adjust.
10247 * osdata.c (get_osdata): Adjust.
10248 * remote.c (remote_get_threads_with_qxfer): Adjust.
10249 (remote_memory_map): Adjust.
10250 (remote_traceframe_info): Adjust.
10251 (btrace_read_config): Adjust.
10252 (remote_read_btrace): Adjust.
10253 (remote_pid_to_exec_file): Adjust.
10254 * solib-aix.c (solib_aix_get_library_list): Adjust.
10255 * solib-dsbt.c (decode_loadmap): Don't free buf.
10256 (dsbt_get_initial_loadmaps): Adjust.
10257 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10258 * solib-target.c (solib_target_current_sos): Adjust.
10259 * tracepoint.c (sdata_make_value): Adjust.
10260 * xml-support.c (xinclude_start_include): Adjust.
10261 (xml_fetch_content_from_file): Adjust.
10262 * xml-support.h (xml_fetch_another): Change return type.
10263 (xml_fetch_content_from_file): Change return type.
10264 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10265 * xml-tdesc.c (file_read_description_xml): Adjust.
10266 (fetch_available_features_from_target): Change return type.
10267 (target_fetch_description_xml): Adjust.
10268 (target_read_description_xml): Adjust.
10272 * value.c (~value): Update.
10273 (struct value) <contents>: Now unique_xmalloc_ptr.
10274 (value_contents_bits_eq, allocate_value_contents)
10275 (value_contents_raw, value_contents_all_raw)
10276 (value_contents_for_printing, value_contents_for_printing_const)
10277 (set_value_enclosing_type): Update.
10281 * value.c (range_s): Remove typedef, VEC.
10282 (struct range): Add operator<.
10283 (range_lessthan): Remove.
10284 (ranges_contain): Change type.
10286 (struct value) <unavailable, optimized_out>: Now std::vector.
10287 (value_entirely_available)
10288 (value_entirely_covered_by_range_vector)
10289 (value_entirely_unavailable, value_entirely_optimized_out):
10291 (insert_into_bit_range_vector): Change argument type.
10292 (find_first_range_overlap): Likewise.
10293 (struct ranges_and_idx, value_contents_bits_eq)
10294 (require_not_optimized_out, require_available): Update.
10295 (ranges_copy_adjusted): Change argument types.
10296 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10300 * value.c (~value): Update.
10301 (struct value) <parent>: Now a value_ref_ptr.
10302 (value_parent, set_value_parent, value_address, value_copy):
10307 * value.c (struct value): Add constructor, destructor, and member
10309 (allocate_value_lazy, value_decref): Update.
10313 * value.c (struct value) <released, next>: Remove.
10314 (all_values): Now a std::vector.
10315 (allocate_value_lazy): Update.
10316 (value_next): Remove.
10317 (value_mark, value_free_to_mark, release_value)
10318 (value_release_to_mark): Update.
10322 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10323 (free_value_chain): Remove.
10324 * value.c (free_value_chain): Remove.
10325 (value_release_to_mark): Return a std::vector.
10326 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10328 (check_condition): Update.
10329 * eval.c (fetch_subexp_value): Change "val_chain" to a
10331 * breakpoint.c (update_watchpoint): Update.
10332 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10336 * value.h (free_all_values): Remove.
10337 * value.c (free_all_values): Remove.
10341 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10342 (value_history_chain, value_history_count): Remove.
10343 (value_history): New global.
10344 (record_latest_value, access_value_history, show_values)
10345 (preserve_values): Update.
10349 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10350 * varobj.c (varobj_set_display_format, varobj_set_value)
10351 (install_default_visualizer, construct_visualizer)
10352 (install_new_value, ~varobj, varobj_get_value_type)
10353 (my_value_of_variable, varobj_editable_p): Update.
10354 * c-varobj.c (c_describe_child, c_value_of_variable)
10355 (cplus_number_of_children, cplus_describe_child): Update.
10356 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10357 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10358 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10362 * printcmd.c (last_examine_address): Change type to
10364 (do_examine, x_command): Update.
10368 * value.c (release_value): Update.
10369 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10370 (struct bpstats) <val>: Now a value_ref_ptr.
10371 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10372 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10373 (~watchpoint, print_it_watchpoint, watch_command_1)
10374 (invalidate_bp_value_on_memory_change): Update.
10378 * varobj.c (varobj_clear_saved_item)
10379 (update_dynamic_varobj_children, install_new_value, ~varobj):
10381 * value.h (value_incref): Move declaration earlier.
10382 (value_decref): Rename from value_free.
10383 (struct value_ref_policy): New.
10384 (value_ref_ptr): New typedef.
10385 (struct value_deleter): Remove.
10386 (gdb_value_up): Remove typedef.
10387 (release_value): Change return type.
10388 (release_value_or_incref): Remove.
10389 * value.c (set_value_parent): Update.
10390 (value_incref): Change return type.
10391 (value_decref): Rename from value_free.
10392 (value_free_to_mark, free_all_values, free_value_chain): Update.
10393 (release_value): Return value_ref_ptr.
10394 (release_value_or_incref): Remove.
10395 (record_latest_value, set_internalvar, clear_internalvar):
10397 * stack.c (info_frame_command): Don't call value_free.
10398 * python/py-value.c (valpy_dealloc, valpy_new)
10399 (value_to_value_object): Update.
10400 * printcmd.c (do_examine): Update.
10401 * opencl-lang.c (lval_func_free_closure): Update.
10402 * mi/mi-main.c (register_changed_p): Don't call value_free.
10403 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10404 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10405 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10407 * guile/scm-value.c (vlscm_free_value_smob)
10408 (vlscm_scm_from_value): Update.
10409 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10410 (frame_unwind_register_unsigned, get_frame_register_bytes)
10411 (put_frame_register_bytes): Don't call value_free.
10412 * findvar.c (address_from_register): Don't call value_free.
10413 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10414 * dwarf2loc.c (entry_data_value_free_closure)
10415 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10416 (dwarf2_evaluate_loc_desc_full): Update.
10417 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10418 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10419 (~watchpoint, watch_command_1)
10420 (invalidate_bp_value_on_memory_change): Update.
10421 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10426 * warning.m4: Add -Wno-error=deprecated-register.
10427 * configure: Re-generate.
10431 * linespec.h: Remove include of "vec.h".
10435 * linespec.c (typep): Remove typedef.
10436 (find_methods, find_superclass_methods): Take a std::vector.
10437 (find_method): Use std::vector.
10441 * utils.c (compare_strings): Remove.
10442 * utils.h (compare_strings): Remove.
10443 * objc-lang.h (find_imps): Update.
10444 * objc-lang.c (find_methods): Take a std::vector.
10445 (uniquify_strings, find_imps): Likewise.
10446 * linespec.c (find_methods): Take a std::vector.
10447 (decode_objc): Use std::vector.
10448 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10450 (find_method, find_function_symbols): Use std::vector.
10454 * completer.c (completion_tracker::completion_tracker): Remove
10456 (completion_tracker::discard_completions): Likewise.
10457 * breakpoint.c (ambiguous_names_p): Remove cast.
10458 * ada-lang.c (_initialize_ada_language): Remove cast.
10459 * utils.h (streq): Update.
10460 (streq_hash): Add new declaration.
10461 * utils.c (streq): Return bool.
10462 (streq_hash): New function.
10466 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10467 Remove a string copy.
10471 * linespec.c (filter_results): Use std::vector.
10472 (decode_line_2, decode_line_full): Update.
10476 * linespec.c (canonical_to_fullform): Return std::string.
10477 (filter_results): Update.
10478 (struct decode_line_2_item): Add constructor.
10479 <fullform, displayform>: Now std::string.
10480 (decode_line_2_compare_items): Now a std::sort comparator.
10481 (decode_line_2): Update.
10485 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10486 (unexpected_linespec_error): Update.
10487 (linespec_parse_basic, parse_linespec): Update.
10491 * linespec.c (linespec_parse_basic): Reindent.
10495 * minsyms.h (iterate_over_minimal_symbols): Update.
10496 * minsyms.c (iterate_over_minimal_symbols): Take a
10497 gdb::function_view.
10498 * linespec.c (struct collect_minsyms): Remove.
10499 (compare_msyms): Now a std::sort comparator.
10500 (add_minsym): Add parameters.
10501 (search_minsyms_for_name): Update. Use std::vector.
10505 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10510 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10515 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10516 printing static type.
10520 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10521 (rs6000_xfer_shared_libraries): Update.
10525 * common/gdb_vecs.h (char_ptr): Remove.
10526 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10530 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10532 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10536 * tracepoint.h (struct uploaded_tp): Initialize fields.
10537 <actions, step_actions, cmd_strings>: Change type to
10538 std::vector<char *>.
10539 * tracepoint.c (get_uploaded_tp): Allocate with new.
10540 (free_uploaded_tps): Free with delete.
10541 (parse_tracepoint_definition): Adjust to std::vector change.
10542 * breakpoint.c (read_uploaded_action): Likewise.
10543 (create_tracepoint_from_upload): Likewise.
10544 * ctf.c (ctf_write_uploaded_tp): Likewise.
10545 (SET_ARRAY_FIELD): Likewise.
10546 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10550 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10552 (svr4_keep_data_in_core): Update.
10553 (svr4_read_so_list): Update.
10557 * windows-nat.c (handle_output_debug_string, handle_exception):
10559 * target.h (target_read_string): Update.
10560 * target.c (target_read_string): Change "string" to
10561 unique_xmalloc_ptr.
10562 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10564 * solib-frv.c (frv_current_sos): Update.
10565 * solib-dsbt.c (dsbt_current_sos): Update.
10566 * solib-darwin.c (darwin_current_sos): Update.
10567 * linux-thread-db.c (inferior_has_bug): Update.
10568 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10569 Update. Remove alloca.
10570 * ada-lang.c (ada_main_name): Update.
10574 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10575 (struct dwo_file_deleter): New.
10576 (dwo_file_up): New typedef.
10577 (open_and_init_dwo_file): Use dwo_file_up.
10578 (free_dwo_file_cleanup): Remove.
10582 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10583 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10587 * dwarf2read.c (class free_cached_comp_units): New class.
10588 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10589 (free_cached_comp_units): Remove function.
10593 * utils.h (make_cleanup_unpush_target): Remove.
10594 * inf-ptrace.c (struct target_unpusher): New.
10595 (target_unpush_up) New typedef.
10596 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10598 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10602 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10607 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10608 destructor. Now a class.
10609 (gdb_readline_wrapper_cleanup): Remove function.
10610 (gdb_readline_wrapper): Remove cleanups.
10614 * typeprint.h (struct type_print_options) <local_typedefs,
10615 global_typedefs>: Remove "struct" keyword.
10616 (class typedef_hash_table): New class.
10617 (recursively_update_typedef_hash, add_template_parameters)
10618 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10619 (find_typedef_in_hash): Don't declare.
10620 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10621 (typedef_hash_table::recursively_update): Rename from
10622 recursively_update_typedef_hash. Now a member.
10623 (typedef_hash_table::add_template_parameters): Rename from
10624 add_template_parameters. Now a member.
10625 (typedef_hash_table::typedef_hash_table): Now a constructor;
10626 rename from create_typedef_hash.
10627 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10628 rename from free_typedef_hash.
10629 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10630 (do_free_global_table): Remove.
10631 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10632 from copy_type_recursive.
10633 (create_global_typedef_table): Remove.
10634 (typedef_hash_table::find_global_typedef): Now a member of
10635 typedef_hash_table.
10636 (typedef_hash_table::find_typedef): Rename from
10637 find_typedef_in_hash; now a member.
10638 (whatis_exp): Update.
10639 * extension.h (struct ext_lang_type_printers): Add constructor and
10641 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10643 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10644 Now a constructor; rename from start_ext_lang_type_printers.
10645 (ext_lang_type_printers): Now a destructor; rename from
10646 free_ext_lang_type_printers.
10647 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10649 (c_type_print_base_struct_union): Update. Remove cleanups.
10653 * dwarf-index-write.c: Include <cmath>.
10657 * NEWS: Add entry describing new "set|show varsize-limit" command.
10658 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10660 * printcmd.c (_initialize_printcmd): Add "set var" alias of
10665 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10666 dwarf-index-write.c
10667 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10668 * dwarf-index-common.c: New file.
10669 * dwarf-index-common.h: New file.
10670 * dwarf-index-write.c: New file.
10671 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10672 (struct dwarf2_section_info): Move from here.
10673 (dwarf2_section_info_def): Likewise.
10674 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10675 (offset_type): Likewise.
10676 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10677 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10678 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10679 (byte_swap): Likewise.
10680 (MAYBE_SWAP): Likewise.
10681 (dwarf2_per_cu_ptr): Likewise.
10682 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10683 (struct tu_stats): Likewise.
10684 (struct dwarf2_per_objfile): Likewise.
10685 (struct dwarf2_per_cu_data): Likewise.
10686 (struct signatured_type): Likewise.
10687 (sig_type_ptr): Likewise.
10688 (DEF_VEC_P (sig_type_ptr)): Likewise.
10689 (INDEX4_SUFFIX): Likewise.
10690 (INDEX5_SUFFIX): Likewise.
10691 (DEBUG_STR_SUFFIX): Likewise.
10692 (dwarf2_read_section): Make non-static.
10693 (mapped_index_string_hash): Move from here.
10694 (dwarf5_djb_hash): Likewise.
10695 (file_write): Likewise.
10696 (class data_buf): Likewise.
10697 (struct symtab_index_entry): Likewise.
10698 (struct mapped_symtab): Likewise.
10699 (find_slot): Likewise.
10700 (hash_expand): Likewise.
10701 (add_index_entry): Likewise.
10702 (uniquify_cu_indices): Likewise.
10703 (class c_str_view): Likewise.
10704 (class c_str_view_hasher): Likewise.
10705 (class vector_hasher): Likewise.
10706 (write_hash_table): Likewise.
10707 (psym_index_map): Likewise.
10708 (struct addrmap_index_data): Likewise.
10709 (add_address_entry): Likewise.
10710 (add_address_entry_worker): Likewise.
10711 (write_address_map): Likewise.
10712 (symbol_kind): Likewise.
10713 (write_psymbols): Likewise.
10714 (struct signatured_type_index_data): Likewise.
10715 (write_one_signatured_type): Likewise.
10716 (recursively_count_psymbols): Likewise.
10717 (recursively_write_psymbols): Likewise.
10718 (class debug_names): Likewise.
10719 (check_dwarf64_offsets): Likewise.
10720 (psyms_seen_size): Likewise.
10721 (write_gdbindex): Likewise.
10722 (write_debug_names): Likewise.
10723 (assert_file_size): Likewise.
10724 (write_psymtabs_to_index): Likewise.
10725 (save_gdb_index_command): Likewise.
10726 (_initialize_dwarf2_read): Don't register the "save gdb-index"
10728 * dwarf2read.h: New file.
10733 * dwarf2read.c (dwarf2_physname): Do not return the demangled
10734 symbol name if the CU's language stores symbol names in linkage
10736 * language.h (struct language_defn)
10737 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
10738 all instances of this struct.
10742 * stack.c (backtrace_command_1): Remove verbose code.
10746 * python/py-framefilter.c (py_print_type): Don't catch
10747 exceptions. Return void.
10748 (py_print_value): Likewise.
10749 (py_print_single_arg): Likewise.
10750 (enumerate_args): Don't catch exceptions.
10751 (py_print_args): Likewise.
10752 (py_print_frame): Likewise.
10753 (gdbpy_apply_frame_filter): Catch exceptions here.
10757 * stack.c (_initialize_stack): Remove trailing newlines from help
10758 text. Add "Usage" line to "backtrace" help.
10763 * python/py-framefilter.c (py_print_args): Call wrap_hint.
10767 * python/py-framefilter.c (py_print_single_arg): Return
10768 EXT_LANG_BT_ERROR from catch.
10772 PR backtrace/15584:
10773 * stack.c (backtrace_command_1): Move some code into no-filters
10778 * python/py-framefilter.c (throw_quit_or_print_exception): New
10780 (gdbpy_apply_frame_filter): Use it.
10785 * python/py-framefilter.c (py_print_type, py_print_value)
10786 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10791 * python/py-framefilter.c (enumerate_args): Use
10792 gdb::unique_xmalloc_ptr.
10796 * python/py-framefilter.c (py_print_frame): Return
10798 (gdbpy_apply_frame_filter): Update comment.
10799 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10801 <EXT_LANG_BT_NO_FILTERS>: Change value.
10805 PR backtrace/15582:
10806 * stack.c (backtrace_command): Parse "hide" argument.
10807 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10808 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10813 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10815 (backtrace_command): Remove "fulltrace", add "flags".
10819 * stack.c (backtrace_command): Rewrite command line parsing.
10823 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10827 * filename-seen-cache.h: Add include guard.
10831 * symfile.c (place_section): Remove "struct" from section_addr_info
10833 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10834 "struct" keyword from section_addr_info.
10838 * regformats/regdef.h (reg): Add constructors.
10842 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10843 if then/else bodies in var_func_name extraction.
10847 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10848 lookup_minimal_symbol() to find symbol entry.
10849 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10854 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10855 nested type definitions for C++, too.
10859 * machoread.c (struct oso_el): Add a constructor. Don't define as
10861 (macho_register_oso): Remove.
10862 (macho_symtab_read): Take a std::vector.
10863 (oso_el_compare_name): Now a std::sort comparator.
10864 (macho_symfile_read_all_oso): Take a std::vector.
10865 (macho_symfile_read): Use std::vector. Remove cleanups.
10869 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10870 (record_full_goto_bookmark): Use std::string.
10875 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10880 * rs6000-tdep.c (store_insn_p): New function.
10881 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10882 and cr_reg to their unshifted values. Use store_insn_p to
10883 match LR saves using either R1 or fdata->alloca_reg. Use
10884 store_insn_p to match CR saves. Set alloca_reg_offset
10885 when alloca_reg and framep are set. Remove lr_reg shift
10886 when assigning to fdata->lr_register.
10890 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10891 command line args instead of emitting a warning.
10895 * tracepoint.h (struct static_tracepoint_marker): Initialize
10896 fields, define default constructor, move constructor and move
10897 assignment, disable the rest.
10898 <str_id, extra>: Make std::string.
10899 (release_static_tracepoint_marker): Remove.
10900 (free_current_marker): Remove.
10901 * tracepoint.c (free_current_marker): Remove.
10902 (parse_static_tracepoint_marker_definition): Adjust to
10903 std::string, use new hex2str overload.
10904 (release_static_tracepoint_marker): Remove.
10905 (print_one_static_tracepoint_marker): Get marker by reference
10906 and adjust to std::string.
10907 (info_static_tracepoint_markers_command): Adjust to std::vector
10909 * target.h (static_tracepoint_marker_p): Remove typedef.
10910 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10911 (struct target_ops) <to_static_tracepoint_marker_at>: Return
10913 <to_static_tracepoint_markers_by_strid>: Return std::vector.
10915 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10916 (target_debug_print_std_vector_static_tracepoint_marker): New.
10917 (target_debug_print_struct_static_tracepoint_marker_p): Rename
10919 (target_debug_print_static_tracepoint_marker_p): ... this.
10920 * target-delegates.c: Re-generate.
10921 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10923 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10924 (decode_static_tracepoint_spec): Adjust to std::vector.
10925 (tracepoint_print_one_detail): Adjust to std::string.
10926 (strace_marker_decode_location): Adjust to std::string.
10927 (update_static_tracepoint): Adjust to std::string, remove call
10928 to release_static_tracepoint_marker.
10929 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10930 Adjust to std::vector.
10931 * remote.c (remote_static_tracepoint_marker_at): Return bool.
10932 (remote_static_tracepoint_markers_by_strid): Adjust to
10934 * common/rsp-low.h (hex2str): New overload with explicit count
10936 * common/rsp-low.c (hex2str): New overload with explicit count
10938 * unittests/rsp-low-selftests.c (test_hex2str): New function.
10939 (_initialize_rsp_low_selftests): Add test_hex2str test.
10940 * unittests/tracepoint-selftests.c
10941 (test_parse_static_tracepoint_marker_definition): Adjust to
10946 * tracepoint.c (parse_static_tracepoint_marker_definition):
10947 Consider case where the definition is followed by more
10949 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10950 tracepoint-selftests.c.
10951 * unittests/tracepoint-selftests.c: New.
10955 * MAINTAINERS (Write After Approval): Add Pedro Franco de
10960 * symtab.c (find_pc_sect_line): fixed indentation.
10964 * symtab.c (find_pc_sect_line): now uses binary search.
10968 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10969 "IDENT" production.
10974 * unittests/observable-selftests.c: New file.
10975 * common/observable.h: New file.
10976 * observable.h: New file.
10977 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10978 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10979 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10980 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10981 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10982 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10983 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10984 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10985 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10986 python/py-breakpoint.c, python/py-finishbreakpoint.c,
10987 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10988 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10989 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10990 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10991 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10992 tui/tui-interp.c, valops.c: Update all users.
10993 * tui/tui-hooks.c (tui_bp_created_observer)
10994 (tui_bp_deleted_observer, tui_bp_modified_observer)
10995 (tui_inferior_exit_observer, tui_before_prompt_observer)
10996 (tui_normal_stop_observer, tui_register_changed_observer):
10998 (tui_observers_token): New global.
10999 (attach_or_detach, tui_attach_detach_observers): New functions.
11000 (tui_install_hooks, tui_remove_hooks): Use
11001 tui_attach_detach_observers.
11002 * record-btrace.c (record_btrace_thread_observer): Remove.
11003 (record_btrace_thread_observer_token): New global.
11004 * observer.sh: Remove.
11005 * observer.c: Rename to observable.c.
11006 * observable.c (namespace gdb_observers): Define new objects.
11007 (observer_debug): Move into gdb_observers namespace.
11008 (struct observer, struct observer_list, xalloc_observer_list_node)
11009 (xfree_observer_list_node, generic_observer_attach)
11010 (generic_observer_detach, generic_observer_notify): Remove.
11011 (_initialize_observer): Update.
11012 Don't include observer.inc.
11013 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11014 (clean mostlyclean): Likewise.
11015 (observer.h, observer.inc): Remove targets.
11016 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11017 (COMMON_SFILES): Use observable.c, not observer.c.
11018 * .gitignore: Remove observer.h.
11022 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11024 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11028 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11032 * target.c (class scoped_target_fd): New.
11033 (target_fileio_close_cleanup): Remove.
11034 (target_fileio_read_alloc_1): Use scoped_target_fd.
11038 * silent-rules.mk: New.
11039 * Makefile.in: Include silent-rules.mk
11040 (srcdir, VPATH, top_srcdir): Move up.
11041 (COMPILE): Add ECHO_CXX.
11042 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11043 (init.c): Add ECHO_INIT_C.
11044 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11045 (version.c): Add ECHO_GEN.
11046 (printcmd.o): Add ECHO_CXX.
11047 (target-float.o): Add ECHO_CXX.
11048 (ada-exp.o): Add ECHO_CXX.
11049 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11050 (insight$(EXEEXT)): Add ECHO_CXXLD.
11051 * gnulib/configure.ac: Add AM_SILENT_RULES.
11052 * gnulib/aclocal.m4: Re-generate.
11053 * gnulib/configure: Re-generate.
11054 * gnulib/import/Makefile.in: Re-generate.
11058 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11059 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11060 * utils.c (do_free_section_addr_info)
11061 (make_cleanup_free_section_addr_info): Remove.
11062 * symfile.h (struct other_sections): Add constructor.
11063 (struct section_addr_info): Remove.
11064 (section_addr_info): New typedef.
11065 (struct sym_fns) <sym_offsets>: Change type of parameter.
11066 (build_section_addr_info_from_objfile)
11067 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11068 (default_symfile_offsets, symbol_file_add)
11069 (symbol_file_add_from_bfd)
11070 (build_section_addr_info_from_section_table): Update.
11071 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11072 * symfile.c (alloc_section_addr_info): Remove.
11073 (build_section_addr_info_from_section_table): Change return type.
11075 (build_section_addr_info_from_bfd)
11076 (build_section_addr_info_from_objfile): Likewise.
11077 (free_section_addr_info): Remove.
11078 (relative_addr_info_to_section_offsets): Change type of "addrs".
11079 (addrs_section_compar): Now a std::sort comparator.
11080 (addrs_section_sort): Change return type.
11081 (addr_info_make_relative): Change type of "addrs". Update.
11082 (default_symfile_offsets, syms_from_objfile_1)
11083 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11084 (symbol_file_add_separate): Update.
11085 (symbol_file_add): Change type of "addrs". Update.
11086 (add_symbol_file_command): Update. Remove cleanups.
11087 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11089 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11090 * solib.c (solib_read_symbols): Update.
11091 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11092 * machoread.c (macho_symfile_offsets): Update.
11093 * jit.c (jit_bfd_try_read_symtab): Update.
11097 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11098 unittests/utils-selftests.c.
11099 * unittests/utils-selftests.c: New file.
11104 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11110 * printcmd.c (printf_pointer): Allow "-" in format.
11114 * printcmd.c (_initialize_printcmd): Add usage to printf.
11118 * MAINTAINERS: Update my email address.
11122 * machoread.c (macho_check_dsym): Change filenamep to a
11124 (macho_symfile_read): Update.
11125 * symfile.c (load_command): Use std::string.
11129 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11130 to error message string.
11131 (riscv_register_name): Use xsnprintf instead of sprintf.
11132 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11134 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11136 (riscv_push_dummy_call): Likewise.
11140 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11141 Use gdb::byte_vector.
11142 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11146 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11147 parameter type to readable_regcache.
11148 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11153 * dwarf2read.c (struct nextfield): Add initializers.
11154 (struct nextfnfield): Remove.
11155 (struct fnfieldlist): Add initializers. Remove "length" and
11156 "head", use std::vector.
11157 (struct decl_field_list): Remove.
11158 (struct field_info): Add initializers.
11159 <fields, baseclasses>: Now std::vector.
11160 <nbaseclasses, nfnfields, typedef_field_list_count,
11161 nested_types_list_count>: Remove.
11162 (dwarf2_add_field, dwarf2_add_type_defn)
11163 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11164 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11165 (process_structure_scope): Update.
11169 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11170 for use by std::sort.
11171 (build_type_psymtabs_1): Use std::vector.
11175 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11176 and LIBMPFR in the printed configuration.
11180 * source.c (get_filename_and_charpos): Use scoped_fd.
11181 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11182 (procfs_pidlist): Likewise.
11183 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11184 (iterate_over_mappings): Likewise.
11188 * infcall.c (struct call_return_meta_info)
11189 <stack_temporaries_enabled>: Remove.
11190 (get_call_return_value, call_function_by_hand_dummy): Update.
11191 * thread.c (disable_thread_stack_temporaries): Remove.
11192 (enable_thread_stack_temporaries): Remove.
11193 (thread_stack_temporaries_enabled_p): Return bool.
11194 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11195 (get_last_thread_stack_temporary): Update.
11196 * eval.c (evaluate_subexp): Update.
11197 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11198 class, not a function.
11199 (value_ptr, value_vec): Remove typedefs.
11200 (class thread_info) <stack_temporaries_enabled>: Now bool.
11201 <stack_temporaries>: Now a std::vector.
11202 (thread_stack_temporaries_enabled_p)
11203 (value_in_thread_stack_temporaries): Return bool.
11207 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11208 (getpkt_or_notif_sane_1): Likewise.
11212 * build-id.c (build_id_to_debug_bfd): Use std::string.
11216 * build-id.c (find_separate_debug_file_by_buildid): Return
11218 * build-id.h (find_separate_debug_file_by_buildid): Return
11220 * coffread.c (coff_symfile_read): Adjust to std::string.
11221 * elfread.c (elf_symfile_read): Adjust to std::string.
11222 * symfile.c (separate_debug_file_exists): Change parameter to
11224 (find_separate_debug_file): Return std::string.
11225 (find_separate_debug_file_by_debuglink): Return std::string.
11226 * symfile.h (find_separate_debug_file_by_debuglink): Return
11231 * common/xml-utils.c (xml_escape_text): Move code to...
11232 (xml_escape_text_append): ... this new function.
11233 * common/xml-utils.h (xml_escape_text_append): New declaration.
11234 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11236 (_initialize_xml_utils): register test_xml_escape_text_append as
11241 * defs.h: Remove MAX_REGISTER_SIZE.
11242 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11244 * python/py-unwind.c (pyuw_sniffer): Likewise.
11248 * linux-tdep.c (linux_info_proc): Update.
11249 * target.h (struct target_ops) <to_fileio_readlink>: Return
11251 (target_fileio_readlink): Return optional<string>.
11252 * remote.c (remote_hostio_readlink): Return optional<string>.
11253 * inf-child.c (inf_child_fileio_readlink): Return
11255 * target.c (target_fileio_readlink): Return optional<string>.
11259 * regcache.c (cooked_read_test): Add riscv to the list of
11260 architectures that have a save_reggroup.
11264 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11265 value is not a dynamic class object.
11269 * rust-exp.y: Formatting fixes.
11273 * riscv-tdep.c (riscv_register_name): Remove target description
11275 (riscv_gdbarch_init): Remove target description check.
11279 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11281 * riscv-tdep.h: Likewise.
11285 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11286 (riscv_pseudo_register_write): Delete.
11287 (riscv_gdbarch_init): Remove all use of pseudo registers.
11291 * record-btrace.c (btrace_print_lines): Replace cleanup
11292 parameter with RAII equivalents.
11293 (btrace_insn_history): Replace cleanup with RAII equivalents.
11294 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11295 make_cleanup_ui_out_tuple_begin_end): Remove.
11296 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11297 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11298 make_cleanup_ui_out_list_begin_end): Remove.
11302 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11303 parameter types to std::vector. Use bool.
11304 (record_btrace_wait): Replace VEC(tp_t) with
11305 std::vector<thread_info *>.
11306 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11310 * record-btrace.c (record_btrace_disable_callback): Remove.
11311 (struct scoped_btrace_disable): New.
11312 (record_btrace_open): Use scoped_btrace_disable.
11316 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11317 reading values from registers.
11321 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11326 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11327 change parameter type. Use GDB's print functions, and use
11328 core_addr_to_string where appropriate.
11329 (riscv_push_dummy_call): Use core_addr_to_string where
11330 appropriate, update call to riscv_print_arg_location, and reindent
11332 (riscv_return_value): Update call to riscv_print_arg_location.
11339 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11340 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11341 (ALLDEPFILES): Add riscv-tdep.c
11342 * configure.tgt: Add riscv support.
11343 * riscv-tdep.c: New file.
11344 * riscv-tdep.h: New file.
11345 * NEWS: Mention new target.
11346 * MAINTAINERS: Add entry for riscv.
11350 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11351 fields within aggregates.
11355 * record-btrace.c (btrace_print_lines): Change type of flags to
11356 gdb_disassembly_flags.
11360 * fbsd-nat.c: Include "inf-ptrace.h".
11361 (USE_SIGTRAP_SIGINFO): Conditionally define.
11362 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11363 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11364 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11366 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11368 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11370 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11371 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11372 "supports_stopped_by_hw_breakpoint" target methods.
11376 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11377 * fbsd-nat.c (debug_fbsd_nat): New variable.
11378 (show_fbsd_nat_debug): New function.
11379 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11380 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11384 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11385 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11387 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11388 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11393 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11394 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11398 * charset.c (struct charset_vector): New.
11399 (charsets): Change type to charset_vector.
11400 (find_charset_names): Adjust.
11402 (_initialize_charset): Adjust.
11406 * progspace.h (struct program_space) <deleted_solibs>: Change
11407 type to std::vector<std::string>.
11408 * progspace.c (clear_program_space_solib_cache): Adjust.
11409 * breakpoint.c (print_solib_event): Adjust.
11410 (check_status_catch_solib): Adjust.
11411 * solib.c (update_solib_list): Adjust.
11412 * ui-out.h (class ui_out) <field_string>: New overload.
11413 * ui-out.c (ui_out::field_string): New overload.
11417 * progspace.h (struct program_space): Add constructor and
11418 destructor, initialize fields.
11419 (add_program_space): Remove.
11420 * progspace.c (add_program_space): Rename to...
11421 (program_space::program_space): ... this.
11422 (release_program_space): Rename to...
11423 (program_space::~program_space): ... this.
11424 (delete_program_space): Use delete to delete program_space.
11425 (initialize_progspace): Use new to allocate program_space.
11426 * inferior.c (add_inferior_with_spaces): Likewise.
11427 (clone_inferior_command): Likewise.
11428 * infrun.c (follow_fork_inferior): Likewise.
11429 (handle_vfork_child_exec_or_exit): Likewise.
11433 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11434 (delim_string_to_char_ptr_vec): Return std::vector of
11435 gdb::unique_xmalloc_ptr.
11436 (dirnames_to_char_ptr_vec_append): Take std::vector of
11437 gdb::unique_xmalloc_ptr.
11438 (dirnames_to_char_ptr_vec): Return std::vector of
11439 gdb::unique_xmalloc_ptr.
11440 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11441 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11442 (delim_string_to_char_ptr_vec): Return an std::vector of
11443 gdb::unique_xmalloc_ptr, adjust the code.
11444 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11445 gdb::unique_xmalloc_ptr, adjust the code.
11446 (dirnames_to_char_ptr_vec): Return an std::vector of
11447 gdb::unique_xmalloc_ptr, adjust the code.
11448 * auto-load.c (auto_load_safe_path_vec): Change type to
11449 std::vector of gdb::unique_xmalloc_ptr.
11450 (auto_load_expand_dir_vars): Return an std::vector of
11451 gdb::unique_xmalloc_ptr, adjust the code.
11452 (auto_load_safe_path_vec_update): Adjust.
11453 (filename_is_in_auto_load_safe_path_vec): Adjust.
11454 (auto_load_objfile_script_1): Adjust.
11455 * build-id.c (build_id_to_debug_bfd): Adjust.
11456 * linux-thread-db.c (thread_db_load_search): Adjust.
11457 * source.c (add_path): Adjust.
11459 * symfile.c (find_separate_debug_file): Adjust.
11460 * utils.c (do_free_char_ptr_vec): Remove.
11461 (make_cleanup_free_char_ptr_vec): Remove.
11466 * common/pathstuff.c: Conditionally include "<windows.h>".
11471 * gcore.in: Quote variables and switch interpreter to bash.
11475 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11476 assertion. Add assertion for discriminant_index.
11477 (quirk_rust_enum): Use correct base type name in univariant case.
11481 * record.c (get_call_history_modifiers): Return a
11482 record_print_flags.
11483 (cmd_record_call_history): Adjust.
11484 * record-btrace.c (record_btrace_call_history): Adjust.
11485 (record_btrace_call_history_range): Adjust.
11486 (record_btrace_call_history_from): Adjust.
11487 * target-debug.h (target_debug_print_record_print_flags): New.
11488 * target-delegates.c: Re-generate.
11489 * target.c (target_call_history): Change flags type.
11490 (target_call_history_from): Likewise.
11491 (target_call_history_range): Likewise.
11492 * target.h (struct target_ops) <target_call_history>: Likewise.
11493 (target_call_history_from): Likewise.
11494 (target_call_history_range): Likewise.
11499 * common/common-utils.c: Include "sys/stat.h".
11500 (is_regular_file): Move here from "source.c"; change return
11502 * common/common-utils.h (is_regular_file): New prototype.
11503 * common/pathstuff.c (contains_dir_separator): New function.
11504 * common/pathstuff.h (contains_dir_separator): New prototype.
11505 * source.c: Don't include "sys/stat.h".
11506 (is_regular_file): Move to "common/common-utils.c".
11510 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11511 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11512 * auto-load.c: Include "common/pathstuff.h".
11513 * common/common-def.h (current_directory): Move here.
11514 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11516 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11518 * common/pathstuff.c: New file.
11519 * common/pathstuff.h: New file.
11520 * compile/compile.c: Include "common/pathstuff.h".
11521 * defs.h (current_directory): Move to "common/common-defs.h".
11522 * dwarf2read.c: Include "common/pathstuff.h".
11523 * exec.c: Likewise.
11524 * guile/scm-safe-call.c: Likewise.
11525 * linux-thread-db.c: Likewise.
11526 * main.c: Likewise.
11527 * nto-tdep.c: Likewise.
11528 * objfiles.c: Likewise.
11529 * source.c: Likewise.
11530 * symtab.c: Likewise.
11531 * utils.c: Include "common/pathstuff.h".
11532 (gdb_realpath): Move to "common/pathstuff.c".
11533 (gdb_realpath_keepfile): Likewise.
11534 (gdb_abspath): Likewise.
11535 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11536 (gdb_realpath_keepfile): Likewise.
11537 (gdb_abspath): Likewise.
11541 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11542 wildcard process pid for super_resume for kernels with a
11547 * compile/compile.c (get_args): Add additional comments
11548 explaining function.
11553 * target.h (memory_write_request_s): Remove typedef. Don't define
11555 (target_write_memory_blocks): Change argument to std::vector.
11556 (struct memory_write_request): Add constructor.
11557 * target-memory.c (compare_block_starting_address): Return bool.
11558 Change argument types.
11559 (claim_memory): Change arguments to use std::vector.
11560 (split_regular_and_flash_blocks, blocks_to_erase)
11561 (compute_garbled_blocks): Likewise.
11562 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11563 (target_write_memory_blocks): Change argument to std::vector.
11564 * symfile.c (struct load_section_data): Add constructor and
11565 destructor. Use std::vector for "requests".
11566 (struct load_progress_data): Add initializers.
11567 (load_section_callback): Update. Use "new".
11568 (clear_memory_write_data): Remove.
11569 (generic_load): Update.
11573 * arch/aarch64.h: Use common/tdesc.h.
11577 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11578 architecture with a 64-bit ABI.
11582 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11583 ahead of target description loading.
11587 * stack.c (backtrace_command_1): Update.
11588 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11590 * python/py-framefilter.c (py_print_frame)
11591 (gdbpy_apply_frame_filter): Change type of "flags".
11592 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11594 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11595 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11596 * extension.h (enum frame_filter_flag): Rename from
11597 frame_filter_flags.
11598 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11599 (apply_ext_lang_frame_filter): Change type of "flags".
11600 * extension.c (apply_ext_lang_frame_filter): Change type of
11602 * extension-priv.h (struct extension_language_ops)
11603 <apply_frame_filter>: Change type of "flags".
11608 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11609 off-by-one in py_end computation.
11610 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11612 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11617 * dwarf2read.c (struct variant_field): New.
11618 (struct nextfield) <variant>: New field.
11619 (dwarf2_add_field): Handle DW_TAG_variant_part.
11620 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11621 discriminated union.
11622 (read_structure_type): Handle DW_TAG_variant_part.
11623 (handle_struct_member_die): New function, extracted from
11624 process_structure_scope. Handle DW_TAG_variant.
11625 (process_structure_scope): Handle discriminated unions. Call
11626 handle_struct_member_die.
11630 * rust-lang.h (rust_last_path_segment): Declare.
11631 * rust-lang.c (rust_last_path_segment): Now public. Change
11633 (struct disr_info): Remove.
11634 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11635 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11636 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11637 (rust_enum_p, rust_enum_variant): New function.
11638 (rust_underscore_fields): Remove "offset" parameter.
11639 (rust_print_enum): New function.
11640 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11641 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11642 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11644 (rust_internal_print_type): New function, from rust_print_type.
11646 (rust_print_type): Call rust_internal_print_type.
11647 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11648 Update enum handling.
11649 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11650 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11651 (rust_union_quirks): New functions.
11652 (process_full_comp_unit, process_full_type_unit): Call
11654 (process_structure_scope): Update rust_unions if necessary.
11658 * value.h (value_union_variant): Declare.
11659 * valops.c (value_union_variant): New function.
11660 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11661 (struct discriminant_info): New.
11662 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11664 (struct main_type) <flag_discriminated_union>: New field.
11668 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11669 unittests/unpack-selftests.c.
11670 * unittests/unpack-selftests.c: New file.
11671 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11675 * dwarf2read.c (struct partial_die_info) <read>: New method.
11676 (read_partial_die): Remove the declaration.
11677 (load_partial_dies): Update.
11678 (partial_die_info::partial_die_info):
11679 (read_partial_die): Change it to partial_die_info::read.
11683 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11684 (fixup_partial_die): Remove declaration.
11685 (scan_partial_symbols): Update.
11686 (partial_die_parent_scope): Likewise.
11687 (partial_die_full_name): Likewise.
11688 (fixup_partial_die): Change it to partial_die_info::fixup.
11692 * dwarf2read.c (read_partial_die): Update the declaration.
11693 (load_partial_dies): Caller update.
11694 (read_partial_die): Remove one argument abbrev_len.
11698 * dwarf2read.c (struct partial_die_info): Add ctor, delete
11699 assignment operator.
11700 (load_partial_dies): Use ctor and copy ctor.
11701 (read_partial_die): Update.
11702 (dwarf2_cu::find_partial_die): Use ctor.
11706 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11707 (find_partial_die_in_comp_unit): Change it to
11708 dwarf2_cu::find_partial_die.
11709 (find_partial_die): Update.
11713 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11718 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11722 * arch/amd64.h: Use common/tdesc.h.
11723 * arch/i386.c: Likewise.
11724 * arch/i386.h: Likewise.
11725 * arch/tic6x.c: Likewise.
11726 * arch/tdesc.h: Move file from here...
11727 * common/tdesc.h: ...to here.
11728 * features/aarch64-core.c: Regenerate.
11729 * features/aarch64-fpu.c: Regenerate.
11730 * features/i386/32bit-avx.c: Regenerate.
11731 * features/i386/32bit-avx512.c: Regenerate.
11732 * features/i386/32bit-core.c: Regenerate.
11733 * features/i386/32bit-linux.c: Regenerate.
11734 * features/i386/32bit-mpx.c: Regenerate.
11735 * features/i386/32bit-pkeys.c: Regenerate.
11736 * features/i386/32bit-sse.c: Regenerate.
11737 * features/i386/64bit-avx.c: Regenerate.
11738 * features/i386/64bit-avx512.c: Regenerate.
11739 * features/i386/64bit-core.c: Regenerate.
11740 * features/i386/64bit-linux.c: Regenerate.
11741 * features/i386/64bit-mpx.c: Regenerate.
11742 * features/i386/64bit-pkeys.c: Regenerate.
11743 * features/i386/64bit-segments.c: Regenerate.
11744 * features/i386/64bit-sse.c: Regenerate.
11745 * features/i386/x32-core.c: Regenerate.
11746 * features/tic6x-c6xp.c: Regenerate.
11747 * features/tic6x-core.c: Regenerate.
11748 * features/tic6x-gp.c: Regenerate.
11749 * target-descriptions.c: Use common/tdesc.h.
11750 * target-descriptions.h: Likewise.
11754 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11755 (try_thread_db_load_from_dir, thread_db_load_search): Use
11757 (info_auto_load_libthread_db_compare): Return bool. Change
11759 (info_auto_load_libthread_db): Use std::vector, std::string.
11764 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11766 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11768 * gdbarch.c: Rebuild.
11769 * gdbarch.h: Rebuild.
11770 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11771 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11772 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11777 * gdbtypes.h (sect_offset): Change type to uint64_t.
11778 (sect_offset_str): New function.
11779 * dwarf2read.c (create_addrmap_from_aranges): Use
11781 (error_check_comp_unit_head): Likewise.
11782 (create_debug_type_hash_table): Likewise.
11783 (read_cutu_die_from_dwo): Likewise.
11784 (init_cutu_and_read_dies): Likewise.
11785 (init_cutu_and_read_dies_no_follow): Likewise.
11786 (process_psymtab_comp_unit_reader): Likewise.
11787 (partial_die_parent_scope): Likewise.
11788 (peek_die_abbrev): Likewise.
11789 (process_queue): Likewise.
11790 (dwarf2_physname): Likewise.
11791 (read_namespace_alias): Likewise.
11792 (read_import_statement): Likewise.
11793 (create_dwo_cu_reader): Likewise.
11794 (create_cus_hash_table): Likewise.
11795 (lookup_dwo_cutu): Likewise.
11796 (inherit_abstract_dies): Likewise.
11797 (read_func_scope): Likewise.
11798 (read_call_site_scope): Likewise.
11799 (dwarf2_add_member_fn): Likewise.
11800 (read_common_block): Likewise.
11801 (read_module_type): Likewise.
11802 (read_typedef): Likewise.
11803 (read_subrange_type): Likewise.
11804 (load_partial_dies): Likewise.
11805 (read_partial_die): Likewise.
11806 (find_partial_die): Likewise.
11807 (read_str_index): Likewise.
11808 (dwarf2_string_attr): Likewise.
11809 (build_error_marker_type): Likewise.
11810 (lookup_die_type): Likewise.
11811 (dump_die_shallow): Likewise.
11812 (follow_die_ref): Likewise.
11813 (dwarf2_fetch_die_loc_sect_off): Likewise.
11814 (dwarf2_fetch_constant_bytes): Likewise.
11815 (follow_die_sig): Likewise.
11816 (get_signatured_type): Likewise.
11817 (get_DW_AT_signature_type): Likewise.
11818 (dwarf2_find_containing_comp_unit): Likewise.
11819 (set_die_type): Likewise.
11823 * arch/aarch64.c: Include "common-defs.h".
11824 * arch/amd64.c: Likewise.
11825 * arch/i386.c: Likewise.
11829 * value.h: (extract_field_op): Update.
11830 * eval.c (extract_field_op): Return a const char *.
11831 * expression.h (parse_expression_for_completion): Update.
11832 * completer.c (complete_expression): Update.
11833 (add_struct_fields): Make fieldname const.
11834 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11835 (mark_completion_tag, parse_exp_in_context_1): Update.
11836 (parse_expression_for_completion): Change "name" to
11837 unique_xmalloc_ptr*.
11841 * infcall.c (call_function_by_hand_dummy): Use std::vector.
11845 * avr-tdep.c (avr_read_pc): Change parameter type to
11847 * gdbarch.sh (read_pc): Likewise.
11848 * gdbarch.c: Re-generated.
11849 * gdbarch.h: Re-generated.
11850 * hppa-tdep.c (hppa_read_pc): Change parameter type to
11852 * ia64-tdep.c (ia64_read_pc): Likewise.
11853 * mips-tdep.c (mips_read_pc): Likewise.
11854 * spu-tdep.c (spu_read_pc): Likewise.
11858 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11859 * regcache-dump.c: New file.
11860 * regcache.c: Move register_dump to regcache-dump.c.
11861 (maintenance_print_registers): Likewise.
11862 (maintenance_print_raw_registers): Likewise.
11863 (maintenance_print_cooked_registers): Likewise.
11864 (maintenance_print_register_groups): Likewise.
11865 (maintenance_print_remote_registers): Likewise.
11866 (_initialize_regcache): Likewise.
11867 * regcache.h (register_dump): Moved from regcache.c.
11871 * regcache.c (regcache::regcache): Update.
11872 (regcache::invalidate): Move it to detached_regcache::invalidate.
11873 (get_thread_arch_aspace_regcache): Update.
11874 (regcache::raw_update): Update.
11875 (regcache::cooked_read): Remove some code.
11876 (regcache::cooked_read_value): Likewise.
11877 (regcache::raw_write): Remove assert on m_readonly_p.
11878 (regcache::raw_supply_integer): Move it to
11879 detached_regcache::raw_supply_integer.
11880 (regcache::raw_supply_zeroed): Likewise.
11881 * regcache.h (detached_regcache) <raw_supply_integer>: New
11883 <raw_supply_zeroed, invalidate>: Likewise.
11884 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11885 <invalidate>: Likewise.
11886 <m_readonly_p>: Removed.
11890 * infcmd.c (get_return_value): Let stop_regs point to
11891 get_current_regcache.
11892 * regcache.c (regcache::regcache): Remove.
11893 (register_dump_reg_buffer): New class.
11894 (regcache_print): Adjust.
11895 * regcache.h (regcache): Remove constructors.
11899 * regcache.c (class register_dump): New class.
11900 (register_dump_regcache, register_dump_none): New class.
11901 (register_dump_remote, register_dump_groups): New class.
11902 (regcache_print): Update.
11903 * regcache.h (regcache_dump_what): Move it to regcache.c.
11904 (regcache) <dump>: Remove.
11908 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11910 (jit_unwind_reg_set_impl): Call raw_supply.
11911 (jit_frame_sniffer): Use reg_buffer_rw.
11912 * record-full.c (record_full_core_regbuf): Change its type.
11913 (record_full_core_open_1): Use reg_buffer_rw.
11914 (record_full_close): Likewise.
11915 (record_full_core_fetch_registers): Use regcache->raw_supply.
11916 (record_full_core_store_registers): Likewise.
11917 * regcache.c (regcache::get_register_status): Move it to
11919 (regcache_raw_set_cached_value): Remove.
11920 (regcache::raw_set_cached_value): Remove.
11921 (regcache::raw_write): Call raw_supply.
11922 (regcache::raw_supply): Move it to reg_buffer_rw.
11923 * regcache.h (regcache_raw_set_cached_value): Remove.
11924 (reg_buffer_rw): New class.
11928 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11929 readonly_detached_regcache.
11930 (dummy_frame_prev_register): Use regcache->cooked_read.
11931 * frame.c (frame_save_as_regcache): Change return type.
11932 (frame_pop): Update.
11933 * frame.h (frame_save_as_regcache): Update declaration.
11934 * inferior.h (get_infcall_suspend_state_regcache): Update
11936 * infrun.c (infcall_suspend_state) <registers>: use
11937 readonly_detached_regcache.
11938 (save_infcall_suspend_state): Don't use regcache_dup.
11939 (get_infcall_suspend_state_regcache): Change return type.
11940 * linux-fork.c (struct fork_info) <savedregs>: Change to
11941 readonly_detached_regcache.
11943 (fork_save_infrun_state): Don't use regcache_dup.
11944 (info_checkpoints_command): Adjust.
11945 * mi/mi-main.c (register_changed_p): Update declaration.
11946 (mi_cmd_data_list_changed_registers): Use
11947 readonly_detached_regcache.
11948 (register_changed_p): Change parameter type to
11949 readonly_detached_regcache.
11950 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11951 readonly_detached_regcache.
11952 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11953 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11955 (regcache::save): Move it to reg_buffer.
11956 (regcache::restore): Change parameter type.
11957 (regcache_dup): Remove.
11958 * regcache.h (reg_buffer) <save>: New method.
11959 (readonly_detached_regcache): New class.
11960 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11961 readonly_detached_regcache.
11962 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11966 * frame.c (frame_save_as_regcache): Use regcache method save.
11967 (frame_pop): Use regcache method restore.
11968 * infrun.c (restore_infcall_suspend_state): Likewise.
11969 * linux-fork.c (fork_load_infrun_state): Likewise.
11970 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11972 * regcache.c (regcache_save): Remove.
11973 (regcache::restore): More asserts.
11974 (regcache_cpy): Remove.
11975 * regcache.h (regcache_save): Remove the declaration.
11976 (regcache::restore): Move from private to public.
11977 Remove the friend declaration of regcache_cpy.
11978 (regcache_cpy): Remove declaration.
11982 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11983 parameter type to 'readable_regcache *'.
11984 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11985 * arm-tdep.c (arm_neon_quad_read): Likewise.
11986 (arm_pseudo_read): Likewise.
11987 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11988 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11989 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11990 * gdbarch.c: Re-generated.
11991 * gdbarch.h: Re-generated.
11992 * gdbarch.sh (pseudo_register_read): Change parameter type to
11993 'readable_regcache *'.
11994 (pseudo_register_read_value): Likewise.
11995 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11996 (h8300_pseudo_register_read): Likewise.
11997 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11998 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11999 (i386_pseudo_register_read_into_value): Likewise.
12000 (i386_pseudo_register_read_value): Likewise.
12001 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12003 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12004 * m32c-tdep.c (m32c_raw_read): Likewise.
12005 (m32c_read_flg): Likewise.
12006 (m32c_banked_register): Likewise.
12007 (m32c_banked_read): Likewise.
12008 (m32c_sb_read): Likewise.
12009 (m32c_part_read): Likewise.
12010 (m32c_cat_read): Likewise.
12011 (m32c_r3r2r1r0_read): Likewise.
12012 (m32c_pseudo_register_read): Likewise.
12013 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12014 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12015 (mep_pseudo_cr64_read): Likewise.
12016 (mep_pseudo_register_read): Likewise.
12017 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12018 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12019 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12020 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12021 (regcache::cooked_read): Likewise.
12022 (regcache::cooked_read_value): Likewise.
12023 (regcache_cooked_read_signed):
12024 (regcache::cooked_read): Likewise.
12025 * regcache.h (readable_regcache): New class.
12026 (regcache): Inherit readable_regcache. Move some methods to
12028 * rl78-tdep.c (rl78_pseudo_register_read): Change
12029 parameter type to 'readable_regcache *'.
12030 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12031 (e500_pseudo_register_read): Change parameter type to
12032 'readable_regcache *'.
12033 (dfp_pseudo_register_read): Likewise.
12034 (vsx_pseudo_register_read): Likewise.
12035 (efpr_pseudo_register_read): Likewise.
12036 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12037 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12038 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12039 (sh64_pseudo_register_read): Likewise.
12040 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12041 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12042 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12043 (spu_pseudo_register_read): Likewise.
12044 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12045 (xtensa_pseudo_register_read): Likewise.
12049 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12050 (regcache::arch): Move it to reg_buffer::arch.
12051 (regcache::register_buffer): Likewise.
12052 (regcache::assert_regnum): Likewise.
12053 (regcache::num_raw_registers): Likewise.
12054 * regcache.h (reg_buffer): New class.
12055 (regcache): Inherit reg_buffer.
12059 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12060 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12064 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12068 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12069 (SFILES): Remove common/*.c files.
12070 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12071 * common/common.host: Add common reference.
12072 * configure.ac: Likewise.
12073 * configure: Regenerate.
12077 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12078 (block_initialize_namespace): Use new.
12079 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12080 (dwarf2_free_objfile): Use delete.
12081 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12082 (copy_type_recursive): Use new.
12083 * gdb_obstack.h (allocate_on_obstack): New.
12088 * inferior.c (exit_inferior_1): Reset inf->control.
12092 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12097 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12098 frame_cleanup_after_sniffer on exception.
12102 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12104 (solib_bfd_open): Make pathname const.
12105 * solib.c (solib_bfd_open): Make pathname const.
12106 * solib-spu.c (spu_bfd_fopen): Make name const.
12107 (spu_bfd_open): Make pathname const.
12108 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12109 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12113 * symfile.c (symfile_bfd_open): Update.
12114 * source.h (openp, source_full_path_of, find_and_open_source):
12115 Change argument type to unique_xmalloc_ptr.
12116 * source.c (openp): Take a unique_xmalloc_ptr.
12117 (source_full_path_of, find_and_open_source): Likewise.
12118 (open_source_file, symtab_to_fullname): Update.
12119 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12120 unique_xmalloc_ptr.
12121 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12122 (exec_file_find): Update.
12123 * psymtab.c (psymtab_to_fullname): Update.
12124 * nto-tdep.h (nto_find_and_open_solib): Update.
12125 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12126 unique_xmalloc_ptr.
12127 * exec.c (exec_file_attach): Update.
12128 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12129 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12133 * solib.c: Include source.h.
12134 * nto-tdep.c: Include source.h.
12135 * mi/mi-cmd-env.c: Include source.h.
12136 * infcmd.c: Include source.h.
12137 * exec.c: Include source.h.
12138 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12139 (add_path, directory_switch, source_path, init_source_path): Move
12141 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12142 (add_path, directory_switch, source_path, init_source_path):
12147 * solist.h (exec_file_find, solib_find): Return
12148 unique_xmalloc_ptr.
12149 (solib_bfd_fopen): Take a const char *.
12150 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12151 (exec_file_find, solib_find): Likewise.
12152 (solib_bfd_fopen): Do not take ownership of "pathname".
12153 (solib_bfd_open): Use unique_xmalloc_ptr.
12154 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12155 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12156 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12157 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12161 * ada-lang.c (name_match_type_from_name): Remove reference to
12162 ada_name_for_lookup in function's documentation.
12163 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12167 * defs.h (enum openp_flags): New enum.
12168 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12169 Move to enum openp_flags.
12170 (openp_flags): New enum flags.
12171 (openp): Change parameter type to openp_flags.
12172 * source.c (openp): Change parameter type to openp_flags.
12173 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12174 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12178 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12183 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12185 (class dwarf2_queue_guard): ...the destructor of this new class.
12186 (dw2_do_instantiate_symtab): Create instance of the new class
12187 dwarf2_queue_guard, remove cleanup.
12191 * source.c (find_source_lines): Don't reference past the end of
12196 * remote.c (remote_btrace_maybe_reopen): Change error message.
12197 * btrace.c (btrace_enable): Likewise.
12198 (parse_xml_btrace): Likewise.
12199 (parse_xml_btrace_conf): Likewise.
12203 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12204 (linux_enable_pt, linux_enable_bts): Call
12205 diagnose_perf_event_open_fail.
12209 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12210 Remove parameter and change return type. Update callers. Move it.
12211 (linux_enable_bts, linux_enable_pt): Improve error message.
12212 (linux_enable_pt): Remove zero buffer size check.
12213 (linux_enable_btrace): Improve error messages. Remove NULL return
12218 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12219 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12220 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12221 (linux_supports_pt, linux_supports_btrace): Remove.
12222 (linux_enable_bts): Call cpu_supports_bts.
12223 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12224 * remote.c (remote_supports_btrace): Remove.
12225 (init_remote_ops): Remove remote_supports_btrace.
12226 * target-delegates.c: Regenerated.
12227 * target.c (target_supports_btrace): Remove.
12228 * target.h (target_ops) <to_supports_btrace>: Remove
12229 (target_supports_btrace): Remove.
12230 * x86-linux-nat.c (x86_linux_create_target): Remove
12231 linux_supports_btrace.
12235 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12237 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12238 exception and use message in own exception.
12242 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12243 (perf_event_pt_event_type): Use gdb_file_up.
12244 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12245 scoped_fd, and scoped_mmap.
12249 * common/scoped_mmap.h: New.
12250 * unittests/scoped_mmap-selftest.c: New.
12251 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12252 unittests/scoped_mmap-selftest.c.
12256 * common/scoped_fd.h: New.
12257 * unittests/scoped_fd-selftest.c: New.
12258 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12259 unittests/scoped_fd-selftest.c.
12263 * auto-load.c (auto_load_section_scripts): Use
12264 gdb::unique_xmalloc_ptr.
12268 * auto-load.c (execute_script_contents): Use std::string.
12272 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12273 Python function, rather than a new command.
12277 * solib.c (solib_find_1): Use std::string.
12278 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12282 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12286 * source.c (find_source_lines): Use gdb::def_vector.
12290 * macrocmd.c (struct temporary_macro_definition): New.
12291 (macro_define_command): Use temporary_macro_definition. Remove
12293 (free_macro_definition_ptr): Remove.
12297 * macroexp.c (maybe_expand): Use std::string.
12301 * macroexp.c (struct macro_buffer): Add initializers for some
12303 (init_buffer, init_shared_buffer, free_buffer)
12304 (free_buffer_return_text): Remove.
12305 (macro_buffer): New constructors.
12306 (~macro_buffer): New destructor.
12307 (macro_buffer::set_shared): New method.
12308 (macro_buffer::resize_buffer, macro_buffer::appendc)
12309 (macro_buffer::appendmem): Now methods, not free functions.
12310 (set_token, append_tokens_without_splicing, stringify)
12311 (macro_stringify): Update.
12312 (gather_arguments): Change return type. Remove argc_p argument,
12313 add args_ptr argument. Use std::vector.
12314 (substitute_args): Remove argc argument. Accept std::vector.
12315 (expand): Update. Use std::vector.
12316 (scan, macro_expand, macro_expand_next): Update.
12320 * symtab.c (default_collect_symbol_completion_matches_break_on):
12321 Use unique_xmalloc_ptr.
12322 * macroscope.h: (sal_macro_scope, user_macro_scope)
12323 (default_macro_scope): Return unique_xmalloc_ptr.
12324 * macroscope.c (sal_macro_scope, user_macro_scope)
12325 (default_macro_scope): Return unique_xmalloc_ptr.
12326 * macroexp.h (macro_expand, macro_expand_once): Return
12327 unique_xmalloc_ptr.
12328 * macroexp.c (macro_expand, macro_expand_once): Return
12329 unique_xmalloc_ptr.
12330 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12331 (info_macro_command, info_macros_command): Use
12332 unique_xmalloc_ptr.
12333 * compile/compile-c-support.c (write_macro_definitions): Use
12334 unique_xmalloc_ptr.
12335 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12339 * value.c (value_static_field): Assign field type instead of
12340 containing type when returning an optimized out value.
12344 * ft32-tdep.c (ft32_read_pc): Remove.
12345 (ft32_write_pc): Remove.
12346 (ft32_gdbarch_init): Update.
12347 * m32r-tdep.c (m32r_read_pc): Remove.
12348 (m32r_gdbarch_init): Update.
12349 * mep-tdep.c (mep_read_pc): Remove.
12350 (mep_gdbarch_init): Update.
12351 * microblaze-tdep.c (microblaze_write_pc): Remove.
12352 (microblaze_gdbarch_init): Update.
12353 * mn10300-tdep.c (mn10300_read_pc): Remove.
12354 (mn10300_write_pc): Remove.
12355 (mn10300_gdbarch_init): Update.
12356 * moxie-tdep.c (moxie_read_pc): Remove.
12357 (moxie_write_pc): Remove.
12358 (moxie_gdbarch_init): Update.
12362 * expprint.c (print_subexp_standard): Handle
12363 OP_F77_UNDETERMINED_ARGLIST.
12364 (dump_subexp_body_standard): Likewise.
12368 * target-descriptions.c (tdesc_element_visitor) Add empty
12370 (tdesc_type): Move make_gdb_type from here.
12371 (tdesc_type_builtin): Likewise.
12372 (tdesc_type_vector): Likewise.
12373 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12374 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12375 (make_gdb_type_union): Likewise.
12376 (make_gdb_type_flags): Likewise.
12377 (make_gdb_type_enum): Likewise.
12378 (make_gdb_type): New function.
12379 (tdesc_register_type): Use static make_gdb_type.
12383 * infcmd.c (default_print_one_register_info): Align natural-format
12384 column values consistently one under another.
12385 (pad_to_column): New function.
12389 * dwarf2read.c (dwarf2_physname): Move commment.
12393 * varobj.c (varobj_formatted_print_options): Allow recursive
12394 pretty printing if pretty printing is enabled.
12398 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12399 names after a structop as a filename.
12403 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12404 (arm_record_coproc_data_proc): Likewise.
12408 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12412 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12413 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12417 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12418 * inflow.c (child_terminal_save_inferior): Wrap reference to
12419 tcgetpgrp in HAVE_TERMIOS_H.
12420 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12422 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12423 always iterate over all inferiors.
12424 (gdbsim_cntrl_c): Adjust.
12425 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12429 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12430 index type is objfile-owned if the element type is as well.
12438 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12439 "features/s390x-linux64.c".
12440 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12441 s390_linux32 and s390x_linux64.
12442 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12444 * s390-tdep.c: Include "features/s390-linux32.c" and
12445 "features/s390x-linux64.c".
12446 (s390_tdesc_valid): Add check for tdesc_has_registers.
12447 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12448 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12449 tdesc_s390x_linux64.
12450 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12451 tdesc_s390x_linux64 to...
12452 * s390-tdep.h: ...here.
12457 * config.in, configure: Regenerate.
12458 * configure.ac: Check for getpgid.
12459 * go32-nat.c (go32_pass_ctrlc): New.
12460 (go32_target): Install it.
12461 * inf-child.c (inf_child_target): Install
12462 child_terminal_save_inferior, child_pass_ctrlc and
12464 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12465 (inf_ptrace_target): No longer install it.
12466 * infcmd.c (interrupt_target_1): Adjust.
12467 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12468 (child_interrupt): Declare.
12469 (inferior::terminal_state): New.
12470 * inflow.c (struct terminal_info): Update comments.
12471 (inferior_process_group): Delete.
12472 (terminal_is_ours): Delete.
12473 (gdb_tty_state): New.
12474 (child_terminal_init): Adjust.
12475 (is_gdb_terminal, sharing_input_terminal_1)
12476 (sharing_input_terminal): New functions.
12477 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12478 Set the process's actual process group in the foreground if
12479 possible. Handle is_ours_for_output/is_ours distinction. Don't
12480 mark terminal as the inferior's if not sharing GDB's terminal.
12481 Don't check attach_flag.
12482 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12483 pass down a target_terminal_state.
12484 (child_terminal_save_inferior): New, factored out from ...
12485 (child_terminal_ours_1): ... this. Handle
12486 target_terminal_state::is_ours_for_output.
12487 (child_interrupt, child_pass_ctrlc): New.
12488 (inflow_inferior_exit): Clear the inferior's terminal_state.
12489 (copy_terminal_info): Copy the inferior's terminal state.
12490 (_initialize_inflow): Remove reference to terminal_is_ours.
12491 * inflow.h (inferior_process_group): Delete.
12492 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12493 * procfs.c (procfs_target): Don't install procfs_interrupt.
12494 (procfs_interrupt): Delete.
12495 * remote.c (remote_serial_quit_handler): Adjust.
12496 (remote_interrupt): Remove ptid parameter. Adjust.
12497 * target-delegates.c: Regenerate.
12498 * target.c: Include "terminal.h".
12499 (target_terminal::terminal_state): Rename to ...
12500 (target_terminal::m_terminal_state): ... this.
12501 (target_terminal::init): Adjust.
12502 (target_terminal::inferior): Adjust to per-inferior
12504 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12505 (target_terminal::ours, target_terminal::ours_for_output): Use
12506 target_terminal_is_ours_kind.
12507 (target_interrupt): Remove ptid parameter. Adjust.
12508 (default_target_pass_ctrlc): Adjust.
12509 * target.h (target_ops::to_terminal_save_inferior): New field.
12510 (target_ops::to_interrupt): Remove ptid_t parameter.
12511 (target_interrupt): Remove ptid_t parameter. Update comment.
12512 (target_pass_ctrlc): Update comment.
12513 * target/target.h (target_terminal_state): New scoped enum,
12514 factored out of ...
12515 (target_terminal::terminal_state): ... here.
12516 (target_terminal::inferior): Update comments.
12517 (target_terminal::restore_inferior): New.
12518 (target_terminal::is_inferior, target_terminal::is_ours)
12519 (target_terminal::is_ours_for_output): Adjust.
12520 (target_terminal::scoped_restore_terminal_state): Adjust to
12521 rename, and call restore_inferior() instead of inferior().
12522 (target_terminal::scoped_restore_terminal_state::m_state): Change
12524 (target_terminal::terminal_state): Rename to ...
12525 (target_terminal::m_terminal_state): ... this and change type.
12529 * linux-nat.c (wait_for_signal): New function.
12530 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12532 (async_terminal_is_ours)
12533 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12534 (linux_nat_add_target): Don't override
12535 to_terminal_inferior/to_terminal_ours.
12539 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12543 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12544 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12545 dwarf2_per_objfile_free here.
12546 (dwarf2_per_objfile_free): Remove.
12547 (_initialize_dwarf2_read): Don't register
12548 dwarf2_per_objfile_free as a registry cleanup.
12552 Avoid compilation errors in MinGW native builds
12554 The error is triggered by including python-internal.h, and the
12557 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12558 from build-gnulib/import/math.h:27,
12559 from d:/usr/Python26/include/pyport.h:235,
12560 from d:/usr/Python26/include/Python.h:58,
12561 from python/python-internal.h:94,
12562 from python/py-arch.c:24:
12563 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12567 This happens because Python headers define 'hypot' to expand t
12568 '_hypot' in the Windows builds.
12569 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12570 'hypoth'. This avoids a compilation error.
12574 * MAINTAINERS (Write After Approval): Fix ordering.
12578 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12582 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12583 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12584 Remove nop. Make const. Comment.
12585 (powerpc32_plt_stub_so_2): New.
12586 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12587 Correct count. Update uses.
12588 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12589 Move common code reading PLT entry word. Correct
12590 powerpc32_plt_stub PLT address calculation.
12591 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12592 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12593 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12594 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12595 (ppc64_standard_linkage8): Likewise.
12596 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12597 Correct insns description.
12598 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12602 GCC PR libstdc++/83906
12603 * gdbtypes.c (operator==(const dynamic_prop &,
12604 const dynamic_prop &)): New.
12605 (operator==(const range_bounds &, const range_bounds &)): New.
12606 (check_types_equal): Use them instead of memcmp.
12607 * gdbtypes.h (operator==(const dynamic_prop &,
12608 const dynamic_prop &)): Declare.
12609 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12610 (operator==(const range_bounds &, const range_bounds &)): Declare.
12611 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12615 * s390-linux-tdep.c (s390_record_address_mask)
12616 (s390_record_calc_disp_common, s390_record_calc_disp)
12617 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12618 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12619 (s390_process_record): Move to s390-tdep.c.
12620 (s390_linux_init_abi_any): Adjust.
12621 * s390-tdep.c (s390_record_address_mask)
12622 (s390_record_calc_disp_common, s390_record_calc_disp)
12623 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12624 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12625 (s390_process_record): Moved from s390-linux-tdep.c
12626 (s390_gdbarch_init): Adjust.
12630 * s390-linux-nat.c (s390-tdep.h): New include.
12631 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12632 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12633 (ALLDEPFILES): Add s390-tdep.c.
12634 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12635 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12636 * s390-tdep.h: ...this. New file.
12637 * s390-linux-tdep.c (s390-tdep.h): New include.
12638 (_initialize_s390_tdep): Rename to...
12639 (_initialize_s390_linux_tdep): ...this and adjust.
12640 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12641 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12643 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12644 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12645 (s390_is_partial_instruction, s390_software_single_step)
12646 (is_non_branch_ril, s390_displaced_step_copy_insn)
12647 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12648 (s390_prologue_data, s390_addr, s390_store, s390_load)
12649 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12650 (s390_register_call_saved, s390_guess_tracepoint_registers)
12651 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12652 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12653 (s390_pseudo_register_name, s390_pseudo_register_type)
12654 (s390_pseudo_register_read, s390_pseudo_register_write)
12655 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12656 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12657 (s390_addr_bits_remove, s390_address_class_type_flags)
12658 (s390_address_class_type_flags_to_name)
12659 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12660 (s390_function_arg_float, s390_function_arg_vector)
12661 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12662 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12663 (s390_frame_align, s390_register_return_value, s390_return_value)
12664 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12665 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12666 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12667 (s390_trad_frame_prev_register, s390_unwind_cache)
12668 (s390_prologue_frame_unwind_cache)
12669 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12670 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12671 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12672 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12673 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12674 (s390_frame_base_address, s390_local_base_address)
12675 (s390_frame_base, s390_gcc_target_options)
12676 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12677 (s390_validate_reg_range, s390_tdesc_valid)
12678 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12679 * s390-tdep.c: ...this. New file.
12683 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12684 (s390_process_record, s390_gdbarch_tdep_alloc)
12685 (s390_linux_init_abi_any): Use/set new hook.
12689 * s390-linux-tdep.c (osabi.h): New include.
12690 (s390_linux_init_abi_31, s390_linux_init_abi_64)
12691 (s390_linux_init_abi_any): New functions.
12692 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12696 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12697 tdesc_has_registers check
12701 * s390-linux-tdep.c (s390_tdesc_valid): New function.
12702 (s390_validate_reg_range): New macro.
12703 (s390_gdbarch_init): Adjust.
12707 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12708 (s390_gdbarch_tdep_alloc): Adjust.
12709 (s390_gdbarch_init): Adjust.
12713 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12714 <have_tdb>: Change type to bool.
12715 (s390_gdbarch_tdep_alloc): Adjust.
12716 (s390_gdbarch_init): Adjust.
12720 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12721 (gdbarch_tdep) <have_upper, have_vx>: New fields.
12722 (s390_gdbarch_tdep_alloc): New function.
12723 (s390_gdbarch_init): Allocate tdep at start and use its fields
12724 instead of separate variables.
12728 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12729 when looking for cached gdbarch and add comment for remaining.
12734 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12739 * MAINTAINERS: Update my company e-mail address.
12743 * regcache.c (cooked_write_test): New function.
12744 (_initialize_regcache): Register the test.
12748 * ia64-tdep.c (ia64_pseudo_register_read): Call
12749 regcache->cooked_read instead of regcache_cooked_read_unsigned.
12750 * m32c-tdep.c (m32c_cat_read): Likewise.
12751 (m32c_r3r2r1r0_read): Likewise.
12752 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12753 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12757 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12758 method raw_read instead of regcache_raw_read.
12759 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12760 * arm-tdep.c (arm_neon_quad_read): Likewise.
12761 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12762 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12763 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12764 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12765 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12766 (i386_pseudo_register_read_into_value): Likewise.
12767 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12768 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12769 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12770 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12771 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12772 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12773 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12774 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12775 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12779 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12780 * configure.tgt: Remove target mt.
12781 * mt-tdep.c: Remove.
12782 * regcache.c (cooked_read_test): Remove the check for mt.
12786 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12787 instead of gdbarch_pseudo_register_read_value.
12791 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12796 * linespec.c (create_sals_line_offset): Remove code that preserved
12797 the symtab_and_line's line number.
12801 * varobj.c (varobj_create): Don't set valid_block when creating a
12806 * varobj.c (varobj_create): Remove out of date comment.
12811 * ada-exp.y (write_var_from_sym): Pass extra parameter when
12812 updating innermost block.
12813 * parse.c (innermost_block_tracker::update): Take extra type
12814 parameter, and check types match before updating innermost block.
12815 (write_dollar_variable): Update innermost block for registers.
12816 * parser-defs.h (enum innermost_block_tracker_type): New enum.
12817 (innermost_block_tracker::innermost_block_tracker): Initialise
12819 (innermost_block_tracker::reset): Take type parameter.
12820 (innermost_block_tracker::update): Take type parameter, and pass
12821 type through as needed.
12822 (innermost_block_tracker::m_types): New member.
12823 * varobj.c (varobj_create): Pass type when reseting innermost
12828 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12829 * ada-lang.c (resolve_subexp): Likewise.
12830 * breakpoint.c (set_breakpoint_condition) Likewise.
12831 (watch_command_1) Likewise.
12832 * c-exp.y (variable): Likewise.
12833 * d-exp.y (PrimaryExpression): Likewise.
12834 * f-exp.y (variable): Likewise.
12835 * go-exp.y (variable): Likewise.
12836 * m2-exp.y (variable): Likewise.
12837 * objfiles.c (objfile::~objfile): Likewise.
12838 * p-exp.y (variable): Likewise.
12839 * parse.c (innermost_block): Change type.
12840 * parser-defs.h (class innermost_block_tracker): New.
12841 (innermost_block): Change to innermost_block_tracker.
12842 * printcmd.c (display_command): Switch to innermost_block API.
12843 (do_one_display): Likewise.
12844 * rust-exp.y (do_one_display): Likewise.
12845 * symfile.c (clear_symtab_users): Likewise.
12846 * varobj.c (varobj_create): Switch to innermost_block API, replace
12847 use of innermost_block with block stored on varobj object.
12851 * expression.h (innermost_block): Remove declaration.
12852 * varobj.c: Add 'parser-defs.h' include.
12856 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12857 symbols in the static and global blocks.
12861 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12862 gdb_ptrace.h, and move including gdb_wait.h ...
12863 * nat/linux-ptrace.h: ... to here.
12867 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12868 inf_ptrace_detach_success.
12869 (inf_ptrace_detach_success): Add inferior parameter, use it
12870 instead of inferior_ptid, pass it to detach_inferior.
12871 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12873 * inferior.c (detach_inferior): Add overload that takes an
12875 * inferior.h (detach_inferior): Likewise.
12876 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12877 use inferior_ptid, adjust call to inf_ptrace_detach_success.
12878 * linux-thread-db.c (thread_db_detach): Use inf parameter.
12882 * target.h (struct target_ops) <to_detach>: Add inferior
12884 (target_detach): Likewise.
12885 * target.c (dispose_inferior): Pass inferior down.
12886 (target_detach): Pass inferior down. Assert that it is equal to
12887 the current inferior.
12888 * aix-thread.c (aix_thread_detach): Pass inferior down.
12889 * corefile.c (core_file_command): Pass current_inferior() down.
12890 * corelow.c (core_detach): Add inferior parameter.
12891 * darwin-nat.c (darwin_detach): Likewise.
12892 * gnu-nat.c (gnu_detach): Likewise.
12893 * inf-ptrace.c (inf_ptrace_detach): Likewise.
12894 * infcmd.c (detach_command): Pass current_inferior() down to
12896 * infrun.c (follow_fork_inferior): Pass parent_inf to
12898 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12900 * linux-nat.c (linux_nat_detach): Add inferior parameter.
12901 * linux-thread-db.c (thread_db_detach): Likewise.
12902 * nto-procfs.c (procfs_detach): Likewise.
12903 * procfs.c (procfs_detach): Likewise.
12904 * record.c (record_detach): Likewise.
12905 * record.h (struct inferior): Forward-declare.
12906 (record_detach): Add inferior parameter.
12907 * remote-sim.c (gdbsim_detach): Likewise.
12908 * remote.c (remote_detach_1): Likewise.
12909 (remote_detach): Likewise.
12910 (extended_remote_detach): Likewise.
12911 * sol-thread.c (sol_thread_detach): Likewise.
12912 * target-debug.h (target_debug_print_inferior_p): New macro.
12913 * target-delegates.c: Re-generate.
12914 * top.c (kill_or_detach): Pass inferior down to target_detach.
12915 * windows-nat.c (windows_detach): Add inferior parameter.
12919 * target.h (struct target_ops) <to_detach>: Remove args
12921 (target_detach): Likewise.
12922 * target.c (dispose_inferior): Adjust.
12923 (target_detach): Remove args parameter, adjust.
12924 * aix-thread.c (aix_thread_detach): Adjust.
12925 * corefile.c (core_file_command): Adjust.
12926 * corelow.c (core_detach): Adjust.
12927 * darwin-nat.c (darwin_detach): Adjust.
12928 * gnu-nat.c (gnu_detach): Adjust.
12929 * inf-ptrace.c (inf_ptrace_detach): Adjust.
12930 * infcmd.c (detach_command): Adjust
12931 * infrun.c (follow_fork_inferior): Adjust.
12932 (handle_vfork_child_exec_or_exit): Adjust.
12933 * linux-fork.c (linux_fork_detach): Remove args parameter.
12934 * linux-fork.h (linux_fork_detach): Likewise.
12935 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12936 * linux-thread-db.c (thread_db_detach): Likewise.
12937 * nto-procfs.c (procfs_detach): Likewise.
12938 * procfs.c (procfs_detach): Likewise.
12939 (do_detach): Remove signo parameter.
12940 * record.c (record_detach): Remove args parameter.
12941 * record.h (record_detach): Likewise.
12942 * remote-sim.c (gdbsim_detach): Likewise.
12943 * remote.c (remote_detach_1): Likewise.
12944 (remote_detach): Likewise.
12945 (extended_remote_detach): Likewise.
12946 * sol-thread.c (sol_thread_detach): Likewise.
12947 * target-delegates.c: Re-generate.
12948 * top.c (struct qt_args) <args>: Remove field.
12949 (kill_or_detach): Don't pass args.
12950 (quit_force): Don't set args.
12951 * windows-nat.c (windows_detach): Remove args parameter.
12955 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12956 (arm_linux_init_abi): Install it.
12960 * osabi.c (gdb_osabi_names): Extend the regexp for
12961 arm-linux-gnueabihf.
12965 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12967 (abbrev_table::add_abbrev): Update.
12968 (abbrev_table::lookup_abbrev): Update.
12972 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12976 * compile/compile.c (compile_to_object): Convert "triplet_rx"
12981 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
12985 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12986 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12987 (create_array_type_with_stride): Update.
12988 * dwarf2read.c (set_die_type): Update.
12992 * dwarf2read.c (delayed_method_info): Remove typedef.
12993 (dwarf2_cu::method_info): Now a std::vector.
12994 (add_to_method_list): Update.
12995 (free_delayed_list): Remove.
12996 (compute_delayed_physnames): Update.
12997 (process_full_comp_unit, process_full_type_unit): Clear the method
12998 list. Remove cleanups.
12999 (psymtab_include_file_name): Add name_holder parameter. Use
13000 unique_xmalloc_ptr.
13001 (dwarf_decode_lines): Update.
13006 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13007 (dwarf2_per_objfile::free_cached_comp_units)
13008 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13009 (init_cutu_and_read_dies_no_follow): Update.
13010 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13011 (dwarf2_cu::~dwarf2_cu): New.
13012 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13013 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13018 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13019 (struct die_reader_specs) <abbrev_table>: New member.
13020 (struct abbrev_table): Add constructor.
13021 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13022 <abbrev_obstack>: Now an auto_obstack.
13023 (abbrev_table_up): New typedef.
13024 (init_cu_die_reader): Add abbrev_table parameter.
13025 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13026 Add result_dwo_abbrev_table.
13027 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13028 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13030 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13032 (skip_children): Update.
13033 (abbrev_table::alloc_abbrev): Rename from
13034 abbrev_table_alloc_abbrev.
13035 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13036 (abbrev_table::lookup_abbrev): Rename from
13037 abbrev_table_lookup_abbrev.
13038 (abbrev_table_read_table): Return abbrev_table_up.
13039 (abbrev_table_free, abbrev_table_free_cleanup)
13040 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13041 (load_partial_dies): Update.
13045 * dwarf2read.c (dwarf2_compute_name): Update comment.
13046 (read_func_scope, read_variable): Update.
13047 (new_symbol): Remove.
13048 (new_symbol_full): Rename to new_symbol.
13053 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13054 a warning instead of throwing an error, set section size to 0 and return
13056 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13060 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13062 (linux_ptrace_attach_fail_reason_string): Likewise.
13063 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13065 (linux_ptrace_attach_fail_reason_string): Likewise.
13066 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13070 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13075 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13076 checking for fs_base/gs_base fields in struct user_regs_struct.
13077 * configure: Regenerate.
13081 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13083 (aarch64_linux_init_abi): Install it to gdbarch hook
13084 gcc_target_options.
13088 * common/signals-state-save-restore.c
13089 (save_original_signals_state): Fix typos.
13094 * Makefile.in (install-only): Install gdb-add-index.
13098 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13102 * infrun.c (keep_going_pass_signal): Clear step-over info when
13103 insert_breakpoints fails.
13108 * infrun.c (resume): Rename to ...
13109 (resume_1): ... this.
13110 (resume): Reimplement as wrapper around resume_1.
13115 * remote.c (remote_parse_stop_reply): Default to the last-set
13116 general thread instead of to 'magic_null_ptid'.
13120 * language.h (language_get_symbol_name_matcher): Rename ...
13121 (get_symbol_name_matcher): ... this.
13122 * language.c (language_get_symbol_name_matcher): Ditto.
13123 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13130 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13131 Adjust to use language_get_symbol_name_matcher instead of
13132 language_defn::la_get_symbol_name_matcher.
13133 * language.c (language_get_symbol_name_matcher): If in Ada mode
13134 and the lookup name is a verbatim match, return Ada's matcher.
13135 * language.h (language_get_symbol_name_matcher): Adjust comment.
13136 (ada_lookup_name_info::verbatim_p):: New method.
13141 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13142 minsym's language is language_auto or language_cplus, pass down
13143 language_ada instead.
13144 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13149 * minsyms.c (linkage_name_str): New function.
13150 (iterate_over_minimal_symbols): Use it.
13154 * NEWS: Document that 'info proc' now works on FreeBSD.
13158 * configure.ac: Check for kinfo_getfile in libutil.
13159 * configure: Regenerate.
13160 * config.in: Regenerate.
13161 * fbsd-nat.c: Include "fbsd-tdep.h".
13162 (fbsd_fetch_cmdline): New.
13163 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13164 rather than calling error.
13165 (fbsd_info_proc): New.
13166 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13167 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13168 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13172 * fbsd-nat.c (struct free_deleter): Remove.
13173 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13177 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13178 NULL for an empty pathname.
13182 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13183 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13184 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13185 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13186 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13187 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13188 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13189 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13190 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13191 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13192 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13193 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13194 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13195 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13196 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13200 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13201 (gnu_xfer_auxv): New function.
13202 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13203 TARGET_OBJECT_AUXV.
13208 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13210 (COMMON_OBS): Remove selftest.o.
13211 * configure.ac: Append selftest-arch.c and common/selftest.c to
13212 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13213 * configure: Re-generated.
13214 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13216 (maintenance_info_selftests): Likewise.
13220 * ada-valprint.c (val_print_packed_array_elements): Use
13221 proper number of elements when printing an array indexed
13222 by an enumeration type.
13226 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13227 (dw2_get_file_names_reader): Adjust.
13228 (lookup_dwo_signatured_type): Adjust.
13229 (lookup_dwp_signatured_type): Adjust.
13230 (lookup_signatured_type): Adjust.
13231 (create_type_unit_group): Adjust.
13232 (get_type_unit_group): Adjust.
13233 (process_psymtab_comp_unit_reader): Adjust.
13234 (build_type_psymtabs_reader): Adjust.
13235 (scan_partial_symbols): Adjust.
13236 (add_partial_symbol): Adjust.
13237 (add_partial_subprogram): Adjust.
13238 (peek_die_abbrev): Adjust.
13239 (fixup_go_packaging): Adjust.
13240 (process_imported_unit_die): Adjust.
13241 (dwarf2_compute_name): Adjust.
13242 (dwarf2_physname): Adjust.
13243 (read_import_statement): Adjust.
13244 (handle_DW_AT_stmt_list): Adjust.
13245 (read_file_scope): Adjust.
13246 (read_func_scope): Adjust.
13247 (read_lexical_block_scope): Adjust.
13248 (read_call_site_scope): Adjust.
13249 (read_variable): Adjust.
13250 (dwarf2_rnglists_process): Adjust.
13251 (dwarf2_ranges_process): Adjust.
13252 (dwarf2_ranges_read): Adjust.
13253 (dwarf2_get_pc_bounds): Adjust.
13254 (dwarf2_record_block_ranges): Adjust.
13255 (dwarf2_add_field): Adjust.
13256 (dwarf2_add_member_fn): Adjust.
13257 (read_structure_type): Adjust.
13258 (process_structure_scope): Adjust.
13259 (read_enumeration_type): Adjust.
13260 (read_array_type): Adjust.
13261 (mark_common_block_symbol_computed): Adjust.
13262 (read_common_block): Adjust.
13263 (read_namespace_type): Adjust.
13264 (read_namespace): Adjust.
13265 (read_module_type): Adjust.
13266 (read_tag_pointer_type): Adjust.
13267 (read_tag_ptr_to_member_type): Adjust.
13268 (read_tag_string_type): Adjust.
13269 (read_subroutine_type): Adjust.
13270 (read_typedef): Adjust.
13271 (read_base_type): Adjust.
13272 (attr_to_dynamic_prop): Adjust.
13273 (read_subrange_type): Adjust.
13274 (read_unspecified_type): Adjust.
13275 (dwarf2_read_abbrevs): Adjust.
13276 (load_partial_dies): Adjust.
13277 (read_partial_die): Adjust.
13278 (find_partial_die): Adjust.
13279 (guess_partial_die_structure_name): Adjust.
13280 (fixup_partial_die): Adjust.
13281 (read_attribute_value): Adjust.
13282 (read_addr_index): Adjust.
13283 (read_addr_index_from_leb128): Adjust.
13284 (read_str_index): Adjust.
13285 (dwarf2_string_attr): Adjust.
13286 (get_debug_line_section): Adjust.
13287 (dwarf_decode_line_header): Adjust.
13288 (lnp_state_machine::check_line_address): Adjust.
13289 (dwarf_decode_lines_1): Adjust.
13290 (dwarf_decode_lines): Adjust.
13291 (dwarf2_start_symtab): Adjust.
13292 (var_decode_location): Adjust.
13293 (new_symbol_full): Adjust.
13294 (dwarf2_const_value_data): Adjust.
13295 (dwarf2_const_value_attr): Adjust.
13296 (dwarf2_const_value): Adjust.
13297 (die_type): Adjust.
13298 (die_containing_type): Adjust.
13299 (build_error_marker_type): Adjust.
13300 (lookup_die_type): Adjust.
13301 (guess_full_die_structure_name): Adjust.
13302 (anonymous_struct_prefix): Adjust.
13303 (determine_prefix): Adjust.
13304 (dwarf2_name): Adjust.
13305 (follow_die_ref_or_sig): Adjust.
13306 (follow_die_offset): Adjust.
13307 (follow_die_ref): Adjust.
13308 (follow_die_sig_1): Adjust.
13309 (follow_die_sig): Adjust.
13310 (get_signatured_type): Adjust.
13311 (get_DW_AT_signature_type): Adjust.
13312 (decode_locdesc): Adjust.
13313 (dwarf_decode_macros): Adjust.
13314 (cu_debug_loc_section): Adjust.
13315 (fill_in_loclist_baton): Adjust.
13316 (dwarf2_symbol_mark_computed): Adjust.
13317 (init_one_comp_unit): Don't assign
13318 dwarf2_cu::dwarf2_per_objfile.
13319 (set_die_type): Adjust.
13323 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13324 <dwarf2_per_objfile>: New field.
13325 (dwarf2_per_objfile): Remove global.
13326 (get_dwarf2_per_objfile): New function.
13327 (set_dwarf2_per_objfile): New function.
13328 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13329 dwarf2_per_objfile.
13330 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13331 (read_abbrev_offset): Likewise.
13332 (read_indirect_string): Likewise.
13333 (read_indirect_line_string): Likewise.
13334 (read_indirect_string_at_offset): Likewise.
13335 (read_indirect_string_from_dwz): Likewise.
13336 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13337 dwarf2_per_objfile.
13338 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13339 (create_all_comp_units): Change objfile parameter to
13340 dwarf2_per_objfile.
13341 (create_all_type_units): Likewise.
13342 (process_queue): Add dwarf2_per_objfile parameter.
13343 (read_and_check_comp_unit_head): Likewise.
13344 (lookup_dwo_unit_in_dwp): Likewise.
13345 (get_dwp_file): Likewise.
13346 (process_cu_includes): Likewise.
13347 (struct free_dwo_file_cleanup_data): New struct.
13348 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13349 set_dwarf2_per_objfile.
13350 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13351 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13352 context, adjust calls.
13353 (dw2_instantiate_symtab): Likewise.
13354 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13355 (dw2_get_cu): Likewise.
13356 (create_cu_from_index_list): Change objfile parameter to
13357 dwarf2_per_objfile.
13358 (create_cus_from_index_list): Get dwarf2_per_objfile from
13359 context, adjust calls.
13360 (create_cus_from_index): Likewise.
13361 (create_signatured_type_table_from_index): Change objfile
13362 parameter to dwarf2_per_objfile.
13363 (create_signatured_type_table_from_debug_names): Change objfile
13364 parameter to dwarf2_per_objfile.
13365 (create_addrmap_from_index): Likewise.
13366 (create_addrmap_from_aranges): Likewise.
13367 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13368 (dw2_setup): Remove.
13369 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13371 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13372 get_dwarf2_per_objfile.
13373 (dw2_forget_cached_source_info): Likewise.
13374 (dw2_map_symtabs_matching_filename): Likewise.
13375 (struct dw2_symtab_iterator) <index>: Remove.
13376 <dwarf2_per_objfile>: New field.
13377 (dw2_symtab_iter_init): Replace index parameter with
13378 dwarf2_per_objfile.
13379 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13380 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13381 (dw2_print_stats): Likewise.
13382 (dw2_dump): Likewise.
13383 (dw2_expand_symtabs_for_function): Likewise.
13384 (dw2_expand_all_symtabs): Likewise.
13385 (dw2_expand_symtabs_with_fullname): Likewise.
13386 (dw2_expand_marked_cus): Replace index and objfile parameters
13387 with dwarf2_per_objfile.
13388 (dw_expand_symtabs_matching_file_matcher): Add
13389 dwarf2_per_objfile parameter and adjust calls.
13390 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13392 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13393 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13395 (create_cus_from_debug_names_list): Replace objfile parameter
13396 with dwarf2_per_objfile and adjust calls.
13397 (create_cus_from_debug_names): Likewise.
13398 (dwarf2_read_debug_names): Likewise.
13399 (mapped_debug_names::namei_to_name): Adjust call.
13400 (dw2_debug_names_iterator::next): Likewise.
13401 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13402 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13403 (dw2_debug_names_dump): Likewise.
13404 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13405 (dw2_debug_names_expand_symtabs_matching): Likewise.
13406 (dwarf2_initialize_objfile): Likewise.
13407 (dwarf2_build_psymtabs): Likewise.
13408 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13410 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13411 (read_and_check_comp_unit_head): Likewise.
13412 (read_abbrev_offset): Likewise.
13413 (create_debug_type_hash_table): Likewise.
13414 (create_debug_types_hash_table): Likewise.
13415 (create_all_type_units): Replace objfile parameter with
13416 dwarf2_per_objfile.
13417 (add_type_unit): Add dwarf2_per_objfile parameter.
13418 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13419 with dwarf2_per_objfile.
13420 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13421 (lookup_dwp_signatured_type): Likewise.
13422 (lookup_signatured_type): Likewise.
13423 (read_cutu_die_from_dwo): Likewise.
13424 (init_tu_and_read_dwo_dies): Likewise.
13425 (init_cutu_and_read_dies): Likewise.
13426 (init_cutu_and_read_dies_no_follow): Likewise.
13427 (allocate_type_unit_groups_table): Add objfile parameter.
13428 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13429 (get_type_unit_group): Likewise.
13430 (process_psymtab_comp_unit): Update call.
13431 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13432 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13433 (print_tu_stats): Likewise.
13434 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13435 in void* parameter.
13436 (build_type_psymtabs): Change objfile parameter to
13437 dwarf2_per_objfile.
13438 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13439 passed in void* parameter.
13440 (process_skeletonless_type_units): Change objfile parameter to
13441 dwarf2_per_objfile.
13442 (set_partial_user): Likewise.
13443 (dwarf2_build_psymtabs_hard): Likewise.
13444 (read_comp_units_from_section): Likewise.
13445 (create_all_comp_units): Likewise.
13446 (scan_partial_symbols): Update calls.
13447 (add_partial_symbol): Likewise.
13448 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13449 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13450 (process_queue): Add dwarf2_per_objfile parameter.
13451 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13452 (compute_compunit_symtab_includes): Likewise.
13453 (process_cu_includes): Add dwarf2_per_objfile parameter.
13454 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13455 (process_full_type_unit): Likewise.
13456 (process_imported_unit_die): Update call.
13457 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13458 (read_file_scope): Likewise.
13459 (allocate_dwo_file_hash_table): Add objfile parameter.
13460 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13461 (create_cus_hash_table): Likewise.
13462 (create_dwp_hash_table): Likewise.
13463 (create_dwo_unit_in_dwp_v1): Likewise.
13464 (create_dwp_v2_section): Likewise.
13465 (create_dwo_unit_in_dwp_v2): Likewise.
13466 (lookup_dwo_unit_in_dwp): Likewise.
13467 (try_open_dwop_file): Likewise.
13468 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13469 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13470 cleanup to include a reference to dwarf2_per_objfile.
13471 (open_dwp_file): Add dwarf2_per_objfile parameter.
13472 (open_and_init_dwp_file): Likewise.
13473 (get_dwp_file): Likewise.
13474 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13475 (queue_and_load_all_dwo_tus): Update call.
13476 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13478 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13479 (dwarf2_ranges_process): Likewise.
13480 (dwarf2_get_pc_bounds): Likewise.
13481 (mark_common_block_symbol_computed): Likewise.
13482 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13483 (dwarf2_read_abbrevs): Update call.
13484 (read_partial_die): Use dwarf2_per_objfile from cu.
13485 (find_partial_die): Likewise.
13486 (fixup_partial_die): Likewise.
13487 (read_attribute_value): Likewise.
13488 (read_indirect_string_at_offset_from): Add objfile parameter.
13489 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13491 (read_indirect_string_from_dwz): Add objfile parameter.
13492 (read_indirect_string): Add objfile parameter.
13493 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13494 (read_addr_index): Use dwarf2_per_objfile from cu.
13495 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13497 (read_str_index): Use dwarf2_per_objfile from cu.
13498 (get_debug_line_section): Likewise.
13499 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13500 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13501 (new_symbol_full): Use dwarf2_per_objfile from cu.
13502 (build_error_marker_type): Likewise.
13503 (lookup_die_type): Likewise.
13504 (determine_prefix): Likewise.
13505 (follow_die_offset): Likewise.
13506 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13507 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13508 (dwarf2_fetch_die_type_sect_off): Likewise.
13509 (dwarf2_get_die_type): Likewise.
13510 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13511 (get_signatured_type): Likewise.
13512 (get_DW_AT_signature_type): Likewise.
13513 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13514 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13515 (cu_debug_loc_section): Likewise.
13516 (fill_in_loclist_baton): Likewise.
13517 (dwarf2_symbol_mark_computed): Likewise.
13518 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13519 dwarf2_per_objfile.
13520 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13522 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13523 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13524 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13525 (set_die_type): Use dwarf2_free_objfile from cu.
13526 (get_die_type_at_offset): Likewise.
13527 (dwarf2_per_objfile_free): Don't assign global variable.
13528 (debug_names) <constructor>: Add dwarf2_per_objfile
13529 parameter, update m_debugstrlookup construction.
13530 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13532 <m_dwarf2_per_objfile>: New field.
13533 <lookup>: Use m_dwarf2_per_objfile.
13534 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13535 (psyms_seen_size): Likewise.
13536 (write_gdbindex): Replace objfile parameter with
13537 dwarf2_per_objfile.
13538 (write_debug_names): Likewise.
13539 (write_psymtabs_to_index): Likewise.
13540 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13545 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13546 <dwarf2_per_objfile>: New field.
13547 (struct dwarf2_per_cu_data) <objfile>: Remove.
13548 <dwarf2_per_objfile>: New field.
13549 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13551 (create_signatured_type_table_from_index): Likewise.
13552 (create_debug_type_hash_table): Likewise.
13553 (fill_in_sig_entry_from_dwo_entry): Likewise.
13554 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13555 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13557 (create_partial_symtab): Access objfile through
13558 dwarf2_per_objfile.
13559 (process_psymtab_comp_unit_reader): Likewise.
13560 (read_comp_units_from_section): Likewise.
13561 (scan_partial_symbols): Likewise.
13562 (add_partial_symbol): Likewise.
13563 (add_partial_subprogram): Likewise.
13564 (peek_die_abbrev): Likewise.
13565 (fixup_go_packaging): Likewise.
13566 (process_full_comp_unit): Likewise.
13567 (process_full_type_unit): Likewise.
13568 (process_imported_unit_die): Likewise.
13569 (dwarf2_compute_name): Likewise.
13570 (dwarf2_physname): Likewise.
13571 (read_import_statement): Likewise.
13572 (create_cus_hash_table): Assign dwarf2_physname instead of
13574 (read_func_scope): Access objfile through dwarf2_per_objfile.
13575 (read_lexical_block_scope): Likewise.
13576 (read_call_site_scope): Likewise.
13577 (read_variable): Likewise.
13578 (dwarf2_rnglists_process): Likewise.
13579 (dwarf2_ranges_process): Likewise.
13580 (dwarf2_ranges_read): Likewise.
13581 (dwarf2_record_block_ranges): Likewise.
13582 (dwarf2_add_field): Likewise.
13583 (dwarf2_add_member_fn): Likewise.
13584 (read_structure_type): Likewise.
13585 (process_structure_scope): Likewise.
13586 (read_enumeration_type): Likewise.
13587 (read_array_type): Likewise.
13588 (read_common_block): Likewise.
13589 (read_namespace_type): Likewise.
13590 (read_namespace): Likewise.
13591 (read_module_type): Likewise.
13592 (read_tag_pointer_type): Likewise.
13593 (read_tag_ptr_to_member_type): Likewise.
13594 (read_tag_string_type): Likewise.
13595 (read_subroutine_type): Likewise.
13596 (read_typedef): Likewise.
13597 (read_base_type): Likewise.
13598 (attr_to_dynamic_prop): Likewise.
13599 (read_subrange_type): Likewise.
13600 (read_unspecified_type): Likewise.
13601 (load_partial_dies): Likewise.
13602 (read_partial_die): Likewise.
13603 (find_partial_die): Likewise.
13604 (guess_partial_die_structure_name): Likewise.
13605 (fixup_partial_die): Likewise.
13606 (read_attribute_value): Likewise.
13607 (read_addr_index_from_leb128): Likewise.
13608 (dwarf2_read_addr_index): Likewise.
13609 (dwarf2_string_attr): Likewise.
13610 (lnp_state_machine::check_line_address): Likewise.
13611 (dwarf_decode_lines_1): Likewise.
13612 (dwarf_decode_lines): Likewise.
13613 (dwarf2_start_symtab): Likewise.
13614 (var_decode_location): Likewise.
13615 (new_symbol_full): Likewise.
13616 (dwarf2_const_value_data): Likewise.
13617 (dwarf2_const_value_attr): Likewise.
13618 (dwarf2_const_value): Likewise.
13619 (die_type): Likewise.
13620 (die_containing_type): Likewise.
13621 (lookup_die_type): Likewise.
13622 (guess_full_die_structure_name): Likewise.
13623 (anonymous_struct_prefix): Likewise.
13624 (dwarf2_name): Likewise.
13625 (follow_die_ref_or_sig): Likewise.
13626 (follow_die_offset): Likewise.
13627 (follow_die_ref): Likewise.
13628 (dwarf2_fetch_die_loc_sect_off): Likewise.
13629 (dwarf2_fetch_constant_bytes): Likewise.
13630 (dwarf2_fetch_die_type_sect_off): Likewise.
13631 (dwarf2_get_die_type): Likewise.
13632 (follow_die_sig): Likewise.
13633 (decode_locdesc): Likewise.
13634 (dwarf2_per_cu_objfile): Likewise.
13635 (dwarf2_per_cu_text_offset): Likewise.
13636 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13638 (set_die_type): Access objfile through
13639 dwarf2_per_objfile.
13643 * valprint.c (converted_character_d): Remove typedef.
13644 (DEF_VEC_O (converted_character_d)): Remove.
13645 (count_next_character): Use std::vector.
13646 (print_converted_chars_to_obstack): Likewise.
13647 (generic_printstr): Likewise.
13651 * xml-support.h (struct gdb_xml_value): Add constructor.
13652 <value>: Change type to unique_xmalloc_ptr.
13653 (gdb_xml_value_s): Remove typedef.
13654 (DEF_VEC_O (gdb_xml_value_s)): Remove.
13655 (gdb_xml_element_start_handler): Change parameter type to
13657 (xml_find_attribute): Likewise.
13658 * xml-support.c (xml_find_attribute): Change parameter type to
13659 std::vector and adjust.
13660 (gdb_xml_values_cleanup): Remove.
13661 (gdb_xml_parser::start_element): Adjust to std::vector.
13662 (xinclude_start_include): Change paraeter type to std::vector
13664 * btrace.c (check_xml_btrace_version): Likewise.
13665 (parse_xml_btrace_block): Likewise.
13666 (parse_xml_btrace_pt_config_cpu): Likewise.
13667 (parse_xml_btrace_pt): Likewise.
13668 (parse_xml_btrace_conf_bts): Likewise.
13669 (parse_xml_btrace_conf_pt): Likewise.
13670 * memory-map.c (memory_map_start_memory): Likewise.
13671 (memory_map_start_property): Likewise.
13672 * osdata.c (osdata_start_osdata): Likewise.
13673 (osdata_start_item): Likewise.
13674 (osdata_start_column): Likewise.
13675 * remote.c (start_thread): Likewise.
13676 * solib-aix.c (library_list_start_library): Likewise.
13677 (library_list_start_list): Likewise.
13678 * solib-svr4.c (library_list_start_library): Likewise.
13679 (svr4_library_list_start_list): Likewise.
13680 * solib-target.c (library_list_start_segment): Likewise.
13681 (library_list_start_section): Likewise.
13682 (library_list_start_library): Likewise.
13683 (library_list_start_list): Likewise.
13684 * tracepoint.c (traceframe_info_start_memory): Likewise.
13685 (traceframe_info_start_tvar): Likewise.
13686 * xml-syscall.c (syscall_start_syscall): Likewise.
13687 * xml-tdesc.c (tdesc_start_target): Likewise.
13688 (tdesc_start_feature): Likewise.
13689 (tdesc_start_reg): Likewise.
13690 (tdesc_start_union): Likewise.
13691 (tdesc_start_struct): Likewise.
13692 (tdesc_start_flags): Likewise.
13693 (tdesc_start_enum): Likewise.
13694 (tdesc_start_field): Likewise.
13695 (tdesc_start_enum_value): Likewise.
13696 (tdesc_start_vector): Likewise.
13700 * extension.h (struct xmethod_worker) <clone>: Remove.
13701 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13703 (python_xmethod_worker::clone): Remove.
13704 * valops.c (find_overload_match): Use std::move instead of
13709 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13710 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13711 <free_xmethod_worker_data>: Remove.
13712 <get_matching_xmethod_workers>: Chance VEC to std::vector.
13713 <get_xmethod_arg_types>: Remove.
13714 <get_xmethod_result_type>: Remove.
13715 <invoke_xmethod>: Remove.
13716 * extension.c (new_xmethod_worker): Remove.
13717 (clone_xmethod_worker): Remove.
13718 (get_matching_xmethod_workers): Return void, pass std::vector by
13720 (get_xmethod_arg_types): Rename to...
13721 (xmethod_worker::get_arg_types): ... this, and adjust.
13722 (get_xmethod_result_type): Rename to...
13723 (xmethod_worker::get_result_type): ... this, and adjust.
13724 (invoke_xmethod): Remove.
13725 (free_xmethod_worker): Remove.
13726 (free_xmethod_worker_vec): Remove.
13727 * extension.h (enum ext_lang_rc): Move here from
13729 (struct xmethod_worker): Add constructor and destructor.
13732 <invoke, clone, do_get_result_type, do_get_arg_types>: New
13733 virtual pure methods.
13734 <get_arg_types, get_result_type>: New methods.
13735 (xmethod_worker_ptr): Remove typedef.
13736 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13737 (xmethod_worker_vec): Remove typedef.
13738 (xmethod_worker_up): New typedef.
13739 (invoke_xmethod): Remove.
13740 (clone_xmethod_worker): Remove.
13741 (free_xmethod_worker): Remove.
13742 (free_xmethod_worker_vec): Remove.
13743 (get_xmethod_arg_types): Remove.
13744 (get_xmethod_result_type): Remove.
13745 * valops.c (find_method_list): Use std::vector, don't use
13746 intermediate vector.
13747 (value_find_oload_method_list): Use std::vector.
13748 (find_overload_match): Use std::vector.
13749 (find_oload_champ): Use std::vector.
13750 * value.c (value_free): Use operator delete.
13751 (value_of_xmethod): Rename to...
13752 (value_from_xmethod): ... this. Don't assign
13753 xmethod_worker::value, take rvalue-reference.
13754 (result_type_of_xmethod): Adjust.
13755 (call_xmethod): Adjust.
13756 * value.h: Include extension.h.
13757 (struct xmethod_worker): Don't forward-declare.
13758 (value_of_xmethod): Rename to...
13759 (value_from_xmethod): ... this, take rvalue-reference.
13760 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13761 (struct python_xmethod_worker): ... this, add constructor and
13763 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13764 (gdbpy_free_xmethod_worker_data): Rename to...
13765 (python_xmethod_worker::~python_xmethod_worker): ... this and
13767 (gdbpy_clone_xmethod_worker_data): Rename to...
13768 (python_xmethod_worker::clone): ... this and adjust.
13769 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13771 (gdbpy_get_xmethod_arg_types): Rename to...
13772 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13773 (gdbpy_get_xmethod_result_type): Rename to...
13774 (python_xmethod_worker::do_get_result_type): ... this and
13776 (gdbpy_invoke_xmethod): Rename to...
13777 (python_xmethod_worker::invoke): ... this and adjust.
13778 (new_python_xmethod_worker): Rename to...
13779 (python_xmethod_worker::python_xmethod_worker): ... this and
13781 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13783 (gdbpy_free_xmethod_worker_data): Remove.
13784 (gdbpy_get_matching_xmethod_workers): Use std::vector.
13785 (gdbpy_get_xmethod_arg_types): Remove.
13786 (gdbpy_get_xmethod_result_type): Remove.
13787 (gdbpy_invoke_xmethod): Remove.
13788 * python/python.c (python_extension_ops): Remove obsolete
13794 * common/signals-state-save-restore.c
13795 (save_original_signals_state): New parameter 'quiet'. Warn if we
13796 find a custom handler preinstalled, instead of internal erroring.
13797 But only warn if !quiet.
13798 * common/signals-state-save-restore.h
13799 (save_original_signals_state): New parameter 'quiet'.
13800 * main.c (captured_main_1): Move save_original_signals_state call
13801 after option handling, and pass QUIET.
13805 * spu-tdep.c (spu_catch_start): Pass
13806 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13811 * ada-lang.c (literal_symbol_name_matcher): New function.
13812 (ada_get_symbol_name_matcher): Use it for
13813 symbol_name_match_type::SEARCH_NAME.
13814 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
13815 it down instead of assuming symbol_name_match_type::FULL.
13816 * block.h (block_lookup_symbol): New parameter 'match_type'.
13817 * c-valprint.c (print_unpacked_pointer): Use
13818 lookup_symbol_search_name instead of lookup_symbol.
13819 * compile/compile-object-load.c (get_out_value_type): Pass down
13820 symbol_name_match_type::SEARCH_NAME.
13821 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13822 symbol_name_match_type::FULL.
13823 * cp-support.c (cp_get_symbol_name_matcher): Handle
13824 symbol_name_match_type::SEARCH_NAME.
13825 * infrun.c (insert_exception_resume_breakpoint): Use
13826 lookup_symbol_search_name.
13827 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13828 * psymtab.c (maintenance_check_psymtabs): Use
13829 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13830 * stack.c (print_frame_args): Use lookup_symbol_search_name and
13831 SYMBOL_SEARCH_NAME.
13832 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13833 if symbol_name_match_type::SEARCH_NAME.
13834 (lookup_symbol_in_language): Pass down
13835 symbol_name_match_type::FULL.
13836 (lookup_symbol_search_name): New.
13837 (lookup_language_this): Pass down
13838 symbol_name_match_type::SEARCH_NAME.
13839 (lookup_symbol_aux, lookup_local_symbol): New parameter
13840 'match_type'. Pass it down.
13841 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13842 (lookup_symbol_search_name): New declaration.
13843 (lookup_symbol_in_block): New 'match_type' parameter.
13848 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13850 (ada_lookup_symbol): Reimplement in terms of
13851 ada_lookup_symbol_list, bits factored out from
13852 ada_lookup_encoded_symbol.
13856 * ada-exp.y (write_object_renaming): When subscripting an array
13857 using a symbol as the index, pass the block in call to
13858 ada_lookup_encoded_symbol when looking that symbol up.
13862 * ada-lang.c (ada_array_length): Use ada_index_type instead of
13867 * ada-lang.c (ada_to_fixed_value_create): Add handling of
13868 the case where VALUE_LVAL (val0) is not lval_memory.
13872 * ada-valprint.c (print_optional_low_bound): Handle
13873 character-indexed array printing like boolean-indexed array
13878 * NEWS: Create a new section for the next release branch.
13879 Rename the section of the current branch, now that it has
13884 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13885 * version.in: Bump version to 8.1.50.DATE-git.
13889 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13891 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13893 (default_exception_support_info) <catch_handlers_sym>: Add field.
13894 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13895 (ada_exception_name_addr_1): Add "catch handlers" handling.
13896 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13897 Update all callers.
13898 (create_excep_cond_exprs) <ex>: Add parameter.
13899 (re_set_exception): Update create_excep_cond_exprs call.
13900 (print_it_exception, print_one_exception, print_mention_exception)
13901 (print_recreate_exception): Add "catch handler" handling.
13902 (allocate_location_catch_handlers, re_set_catch_handlers)
13903 (check_status_catch_handlers, print_it_catch_handlers)
13904 (print_one_catch_handlers, print_mention_catch_handlers)
13905 (print_recreate_catch_handlers): New function.
13906 (catch_handlers_breakpoint_ops): New variable.
13907 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13908 Add parameter. Add "catch handler" handling.
13909 (ada_exception_sym_name, ada_exception_breakpoint_ops):
13910 Add "catch handler" handling.
13911 (ada_exception_catchpoint_cond_string): Add "catch handler"
13913 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13915 (catch_ada_handlers_command): New function.
13916 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13917 operations structure.
13918 (_initialize_ada_language): Add "catch handlers" command entry.
13919 * NEWS: Document "catch handlers" feature.
13923 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13924 account when creating the array type of the slice.
13925 (ada_value_slice): Likewise.
13929 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13931 (create_array_type_with_stride): Add byte_stride_prop parameter.
13932 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13933 New parameter. Update all callers in this file.
13934 (array_type_has_dynamic_stride): New function.
13935 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13936 of arrays with dynamic byte strides.
13937 * dwarf2read.c (read_array_type): Add support for dynamic
13938 DW_AT_byte_stride attributes.
13942 * dwarf2read.c (read_unspecified_type): Treat
13943 DW_TAG_enumeration_type DIEs from Ada units as stubs.
13947 Update copyright year range in all GDB files.
13951 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13952 and gdb/testsuite/gdb.base/step-line.c.
13956 * copyright.py (main): Dump the contents of
13957 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13958 even if BY_HAND is empty.
13962 * top.c (print_gdb_version): Update Copyright year in version
13967 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13969 For older changes see ChangeLog-2017.
13975 version-control: never