ghidra icon indicating copy to clipboard operation
ghidra copied to clipboard

IDA plugin don't export prototype of function

Open saruman9 opened this issue 5 years ago • 4 comments

Describe the bug IDA exporter don't export function's prototypes correctly: ida_name.get_demangled_name and idaapi.print_type often returns only name of function without parameters (see code).

To Reproduce Steps to reproduce the behavior:

  1. Open IDA database or analyze new file.
  2. Create function with parameters.
  3. Export IDA database to XML.
  4. Import XML to Ghidra (see Fig. 1, that shows the problem).

Expected behavior Information about our function should be imported with all parameters and datatypes, that are used for parameters.

Screenshots 2020-01-30_12-47-18

Fig. 1. List of functions, that were not imported

Attachments You can use any file for testing.

Environment (please complete the following information):

  • OS: Linux 5.4.3
  • Java Version: 11.0.5
  • Ghidra Version: dc16f297cc3b55816f929f25f38b5cc779631bce

Additional context I create PR for that issue. I also had to make some changes to Ghidra's code, that could affect issues as #651, #857.

Also I found, that Ghidra don't parse calling convention sadly (besides cdecl). It's mean, that exporting/importing from Ghidra to Ghidra don't works correctly (what of course is warned).

saruman9 avatar Jan 30 '20 12:01 saruman9

Any update on this, or review for the PR? This is a crazy huge gap for a plugin that's bundled with Ghidra.

NoneGiven avatar Sep 03 '20 21:09 NoneGiven

Any update on this, or review for the PR? This is a crazy huge gap for a plugin that's bundled with Ghidra.

We took a quick peek at the PR. We agree this should be better. We need to investigate the best way to update the FunctionsXmlMgr to use the new info provided by the idaxml.py file.

dragonmacher avatar Sep 21 '20 22:09 dragonmacher

#857 mentioned, appears to relate to case where code has not been diassembled. How does this relate to your PR which simply returns existing function if one already exists containing specified address?

ghidra1 avatar May 23 '23 14:05 ghidra1

#651 seems unrelated to changes made in PR

ghidra1 avatar May 23 '23 14:05 ghidra1