aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-17 16:37:15 -0600
committerTom Tromey <tom@tromey.com>2023-03-28 15:12:43 -0600
commit584d0cdac2b1fee77adb587052decfce12077469 (patch)
tree011aa24c2e4e17e2fed576477db52cc1773005dc /gdb/xcoffread.c
parent257c302c6952fb77af456a44f2ab117fa290c01b (diff)
downloadgdb-584d0cdac2b1fee77adb587052decfce12077469.zip
gdb-584d0cdac2b1fee77adb587052decfce12077469.tar.gz
gdb-584d0cdac2b1fee77adb587052decfce12077469.tar.bz2
Use unrelocated_addr in partial symbol tables
This changes partial symbol tables to use unrelocated_addr for the text_high and text_low members. This revealed some latent bugs in ctfread.c, which are fixed here.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index f1fb195..ff46cd5 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1875,7 +1875,8 @@ xcoff_start_psymtab (psymtab_storage *partial_symtabs,
{
/* We fill in textlow later. */
legacy_psymtab *result = new legacy_psymtab (filename, partial_symtabs,
- objfile->per_bfd, 0);
+ objfile->per_bfd,
+ unrelocated_addr (0));
result->read_symtab_private =
XOBNEW (&objfile->objfile_obstack, struct xcoff_symloc);
@@ -2172,14 +2173,16 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
}
if (pst != NULL)
{
- CORE_ADDR highval =
- symbol.n_value + CSECT_LEN (&csect_aux);
+ unrelocated_addr highval
+ = unrelocated_addr (symbol.n_value
+ + CSECT_LEN (&csect_aux));
if (highval > pst->raw_text_high ())
pst->set_text_high (highval);
- if (!pst->text_low_valid
- || symbol.n_value < pst->raw_text_low ())
- pst->set_text_low (symbol.n_value);
+ unrelocated_addr loval
+ = unrelocated_addr (symbol.n_value);
+ if (!pst->text_low_valid || loval < pst->raw_text_low ())
+ pst->set_text_low (loval);
}
misc_func_recorded = 0;
break;