diff options
author | Tom Tromey <tom@tromey.com> | 2020-10-12 15:53:16 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-10-12 20:18:47 -0600 |
commit | 7b466b10241f3971ab628ace1e75cf1166209af5 (patch) | |
tree | 06eb7d269f6118294733fff4b6b6cbddf0e30762 /gdb/target.h | |
parent | af1b7b51595f47d2672e4fcbc9fa4c641e4a501e (diff) | |
download | gdb-7b466b10241f3971ab628ace1e75cf1166209af5.zip gdb-7b466b10241f3971ab628ace1e75cf1166209af5.tar.gz gdb-7b466b10241f3971ab628ace1e75cf1166209af5.tar.bz2 |
Introduce target-section.h
This introduces a new target-section.h file. This makes some of the
later patches in this series a bit cleaner, because new includes of
target.h won't be required. Also I think it's better to have small
header files for each separate data structure.
gdb/ChangeLog
2020-10-12 Tom Tromey <tom@tromey.com>
* target.h (struct target_section, struct target_section_table):
Move to target-section.h.
* target-section.h: New file.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/gdb/target.h b/gdb/target.h index 8545533..cf0a296 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -44,6 +44,7 @@ struct inferior; #include "breakpoint.h" /* For enum bptype. */ #include "gdbsupport/scoped_restore.h" #include "gdbsupport/refcounted-object.h" +#include "target-section.h" /* This include file defines the interface between the main part of the debugger, and the part which is target-specific, or @@ -2405,33 +2406,6 @@ extern bool target_is_pushed (target_ops *t); extern CORE_ADDR target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset); -/* Struct target_section maps address ranges to file sections. It is - mostly used with BFD files, but can be used without (e.g. for handling - raw disks, or files not in formats handled by BFD). */ - -struct target_section - { - CORE_ADDR addr; /* Lowest address in section */ - CORE_ADDR endaddr; /* 1+highest address in section */ - - struct bfd_section *the_bfd_section; - - /* The "owner" of the section. - It can be any unique value. It is set by add_target_sections - and used by remove_target_sections. - For example, for executables it is a pointer to exec_bfd and - for shlibs it is the so_list pointer. */ - void *owner; - }; - -/* Holds an array of target sections. Defined by [SECTIONS..SECTIONS_END[. */ - -struct target_section_table -{ - struct target_section *sections; - struct target_section *sections_end; -}; - /* Return the "section" containing the specified address. */ struct target_section *target_section_by_addr (struct target_ops *target, CORE_ADDR addr); |