You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, while decompiling a binary, I found a label that has no statement aftewards. Instead, it is followed by a closing curly bracket }.
The structure is something like:
for ... {
if ... {
}
...
LAB:
}
For the task I am performing, it is important that the generated pseudo-C is correct C syntax (I don't really care about the semantics at this stage).
I was trying to fix this through a Ghidra script but I have not been able to find a way.
Instead, I modified ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printc.cc to add a semicolon after the colon.
Is it expected from Ghidra to generate 'incorrect' C code? Is this a bug?
Lastly, should I fork Ghidra and use this modified version, or is it possible to patch Ghidra or do this at the Abstract Analyzer level?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hello, while decompiling a binary, I found a label that has no statement aftewards. Instead, it is followed by a closing curly bracket
}
.The structure is something like:
For the task I am performing, it is important that the generated pseudo-C is correct C syntax (I don't really care about the semantics at this stage).
I was trying to fix this through a Ghidra script but I have not been able to find a way.
Instead, I modified
ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printc.cc
to add a semicolon after the colon.Is it expected from Ghidra to generate 'incorrect' C code? Is this a bug?
Lastly, should I fork Ghidra and use this modified version, or is it possible to patch Ghidra or do this at the Abstract Analyzer level?
Thanks in advance.
The text was updated successfully, but these errors were encountered: