aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.h
AgeCommit message (Collapse)AuthorFilesLines
2020-10-29Change add_target_sections_of_objfile to method on program_spaceTom Tromey1-0/+4
This changes add_target_sections_of_objfile to be a method on program_space. It is renamed to be another overload of add_target_sections, because they are semantically equivalent in a sense. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * symfile.c (add_symbol_file_command): Update. * exec.c (program_space::add_target_sections): Rename. * symfile-mem.c (symbol_file_add_from_memory): Update. * progspace.h (struct program_space) <add_target_sections>: Declare new overload. * exec.h (add_target_sections_of_objfile): Don't declare.
2020-10-29Change add_target_sections to method on program_spaceTom Tromey1-0/+5
This changes add_target_sections to be a method on program_space. Like the earlier change to remove_target_sections, this makes sense because this function is manipulating data that is stored on the program space. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * solib.c (solib_map_sections): Update. * exec.c (program_space::add_target_sections): Now a method. (exec_file_attach): Update. * exec.h (add_target_sections): Don't declare. * progspace.h (struct program_space) <add_target_sections>: Declare.
2020-10-29Change remove_target_sections to method on program_spaceTom Tromey1-0/+3
This changes remove_target_sections to be a method on program_space. This makes sense because this function manipulates data that is attached to the program space. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * progspace.h (struct program_space) <remove_target_sections>: Declare. * exec.c (program_space::remove_target_sections): Now a method. * exec.h (remove_target_sections): Don't declare.
2020-10-29Change program_space_empty_p to method on program_spaceTom Tromey1-3/+4
This changes program_space_empty_p to be a method on program_space. It also changes it to return bool. I removed the "_p" suffix because "empty" is a "well-known" C++ method name. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * inferior.c (delete_inferior): Update. * progspace.c (program_space::empty): Rename from program_space_empty_p. Return bool. * progspace.h (struct program_space) <empty>: New method. (program_space_empty_p): Don't declare.
2020-10-29Change clear_program_space_solib_cache to method on program_spaceTom Tromey1-5/+5
This changes clear_program_space_solib_cache to be a method on program_space. Also, it removes a call to this function from the program_space destructor, as that is not necessary. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * progspace.c (program_space::~program_space): Don't call clear_program_space_solib_cache. (program_space::clear_solib_cache): Rename from clear_solib_cache. * solib.c (handle_solib_event): Update. * progspace.h (struct program_space) <clear_solib_cache>: New method. (clear_program_space_solib_cache): Don't declare.
2020-10-29Remove symfile_objfile macroTom Tromey1-5/+0
This removes the symfile_objfile macro, in favor of just spelling out the member access. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * windows-tdep.c (windows_solib_create_inferior_hook): Update. * target.c (info_target_command): Update. * symfile.c (syms_from_objfile_1, finish_new_objfile) (symbol_file_clear, reread_symbols): Update. * symfile-mem.c (add_symbol_file_from_memory_command): Update. * stabsread.c (scan_file_globals): Update. * solib.c (update_solib_list): Update. * solib-svr4.c (elf_locate_base, open_symbol_file_object) (svr4_fetch_objfile_link_map, enable_break) (svr4_relocate_main_executable) (svr4_iterate_over_objfiles_in_search_order): Update. * solib-frv.c (lm_base, enable_break) (frv_relocate_main_executable): Update. (main_got, frv_fdpic_find_canonical_descriptor): Update. (frv_fetch_objfile_link_map): Update. * solib-dsbt.c (lm_base, dsbt_relocate_main_executable): Update. * solib-darwin.c (darwin_solib_create_inferior_hook): Update. * solib-aix.c (solib_aix_solib_create_inferior_hook): Update. * remote.c (remote_target::get_offsets): Update. (remote_target::start_remote) (extended_remote_target::post_attach): Update. * objfiles.c (entry_point_address_query): Update. * nto-procfs.c (nto_procfs_target::create_inferior): Update. * minsyms.c (get_symbol_leading_char): Update. * frame.c (inside_main_func): Update. * progspace.h (symfile_objfile): Remove macro.
2020-10-29Change program_space::ebfd to a gdb_bfd_ref_ptrTom Tromey1-4/+4
This changes program_space::ebfd to a gdb_bfd_ref_ptr, removing some manual management. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * exec.c (exec_file_attach): Update. * progspace.c (program_space::exec_close): Update. * progspace.h (struct program_space) <ebfd>: Now a gdb_bfd_ref_ptr. <set_exec_bfd>: Change argument type. <exec_bfd>: Update.
2020-10-29Remove the exec_bfd macroTom Tromey1-0/+12
This removes the exec_bfd macro, in favor of new accessors on program_space. In one spot the accessor can't be used; but this is still a big improvement over the macro, IMO. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * windows-tdep.c (windows_solib_create_inferior_hook): Update. * symfile.c (reread_symbols): Update. * symfile-mem.c (add_symbol_file_from_memory_command) (add_vsyscall_page): Update. * source-cache.c (source_cache::get_plain_source_lines): Update. * solib-svr4.c (find_program_interpreter, elf_locate_base) (svr4_current_sos_direct, svr4_exec_displacement) (svr4_relocate_main_executable): Update. (svr4_iterate_over_objfiles_in_search_order): Update. * solib-frv.c (enable_break2, enable_break): Update. * solib-dsbt.c (lm_base, enable_break): Update. * solib-darwin.c (find_program_interpreter) (darwin_solib_create_inferior_hook): Update. * sol-thread.c (rw_common, ps_pdmodel): Update. * rs6000-nat.c (rs6000_nat_target::create_inferior): Update. * remote.c (compare_sections_command) (remote_target::trace_set_readonly_regions): Update. * remote-sim.c (get_sim_inferior_data) (gdbsim_target::create_inferior, gdbsim_target::create_inferior): Update. (gdbsim_target_open, gdbsim_target::files_info): Update. * exec.h (exec_bfd): Remove macro. * progspace.c (initialize_progspace): Update. * proc-service.c (ps_addr_to_core_addr, core_addr_to_ps_addr): Update. * nto-procfs.c (nto_procfs_target::post_attach) (nto_procfs_target::create_inferior): Update. * maint.c (maintenance_info_sections): Update. * linux-thread-db.c (thread_db_target::get_thread_local_address): Update. * infcmd.c (post_create_inferior): Update. * gcore.c (default_gcore_arch, default_gcore_target): Update. (objfile_find_memory_regions): Update. * exec.c (validate_exec_file, exec_file_attach) (exec_read_partial_read_only, print_section_info): Update. * corelow.c (core_target_open): Update. * corefile.c (reopen_exec_file, validate_files): Update. * arm-tdep.c (gdb_print_insn_arm): Update. * arch-utils.c (gdbarch_update_p, default_print_insn): Update. * progspace.h (struct program_space) <exec_bfd, set_exec_bfd>: New methods.
2020-10-29Remove current_target_sections macroTom Tromey1-4/+0
This removes the current_target_sections macro, replacing it with uses of the appropriate member from current_program_space. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * progspace.h (current_target_sections): Remove macro. * solib-svr4.c (scan_dyntag): Update. * solib-dsbt.c (scan_dyntag): Update. * exec.c (exec_target::close): Update. (add_target_sections, add_target_sections_of_objfile) (remove_target_sections, exec_target::get_section_table) (exec_target::files_info, set_section_command) (exec_set_section_address, exec_target::has_memory) (exec_target::has_memory): Update.
2020-10-29Change exec_close to be a method on program_spaceTom Tromey1-0/+3
exec_close uses the current program space, so it seemed cleaner to change it to be a method on program_space. This patch makes this change. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * progspace.c (program_space::exec_close): New method, from exec_close in exec.c. * exec.c (exec_close): Move to progspace.c. (exec_target::close, exec_file_attach): Update. * progspace.h (struct program_space) <exec_close>: Declare method.
2020-10-29Remove exec_filename macroTom Tromey1-3/+3
This removes the exec_filename macro, replacing it with uses of the member of current_program_space. This also renames that member, and changes it to be a unique pointer. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * progspace.h (struct program_space) <exec_filename>: Rename from pspace_exec_filename. Now a unique_xmalloc_ptr. * inferior.c (print_selected_inferior): Update. (print_inferior): Update. * mi/mi-main.c (print_one_inferior): Update. * exec.h (exec_filename): Remove macro. * corefile.c (get_exec_file): Update. * exec.c (exec_close): Update. (exec_file_attach): Update. * progspace.c (clone_program_space): Update. (print_program_space): Update.
2020-10-12Change target_section_table to std::vector aliasTom Tromey1-1/+1
Because target_section_table only holds a vector, and because it is used in an "open" way, this patch makes it just be an alias for the std::vector specialization. This makes the code less wordy. If we do ever want to add more specialized behavior to this type, it's simple enough to convert it back to a struct with the few needed methods implied by this change. gdb/ChangeLog 2020-10-12 Tom Tromey <tom@tromey.com> * target.h (struct target_ops) <get_section_table>: Update. (target_get_section_table): Update. * target.c (target_get_section_table, target_section_by_addr) (memory_xfer_partial_1): Update. * target-section.h (target_section_table): Now an alias. * target-delegates.c: Rebuild. * target-debug.h (target_debug_print_target_section_table_p): Rename from target_debug_print_struct_target_section_table_p. * symfile.c (build_section_addr_info_from_section_table): Update. * solib.c (solib_map_sections, solib_contains_address_p): Update. * solib-svr4.c (scan_dyntag): Update. * solib-dsbt.c (scan_dyntag): Update. * remote.c (remote_target::remote_xfer_live_readonly_partial): Update. * record-full.c (record_full_core_target::xfer_partial): Update. * progspace.h (struct program_space) <target_sections>: Update. * exec.h (print_section_info): Update. * exec.c (exec_target::close, build_section_table) (add_target_sections, add_target_sections_of_objfile) (remove_target_sections, exec_on_vfork) (section_table_available_memory) (section_table_xfer_memory_partial) (exec_target::get_section_table, exec_target::xfer_partial) (print_section_info, set_section_command) (exec_set_section_address, exec_target::has_memory): Update. * corelow.c (core_target::build_file_mappings) (core_target::xfer_partial, core_target::info_proc_mappings) (core_target::info_proc_mappings): Update. * bfd-target.c (class target_bfd): Update
2020-05-08Remove ALL_PSPACESTom Tromey1-10/+2
This removes the ALL_PSPACES macro. In this case it seemed cleanest to change how program spaces are stored -- instead of using a linked list, they are now stored in a std::vector. gdb/ChangeLog 2020-05-08 Tom Tromey <tom@tromey.com> * symtab.c (set_symbol_cache_size) (maintenance_print_symbol_cache, maintenance_flush_symbol_cache) (maintenance_print_symbol_cache_statistics): Update. * symmisc.c (print_symbol_bcache_statistics) (print_objfile_statistics, maintenance_print_objfiles) (maintenance_info_symtabs, maintenance_check_symtabs) (maintenance_expand_symtabs, maintenance_info_line_tables): Update. * symfile-debug.c (set_debug_symfile): Update. * source.c (forget_cached_source_info): Update. * python/python.c (gdbpy_progspaces): Update. * psymtab.c (maintenance_info_psymtabs): Update. * probe.c (parse_probes): Update. * linespec.c (iterate_over_all_matching_symtabs) (collect_symtabs_from_filename, search_minsyms_for_name): Update. * guile/scm-progspace.c (gdbscm_progspaces): Update. * exec.c (exec_target::close): Update. * ada-tasks.c (ada_tasks_new_objfile_observer): Update. * breakpoint.c (print_one_breakpoint_location) (create_longjmp_master_breakpoint) (create_std_terminate_master_breakpoint): Update. * progspace.c (program_spaces): Now a std::vector. (maybe_new_address_space): Update. (add_program_space): Remove. (program_space::program_space): Update. (remove_program_space): Update. (number_of_program_spaces): Remove. (print_program_space, update_address_spaces): Update. * progspace.h (program_spaces): Change type. (ALL_PSPACES): Remove. (number_of_program_spaces): Don't declare. (struct program_space) <next>: Remove.
2020-05-08Remove ALL_SO_LIBS and so_list_headTom Tromey1-0/+7
This patch started as an attempt to replace ALL_SO_LIBS with an ordinary C++ iterator. However, then I tripped over the so_list_head define again, and decided to remove it as well. gdb/ChangeLog 2020-05-08 Tom Tromey <tom@tromey.com> * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update. * solib-svr4.c (svr4_fetch_objfile_link_map): Update. (enable_break): Update. * solib-frv.c (frv_fdpic_find_global_pointer): Update. (frv_fdpic_find_canonical_descriptor): Update. (frv_fetch_objfile_link_map): Update. * progspace.c (program_space::free_all_objfiles): Update. (program_space::solibs): New method. * progspace.h (struct program_space) <solibs>: New method. * solist.h (master_so_list): Don't declare. (ALL_SO_LIBS): Remove. * solib.h (so_list_head): Remove. (update_solib_list): Update comment. * solib.c (master_so_list): Remove. (solib_used, update_solib_list, solib_add) (info_sharedlibrary_command, clear_solib) (reload_shared_libraries_1, remove_user_added_objfile): Update.
2020-04-16Refactor delete_program_space as a destructorPedro Alves1-5/+9
Currently, while the program_space's ctor adds the new pspace to the pspaces list, the destructor doesn't remove the pspace from the pspace list. Instead, you're supposed to use delete_program_space, to both remove the pspace from the list, and deleting the pspace. This patch eliminates delete_program_space, and makes the pspace dtor remove the deleted pspace from the pspace list itself, i.e., makes the dtor do the mirror opposite of the ctor. I found this helps with a following patch that will allocate a mock program_space on the stack. It's easier to just let the regular dtor remove the mock pspace from the pspace list than arrange to call delete_program_space instead of the pspace dtor in that situation. While at it, move the ctor/dtor intro comments to the header file, and make the ctor explicit. gdb/ChangeLog: 2020-04-16 Pedro Alves <palves@redhat.com> * inferior.c (delete_inferior): Use delete operator directly instead of delete_program_space. * progspace.c (add_program_space): New, factored out from program_space::program_space. (remove_program_space): New, factored out from delete_program_space. (program_space::program_space): Remove intro comment. Rewrite. (program_space::~program_space): Remove intro comment. Call remove_program_space. (delete_program_space): Delete. * progspace.h (program_space::program_space): Make explicit. Move intro comment here, adjusted. (program_space::~program_space): Move intro comment here, adjusted. (delete_program_space): Remove.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-12-12Manage objfiles with shared_ptrTom Tromey1-5/+79
This changes objfiles to be managed using a shared_ptr. shared_ptr is chosen because it enables the use of objfiles in background threads. The simplest way to do this was to introduce a new iterator that will return the underlying objfile, rather than a shared_ptr. (I also tried changing the rest of gdb to use shared_ptr, but this was quite large; and to using intrusive reference counting, but this also was tricky.) gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * progspace.h (objfile_list): New typedef. (class unwrapping_objfile_iterator) (struct unwrapping_objfile_range): Newl (struct program_space) <objfiles_range>: Change type. <objfiles>: Change return type. <add_objfile>: Change type of "objfile" parameter. <objfiles_list>: Now a list of shared_ptr. * progspace.c (program_space::add_objfile): Change type of "objfile". Update. (program_space::remove_objfile): Update. * objfiles.h (struct objfile) <~objfile>: Make public. * objfiles.c (objfile::make): Update. (objfile::unlink): Don't call delete. Change-Id: I6fb7fbf06efb7cb7474c525908365863eae27eb3
2019-12-12Move free_all_objfiles to program_spaceTom Tromey1-0/+3
This changes free_all_objfiles to be a method on program_space, in line with the other changes to treat program_space as a container for objfiles. gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * symfile.c (symbol_file_clear): Update. * progspace.h (struct program_space) <free_all_objfiles>: Declare method. * progspace.c (program_space::free_all_objfiles): New method. * objfiles.h (free_all_objfiles): Don't declare. * objfiles.c (free_all_objfiles): Move to program_space. Change-Id: I908b549d2981b6005f7ca181fc0e6d24fc8b7b6f
2019-12-12Store objfiles on a std::listTom Tromey1-15/+12
This removes objfile::next and changes objfiles to be stored in a std::list. gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * progspace.c (program_space::add_objfile) (program_space::remove_objfile): Update. (program_space::multi_objfile_p): Remove. * objfiles.h (struct objfile) <next>: Remove. * objfiles.c (objfile::objfile): Update. (put_objfile_before): Update. (unlink_objfile): Update. * progspace.h (object_files): Remove. (struct program_space) <objfiles_head>: Remove. <objfiles_list>: New member. <objfiles_range, objfiles_safe_range>: Change type. (objfiles): Change return type. (objfiles_safe): Update. (multi_objfile_p): Rewrite and inline. (object_files): Remove macro. Change-Id: Ib4430e3db6f9a390399924379a5c10426c514853
2019-12-12Remove MULTI_OBJFILE_PTom Tromey1-0/+5
This removes the MULTI_OBJFILE_P macro in favor of a method on the program space. gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * progspace.c (program_space::multi_objfile_p): New method. * printcmd.c (info_symbol_command): Update. * maint.c (maintenance_translate_address): Update. * objfiles.h (MULTI_OBJFILE_P): Remove. * progspace.h (struct program_space) <multi_objfile_p>: New method. Change-Id: I2779e26ea8909078d63fea8f13bce94cab73948c
2019-12-12Introduce program_space::remove_objfileTom Tromey1-0/+2
This introduces a new method, program_space::remove_objfile, and changes the objfile destructor not to unlink an objfile from the program space's list. This is cleaner because, like the previous patch, it treats the program space more like a container for objfiles. Also, this makes it possible to keep an objfile alive even though it has been unlinked from the program space's list, which is important for processing in a worker thread. gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * progspace.h (struct program_space) <remove_objfile>: Declare. * progspace.c (program_space::remove_objfile): New method. * objfiles.c (unlink_objfile): Remove. (objfile::unlink): Call remove_objfile. (objfile): Don't call unlink_objfile. Change-Id: I22f768827723dce21886fae9b3664532c8349e68
2019-12-12Introduce program_space::add_objfileTom Tromey1-0/+6
This introduces a new method, program_space::add_objfile, that adds an objfile to the program space's list of objfiles. It also changes the obfile's constructor so that linking an objfile into this list is not done here. The former is an improvement because it makes more sense to treat the program space as a container holding objfiles -- so manipulation of the list belongs there. The latter is not strictly needed, but seemed better both because it is removing a global side effect from a constructor, and for symmetry reasons, as a subsequent patch will remove unlinking from the destructor. gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * progspace.h (struct program_space) <add_objfile>: Declare method. * progspace.c (program_space::add_objfile): New method. * objfiles.c (~objfile): Don't unlink objfile. (put_objfile_before): Remove. (add_separate_debug_objfile): Don't call put_objfile_before. (objfile::make): Call add_objfile. Set new_objfiles_available on the per-program-space data. Change-Id: I93e8525dda631cb89dcc2046a5c51c7c9f34ccfd
2019-10-26[gdb] Fix more typos in comments (2)Tom de Vries1-1/+1
Fix typos in comments. NFC. Tested on x86_64-linux. gdb/ChangeLog: 2019-10-26 Tom de Vries <tdevries@suse.de> * aarch64-linux-tdep.c: Fix typos in comments. * aarch64-tdep.c: Same. * ada-lang.c: Same. * amd64-nat.c: Same. * arc-tdep.c: Same. * arch/aarch64-insn.c: Same. * block.c: Same. * breakpoint.h: Same. * btrace.h: Same. * c-varobj.c: Same. * cli/cli-decode.c: Same. * cli/cli-script.c: Same. * cli/cli-utils.h: Same. * coff-pe-read.c: Same. * coffread.c: Same. * compile/compile-cplus-symbols.c: Same. * compile/compile-object-run.c: Same. * completer.c: Same. * corelow.c: Same. * cp-support.c: Same. * demangle.c: Same. * dwarf-index-write.c: Same. * dwarf2-frame.c: Same. * dwarf2-frame.h: Same. * eval.c: Same. * frame-base.h: Same. * frame.h: Same. * gdbcmd.h: Same. * gdbtypes.h: Same. * gnu-nat.c: Same. * guile/scm-objfile.c: Same. * i386-tdep.c: Same. * i386-tdep.h: Same. * infcall.c: Same. * infcall.h: Same. * linux-nat.c: Same. * m68k-tdep.c: Same. * macroexp.c: Same. * memattr.c: Same. * mi/mi-cmd-disas.c: Same. * mi/mi-getopt.h: Same. * mi/mi-main.c: Same. * minsyms.c: Same. * nat/aarch64-sve-linux-sigcontext.h: Same. * objfiles.h: Same. * ppc-linux-nat.c: Same. * ppc-linux-tdep.c: Same. * ppc-tdep.h: Same. * progspace.h: Same. * prologue-value.h: Same. * python/py-evtregistry.c: Same. * python/py-instruction.h: Same. * record-btrace.c: Same. * record-full.c: Same. * remote.c: Same. * rs6000-tdep.c: Same. * ser-tcp.c: Same. * sol-thread.c: Same. * sparc-sol2-tdep.c: Same. * sparc64-tdep.c: Same. * stabsread.c: Same. * symfile.c: Same. * symtab.h: Same. * target.c: Same. * tracepoint.c: Same. * tui/tui-data.h: Same. * tui/tui-io.c: Same. * tui/tui-win.c: Same. * tui/tui.c: Same. * unittests/rsp-low-selftests.c: Same. * user-regs.h: Same. * utils.c: Same. * utils.h: Same. * valarith.c: Same. * valops.c: Same. * valprint.c: Same. * valprint.h: Same. * value.c: Same. * value.h: Same. * varobj.c: Same. * x86-nat.h: Same. * xtensa-tdep.c: Same. gdb/gdbserver/ChangeLog: 2019-10-26 Tom de Vries <tdevries@suse.de> * linux-aarch64-low.c: Fix typos in comments. * linux-arm-low.c: Same. * linux-low.c: Same. * linux-ppc-low.c: Same. * proc-service.c: Same. * regcache.h: Same. * server.c: Same. * tracepoint.c: Same. * win32-low.c: Same. gdb/stubs/ChangeLog: 2019-10-26 Tom de Vries <tdevries@suse.de> * ia64vms-stub.c: Fix typos in comments. * m32r-stub.c: Same. * m68k-stub.c: Same. * sh-stub.c: Same. gdb/testsuite/ChangeLog: 2019-10-26 Tom de Vries <tdevries@suse.de> * gdb.base/bigcore.c: Fix typos in comments. * gdb.base/ctf-ptype.c: Same. * gdb.base/long_long.c: Same. * gdb.dwarf2/dw2-op-out-param.S: Same. * gdb.python/py-evthreads.c: Same. * gdb.reverse/i387-stack-reverse.c: Same. * gdb.trace/tfile.c: Same. * lib/compiler.c: Same. * lib/compiler.cc: Same. Change-Id: I8573d84a577894270179ae30f46c48d806fc1beb
2019-10-15gdb: Remove vec.{c,h} and update code to not include vec.hAndrew Burgess1-1/+0
Removes vec.c and vec.h from the source tree, and remove all the remaining includes of vec.h. There should be no user visible changes after this commit. I did have a few issues rebuilding GDB after applying this patch due to cached dependencies, I found that running this command in the build directory resolved my build issues without requiring a 'make clean': rm -fr gdb/gdbserver/gdbsupport/.deps/ gdb/ChangeLog: * Makefile.in: Remove references to vec.h and vec.c. * aarch64-tdep.c: No longer include vec.h. * ada-lang.c: Likewise. * ada-lang.h: Likewise. * arm-tdep.c: Likewise. * ax.h: Likewise. * breakpoint.h: Likewise. * charset.c: Likewise. * cp-support.h: Likewise. * dtrace-probe.c: Likewise. * dwarf2read.c: Likewise. * extension.h: Likewise. * gdb_bfd.c: Likewise. * gdbsupport/gdb_vecs.h: Likewise. * gdbsupport/vec.c: Remove. * gdbsupport/vec.h: Remove. * gdbthread.h: Likewise. * guile/scm-type.c: Likewise. * inline-frame.c: Likewise. * machoread.c: Likewise. * memattr.c: Likewise. * memrange.h: Likewise. * namespace.h: Likewise. * nat/linux-btrace.h: Likewise. * osdata.c: Likewise. * parser-defs.h: Likewise. * progspace.h: Likewise. * python/py-type.c: Likewise. * record-btrace.c: Likewise. * rust-exp.y: Likewise. * solib-target.c: Likewise. * stap-probe.c: Likewise. * target-descriptions.c: Likewise. * target-memory.c: Likewise. * target.h: Likewise. * varobj.c: Likewise. * varobj.h: Likewise. * xml-support.h: Likewise. gdb/gdbserver/ChangeLog: * Makefile.in: Remove references to vec.c. Change-Id: I0c91d7170bf1b5e992a387fcd9fe4f2abe343bb5
2019-07-09Rename common to gdbsupportTom Tromey1-4/+4
This is the next patch in the ongoing series to move gdbsever to the top level. This patch just renames the "common" directory. The idea is to do this move in two parts: first rename the directory (this patch), then move the directory to the top. This approach makes the patches a bit more tractable. I chose the name "gdbsupport" for the directory. However, as this patch was largely written by sed, we could pick a new name without too much difficulty. Tested by the buildbot. gdb/ChangeLog 2019-07-09 Tom Tromey <tom@tromey.com> * contrib/ari/gdb_ari.sh: Change common to gdbsupport. * configure: Rebuild. * configure.ac: Change common to gdbsupport. * gdbsupport: Rename from common. * acinclude.m4: Change common to gdbsupport. * Makefile.in (CONFIG_SRC_SUBDIR, COMMON_SFILES) (HFILES_NO_SRCDIR, stamp-version, ALLDEPFILES): Change common to gdbsupport. * aarch64-tdep.c, ada-lang.c, ada-lang.h, agent.c, alloc.c, amd64-darwin-tdep.c, amd64-dicos-tdep.c, amd64-fbsd-nat.c, amd64-fbsd-tdep.c, amd64-linux-nat.c, amd64-linux-tdep.c, amd64-nbsd-tdep.c, amd64-obsd-tdep.c, amd64-sol2-tdep.c, amd64-tdep.c, amd64-windows-tdep.c, arch-utils.c, arch/aarch64-insn.c, arch/aarch64.c, arch/aarch64.h, arch/amd64.c, arch/amd64.h, arch/arm-get-next-pcs.c, arch/arm-linux.c, arch/arm.c, arch/i386.c, arch/i386.h, arch/ppc-linux-common.c, arch/riscv.c, arch/riscv.h, arch/tic6x.c, arm-tdep.c, auto-load.c, auxv.c, ax-gdb.c, ax-general.c, ax.h, breakpoint.c, breakpoint.h, btrace.c, btrace.h, build-id.c, build-id.h, c-lang.h, charset.c, charset.h, cli/cli-cmds.c, cli/cli-cmds.h, cli/cli-decode.c, cli/cli-dump.c, cli/cli-option.h, cli/cli-script.c, coff-pe-read.c, command.h, compile/compile-c-support.c, compile/compile-c.h, compile/compile-cplus-symbols.c, compile/compile-cplus-types.c, compile/compile-cplus.h, compile/compile-loc2c.c, compile/compile.c, completer.c, completer.h, contrib/ari/gdb_ari.sh, corefile.c, corelow.c, cp-support.c, cp-support.h, cp-valprint.c, csky-tdep.c, ctf.c, darwin-nat.c, debug.c, defs.h, disasm-selftests.c, disasm.c, disasm.h, dtrace-probe.c, dwarf-index-cache.c, dwarf-index-cache.h, dwarf-index-write.c, dwarf2-frame.c, dwarf2expr.c, dwarf2loc.c, dwarf2read.c, event-loop.c, event-top.c, exceptions.c, exec.c, extension.h, fbsd-nat.c, features/aarch64-core.c, features/aarch64-fpu.c, features/aarch64-pauth.c, features/aarch64-sve.c, features/i386/32bit-avx.c, features/i386/32bit-avx512.c, features/i386/32bit-core.c, features/i386/32bit-linux.c, features/i386/32bit-mpx.c, features/i386/32bit-pkeys.c, features/i386/32bit-segments.c, features/i386/32bit-sse.c, features/i386/64bit-avx.c, features/i386/64bit-avx512.c, features/i386/64bit-core.c, features/i386/64bit-linux.c, features/i386/64bit-mpx.c, features/i386/64bit-pkeys.c, features/i386/64bit-segments.c, features/i386/64bit-sse.c, features/i386/x32-core.c, features/riscv/32bit-cpu.c, features/riscv/32bit-csr.c, features/riscv/32bit-fpu.c, features/riscv/64bit-cpu.c, features/riscv/64bit-csr.c, features/riscv/64bit-fpu.c, features/tic6x-c6xp.c, features/tic6x-core.c, features/tic6x-gp.c, filename-seen-cache.h, findcmd.c, findvar.c, fork-child.c, gcore.c, gdb_bfd.c, gdb_bfd.h, gdb_proc_service.h, gdb_regex.c, gdb_select.h, gdb_usleep.c, gdbarch-selftests.c, gdbthread.h, gdbtypes.h, gnu-nat.c, go32-nat.c, guile/guile.c, guile/scm-ports.c, guile/scm-safe-call.c, guile/scm-type.c, i386-fbsd-nat.c, i386-fbsd-tdep.c, i386-go32-tdep.c, i386-linux-nat.c, i386-linux-tdep.c, i386-tdep.c, i387-tdep.c, ia64-libunwind-tdep.c, ia64-linux-nat.c, inf-child.c, inf-ptrace.c, infcall.c, infcall.h, infcmd.c, inferior-iter.h, inferior.c, inferior.h, inflow.c, inflow.h, infrun.c, infrun.h, inline-frame.c, language.h, linespec.c, linux-fork.c, linux-nat.c, linux-tdep.c, linux-thread-db.c, location.c, machoread.c, macrotab.h, main.c, maint.c, maint.h, memattr.c, memrange.h, mi/mi-cmd-break.h, mi/mi-cmd-env.c, mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-interp.c, mi/mi-main.c, mi/mi-parse.h, minsyms.c, mips-linux-tdep.c, namespace.h, nat/aarch64-linux-hw-point.c, nat/aarch64-linux-hw-point.h, nat/aarch64-linux.c, nat/aarch64-sve-linux-ptrace.c, nat/amd64-linux-siginfo.c, nat/fork-inferior.c, nat/linux-btrace.c, nat/linux-btrace.h, nat/linux-namespaces.c, nat/linux-nat.h, nat/linux-osdata.c, nat/linux-personality.c, nat/linux-procfs.c, nat/linux-ptrace.c, nat/linux-ptrace.h, nat/linux-waitpid.c, nat/mips-linux-watch.c, nat/mips-linux-watch.h, nat/ppc-linux.c, nat/x86-dregs.c, nat/x86-dregs.h, nat/x86-linux-dregs.c, nat/x86-linux.c, nto-procfs.c, nto-tdep.c, objfile-flags.h, objfiles.c, objfiles.h, obsd-nat.c, observable.h, osdata.c, p-valprint.c, parse.c, parser-defs.h, ppc-linux-nat.c, printcmd.c, probe.c, proc-api.c, procfs.c, producer.c, progspace.h, psymtab.h, python/py-framefilter.c, python/py-inferior.c, python/py-ref.h, python/py-type.c, python/python.c, record-btrace.c, record-full.c, record.c, record.h, regcache-dump.c, regcache.c, regcache.h, remote-fileio.c, remote-fileio.h, remote-sim.c, remote.c, riscv-tdep.c, rs6000-aix-tdep.c, rust-exp.y, s12z-tdep.c, selftest-arch.c, ser-base.c, ser-event.c, ser-pipe.c, ser-tcp.c, ser-unix.c, skip.c, solib-aix.c, solib-target.c, solib.c, source-cache.c, source.c, source.h, sparc-nat.c, spu-linux-nat.c, stack.c, stap-probe.c, symfile-add-flags.h, symfile.c, symfile.h, symtab.c, symtab.h, target-descriptions.c, target-descriptions.h, target-memory.c, target.c, target.h, target/waitstatus.c, target/waitstatus.h, thread-iter.h, thread.c, tilegx-tdep.c, top.c, top.h, tracefile-tfile.c, tracefile.c, tracepoint.c, tracepoint.h, tui/tui-io.c, ui-file.c, ui-out.h, unittests/array-view-selftests.c, unittests/child-path-selftests.c, unittests/cli-utils-selftests.c, unittests/common-utils-selftests.c, unittests/copy_bitwise-selftests.c, unittests/environ-selftests.c, unittests/format_pieces-selftests.c, unittests/function-view-selftests.c, unittests/lookup_name_info-selftests.c, unittests/memory-map-selftests.c, unittests/memrange-selftests.c, unittests/mkdir-recursive-selftests.c, unittests/observable-selftests.c, unittests/offset-type-selftests.c, unittests/optional-selftests.c, unittests/parse-connection-spec-selftests.c, unittests/ptid-selftests.c, unittests/rsp-low-selftests.c, unittests/scoped_fd-selftests.c, unittests/scoped_mmap-selftests.c, unittests/scoped_restore-selftests.c, unittests/string_view-selftests.c, unittests/style-selftests.c, unittests/tracepoint-selftests.c, unittests/unpack-selftests.c, unittests/utils-selftests.c, unittests/xml-utils-selftests.c, utils.c, utils.h, valarith.c, valops.c, valprint.c, value.c, value.h, varobj.c, varobj.h, windows-nat.c, x86-linux-nat.c, xml-support.c, xml-support.h, xml-tdesc.h, xstormy16-tdep.c, xtensa-linux-nat.c, dwarf2read.h: Change common to gdbsupport. gdb/gdbserver/ChangeLog 2019-07-09 Tom Tromey <tom@tromey.com> * configure: Rebuild. * configure.ac: Change common to gdbsupport. * acinclude.m4: Change common to gdbsupport. * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS) (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change common to gdbsupport. * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h, gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c, inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c, linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c, linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c, linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h, nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c, server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h, thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change common to gdbsupport.
2019-01-25Normalize includes to use common/Tom Tromey1-2/+2
This changes all includes to use the form "common/filename.h" rather than just "filename.h". This was written by a script. gdb/ChangeLog 2019-01-25 Tom Tromey <tom@tromey.com> * xtensa-linux-nat.c: Fix common/ includes. * xml-support.h: Fix common/ includes. * xml-support.c: Fix common/ includes. * x86-linux-nat.c: Fix common/ includes. * windows-nat.c: Fix common/ includes. * varobj.h: Fix common/ includes. * varobj.c: Fix common/ includes. * value.c: Fix common/ includes. * valops.c: Fix common/ includes. * utils.c: Fix common/ includes. * unittests/xml-utils-selftests.c: Fix common/ includes. * unittests/utils-selftests.c: Fix common/ includes. * unittests/unpack-selftests.c: Fix common/ includes. * unittests/tracepoint-selftests.c: Fix common/ includes. * unittests/style-selftests.c: Fix common/ includes. * unittests/string_view-selftests.c: Fix common/ includes. * unittests/scoped_restore-selftests.c: Fix common/ includes. * unittests/scoped_mmap-selftests.c: Fix common/ includes. * unittests/scoped_fd-selftests.c: Fix common/ includes. * unittests/rsp-low-selftests.c: Fix common/ includes. * unittests/parse-connection-spec-selftests.c: Fix common/ includes. * unittests/optional-selftests.c: Fix common/ includes. * unittests/offset-type-selftests.c: Fix common/ includes. * unittests/observable-selftests.c: Fix common/ includes. * unittests/mkdir-recursive-selftests.c: Fix common/ includes. * unittests/memrange-selftests.c: Fix common/ includes. * unittests/memory-map-selftests.c: Fix common/ includes. * unittests/lookup_name_info-selftests.c: Fix common/ includes. * unittests/function-view-selftests.c: Fix common/ includes. * unittests/environ-selftests.c: Fix common/ includes. * unittests/copy_bitwise-selftests.c: Fix common/ includes. * unittests/common-utils-selftests.c: Fix common/ includes. * unittests/cli-utils-selftests.c: Fix common/ includes. * unittests/array-view-selftests.c: Fix common/ includes. * ui-file.c: Fix common/ includes. * tui/tui-io.c: Fix common/ includes. * tracepoint.h: Fix common/ includes. * tracepoint.c: Fix common/ includes. * tracefile-tfile.c: Fix common/ includes. * top.h: Fix common/ includes. * top.c: Fix common/ includes. * thread.c: Fix common/ includes. * target/waitstatus.h: Fix common/ includes. * target/waitstatus.c: Fix common/ includes. * target.h: Fix common/ includes. * target.c: Fix common/ includes. * target-memory.c: Fix common/ includes. * target-descriptions.c: Fix common/ includes. * symtab.h: Fix common/ includes. * symfile.c: Fix common/ includes. * stap-probe.c: Fix common/ includes. * spu-linux-nat.c: Fix common/ includes. * sparc-nat.c: Fix common/ includes. * source.c: Fix common/ includes. * solib.c: Fix common/ includes. * solib-target.c: Fix common/ includes. * ser-unix.c: Fix common/ includes. * ser-tcp.c: Fix common/ includes. * ser-pipe.c: Fix common/ includes. * ser-base.c: Fix common/ includes. * selftest-arch.c: Fix common/ includes. * s12z-tdep.c: Fix common/ includes. * rust-exp.y: Fix common/ includes. * rs6000-aix-tdep.c: Fix common/ includes. * riscv-tdep.c: Fix common/ includes. * remote.c: Fix common/ includes. * remote-notif.h: Fix common/ includes. * remote-fileio.h: Fix common/ includes. * remote-fileio.c: Fix common/ includes. * regcache.h: Fix common/ includes. * regcache.c: Fix common/ includes. * record-btrace.c: Fix common/ includes. * python/python.c: Fix common/ includes. * python/py-type.c: Fix common/ includes. * python/py-inferior.c: Fix common/ includes. * progspace.h: Fix common/ includes. * producer.c: Fix common/ includes. * procfs.c: Fix common/ includes. * proc-api.c: Fix common/ includes. * printcmd.c: Fix common/ includes. * ppc-linux-nat.c: Fix common/ includes. * parser-defs.h: Fix common/ includes. * osdata.c: Fix common/ includes. * obsd-nat.c: Fix common/ includes. * nat/x86-linux.c: Fix common/ includes. * nat/x86-linux-dregs.c: Fix common/ includes. * nat/x86-dregs.h: Fix common/ includes. * nat/x86-dregs.c: Fix common/ includes. * nat/ppc-linux.c: Fix common/ includes. * nat/mips-linux-watch.h: Fix common/ includes. * nat/mips-linux-watch.c: Fix common/ includes. * nat/linux-waitpid.c: Fix common/ includes. * nat/linux-ptrace.h: Fix common/ includes. * nat/linux-ptrace.c: Fix common/ includes. * nat/linux-procfs.c: Fix common/ includes. * nat/linux-personality.c: Fix common/ includes. * nat/linux-osdata.c: Fix common/ includes. * nat/linux-namespaces.c: Fix common/ includes. * nat/linux-btrace.h: Fix common/ includes. * nat/linux-btrace.c: Fix common/ includes. * nat/fork-inferior.c: Fix common/ includes. * nat/amd64-linux-siginfo.c: Fix common/ includes. * nat/aarch64-sve-linux-ptrace.c: Fix common/ includes. * nat/aarch64-linux.c: Fix common/ includes. * nat/aarch64-linux-hw-point.h: Fix common/ includes. * nat/aarch64-linux-hw-point.c: Fix common/ includes. * namespace.h: Fix common/ includes. * mips-linux-tdep.c: Fix common/ includes. * minsyms.c: Fix common/ includes. * mi/mi-parse.h: Fix common/ includes. * mi/mi-main.c: Fix common/ includes. * mi/mi-cmd-env.c: Fix common/ includes. * memrange.h: Fix common/ includes. * memattr.c: Fix common/ includes. * maint.h: Fix common/ includes. * maint.c: Fix common/ includes. * main.c: Fix common/ includes. * machoread.c: Fix common/ includes. * location.c: Fix common/ includes. * linux-thread-db.c: Fix common/ includes. * linux-nat.c: Fix common/ includes. * linux-fork.c: Fix common/ includes. * inline-frame.c: Fix common/ includes. * infrun.c: Fix common/ includes. * inflow.c: Fix common/ includes. * inferior.h: Fix common/ includes. * inferior.c: Fix common/ includes. * infcmd.c: Fix common/ includes. * inf-ptrace.c: Fix common/ includes. * inf-child.c: Fix common/ includes. * ia64-linux-nat.c: Fix common/ includes. * i387-tdep.c: Fix common/ includes. * i386-tdep.c: Fix common/ includes. * i386-linux-tdep.c: Fix common/ includes. * i386-linux-nat.c: Fix common/ includes. * i386-go32-tdep.c: Fix common/ includes. * i386-fbsd-tdep.c: Fix common/ includes. * i386-fbsd-nat.c: Fix common/ includes. * guile/scm-type.c: Fix common/ includes. * guile/guile.c: Fix common/ includes. * go32-nat.c: Fix common/ includes. * gnu-nat.c: Fix common/ includes. * gdbthread.h: Fix common/ includes. * gdbarch-selftests.c: Fix common/ includes. * gdb_usleep.c: Fix common/ includes. * gdb_select.h: Fix common/ includes. * gdb_bfd.c: Fix common/ includes. * gcore.c: Fix common/ includes. * fork-child.c: Fix common/ includes. * findvar.c: Fix common/ includes. * fbsd-nat.c: Fix common/ includes. * event-top.c: Fix common/ includes. * event-loop.c: Fix common/ includes. * dwarf2read.c: Fix common/ includes. * dwarf2loc.c: Fix common/ includes. * dwarf2-frame.c: Fix common/ includes. * dwarf-index-cache.c: Fix common/ includes. * dtrace-probe.c: Fix common/ includes. * disasm-selftests.c: Fix common/ includes. * defs.h: Fix common/ includes. * csky-tdep.c: Fix common/ includes. * cp-valprint.c: Fix common/ includes. * cp-support.h: Fix common/ includes. * cp-support.c: Fix common/ includes. * corelow.c: Fix common/ includes. * completer.h: Fix common/ includes. * completer.c: Fix common/ includes. * compile/compile.c: Fix common/ includes. * compile/compile-loc2c.c: Fix common/ includes. * compile/compile-cplus-types.c: Fix common/ includes. * compile/compile-cplus-symbols.c: Fix common/ includes. * command.h: Fix common/ includes. * cli/cli-dump.c: Fix common/ includes. * cli/cli-cmds.c: Fix common/ includes. * charset.c: Fix common/ includes. * build-id.c: Fix common/ includes. * btrace.h: Fix common/ includes. * btrace.c: Fix common/ includes. * breakpoint.h: Fix common/ includes. * breakpoint.c: Fix common/ includes. * ax.h: (enum agent_op): Fix common/ includes. * ax-general.c (struct aop_map): Fix common/ includes. * ax-gdb.c: Fix common/ includes. * auxv.c: Fix common/ includes. * auto-load.c: Fix common/ includes. * arm-tdep.c: Fix common/ includes. * arch/riscv.c: Fix common/ includes. * arch/ppc-linux-common.c: Fix common/ includes. * arch/i386.c: Fix common/ includes. * arch/arm.c: Fix common/ includes. * arch/arm-linux.c: Fix common/ includes. * arch/arm-get-next-pcs.c: Fix common/ includes. * arch/amd64.c: Fix common/ includes. * arch/aarch64.c: Fix common/ includes. * arch/aarch64-insn.c: Fix common/ includes. * arch-utils.c: Fix common/ includes. * amd64-windows-tdep.c: Fix common/ includes. * amd64-tdep.c: Fix common/ includes. * amd64-sol2-tdep.c: Fix common/ includes. * amd64-obsd-tdep.c: Fix common/ includes. * amd64-nbsd-tdep.c: Fix common/ includes. * amd64-linux-tdep.c: Fix common/ includes. * amd64-linux-nat.c: Fix common/ includes. * amd64-fbsd-tdep.c: Fix common/ includes. * amd64-fbsd-nat.c: Fix common/ includes. * amd64-dicos-tdep.c: Fix common/ includes. * amd64-darwin-tdep.c: Fix common/ includes. * agent.c: Fix common/ includes. * ada-lang.h: Fix common/ includes. * ada-lang.c: Fix common/ includes. * aarch64-tdep.c: Fix common/ includes. gdb/gdbserver/ChangeLog 2019-01-25 Tom Tromey <tom@tromey.com> * win32-low.c: Fix common/ includes. * win32-i386-low.c: Fix common/ includes. * tracepoint.c: Fix common/ includes. * thread-db.c: Fix common/ includes. * target.h: Fix common/ includes. * symbol.c: Fix common/ includes. * spu-low.c: Fix common/ includes. * server.h: Fix common/ includes. * server.c: Fix common/ includes. * remote-utils.c: Fix common/ includes. * regcache.h: Fix common/ includes. * regcache.c: Fix common/ includes. * nto-x86-low.c: Fix common/ includes. * notif.h: Fix common/ includes. * mem-break.h: Fix common/ includes. * lynx-low.c: Fix common/ includes. * lynx-i386-low.c: Fix common/ includes. * linux-x86-tdesc-selftest.c: Fix common/ includes. * linux-x86-low.c: Fix common/ includes. * linux-low.c: Fix common/ includes. * inferiors.h: Fix common/ includes. * i387-fp.c: Fix common/ includes. * hostio.c: Fix common/ includes. * hostio-errno.c: Fix common/ includes. * gdbthread.h: Fix common/ includes. * gdbreplay.c: Fix common/ includes. * fork-child.c: Fix common/ includes. * event-loop.c: Fix common/ includes. * ax.c: (enum gdb_agent_op): Fix common/ includes.
2019-01-17Change all_objfiles_safe adapter to be a method on program_spaceTom Tromey1-0/+18
This changes the all_objfiles_safe range adapter to be a method on the program space, and fixes up all the users. gdb/ChangeLog 2019-01-15 Tom Tromey <tom@tromey.com> * progspace.h (program_space) <objfiles_safe_range>: New typedef. <objfiles_safe>: New method. * objfiles.h (class all_objfiles_safe): Remove. * objfiles.c (free_all_objfiles, objfile_purge_solibs): Update. * jit.c (jit_inferior_exit_hook): Update.
2019-01-17Change all_objfiles adapter to be a method on program_spaceTom Tromey1-2/+13
This changes the all_objfiles range adapter to be a method on the program space, and fixes up all the users. gdb/ChangeLog 2019-01-17 Tom Tromey <tom@tromey.com> * progspace.h (program_space) <objfiles_range>: New typedef. <objfiles>: New method. <objfiles_head>: Rename from objfiles. (object_files): Update. * guile/scm-progspace.c (gdbscm_progspace_objfiles): Update. * guile/scm-pretty-print.c (ppscm_find_pretty_printer_from_objfiles): Update. * guile/scm-objfile.c (gdbscm_objfiles): Update. * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Update. * python/py-progspace.c (pspy_get_objfiles): Update. * python/py-prettyprint.c (find_pretty_printer_from_objfiles): Update. * python/py-objfile.c (objfpy_lookup_objfile_by_name) (objfpy_lookup_objfile_by_build_id): Update. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update. * windows-tdep.c (windows_iterate_over_objfiles_in_search_order): Update. * symtab.c (iterate_over_symtabs, matching_obj_sections) (expand_symtab_containing_pc, lookup_objfile_from_block) (lookup_static_symbol, basic_lookup_transparent_type) (find_pc_sect_compunit_symtab, find_symbol_at_address) (find_line_symtab, info_sources_command) (default_collect_symbol_completion_matches_break_on) (make_source_files_completion_list, find_main_name): Update. * symmisc.c (print_symbol_bcache_statistics) (print_objfile_statistics, maintenance_print_symbols) (maintenance_print_msymbols, maintenance_print_objfiles) (maintenance_info_symtabs, maintenance_check_symtabs) (maintenance_expand_symtabs, maintenance_info_line_tables): Update. * symfile.c (remove_symbol_file_command, overlay_invalidate_all) (find_pc_overlay, find_pc_mapped_section, list_overlays_command) (map_overlay_command, unmap_overlay_command) (simple_overlay_update, expand_symtabs_matching) (map_symbol_filenames): Update. * symfile-debug.c (set_debug_symfile): Update. * spu-tdep.c (spu_overlay_update, spu_objfile_from_frame): Update. * source.c (select_source_symtab, forget_cached_source_info): Update. * solib.c (solib_read_symbols): Update. * solib-spu.c (append_ocl_sos): Update. * psymtab.c (maintenance_print_psymbols) (maintenance_info_psymtabs, maintenance_check_psymtabs): Update. * probe.c (parse_probes_in_pspace, find_probe_by_pc): Update. * printcmd.c (info_symbol_command): Update. * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Update. * objfiles.h (class all_objfiles): Remove. * objfiles.c (have_partial_symbols, have_full_symbols) (have_minimal_symbols, qsort_cmp, update_section_map) (shared_objfile_contains_address_p) (default_iterate_over_objfiles_in_search_order): Update. * objc-lang.c (info_selectors_command, info_classes_command) (find_methods): Update. * minsyms.c (find_solib_trampoline_target): Update. * maint.c (maintenance_info_sections) (maintenance_translate_address, count_symtabs_and_blocks): Update. * main.c (captured_main_1): Update. * linux-thread-db.c (try_thread_db_load_from_pdir) (has_libpthread): Update. * linespec.c (iterate_over_all_matching_symtabs) (search_minsyms_for_name): Update. * jit.c (jit_find_objf_with_entry_addr): Update. * hppa-tdep.c (find_unwind_entry) (hppa_lookup_stub_minimal_symbol): Update. * gcore.c (gcore_create_callback, objfile_find_memory_regions): Update. * elfread.c (elf_gnu_ifunc_resolve_by_cache) (elf_gnu_ifunc_resolve_by_got): Update. * dwarf2-frame.c (dwarf2_frame_find_fde): Update. * dwarf-index-write.c (save_gdb_index_command): Update. * cp-support.c (add_symbol_overload_list_qualified): Update. * breakpoint.c (create_overlay_event_breakpoint) (create_longjmp_master_breakpoint) (create_std_terminate_master_breakpoint) (create_exception_master_breakpoint): Update. * blockframe.c (find_pc_partial_function): Update. * ada-lang.c (ada_lookup_simple_minsym, add_nonlocal_symbols) (ada_collect_symbol_completion_matches) (ada_add_global_exceptions): Update.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-05-29Change program_space::added_solibs to a std::vectorTom Tromey1-4/+1
This changes program_space::added_solibs to a std::vector, removing a VEC. Tested by the buildbot. gdb/ChangeLog 2018-05-29 Tom Tromey <tom@tromey.com> * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC. (struct program_space) <added_solibs>: Now a std::vector. * breakpoint.c (print_solib_event): Update. (check_status_catch_solib): Update. * progspace.c (clear_program_space_solib_cache): Update. * solib.c (update_solib_list): Update.
2018-05-16Make "cbfd" a gdb_bfd_ref_ptrTom Tromey1-1/+2
This changes program_space::cbfd to be a gdb_bfd_ref_ptr. This makes it somewhat less error-prone to use, because now it manages the reference counting automatically. Tested by the buildbot. 2018-05-16 Tom Tromey <tom@tromey.com> * gdbcore.h (core_bfd): Redefine. * corelow.c (core_target::close): Update. (core_target_open): Update. * progspace.h (struct program_space) <cbfd>: Now a gdb_bfd_ref_ptr.
2018-05-11Move core_bfd to program spaceTom Tromey1-0/+3
This moves the core_bfd global to be a field of the program space. It then replaces core_bfd with a macro to avoid a massive patch -- the same approach taken for various other program space fields. This is a basic transformation for multi-target work. 2018-05-11 Tom Tromey <tromey@redhat.com> Pedro Alves <tromey@redhat.com> * corefile.c (core_bfd): Remove. * gdbcore.h (core_bfd): Now a macro. * progspace.h (struct program_space) <cbfd>: New field.
2018-03-02Make program_space::deleted_solibs a vector of std::stringSimon Marchi1-1/+1
This allows removing a usage of free_char_ptr_vec. gdb/ChangeLog: * progspace.h (struct program_space) <deleted_solibs>: Change type to std::vector<std::string>. * progspace.c (clear_program_space_solib_cache): Adjust. * breakpoint.c (print_solib_event): Adjust. (check_status_catch_solib): Adjust. * solib.c (update_solib_list): Adjust. * ui-out.h (class ui_out) <field_string>: New overload. * ui-out.c (ui_out::field_string): New overload.
2018-03-02C++ify program_spaceSimon Marchi1-78/+77
This patch makes program_space a C++ object by adding a constructor/destructor, giving default values to fields, and using new/delete. gdb/ChangeLog: * progspace.h (struct program_space): Add constructor and destructor, initialize fields. (add_program_space): Remove. * progspace.c (add_program_space): Rename to... (program_space::program_space): ... this. (release_program_space): Rename to... (program_space::~program_space): ... this. (delete_program_space): Use delete to delete program_space. (initialize_progspace): Use new to allocate program_space. * inferior.c (add_inferior_with_spaces): Likewise. (clone_inferior_command): Likewise. * infrun.c (follow_fork_inferior): Likewise. (handle_vfork_child_exec_or_exit): Likewise.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-10-04Redesign mock environment for gdbarch selftestsPedro Alves1-0/+11
A following patch will remove this hack from within regcache's implementation: struct regcache * get_thread_arch_regcache (ptid_t ptid, struct gdbarch *gdbarch) { struct address_space *aspace; /* For the benefit of "maint print registers" & co when debugging an executable, allow dumping the regcache even when there is no thread selected (target_thread_address_space internal-errors if no address space is found). Note that normal user commands will fail higher up on the call stack due to no target_has_registers. */ aspace = (ptid_equal (null_ptid, ptid) ? NULL : target_thread_address_space (ptid)); i.e., it'll no longer be possible to try to build a regcache for null_ptid. That change alone would regress the gdbarch self tests though, causing this: (gdb) maintenance selftest [...] Running selftest register_to_value. src/gdb/inferior.c:309: internal-error: inferior* find_inferior_pid(int): Assertion `pid != 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) FAIL: gdb.gdb/unittest.exp: maintenance selftest (GDB internal error) The problem is that the way the mocking environment for those unit tests is written is a bit fragile: it creates a special purpose regcache (and sentinel's frame), using whatever is the current inferior_ptid (usually null_ptid), and assumes get_current_regcache will find that in the regcache::current_regcache list. This commit changes the way the mock environment is created. It eliminates the special regcache and frame and instead creates a fuller mock environment, with a custom mock target_ops, and then a mock inferior and thread "running" on that target. If there's already a running target when you type "maint selftest", then we error out, instead of pushing a new target on top of the existing one (and thus killing the debug session). This results in: (gdb) maint selftest (...) Self test failed: arch i386: target already pushed Self test failed: arch i386:x86-64: target already pushed Self test failed: arch i386:x64-32: target already pushed Self test failed: arch i8086: target already pushed Self test failed: arch i386:intel: target already pushed Self test failed: arch i386:x86-64:intel: target already pushed Self test failed: arch i386:x64-32:intel: target already pushed Self test failed: arch i386:nacl: target already pushed Self test failed: arch i386:x86-64:nacl: target already pushed Self test failed: arch i386:x64-32:nacl: target already pushed Self test failed: self-test failed at /home/pedro/gdb/mygit/src/gdb/selftest-arch.c:86 (...) Ran 19 unit tests, 1 failed I think that's OK, because self tests are really meant to be run from a clean state right after GDB is started. I'm adding that erroring out just as safe measure just in case someone types "maint selftest" on the command line while already debugging something (as I've done it). (In my multi-target branch, where this patch originated from, we don't actually need to error out, because there each inferior has its own target stack). Also, note that the current code was doing: current_inferior()->gdbarch = gdbarch; without taking care to restore the previous gdbarch. This means that GDB's state was being left inconsistent after running the self tests, further supporting the point that there's probably not much expectation that mixing "maint selftests" and regular debugging in the same GDB invocation really works. This patch fixes that, regardless. gdb/ChangeLog: 2017-10-04 Pedro Alves <palves@redhat.com> * frame.c (create_test_frame): Delete. * frame.h (create_test_frame): Delete. * gdbarch-selftests.c: Include gdbthread.h and target.h. (class regcache_test): Delete. (test_target_has_registers, test_target_has_stack) (test_target_has_memory, test_target_prepare_to_store) (test_target_store_registers): New functions. (test_target_ops): New class. (register_to_value_test): Error out if there's already a process_stratum (or higher) target pushed. Create a fuller mock environment, with mock target_ops, inferior, address space, thread and inferior_ptid. * progspace.c (struct address_space): Move to ... * progspace.h (struct address_space): ... here. * regcache.h (regcache::~regcache, regcache::raw_write) [GDB_SELF_TEST]: No longer virtual.
2017-09-19Use DISABLE_COPY_AND_ASSIGNYao Qi1-5/+1
We have many classes that copy cotr and assignment operator are deleted, so this patch replaces these existing mechanical code with macro DISABLE_COPY_AND_ASSIGN. gdb: 2017-09-19 Yao Qi <yao.qi@linaro.org> * annotate.h (struct annotate_arg_emitter): Use DISABLE_COPY_AND_ASSIGN. * common/refcounted-object.h (refcounted_object): Likewise. * completer.h (struct completion_result): Likewise. * dwarf2read.c (struct dwarf2_per_objfile): Likewise. * filename-seen-cache.h (filename_seen_cache): Likewise. * gdbcore.h (thread_section_name): Likewise. * gdb_regex.h (compiled_regex): Likewise. * gdbthread.h (scoped_restore_current_thread): Likewise. * inferior.h (scoped_restore_current_inferior): Likewise. * jit.c (jit_reader): Likewise. * linespec.h (struct linespec_result): Likewise. * mi/mi-parse.h (struct mi_parse): Likewise. * nat/fork-inferior.c (execv_argv): Likewise. * progspace.h (scoped_restore_current_program_space): Likewise. * python/python-internal.h (class gdbpy_enter): Likewise. * regcache.h (regcache): Likewise. * target-descriptions.c (struct tdesc_reg): Likewise. (struct tdesc_type): Likewise. (struct tdesc_feature): Likewise. * ui-out.h (ui_out_emit_type): Likewise.
2017-05-04RAII-fy make_cleanup_restore_current_thread & friendsPedro Alves1-12/+20
After all the make_cleanup_restore_current_thread fixing, I thought I'd convert that and its relatives (which are all cleanups) to RAII classes. scoped_restore_current_pspace_and_thread was put in a separate file to avoid a circular dependency. Tested on x86-64 Fedora 23, native and gdbserver. gdb/ChangeLog: 2017-05-04 Pedro Alves <palves@redhat.com> * Makefile.in (SFILES): Add progspace-and-thread.c. (HFILES_NO_SRCDIR): Add progspace-and-thread.h. (COMMON_OBS): Add progspace-and-thread.o. * breakpoint.c: Include "progspace-and-thread.h". (update_inserted_breakpoint_locations) (insert_breakpoint_locations, create_longjmp_master_breakpoint): Use scoped_restore_current_pspace_and_thread. (create_std_terminate_master_breakpoint): Use scoped_restore_current_program_space. (remove_breakpoint): Use scoped_restore_current_pspace_and_thread. (print_breakpoint_location): Use scoped_restore_current_program_space. (bp_loc_is_permanent): Use scoped_restore_current_pspace_and_thread. (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread. (download_tracepoint_locations): Use scoped_restore_current_pspace_and_thread. (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread. * exec.c (exec_close_1): Use scoped_restore_current_program_space. (enum step_over_calls_kind): Moved from inferior.h. (class scoped_restore_current_thread): New class. * gdbthread.h (make_cleanup_restore_current_thread): Delete declaration. (scoped_restore_current_thread): New class. * infcmd.c: Include "common/gdb_optional.h". (continue_1, proceed_after_attach): Use scoped_restore_current_thread. (notice_new_inferior): Use scoped_restore_current_thread. * inferior.c: Include "progspace-and-thread.h". (restore_inferior, save_current_inferior): Delete. (add_inferior_command, clone_inferior_command): Use scoped_restore_current_pspace_and_thread. * inferior.h (scoped_restore_current_inferior): New class. * infrun.c: Include "progspace-and-thread.h" and "common/gdb_optional.h". (follow_fork_inferior): Use scoped_restore_current_pspace_and_thread. (scoped_restore_exited_inferior): New class. (handle_vfork_child_exec_or_exit): Use scoped_restore_exited_inferior, scoped_restore_current_pspace_and_thread, scoped_restore_current_thread and scoped_restore. (fetch_inferior_event): Use scoped_restore_current_thread. * linespec.c (decode_line_full, decode_line_1): Use scoped_restore_current_program_space. * mi/mi-main.c: Include "progspace-and-thread.h". (exec_continue): Use scoped_restore_current_thread. (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread. (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread. * proc-service.c (ps_pglobal_lookup): Use scoped_restore_current_program_space. * progspace-and-thread.c: New file. * progspace-and-thread.h: New file. * progspace.c (release_program_space, clone_program_space): Use scoped_restore_current_program_space. (restore_program_space, save_current_program_space) (save_current_space_and_thread): Delete. (switch_to_program_space_and_thread): Moved to progspace-and-thread.c. * progspace.h (save_current_program_space) (save_current_space_and_thread): Delete declarations. (scoped_restore_current_program_space): New class. * remote.c (remote_btrace_maybe_reopen): Use scoped_restore_current_thread. * symtab.c: Include "progspace-and-thread.h". (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread. * thread.c (print_thread_info_1): Use scoped_restore_current_thread. (struct current_thread_cleanup): Delete. (do_restore_current_thread_cleanup) (restore_current_thread_cleanup_dtor): Rename/convert both to ... (scoped_restore_current_thread::~scoped_restore_current_thread): ... this new dtor. (make_cleanup_restore_current_thread): Rename/convert to ... (scoped_restore_current_thread::scoped_restore_current_thread): ... this new ctor. (thread_apply_all_command): Use scoped_restore_current_thread. (thread_apply_command): Use scoped_restore_current_thread. * tracepoint.c (tdump_command): Use scoped_restore_current_thread. * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-07-08Delete program spaces directly when removing inferiorsSimon Marchi1-4/+7
When deleting an inferior, delete the associated program space as well if it becomes unused. This replaces the "pruning" approach, with which you could forget to call prune_program_spaces (as seen, with the -remove-inferior command, see [1]). This allows to remove the prune_program_spaces function. At the same time, I was able to clean up the delete_inferior* family: - delete_inferior is unused - delete_inferior_silent is only used in monitor_close, but is replaced with discard_all_inferiors [2], so it becomes unused - All remaining calls to delete_inferior_1 are with silent=1, so the parameter is removed - delete_inferior_1 is renamed to delete_inferior I renamed pspace_empty_p to program_space_empty_p. I prefer if the "exported" functions have a more explicit and standard name. Tested on Ubuntu 14.10. [1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html [2] See https://sourceware.org/ml/gdb-patches/2015-07/msg00228.html and follow-ups for details. gdb/Changelog: * inferior.c (delete_inferior_1): Rename to ... (delete_inferior): ..., remove 'silent' parameter, delete program space when unused and remove call to prune_program_spaces. Remove the old, unused, delete_inferior. (delete_inferior_silent): Remove. (prune_inferiors): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. Remove call to prune_program_spaces. (remove_inferior_command): Idem. * inferior.h (delete_inferior_1): Rename to... (delete_inferior): ..., remove 'silent' parameter and remove the original delete_inferior. (delete_inferior_silent): Remove. * mi/mi-main.c (mi_cmd_remove_inferior): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. * progspace.c (prune_program_spaces): Remove. (pspace_empty_p): Rename to... (program_space_empty_p): ... and make non-static. (delete_program_space): New. * progspace.h (prune_program_spaces): Remove declaration. (program_space_empty_p): New declaration. (delete_program_space): New declaration. * monitor.c (monitor_close): Replace call to delete_thread_silent and delete_inferior_silent with discard_all_inferiors.
2015-07-08Revert "Delete program spaces directly when removing inferiors"Simon Marchi1-7/+4
Reverted, since it causes a build failure. It turns out that delete_inferior_silent wasn't actually unused. This reverts commit 0560c645c02eba2828a053039dcfdf676cdd1d00.
2015-07-08Delete program spaces directly when removing inferiorsSimon Marchi1-4/+7
When deleting an inferior, delete the associated program space as well if it becomes unused. This replaces the "pruning" approach, with which you could forget to call prune_program_spaces (as seen, with the -remove-inferior command, see [1]). This allows to remove the prune_program_spaces function. At the same time, I was able to clean up the delete_inferior* family. delete_inferior_silent and delete_inferior were unused, which allowed renaming delete_inferior_1 to delete_inferior. Also, since all calls to it were with silent=1, I removed that parameter completely. I renamed pspace_empty_p to program_space_empty_p. I prefer if the "exported" functions have a more explicit and standard name. Tested on Ubuntu 14.10. This obsoletes my previous patch "Add call to prune_program_spaces in mi_cmd_remove_inferior" [1]. [1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html gdb/Changelog: * inferior.c (delete_inferior_1): Rename to ... (delete_inferior): ..., remove 'silent' parameter, delete program space when unused and remove call to prune_program_spaces. Remove the old, unused, delete_inferior. (delete_inferior_silent): Remove. (prune_inferiors): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. Remove call to prune_program_spaces. (remove_inferior_command): Idem. * inferior.h (delete_inferior_1): Rename to... (delete_inferior): ..., remove 'silent' parameter and remove the original delete_inferior. (delete_inferior_silent): Remove. * mi/mi-main.c (mi_cmd_remove_inferior): Change call from delete_inferior_1 to delete_inferior and remove 'silent' parameter. * progspace.c (prune_program_spaces): Remove. (pspace_empty_p): Rename to... (program_space_empty_p): ... and make non-static. (delete_program_space): New. * progspace.h (prune_program_spaces): Remove declaration. (program_space_empty_p): New declaration. (delete_program_space): New declaration.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-10-02Reduce Hg packet (select remote general thread) bouncingPedro Alves1-1/+2
A patch I wrote made GDB pull the thread list sooner when debugging with target remote, and I noticed an intended consequence. GDB started bouncing around the currently selected remote/general thread more frequently. E.g.: Sending packet: $qTMinFTPILen#3b...Packet received: 5 +Sending packet: $Hgp726d.726d#53...Packet received: OK Sending packet: $m400680,40#2f...Packet received: 85c0741455bff00d60004889e5ffd05de97bffffff0f1f00e973ffffff0f1f00554889e5c745fc00000000c745fc01000000e900000000c745fc02000000b800 +Sending packet: $Hgp726d.7278#28...Packet received: OK Sending packet: $m4006b2,1#28...Packet received: e9 Fast tracepoint 2 at 0x4006b2: file gdb/testsuite/gdb.trace/range-stepping.c, line 53. Sending packet: $qTStatus#49...Packet received: T0;tnotrun:0;tframes:0;tcreated:0;tfree:500000;tsize:500000;circular:0;disconn:0;starttime:0;stoptime:0;username:;notes:: This ended up breaking "tstart" when one has fast tracepoints set, because gdbserver isn't expecting an Hg packet in response to qRelocInsn: (gdb) ftrace *set_point Fast tracepoint 3 at 0x4006b2: file gdb/testsuite/gdb.trace/range-stepping.c, line 53. (gdb) PASS: gdb.trace/range-stepping.exp: ftrace: ftrace *set_point tstart gdbserver: Malformed response to qRelocInsn, ignoring: Hgp2783.2783 Target does not support this command. (gdb) FAIL: gdb.trace/range-stepping.exp: ftrace: tstart remote_trace_start should probably start by making sure the remote current thread matches inferior_ptid (calling set_general_thread), but still, reducing unnecessary bouncing is a good idea. It happens because the memory/symbol/breakpoint routines use switch_to_program_space_and_thread to do something in the right context and then revert back to the previously current thread. The fix is to simply make any_thread_of_process, find_inferior_for_program_space, etc. give preference to the current thread/inferior it if matches. gdb/ 2014-10-02 Pedro Alves <palves@redhat.com> * gdbthread.h (any_thread_of_process, any_live_thread_of_process): Adjust comments. * inferior.c (find_inferior_for_program_space): Give preference to the current inferior. * inferior.h (find_inferior_for_program_space): Update comment. * progspace.c (switch_to_program_space_and_thread): Prefer the current inferior if it's bound to the program space requested. If the inferior found doesn't have a PID yet, don't bother looking up a thread. * progspace.h (switch_to_program_space_and_thread): Adjust comment. * thread.c (any_thread_of_process, any_live_thread_of_process): Give preference to the current thread.
2014-05-17 * progspace.c (remove_program_space): Delete, unused.Doug Evans1-3/+0
* progspace.h (remove_program_space): Ditto.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-11-20Associate target_dcache to address_space.Yao Qi1-0/+1
Hi, Nowadays, 'target_dcache' is a global variable in GDB, which is not necessary. It can be a per-address-space variable. In this patch, we associate target_dcache to address_space. gdb/doc: 2013-11-20 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Caching Target Data): Update doc for per-address-space dcache. gdb: 2013-11-20 Yao Qi <yao@codesourcery.com> * progspace.h (struct address_space_data): Declare. * target-dcache.c: Include "progspace.h". (target_dache): Remove. (target_dcache_aspace_key): New. (target_dcache_cleanup): New function. (target_dcache_init_p): Get data through target_dcache_aspace_key. (target_dcache_invalidate): Likewise. (target_dcache_get): Likewise. (target_dcache_get_or_init): Likewise. (_initialize_target_dcache): Initialize target_dcache_aspace_key.
2013-11-20Add REGISTRY for struct address_space.Yao Qi1-0/+5
This patch adds REGISTRY for struct address_space. gdb: 2013-11-20 Yao Qi <yao@codesourcery.com> * progspace.c (struct address_space): Update comments. <REGISTRY_FIELDS>: New fields. DEFINE_REGISTRY for address_space. (new_address_space): Call address_space_alloc_data. (free_address_space): Call address_space_free_data. * progspace.h: Use DECLARE_REGISTRY.
2013-08-28PR gdb/15415Jan Kratochvil1-0/+4
gdb/ 2013-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/15415 * corefile.c (get_exec_file): Use exec_filename. * defs.h (OPF_DISABLE_REALPATH): New definition. Add new comment. * exec.c (exec_close): Free EXEC_FILENAME. (exec_file_attach): New variable canonical_pathname. Use OPF_DISABLE_REALPATH. Call gdb_realpath explicitly. Set EXEC_FILENAME. * exec.h (exec_filename): New. * inferior.c (print_inferior, inferior_command): Use PSPACE_EXEC_FILENAME. * mi/mi-main.c (print_one_inferior): Likewise. * progspace.c (clone_program_space, print_program_space): Likewise. * progspace.h (struct program_space): New field pspace_exec_filename. * source.c (openp): Describe OPF_DISABLE_REALPATH. New variable realpath_fptr, initialize it from OPF_DISABLE_REALPATH, use it. gdb/testsuite/ 2013-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/15415 * gdb.base/argv0-symlink.c: New file. * gdb.base/argv0-symlink.exp: New file.