summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/binutils/rddbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/binutils/rddbg.c')
-rw-r--r--contrib/binutils/binutils/rddbg.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c
index c9ee3a8..f9fae05 100644
--- a/contrib/binutils/binutils/rddbg.c
+++ b/contrib/binutils/binutils/rddbg.c
@@ -1,5 +1,5 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright (C) 1995, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -84,8 +84,8 @@ read_debugging_info (abfd, syms, symcount)
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;
}
@@ -159,7 +159,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
next_stroff = 0;
for (stab = stabs; stab < stabs + stabsize; stab += 12)
{
- bfd_size_type strx;
+ unsigned int strx;
int type;
int other;
int desc;
@@ -185,7 +185,17 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
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)
{
@@ -397,7 +407,7 @@ stab_context ()
{
int i;
- fprintf (stderr, "Last stabs entries before error:\n");
+ fprintf (stderr, _("Last stabs entries before error:\n"));
fprintf (stderr, "n_type n_desc n_value string\n");
i = saved_stabs_index;
OpenPOWER on IntegriCloud