aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-11-09 10:50:07 +0000
committerJohn Gilmore <gnu@cygnus>1991-11-09 10:50:07 +0000
commita048c8f5373eb41ad78d82289cb381013a67a930 (patch)
treeb99d0c5bfba4360252892d11e2cc985e3d5965f1 /gdb/elfread.c
parentc466820795c1eccb540b676f32c42ff71d592610 (diff)
downloadgdb-a048c8f5373eb41ad78d82289cb381013a67a930.zip
gdb-a048c8f5373eb41ad78d82289cb381013a67a930.tar.gz
gdb-a048c8f5373eb41ad78d82289cb381013a67a930.tar.bz2
Add tracking of object files (that contain symbols) to gdb.
This includes a "struct objfile" that owns symtabs and psymtabs that were read in from that binary file. See ChangeLog.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 124e9a2..c99bfc4 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -48,7 +48,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "symtab.h"
#include "ansidecl.h"
-extern int EXFUN(strcmp, (CONST char *a, CONST char *b));
+extern int EXFUN (strcmp, (CONST char *a, CONST char *b));
+extern int EXFUN (dwarf_build_psymtabs,
+ (int desc, char *filename, CORE_ADDR addr, int mainline,
+ unsigned int dbfoff, unsigned int dbsize, unsigned int lnoffset,
+ unsigned int lnsize, struct objfile *objfile));
+
#define STREQ(a,b) (strcmp((a),(b))==0)
struct elfinfo {
@@ -127,7 +132,7 @@ DEFUN(elf_symfile_read, (sf, addr, mainline),
CORE_ADDR addr AND
int mainline)
{
- bfd *abfd = sf -> sym_bfd;
+ bfd *abfd = sf->objfile->obfd;
struct elfinfo ei;
bfd_map_over_sections (abfd, elf_locate_sections, &ei);
@@ -138,7 +143,7 @@ DEFUN(elf_symfile_read, (sf, addr, mainline),
bfd_get_filename (abfd),
addr, mainline,
ei.dboffset, ei.dbsize,
- ei.lnoffset, ei.lnsize);
+ ei.lnoffset, ei.lnsize, sf->objfile);
}
if (!partial_symtab_list)
{