/* rddbg.c -- Read debugging information into a generic form.
- Copyright (C) 1995, 96, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
if (! found)
{
- fprintf (stderr, _("%s: no recognized debugging information\n"),
- bfd_get_filename (abfd));
+ non_fatal (_("%s: no recognized debugging information"),
+ bfd_get_filename (abfd));
return NULL;
}
next_stroff = 0;
for (stab = stabs; stab < stabs + stabsize; stab += 12)
{
- bfd_size_type strx;
+ unsigned int strx;
int type;
int other;
int desc;
char *f, *s;
f = NULL;
+
+ if (stroff + strx > strsize)
+ {
+ fprintf (stderr, "%s: %s: stab entry %d is corrupt, strx = 0x%x, type = %d\n",
+ bfd_get_filename (abfd), names[i].secname,
+ (stab - stabs) / 12, strx, type);
+ continue;
+ }
+
s = (char *) strings + stroff + strx;
+
while (s[strlen (s) - 1] == '\\'
&& stab + 12 < stabs + stabsize)
{