angr / angr-targets

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

TypeError: __init__() got an unexpected keyword argument 'gdb_path' #8

Closed visionius closed 3 years ago

visionius commented 3 years ago

Hi. I just install the angr-targets and I want to use this: avatar_gdb = AvatarGDBConcreteTarget(avatar2.archs.x86.X86_64, GDB_SERVER_IP, GDB_SERVER_PORT)

The full error texts is here: Exception ignored in: <bound method GDBProtocol.del of <avatar2.protocols.gdb.GDBProtocol object at 0x7f2e606b75c0>> Traceback (most recent call last): File "/home/lab-test/.local/lib/python3.6/site-packages/avatar2/protocols/gdb.py", line 287, in del self.shutdown() File "/home/lab-test/.local/lib/python3.6/site-packages/avatar2/protocols/gdb.py", line 290, in shutdown if self._communicator is not None: AttributeError: 'GDBProtocol' object has no attribute '_communicator' Traceback (most recent call last): File "", line 1, in File "/home/lab-test/Downloads/angr_targets/angr-targets/angr_targets/targets/avatar_gdb.py", line 23, in init self.avatar.init_targets() File "/home/lab-test/.local/lib/python3.6/site-packages/avatar2/avatar2.py", line 210, in init_targets t[1].init() File "/home/lab-test/.local/lib/python3.6/site-packages/avatar2/targets/gdb_target.py", line 47, in init verbose=self._verbose_gdbmi) File "/home/lab-test/.local/lib/python3.6/site-packages/avatar2/protocols/gdb.py", line 273, in init verbose=verbose) # set to True for debugging TypeError: init() got an unexpected keyword argument 'gdb_path'

I am using ubuntu 18 and try to pass that 'avatar_gdb' as a ConcreteTarget in angr.

visionius commented 3 years ago

Simply remove these codes in lib/python3.6/site-packages/avatar2/protocols/gdb.py (according to this https://github.com/cs01/pygdbmi/blob/master/pygdbmi/gdbcontroller.py there will be no problem and we are ready to go):

gdb_path=gdb_executable, gdb_args=gdb_args, verbose=verbose) # set to True for debugging pfffffff...