def setUp(self):
     model.reset()
     self.mappings = dump_loader.load('test/src/test-ctypes6.32.dump')
     self.memdumpname = 'test/src/test-ctypes6.32.dump'
     self._load_offsets_values(self.memdumpname)
     sys.path.append('test/src/')
     from test.src import ctypes6
     from test.src import ctypes6_gen32
     model.copyGeneratedClasses(ctypes6_gen32, ctypes6)
     model.registerModule(ctypes6)
     # apply constraints
     ctypes6.populate(self.mappings.config)
     self.offset = self.offsets['test1'][0]
     self.m = self.mappings.get_mapping_for_address(self.offset)
     self.usual = self.m.readStruct(self.offset, ctypes6.struct_usual)
 def setUp(self):
     model.reset()
     types.reload_ctypes(8, 8, 16)
     class MyConfig:
         def get_word_size(self):
             return 8
     self.memdumpname = 'test/src/test-ctypes6.64.dump'
     self.node_structname = 'test.src.ctypes6.struct_Node'
     self.usual_structname = 'test.src.ctypes6.struct_usual'
     self._load_offsets_values(self.memdumpname)
     self.address1 = self.offsets['test1'][0]  # struct_usual
     self.address2 = self.offsets['test2'][0]  # struct_Node
     self.address3 = self.offsets['test3'][0]  # struct_Node
     # load layout in x64
     from test.src import ctypes6
     from test.src import ctypes6_gen64
     model.copyGeneratedClasses(ctypes6_gen64, ctypes6)
     model.registerModule(ctypes6)
     # apply constraints
     ctypes6.populate(MyConfig())