Skip to content

Commit

Permalink
debug-dump=info should print null DIEs to conform to the new readelf.
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Mar 30, 2013
1 parent a00bbf9 commit 9aec9d8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 4 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Changelog
file & line information from an address.
- Issue #7: parsing incorrect DWARF was made a bit more forgiving for cases
where serialized DIE trees have extra NULLs at the end.
- Pull request 6: very initial support for ARM ELF files (Matthew Fernandez).
- Pull request 7: support for dumping the dynamic section (Mike Frysinger).
- Very initial support for ARM ELF files (Matthew Fernandez - pull
request #6).
- Support support for dumping the dynamic section (Mike Frysinger - pull
request #7).

+ Version 0.20 (27.01.2012)

Expand Down
2 changes: 1 addition & 1 deletion elftools/dwarf/die.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class DIE(object):
Specifies whether this DIE has children
abbrev_code:
The abbreviation code pointing to an abbreviation entry (not
The abbreviation code pointing to an abbreviation entry (note
that this is for informational pusposes only - this object
interacts with its abbreviation table transparently).
Expand Down
14 changes: 7 additions & 7 deletions pyelftools.sublime-project
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"folders":
[
{
"path": ".",
"folder_exclude_patterns": ["build", "dist", ".tox", ".hg"]
}
]
"folders":
[
{
"path": ".",
"folder_exclude_patterns": ["build", "dist", ".tox", ".hg"]
}
]
}
10 changes: 5 additions & 5 deletions scripts/readelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@ def _dump_debug_info(self):
#
die_depth = 0
for die in cu.iter_DIEs():
if die.is_null():
die_depth -= 1
continue
self._emitline(' <%s><%x>: Abbrev Number: %s (%s)' % (
self._emitline(' <%s><%x>: Abbrev Number: %s%s' % (
die_depth,
die.offset,
die.abbrev_code,
die.tag))
(' (%s)' % die.tag) if not die.is_null() else ''))
if die.is_null():
die_depth -= 1
continue

for attr in itervalues(die.attributes):
name = attr.name
Expand Down

0 comments on commit 9aec9d8

Please sign in to comment.