aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-02 09:12:11 +0000
committerNick Clifton <nickc@redhat.com>2001-10-02 09:12:11 +0000
commitacb325ecee0165f154751927262c2b06ba6cca68 (patch)
tree137b6a9747f822973f4766b8e4ea5b219294fd8f
parent0cea17c5979ee8eacdc4d444ee842a5d1261db8b (diff)
downloadgdb-acb325ecee0165f154751927262c2b06ba6cca68.zip
gdb-acb325ecee0165f154751927262c2b06ba6cca68.tar.gz
gdb-acb325ecee0165f154751927262c2b06ba6cca68.tar.bz2
Detect and warna bout more 64bit DWARF debug sections
-rw-r--r--binutils/ChangeLog9
-rw-r--r--binutils/readelf.c30
2 files changed, 37 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 55bfba2..1227757 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (display_debug_line, display_debug_pubnames,
+ display_debug_info, display_debug_frames): Detect and warn
+ about 64-bit format entries.
+ (display_debug_aranges): Reword 64-bit warning.
+ (debug_displays): Add .debug_pubtypes as a known, but not yet
+ supported, debug section.
+
2001-10-01 Nick Clifton <nickc@cambridge.redhat.com>
* readelf.c (display_debug_aranges): Warn about DWARF64 format
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 4bfc1d7..7befc88 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5490,6 +5490,13 @@ display_debug_lines (section, start, file)
/* Check the length of the block. */
info.li_length = BYTE_GET (external->li_length);
+
+ if (info.li_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF line info is not supported yet.\n"));
+ break;
+ }
+
if (info.li_length + sizeof (external->li_length) > section->sh_size)
{
warn
@@ -5718,6 +5725,12 @@ display_debug_pubnames (section, start, file)
data = start + sizeof (* external);
start += pubnames.pn_length + sizeof (external->pn_length);
+ if (pubnames.pn_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF pubnames are not supported yet.\n"));
+ break;
+ }
+
if (pubnames.pn_version != 2)
{
static int warned = 0;
@@ -6818,6 +6831,12 @@ display_debug_info (section, start, file)
compunit.cu_abbrev_offset = BYTE_GET (external->cu_abbrev_offset);
compunit.cu_pointer_size = BYTE_GET (external->cu_pointer_size);
+ if (compunit.cu_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF debug info is not supported yet.\n"));
+ break;
+ }
+
tags = start + sizeof (* external);
cu_offset = start - section_begin;
start += compunit.cu_length + sizeof (external->cu_length);
@@ -6947,7 +6966,7 @@ display_debug_aranges (section, start, file)
if (arange.ar_length == 0xffffffff)
{
- warn (_("DWARF64 aranges not currently supported.\n"));
+ warn (_("64-bit DWARF aranges are not supported yet.\n"));
break;
}
@@ -7162,6 +7181,12 @@ display_debug_frames (section, start, file)
if (length == 0)
return 1;
+ if (length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF format frames are not supported yet.\n"));
+ break;
+ }
+
block_end = saved_start + length + 4;
cie_id = byte_get (start, 4); start += 4;
@@ -7270,7 +7295,7 @@ display_debug_frames (section, start, file)
look_for = is_eh ? start - 4 - cie_id : section_start + cie_id;
- for (cie=chunks; cie ; cie = cie->next)
+ for (cie = chunks; cie ; cie = cie->next)
if (cie->chunk_start == look_for)
break;
@@ -7712,6 +7737,7 @@ debug_displays[] =
{ ".debug_frame", display_debug_frames, NULL },
{ ".eh_frame", display_debug_frames, NULL },
{ ".debug_macinfo", display_debug_not_supported, NULL },
+ { ".debug_pubtypes", display_debug_not_supported, NULL },
{ ".debug_str", display_debug_not_supported, NULL },
{ ".debug_static_func", display_debug_not_supported, NULL },
{ ".debug_static_vars", display_debug_not_supported, NULL },