Replies: 1 comment 9 replies
-
I'd really like to see something like this, and also something to allow extensions or even end users to add rules that could be enabled/disabled at runtime. One of ghidra's biggest weaknesses, currently, is the limited ability to do any kind of transformation on the output of the decompiler from the java UI. User-controlled rules that could be invoked at the end of the decompilation pipeline to do things like apply transformations to the resolved syntax tree would open up a whole new realm of possibilities for manipulating the output of the decompiler. I could even see it being useful for decompiling to things like non-C/C++ languages. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This could be done two ways.
Utilizing the rule compiler and having the rule file specified in in the
ldefs
file. The compiler does appear to be functional. However extreme care is required as it will happily dereference an uninitialized pointer. This does need a bit of work. Dealing with the uninitialized pointer dereference can be dealt with a custom "smart" pointer template class. This class would default it's value tonullptr
and it would check prior to dereferencing to provide a proper explanation of what went wrong in the low level error.Via an exported vector of rules from a user created dynamic library.
This would help ease the burden of developing new rules and would also ease the pain of dealing with rules that only apply for specific processors.
Beta Was this translation helpful? Give feedback.
All reactions