diff options
author | Mark Alexander <marka@cygnus> | 1997-03-26 14:48:59 +0000 |
---|---|---|
committer | Mark Alexander <marka@cygnus> | 1997-03-26 14:48:59 +0000 |
commit | 4a3150f58a4492a8b164eed90ee984c6485671a4 (patch) | |
tree | 61f2e2b2332119b4093cd925502e2b5a23a5057f /gdb/mdebugread.c | |
parent | 60d1227a31258b1da5919fd253b7a88666a4a29e (diff) | |
download | gdb-4a3150f58a4492a8b164eed90ee984c6485671a4.zip gdb-4a3150f58a4492a8b164eed90ee984c6485671a4.tar.gz gdb-4a3150f58a4492a8b164eed90ee984c6485671a4.tar.bz2 |
Fix from Peter Schauer:
* mdebugread.c (parse_procedure): Set address of procedure to
block start; this fixes problems with shared libraries introduced
by change of Mar 21.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 1e9fe6d..dda7c8c 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -2005,7 +2005,18 @@ parse_procedure (pr, search_symtab, pst) e = (struct mips_extra_func_info *) SYMBOL_VALUE (i); e->pdr = *pr; e->pdr.isym = (long) s; - e->pdr.adr += cur_fdr->adr; /* PDR address is relative to FDR address */ + + /* GDB expects the absolute function start address for the + procedure descriptor in e->pdr.adr. + As the address in the procedure descriptor is usually relative, + we would have to relocate e->pdr.adr with cur_fdr->adr and + ANOFFSET (pst->section_offsets, SECT_OFF_TEXT). + Unfortunately cur_fdr->adr and e->pdr.adr are both absolute + in shared libraries on some systems, and on other systems + e->pdr.adr is sometimes offset by a bogus value. + To work around these problems, we replace e->pdr.adr with + the start address of the function. */ + e->pdr.adr = BLOCK_START (b); /* Correct incorrect setjmp procedure descriptor from the library to make backtrace through setjmp work. */ |