def __init__(self, buf, wordsize): vstruct.VStruct.__init__(self) self.buf = idb.memview(buf) self.wordsize = wordsize self.next_free_offset = v_uint32() self.page_size = v_uint16() self.root_page = v_uint32() self.record_count = v_uint32() self.page_count = v_uint32() self.unk12 = v_uint8() self.signature = v_bytes(size=0x09) self._page_cache = {}
def __init__(self, buf): vstruct.VStruct.__init__(self) # we use a memoryview since we'll take a bunch of read-only subslices. self.buf = idb.memview(buf) # list of parsed Section instances or None. # the entries should line up with the SECTIONS definition. self.sections = [] # these fields will be parsed from self.buf once the header is parsed. # they are *not* linearly parsed during .vsParse(). self.id0 = None # type: ID0 self.id1 = None # type: ID1 self.nam = None # type: NAM self.seg = None # type: NotImplemented self.til = None # type: TIL self.id2 = None # type: NotImplemented # these are the only true vstruct fields for this struct. self.header = FileHeader() # updated once header is parsed. self.wordsize = 0