aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-12-10 23:11:20 +0000
committerAndrew Cagney <cagney@redhat.com>1997-12-10 23:11:20 +0000
commit70a46de24e0e3c13ab4eb6b1f02be8a7c8d75502 (patch)
tree5fe1b006f634c71811104be77e57ccdd6aa233a9 /gdb/dwarf2read.c
parent7602287484f0c3759fae86e5eb1684fcadc13f2f (diff)
downloadgdb-70a46de24e0e3c13ab4eb6b1f02be8a7c8d75502.zip
gdb-70a46de24e0e3c13ab4eb6b1f02be8a7c8d75502.tar.gz
gdb-70a46de24e0e3c13ab4eb6b1f02be8a7c8d75502.tar.bz2
(CVS is doing wierd things)
Re-checkin fixes to code verifying dwarf debug info CU headers before using it.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 614ba92..feded4e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -934,13 +934,17 @@ dwarf2_build_psymtabs_hard (objfile, section_offsets, mainline)
}
if (cu_header.abbrev_offset >= dwarf_abbrev_size)
{
- error ("Dwarf Error: bad offset in compilation unit header.");
+ error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (at 0x%lx + 6).",
+ (long) cu_header.abbrev_offset,
+ (long) (beg_of_comp_unit - dwarf_info_buffer));
return;
}
if (beg_of_comp_unit + cu_header.length + 4
- >= dwarf_info_buffer + dwarf_info_size)
+ > dwarf_info_buffer + dwarf_info_size)
{
- error ("Dwarf Error: bad length in compilation unit header.");
+ error ("Dwarf Error: bad length (0x%lx) in compilation unit header (0x%lx + 0).",
+ (long) cu_header.length,
+ (long) (beg_of_comp_unit - dwarf_info_buffer));
return;
}