REhints / HexRaysCodeXplorer

Hex-Rays Decompiler plugin for better code navigation
2.41k stars 389 forks source link

Support type reconstruction from script #98

Closed assafcarlsbad closed 3 years ago

assafcarlsbad commented 3 years ago

Hi again,

In some scenarios it would be useful to be able to call the structure reconstruction capabilities of HexRaysCodeXplorer from a script rather than using it interactively. As far as I understand, this can be achieved by implementing the run method of the codexplorer_ctx_t class. The single argument this function takes can then be interpreted as a pointer to a structure detailing the location of the of the variable to be scanned (i.e. its address in case of a local variable or some other identifier in case of a function argument).

Afterwards, client code written in Python will be able reconstruct structures dynamically simply by using the ida_loader.run_plugin method.