Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About improving the readability of decompiled code #6489

Open
01ChenQing opened this issue May 8, 2024 · 2 comments
Open

About improving the readability of decompiled code #6489

01ChenQing opened this issue May 8, 2024 · 2 comments
Assignees
Labels
Feature: Decompiler Status: Triage Information is being gathered Type: Enhancement New feature or request

Comments

@01ChenQing
Copy link

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:
image

IDA:
image

Describe the solution you'd like
Consider formatting the decompiled code to increase its readability

@ryanmkurtz ryanmkurtz added Type: Enhancement New feature or request Feature: Decompiler Status: Triage Information is being gathered labels May 8, 2024
@Varriount
Copy link

@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.

@01ChenQing
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Decompiler Status: Triage Information is being gathered Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants