Entirely, I wonder why the encoder drops many additional information (e.g. many part of PcodeOp flags and use-def relations between variables, etc.).
I think the Java frontend/engine uses the C++ component via IPC transferring this encoded commands and results.
Please tell me if you know how to handle these additional information in Java implementation.
I use Ghidra C++ decompiler component only, so I interpret the encoded result of the decompilation.
Cbranch is tricky. Its condition seems to be flipped if
op->isBooleanFlip()^op->isFallthruTrue()
is satisfied.https://github.com/NationalSecurityAgency/ghidra/blob/80ccdadeba79cd42fb0b85796b55952e0f79f323/Ghidra/Features/Decompiler/src/decompile/cpp/typeop.cc#L545-L556
However, the values of
isBooleanFlip
andisFallthruTrue
seem to not be encoded.https://github.com/NationalSecurityAgency/ghidra/blob/80ccdadeba79cd42fb0b85796b55952e0f79f323/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc#L395
Is there any way to distinguish this condition flip from the encoded result? The syntax of cbranch is underspecified (Refer: https://spinsel.dev/assets/2020-06-17-ghidra-brainfuck-processor-1/ghidra_docs/language_spec/html/pcodedescription.html), so I cannot figure out how to handle cbranch correctly.
Entirely, I wonder why the encoder drops many additional information (e.g. many part of
PcodeOp
flags and use-def relations between variables, etc.). I think the Java frontend/engine uses the C++ component via IPC transferring this encoded commands and results. Please tell me if you know how to handle these additional information in Java implementation.