aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsread.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-10-15 13:40:40 +0000
committerJohn Gilmore <gnu@cygnus>1992-10-15 13:40:40 +0000
commitd5931d797dee8c07bb112be83593ca79b61ae43b (patch)
treefd546b4589f8165979bd98779e73191dbf65879c /gdb/mipsread.c
parent6803d8186f6bee7f92230ebe4c185f229c47a24e (diff)
downloadgdb-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/mipsread.c')
-rw-r--r--gdb/mipsread.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index dd0d9b9..f5740ef 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -230,7 +230,7 @@ struct type *builtin_type_string;
/* Forward declarations */
static void
-fixup_symtab PARAMS ((HDRR *, char *, int, bfd *));
+fixup_symtab PARAMS ((HDRR *, char *, file_ptr, bfd *));
static void
read_mips_symtab PARAMS ((struct objfile *, struct section_offsets *));
@@ -449,7 +449,7 @@ read_the_mips_symtab(abfd, end_of_text_segp)
CORE_ADDR *end_of_text_segp;
{
int stsize, st_hdrsize;
- unsigned st_filptr;
+ file_ptr st_filptr;
struct hdr_ext hdr_ext;
HDRR st_hdr;
/* Header for executable/object file we read symbols from */
@@ -457,7 +457,7 @@ read_the_mips_symtab(abfd, end_of_text_segp)
int val;
/* We need some info from the initial headers */
- val = bfd_seek(abfd, 0L, L_SET);
+ val = bfd_seek(abfd, (file_ptr) 0, L_SET);
val = bfd_read((PTR)&filhdr, sizeof filhdr, 1, abfd);
if (end_of_text_segp)
@@ -514,7 +514,7 @@ static void
fixup_symtab (hdr, data, f_ptr, abfd)
HDRR *hdr;
char *data;
- int f_ptr;
+ file_ptr f_ptr;
bfd *abfd;
{
int f_idx, s_idx, i;
@@ -526,8 +526,9 @@ fixup_symtab (hdr, data, f_ptr, abfd)
/* This function depends on the external and internal forms
of the MIPS symbol table taking identical space. Check this
- assumption at compile-time. */
-#if 0 /* FIXME: Unused */
+ assumption at compile-time.
+ DO NOT DELETE THESE ENTRIES, OR COMMENT THEM OUT, JUST BECAUSE SOME
+ "LINT" OR COMPILER THINKS THEY ARE UNUSED! Thank you. */
static check_hdr1[1 + sizeof (struct hdr_ext) - sizeof (HDRR)] = {0};
static check_hdr2[1 + sizeof (HDRR) - sizeof (struct hdr_ext)] = {0};
static check_fdr1[1 + sizeof (struct fdr_ext) - sizeof (FDR)] = {0};
@@ -540,7 +541,6 @@ fixup_symtab (hdr, data, f_ptr, abfd)
static check_ext2[1 + sizeof (EXTR) - sizeof (struct ext_ext)] = {0};
static check_rfd1[1 + sizeof (struct rfd_ext) - sizeof (RFDT)] = {0};
static check_rfd2[1 + sizeof (RFDT) - sizeof (struct rfd_ext)] = {0};
-#endif
/* Swap in the header record. */
ecoff_swap_hdr_in (abfd, hdr, hdr);