debug_abbrev_sec,
debug_frame_sec,
debug_str_sec,
+ debug_loc_sec,
debug_line_sec):
""" config:
A DwarfConfig object
debug_*_sec:
- DebugSectionDescriptor for a section
+ DebugSectionDescriptor for a section. Pass None for sections
+ that don't exist. These arguments are best given with
+ keyword syntax.
"""
self.config = config
self.debug_info_sec = debug_info_sec
self.debug_abbrev_sec = debug_abbrev_sec
self.debug_frame_sec = debug_frame_sec
self.debug_str_sec = debug_str_sec
+ self.debug_loc_sec = debug_loc_sec
self.debug_line_sec = debug_line_sec
# This is the DWARFStructs the context uses, so it doesn't depend on
--- /dev/null
+#-------------------------------------------------------------------------------
+# elftools: dwarf/locationlists.py
+#
+# DWARF location lists section decoding
+#
+# Eli Bendersky (eliben@gmail.com)
+# This code is in the public domain
+#-------------------------------------------------------------------------------
+from collections import namedtuple
+
+from ..common.utils import struct_parse
+
+
+class LocationLists(object):
+ def __init__(self, stream, structs):
+ pass
+
+
are looked up and applied.
"""
# Expect that has_dwarf_info was called, so at least .debug_info is
- # present. Check also the presence of other must-have debug sections.
+ # present.
# Sections that aren't found will be passed as None to DWARFInfo.
#
debug_sections = {}
for secname in ('.debug_info', '.debug_abbrev', '.debug_str',
- '.debug_line', '.debug_frame'):
+ '.debug_line', '.debug_frame', '.debug_loc'):
section = self.get_section_by_name(secname)
if section is None:
debug_sections[secname] = None
debug_abbrev_sec=debug_sections['.debug_abbrev'],
debug_frame_sec=debug_sections['.debug_frame'],
debug_str_sec=debug_sections['.debug_str'],
+ debug_loc_sec=debug_sections['.debug_loc'],
debug_line_sec=debug_sections['.debug_line'])
def get_machine_arch(self):