diff options
author | 2023-03-19 10:24:27 -0600 | |
---|---|---|
committer | 2023-03-28 15:12:44 -0600 | |
commit | 9675da25357c7a3f472731ddc6eb3becc65b469a (patch) | |
tree | 54d600ccb876d7db6056c0aa97b7579878027f18 /gdb/symtab.h | |
parent | Use unrelocated_addr in psymbols (diff) | |
download | binutils-gdb-9675da25357c7a3f472731ddc6eb3becc65b469a.tar.gz binutils-gdb-9675da25357c7a3f472731ddc6eb3becc65b469a.tar.bz2 binutils-gdb-9675da25357c7a3f472731ddc6eb3becc65b469a.zip |
Use unrelocated_addr in minimal symbols
This changes minimal symbols to use unrelocated_addr. I believe this
detected a latent bug in add_pe_forwarded_sym.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index d1ace398fe2..826489c9cbc 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -754,10 +754,21 @@ struct minimal_symbol : public general_symbol_info offsets from OBJFILE. */ CORE_ADDR value_address (objfile *objfile) const; + /* It does not make sense to call this for minimal symbols, as they + are stored unrelocated. */ + CORE_ADDR value_address () const = delete; + /* The unrelocated address of the minimal symbol. */ - CORE_ADDR value_raw_address () const + unrelocated_addr value_raw_address () const { - return m_value.address; + return m_value.unrel_addr; + } + + /* The unrelocated address just after the end of the the minimal + symbol. */ + unrelocated_addr value_raw_end_address () const + { + return unrelocated_addr (CORE_ADDR (value_raw_address ()) + size ()); } /* Return this minimal symbol's type. */ |