aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-19 10:24:27 -0600
committerTom Tromey <tom@tromey.com>2023-03-28 15:12:44 -0600
commit9675da25357c7a3f472731ddc6eb3becc65b469a (patch)
tree54d600ccb876d7db6056c0aa97b7579878027f18 /gdb/symtab.h
parent1ee8702db9cb2a329c9df0938667e2415b0c9e46 (diff)
downloadgdb-9675da25357c7a3f472731ddc6eb3becc65b469a.zip
gdb-9675da25357c7a3f472731ddc6eb3becc65b469a.tar.gz
gdb-9675da25357c7a3f472731ddc6eb3becc65b469a.tar.bz2
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.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index d1ace39..826489c 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. */