diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-09-07 18:07:02 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-09-07 18:07:02 +0000 |
commit | eb7cc02115c176068ad577e9787cff620cf32d4f (patch) | |
tree | 3899f9763528884b58f68e57ad0b3be47e48956d /binutils/dwarf.c | |
parent | 1ecbdee03ea43a662dda7b1fd47102b11b284925 (diff) | |
download | gdb-eb7cc02115c176068ad577e9787cff620cf32d4f.zip gdb-eb7cc02115c176068ad577e9787cff620cf32d4f.tar.gz gdb-eb7cc02115c176068ad577e9787cff620cf32d4f.tar.bz2 |
binutils/
* dwarf.c (process_debug_info): Support section padding abbrev codes.
binutils/testsuite/
* binutils-all/testranges.s (.debug_info): Pad the only CU.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 9c7c9a8..46b6929 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) { |