aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-08-05 08:25:17 +0000
committerNick Clifton <nickc@redhat.com>2003-08-05 08:25:17 +0000
commit14abcef98a3d8a5113a552889f4ecc084d1df2fe (patch)
tree2ce00aafcc6dcafc1cef56e748afacef675a1b57 /bfd
parentab4e3d93a0586b8b95213f7255b91fc056d82fd9 (diff)
downloadgdb-14abcef98a3d8a5113a552889f4ecc084d1df2fe.zip
gdb-14abcef98a3d8a5113a552889f4ecc084d1df2fe.tar.gz
gdb-14abcef98a3d8a5113a552889f4ecc084d1df2fe.tar.bz2
Detect and issue a warning message if the line number table could not be read.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coffcode.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8645db0..e4c4f92 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
+
+ * coffcode.h: (coff_slurp_line_table) Return with a warning
+ message if the line number table could not be read.
+
2003-08-04 Nick Clifton <nickc@redhat.com>
* elflink.h (elf_link_add_object_symbols): Prepend "warning: "
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index b8dde1a..3b39f09 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -4407,6 +4407,13 @@ coff_slurp_line_table (abfd, asect)
amt = (bfd_size_type) bfd_coff_linesz (abfd) * asect->lineno_count;
native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
+ if (native_lineno == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: warning: line number table read failed"),
+ bfd_archive_filename (abfd));
+ return FALSE;
+ }
amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
lineno_cache = (alent *) bfd_alloc (abfd, amt);
if (lineno_cache == NULL)