diff options
author | John Gilmore <gnu@cygnus> | 1992-10-15 13:40:40 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-10-15 13:40:40 +0000 |
commit | d5931d797dee8c07bb112be83593ca79b61ae43b (patch) | |
tree | fd546b4589f8165979bd98779e73191dbf65879c /gdb/elfread.c | |
parent | 6803d8186f6bee7f92230ebe4c185f229c47a24e (diff) | |
download | gdb-d5931d797dee8c07bb112be83593ca79b61ae43b.zip gdb-d5931d797dee8c07bb112be83593ca79b61ae43b.tar.gz gdb-d5931d797dee8c07bb112be83593ca79b61ae43b.tar.bz2 |
Lint around file_ptr's (bfd's off_t's) and bfd_seek.
* dbxread.c (read_dbx_symtab): Use L_SET as bfd_seek arg.
(elfstab_build_psymtabs): staboffset and stabstroffset args are
file_ptr's.
* dwarfread.c (struct dwfinfo): Convert dbfoff, lnfoff to file_ptr.
(scan_compilation_units): Punt unused filename arg. dbfoff,
lnoffset, and curlnoffset are file_ptr's now.
(dwarf_build_psymtabs): Drop desc and filename args; use
objfile. dbfoff and lnoffset are file_ptr's now.
(read_ofile_symtab): foffset is now file_ptr. Use L_SET in bfd_seek.
* elfread.c (struct elfinfo): dboffset and lnoffset are file_ptr's.
(elf_symfile_read): Skip desc and filename args to
dwarf_build_psymtabs. Pass file_ptr's to elfstab_build_psymtabs.
* gdb-stabs.h: Use file_ptr rather than off_t.
* mipsread.c (fixup_symtab): f_ptr is a file_ptr. Re-enable
compile-time debug check that someone turned off as "unused".
(read_the_mips_symtab): st_filptr is a file_ptr. Fix bfd_seek call.
* symfile.h: Update dwarf_build_psymtabs and
elfstab_build_psymtabs prototypes.
* xcoffread.c (init_stringtab, init_lineno, xcoff_symfile_read):
Use file_ptr offsets. bfd_seeks use L_SET.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index 3ba7bb7..1c35461 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -42,8 +42,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "symfile.h" #include "objfiles.h" #include "buildsym.h" - -#include <sys/types.h> /* For off_t for gdb-stabs.h */ #include "gdb-stabs.h" #define STREQ(a,b) (strcmp((a),(b))==0) @@ -53,9 +51,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ It's local to elf_symfile_read. */ struct elfinfo { - unsigned int dboffset; /* Offset to dwarf debug section */ + file_ptr dboffset; /* Offset to dwarf debug section */ unsigned int dbsize; /* Size of dwarf debug section */ - unsigned int lnoffset; /* Offset to dwarf line number section */ + file_ptr lnoffset; /* Offset to dwarf line number section */ unsigned int lnsize; /* Size of dwarf line number section */ asection *stabsect; /* Section pointer for .stab section */ asection *stabindexsect; /* Section pointer for .stab.index section */ @@ -464,11 +462,10 @@ elf_symfile_read (objfile, section_offsets, mainline) if (ei.dboffset && ei.lnoffset) { /* DWARF sections */ - dwarf_build_psymtabs (fileno ((FILE *)(abfd -> iostream)), - bfd_get_filename (abfd), + dwarf_build_psymtabs (objfile, section_offsets, mainline, ei.dboffset, ei.dbsize, - ei.lnoffset, ei.lnsize, objfile); + ei.lnoffset, ei.lnsize); } if (ei.stabsect) { @@ -489,7 +486,7 @@ elf_symfile_read (objfile, section_offsets, mainline) mainline, ei.stabsect->filepos, /* .stab offset */ bfd_get_section_size_before_reloc (ei.stabsect),/* .stab size */ - elf_sect->sh_offset, /* .stabstr offset */ + (file_ptr) elf_sect->sh_offset, /* .stabstr offset */ elf_sect->sh_size); /* .stabstr size */ } |