diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2004-02-14 15:46:33 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2004-02-14 15:46:33 +0000 |
commit | 9ab9195f183692346cff01bbe15e77774ef1d608 (patch) | |
tree | f3f7314d2e74a17d9c705d527326f2560e442463 /gdb/objfiles.c | |
parent | ca0b76868aa28d2ecced761ad041d942953261a9 (diff) | |
download | gdb-9ab9195f183692346cff01bbe15e77774ef1d608.zip gdb-9ab9195f183692346cff01bbe15e77774ef1d608.tar.gz gdb-9ab9195f183692346cff01bbe15e77774ef1d608.tar.bz2 |
2004-02-14 Elena Zannoni <ezannoni@redhat.com>
* symfile.c (init_entry_point_info, entry_point_address): Move
from here...
* objfiles.c (init_entry_point_info, entry_point_address):..to
here.
* symfile.h (init_entry_point_info, entry_point_address): Remove
prototypes.
* objfiles.h (init_entry_point_info, entry_point_address):Add
prototypes.
* cris-tdep.c: Remove include of symfile.h. Add include of
objfiles.h.
* infcall.c: Ditto.
* mcore-tdep.c: Ditto.
* mn10300-tdep.c: Ditto.
* sh64-tdep.c: Ditto.
* v850-tdep.c: Ditto.
* arm-tdep.c: Remove include of symfile.h.
* blockframe.c: Ditto.
* coffread.c: Ditto.
* dbxread.c: Ditto.
* dwarf2read.c: Ditto.
* dwarfread.c: Ditto.
* frv-tdep.c: Ditto.
* ia64-tdep.c: Ditto.
* mdebugread.c: Ditto.
* mipsread.c: Ditto.
* rs6000-tdep.c: Ditto.
* s390-tdep.c: Ditto.
* sh-tdep.c: Ditto.
* xstormy16-tdep.c: Ditto.
* gdbarch.sh: Remove include of symfile.h.
* gdbarch.c: Regenerate.
* solib-irix.c (enable_break): Use entry_point_address().
Add comment about include file.
* xcoffread.c: Add comment about include file.
* Makefile.in (arm-tdep.o, blockframe.o, coffread.o, cris-tdep.o)
(dbxread.o, dwarf2read.o, dwarfread.o, frv-tdep.o, gdbarch.o)
(ia64-tdep.o, infcall.o, mcore-tdep.o, mdebugread.o, mipsread.o)
(mn10300-tdep.o, rs6000-nat.o, s390-tdep.o, sh64-tdep.o)
(sh-tdep.o, v850-tdep.o, xstormy16-tdep.o): Update dependencies.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 03a88eb..314e27e 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -231,6 +231,40 @@ allocate_objfile (bfd *abfd, int flags) return (objfile); } +/* Initialize entry point information for this objfile. */ + +void +init_entry_point_info (struct objfile *objfile) +{ + /* Save startup file's range of PC addresses to help blockframe.c + decide where the bottom of the stack is. */ + + if (bfd_get_file_flags (objfile->obfd) & EXEC_P) + { + /* Executable file -- record its entry point so we'll recognize + the startup file because it contains the entry point. */ + objfile->ei.entry_point = bfd_get_start_address (objfile->obfd); + } + else + { + /* Examination of non-executable.o files. Short-circuit this stuff. */ + objfile->ei.entry_point = INVALID_ENTRY_POINT; + } + objfile->ei.deprecated_entry_file_lowpc = INVALID_ENTRY_LOWPC; + objfile->ei.deprecated_entry_file_highpc = INVALID_ENTRY_HIGHPC; + objfile->ei.entry_func_lowpc = INVALID_ENTRY_LOWPC; + objfile->ei.entry_func_highpc = INVALID_ENTRY_HIGHPC; + objfile->ei.main_func_lowpc = INVALID_ENTRY_LOWPC; + objfile->ei.main_func_highpc = INVALID_ENTRY_HIGHPC; +} + +/* Get current entry point address. */ + +CORE_ADDR +entry_point_address (void) +{ + return symfile_objfile ? symfile_objfile->ei.entry_point : 0; +} /* Create the terminating entry of OBJFILE's minimal symbol table. If OBJFILE->msymbols is zero, allocate a single entry from |