simuvex icon indicating copy to clipboard operation
simuvex copied to clipboard

SimPagedMemory throwing AttributeError in concrete_parts() and dbg_print()

Open RayFoulk opened this issue 8 years ago • 1 comments

  File "simuvex/plugins/symbolic_memory.py", line 941, in concrete_parts
    for k,v in self.mem.iteritems():
AttributeError: 'SimPagedMemory' object has no attribute 'iteritems'

  File "simuvex/plugins/symbolic_memory.py", line 953, in dbg_print
    for i, addr in enumerate(self.mem.iterkeys()):
AttributeError: 'SimPagedMemory' object has no attribute 'iterkeys'

Looks like self.mem is assumed to be a dictionary at these points but it (at least in my case) doesn't appear to be as it's created on lines 47-51 as self.mem = SimPagedMemory(

RayFoulk avatar Aug 02 '17 17:08 RayFoulk

Yeah, this changed after the r/trees branch, which refactored SimPagedMemory. The new way would be to iterate over all pages (unfortunately, this would be self.mem._pages.values()) and then getting the keys for each page (page.keys()).

zardus avatar Aug 06 '17 02:08 zardus