from itertools import ifilter
import string
-
# If elftools is not installed, maybe we're running from the root or scripts
# dir of the source distribution
-#
try:
import elftools
except ImportError:
die.tag))
for attr in die.attributes.itervalues():
+ name = attr.name
+ # Unknown attribute values are passed-through as integers
+ if isinstance(name, int):
+ name = 'Unknown AT value: %x' % name
self._emitline(' <%2x> %-18s: %s' % (
attr.offset,
- attr.name,
+ name,
describe_attr_value(
attr, die, section_offset)))
action='store', dest='show_string_dump', metavar='<number|name>',
help='Dump the contents of section <number|name> as strings')
optparser.add_option('--debug-dump',
- action='store', dest='debug_dump_what', metavar='<section>',
- help='Display the contents of DWARF debug sections')
+ action='store', dest='debug_dump_what', metavar='<what>',
+ help=(
+ 'Display the contents of DWARF debug sections. <what> can ' +
+ 'one of {info,decodedline,frames,frames-interp}'))
options, args = optparser.parse_args()