From: Jan Kratochvil Date: Mon, 7 Sep 2009 18:07:02 +0000 (+0000) Subject: binutils/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb7cc02115c176068ad577e9787cff620cf32d4f;p=binutils-gdb.git binutils/ * dwarf.c (process_debug_info): Support section padding abbrev codes. binutils/testsuite/ * binutils-all/testranges.s (.debug_info): Pad the only CU. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 107cb8d29a7..e44742515c0 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2009-09-07 Jan Kratochvil + + * dwarf.c (process_debug_info): Support section padding abbrev codes. + 2009-09-07 Tristan Gingold * po/binutils.pot: Regenerate. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 9c7c9a87aa0..46b6929a011 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -1985,9 +1985,22 @@ process_debug_info (struct dwarf_section *section, abbrev_number = read_leb128 (tags, & bytes_read, 0); tags += bytes_read; - /* A null DIE marks the end of a list of siblings. */ + /* A null DIE marks the end of a list of siblings or it may also be + a section padding. */ if (abbrev_number == 0) { + /* Check if it can be a section padding for the last CU. */ + if (level == 0 && start == end) + { + unsigned char *chk; + + for (chk = tags; chk < start; chk++) + if (*chk != 0) + break; + if (chk == start) + break; + } + --level; if (level < 0) { diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index d212b673525..250959e0be3 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-09-07 Jan Kratochvil + + * binutils-all/testranges.s (.debug_info): Pad the only CU. + 2009-09-07 Jan Kratochvil * binutils-all/testranges.s: Replace all .long by .4byte. diff --git a/binutils/testsuite/binutils-all/testranges.s b/binutils/testsuite/binutils-all/testranges.s index 0964519387c..e1f9931b999 100644 --- a/binutils/testsuite/binutils-all/testranges.s +++ b/binutils/testsuite/binutils-all/testranges.s @@ -32,6 +32,10 @@ debugS: .uleb128 0x2 ;# (DIE (0x6d) DW_TAG_subprogram) .ascii "A\0" ;# DW_AT_name .4byte range_sub - range ;# DW_AT_ranges + + ;# minimal section alignment on alpha-* is 2, ensure no new invalid CU + ;# will be started. + .balign 2 debugE: .section .debug_abbrev,"",%progbits