Open 01ChenQing opened 4 months ago
@ryanmkurtz @caheckman Since Ghidra's internal documentation is a bit sparse on the subject, is there any way for an internal plugin to reformat the C code emitted by the decompiler? If so, then perhaps an existing formatting tool can be leveraged for this feature.
@ryanmkurtz @caheckman Since Ghidra's internal documentation is a bit sparse on the subject, is there any way for an internal plugin to reformat the C code emitted by the decompiler? If so, then perhaps an existing formatting tool can be leveraged for this feature.
I reconsidered this problem. Implementing this Feature by introducing a code formatting tool like ClangFormat may solve the problem now, but the code formatting tool has limited understanding of program semantics. Although it can adjust the code format, it cannot Improve code readability in other aspects, such as reducing the number of statement nesting levels(#6014), etc.
Is your feature request related to a problem? Please describe. I'm always frustrated when use ghidra to view an if statement with a long expression
Ghidra:
IDA:
Describe the solution you'd like Consider formatting the decompiled code to increase its readability