angr / angr-targets

This repository contains the currently implemented angr concrete targets.
32 stars 9 forks source link

update avatar_gdb.get_mappings() #28

Closed ghost closed 1 year ago

ghost commented 1 year ago

In the new version of gdb-multiarch (13.1), self.target.protocols.memory.get_mappings() returns an additional attribute Perms, which causes the current avatar_gdb.get_mappings() function to fail to obtain map_name correctly.

old:

image

new:

image

So I added some code in avatar_gdb.get_mappings() function to get Perms and map_name correctly and modified class MemoryMap accordingly.

old:

image

new:

image
degrigis commented 1 year ago

This totally slipped under my radar, thanks!

AndrewFasano commented 12 months ago

Looks like this change breaks the panda target which creates creating MemoryMap objects here without setting a value for permission.

Are these permissions actually used somewhere? if so we can expand the panda target to specify this information. Otherwise maybe we could just allow perms to be None here?

EDIT: I think I'm getting a better understanding of this now - the change to the MemoryMap object was required, so we can't just leave it as None. I think Zak's PR fixes this for the PANDA target.