blob: 6eb5afa18826d87417058cd6d8a3f17cdb095387 [file] [log] [blame]
#-------------------------------------------------------------------------------
# elftools: dwarf/compileunit.py
#
# DWARF compile unit
#
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
class CompileUnit(object):
def __init__(self, dwarfinfo, header, structs):
""" dwarfinfo:
The DWARFInfo context object which created this one
header:
CU header for this compile unit
structs:
A DWARFStructs instance suitable for this compile unit
"""
self.dwarfinfo = dwarfinfo
self.header = header
self.structs = structs
def __getitem__(self, name):
""" Implement dict-like access to header entries
"""
return self.header[name]