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

Ghidra API not using correct updated function boundaries #7424

Open
Mysterium-Mystery opened this issue Jan 28, 2025 · 0 comments
Open

Ghidra API not using correct updated function boundaries #7424

Mysterium-Mystery opened this issue Jan 28, 2025 · 0 comments

Comments

@Mysterium-Mystery
Copy link

Describe the Bug
When using .getFunctionContaining() in a python script it returns data based on the functions however they exist in the original file. Any patches which were applied (manually or through the API) are not reflected here unlike in the Decompile window which does display these functions correctly.

To Reproduce

  1. Open any file in the code browser
  2. Patch any instruction that will cause a function to change its boundaries (So JMP or CALL for example)
  3. Go through the relevant instructions with a python script and see what .getFunctionContaining() returns for each instruction
  4. The output for the instructions which always were part of the function are correctly identified as part of the function but the new instructions are not (In my case they return "None", because no function was identified there before patching). This is different from the Decompile window which displays the function correctly

Expected behavior
.getFunctionContaining() should return the correct function as displayed in the Decompile window

Environment (please complete the following information):

  • OS: Windows 10.0.19045
  • Java Version: 18.0.2.1
  • Ghidra Version: 10.4 (I also tested on 11.2.1 and it seemed to give the same results)
  • Ghidra Origin: Official GitHub
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