diff options
author | Stu Grossman <grossman@cygnus> | 1994-06-09 06:30:38 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1994-06-09 06:30:38 +0000 |
commit | a4b4f5205874ff2b856aad63a4298f7eb205262f (patch) | |
tree | 184658dd550b80260f6a69d8da435e96c77eb966 /gdb/objfiles.c | |
parent | 5005cbca02225dc77057fc86d08c73e5675c02fe (diff) | |
download | gdb-a4b4f5205874ff2b856aad63a4298f7eb205262f.zip gdb-a4b4f5205874ff2b856aad63a4298f7eb205262f.tar.gz gdb-a4b4f5205874ff2b856aad63a4298f7eb205262f.tar.bz2 |
* nlmread.c (nlm_symtab_read): Clean up a bit.
* (nlm_symfile_read): Record bounds of main() so that backtrace
command will know where to stop.
* objfiles.c (objfile_relocate): Relocate entry point/func info
for backtrace as well.
* objfiles.h: Define values for invalid PCs for entry point info.
* symfile.c (init_entry_point_info): Initialize invalid values
with aforementioned macros.
* config/alpha/tm-alphanw.h: Turn on FRAME_CHAIN_VALID_ALTERNATE
to cause backtrace to stop when it gets back to main().
* config/i386/tm-i386nw.h: Ditto.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 530e19b..5e9e354 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -578,6 +578,27 @@ objfile_relocate (objfile, new_offsets) } } } + + if (objfile->ei.entry_point != ~0) + objfile->ei.entry_point += ANOFFSET (delta, SECT_OFF_TEXT); + + if (objfile->ei.entry_func_lowpc != INVALID_ENTRY_LOWPC) + { + objfile->ei.entry_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT); + objfile->ei.entry_func_highpc += ANOFFSET (delta, SECT_OFF_TEXT); + } + + if (objfile->ei.entry_file_lowpc != INVALID_ENTRY_LOWPC) + { + objfile->ei.entry_file_lowpc += ANOFFSET (delta, SECT_OFF_TEXT); + objfile->ei.entry_file_highpc += ANOFFSET (delta, SECT_OFF_TEXT); + } + + if (objfile->ei.main_func_lowpc != INVALID_ENTRY_LOWPC) + { + objfile->ei.main_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT); + objfile->ei.main_func_highpc += ANOFFSET (delta, SECT_OFF_TEXT); + } } /* Many places in gdb want to test just to see if we have any partial |