From d7a78e5c41c77ad32de668b0b2fde74deeb8190d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 12 Oct 2020 15:53:16 -0600 Subject: Change target_section_table to std::vector alias 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 * target.h (struct target_ops) : 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) : 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 --- gdb/target-debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/target-debug.h') diff --git a/gdb/target-debug.h b/gdb/target-debug.h index 1b2feb2..65a14c4 100644 --- a/gdb/target-debug.h +++ b/gdb/target-debug.h @@ -106,7 +106,7 @@ target_debug_do_print (host_address_to_string (X)) #define target_debug_print_struct_ui_file_p(X) \ target_debug_do_print (host_address_to_string (X)) -#define target_debug_print_struct_target_section_table_p(X) \ +#define target_debug_print_target_section_table_p(X) \ target_debug_do_print (host_address_to_string (X)) #define target_debug_print_async_callback_ftype_p(X) \ target_debug_do_print (host_address_to_string (X)) -- cgit v1.1