Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception triggered when calling "getCalledFunctions" on a Function #74

Open
shaqed opened this issue Jul 14, 2024 · 0 comments
Open

Exception triggered when calling "getCalledFunctions" on a Function #74

shaqed opened this issue Jul 14, 2024 · 0 comments

Comments

@shaqed
Copy link

shaqed commented Jul 14, 2024

I'm not really sure what causes it, and if you have any tips that could help me debug the project and understand the issue further I'd love to take part.

The client code

addressFactory = currentProgram.getAddressFactory()
monitor = getMonitor()

addr = "802de918"
f = (getFunctionAt(addressFactory.getAddress(addr)))

# returns an empty list
called = f.getCalledFunctions(monitor)

print(f)

The client receives an empty list. However on the server side (in Ghidra) I see the following:

WARNING:jfx_bridge.bridge:Handling connection from ('127.0.0.1', 56181)
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.program.database.ProgramAddressFactory' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.program.model.address.GenericAddress' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.program.util.BytesFieldLocation' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.program.database.ProgramDB' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.program.database.function.FunctionDB' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'javapackage' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'javapackage' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.util.task.WrappingTaskMonitor' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.app.script.GhidraScriptProperties' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'generic.jar.ResourceFile' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.app.script.GhidraState' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'java.io.PrintWriter' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__iter__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__eq__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__ge__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__getstate__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__gt__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__le__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__lt__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__ne__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__self_class__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'instancemethod' object has no attribute '__thisclass__'
Traceback (most recent call last):
  File "C:\Users\shaked.delarea\ghidra_scripts\jfx_bridge\bridge.py", line 1003, in local_get
    result = getattr(target, name)
AttributeError: 'ghidra.program.database.function.FunctionDB' object has no attribute '__iter__'

Needless to say that running the same lines of code directly from Ghidra's Python console does yield some functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant