Closed Abbas-MG closed 1 month ago
now the PDB generation works for IDA 9.0 too.
could import the generated PDB to visual studio and functions/globals were mapped fine.
"find signature" still needs updating to be synced with new IDA types.
Can you share your compiled files? Building requires pretty bulky compilation including LLVM :/
now the PDB generation ...
Can you share your compiled files? Building requires pretty bulky compilation including LLVM :/
its a tiny fix to python file. the ida python internals were changed so plugin couldn't communicate with IDA. i just changed few lines. just replace the dumpinfo.py; at least for my target, i faced no problems when generating the PDB file.
now the PDB generation ...
Can you share your compiled files? Building requires pretty bulky compilation including LLVM :/
its a tiny fix to python file. the ida python internals were changed so plugin couldn't communicate with IDA. i just changed few lines. just replace the dumpinfo.py; at least for my target, i faced no problems when generating the PDB file.
Yeah, but executables in release section are very old still, 2021 0.3 ver :/
@Abbas-MG This does not fix the errors from ida_struct
(and ida_enum
though not used here) being removed from the API. There is not a 1:1 replacement of all the functions needed so additional work beyond just replacing names is required.
Porting 8.X to 9.0 API documentation: https://docs.hex-rays.com/developer-guide/idapython/idapython-porting-guide-ida-9#ida_struct
For dumpinfo.py
the following instances need to be upgraded to the new API:
__describe_struct_type
ida_struct.SF_GHOST
ida_struct.SF_VAR
ida_struct.SF_FRAME
ida_struct.SF_UNION
__process_struct_members
ida_struct.get_member_name
ida_struct.get_member_tinfo
__process_structs
ida_struct.get_first_struc_idx
ida_struct.get_struc_by_idx
ida_struct.get_struc
ida_struct.get_struc_name
ida_struct.get_struc_size
ida_struct.get_next_struc_idx
@ThiconZ as i said, i tested it on my target only. do you have an .i64 file for which this fix doesn't work? i need it to test if my future changes will work.
@Abbas-MG I'm surprised your script ran at all under IDA 9.0 since it has an import to ida_struct
still which at least on my end instantly causes an error just loading the plugin.
Traceback (most recent call last):
File "C:\Program Files\IDA Professional 9.0\python\ida_idaapi.py", line 574, in IDAPython_ExecScript
exec(code, g)
File "C:/Program Files/IDA Professional 9.0/plugins/fakepdb.py", line 21, in <module>
import fakepdb.command_dumpinfo
File "C:\Program Files/IDA Professional 9.0/plugins\fakepdb\command_dumpinfo.py", line 24, in <module>
from .dumpinfo import DumpInfo
File "C:\Program Files/IDA Professional 9.0/plugins\fakepdb\dumpinfo.py", line 32, in <module>
import ida_struct
ModuleNotFoundError: No module named 'ida_struct'
I've been working on a shim for ida_struct to try and get it up and running on my end at least but as I'm not too familiar with the IDA API it has not been the smoothest of times.
Here's an i64 that should contain everything you'd need to test against: https://file.io/pXMxjhcXLCrt
@ThiconZ thanks for the sample. when ran FakePDB on it i only got the json file while for my own target i still get both pdb and json files; FakePDB is not throwing anything to inform what's wrong when it doesn't generate the pdb file for your sample.
regarding the error you mentioned, i think i have some left over files from previous IDA (or a plugin) or some extra links in PATH. is there any way to fully log idapython's procedures?
"find signature" still needs updating to be synced with new IDA types.
fixed in 9bbf05b88ee0ff9923b2911413514edb87207776
This does not fix the errors from ida_struct
now the PDB generation works for IDA 9.0 too.
could import the generated PDB to visual studio and functions/globals were mapped fine.
"find signature" still needs updating to be synced with new IDA types.