Description
I am making this issue on behalf of the Cutter Team. As part of the Improving Decompiler Widget project, we have made a new dedicated context menu for the decompiler in Cutter. These changes can be found in the decompiler-refactoring branch in Cutter and also can be quickly seen from the project linked above. Please have a look at r_annotated_code.h to have an idea of the new annotations added.
For r2retdec to work desirably and support all the actions that are currently available for r2ghidra-dec (in the decompiler-refactoring branch now), it has to provide required annotations.
Detailed description of the data we will need for each type of annotation
For R_CODE_ANNOTATION_TYPE_FUNCTION_NAME:
Range of the function's name in the entire output.
Name of the function
Address of the function
Example JSON output with all this information (that is currently available from r2ghidra-dec)
For R_CODE_ANNOTATION_TYPE_GLOBAL_VARIABLE and R_CODE_ANNOTATION_TYPE_CONSTANT_VARIABLE:
Note: R_CODE_ANNOTATION_TYPE_CONSTANT_VARIABLE is the annotation type for constant variables with an address. e.g. string literals.
Range of the variable name in the entire output.
Address of the variable
Example JSON output with all this information (that is currently available from r2ghidra-dec)
Here, I'm linking a file with the pdg output and formatted pdgj output of multiple functions that will cover all new types of annotations, and the binary used. This is just for illustrating the kind of information we need.
AllAnnotationsWithBinary.zip
If any more information is needed, I will be happy to help.
Description I am making this issue on behalf of the Cutter Team. As part of the Improving Decompiler Widget project, we have made a new dedicated context menu for the decompiler in Cutter. These changes can be found in the
decompiler-refactoring
branch in Cutter and also can be quickly seen from the project linked above. Please have a look at r_annotated_code.h to have an idea of the new annotations added.For r2retdec to work desirably and support all the actions that are currently available for r2ghidra-dec (in the
decompiler-refactoring
branch now), it has to provide required annotations.Detailed description of the data we will need for each type of annotation
R_CODE_ANNOTATION_TYPE_FUNCTION_NAME
:R_CODE_ANNOTATION_TYPE_GLOBAL_VARIABLE
andR_CODE_ANNOTATION_TYPE_CONSTANT_VARIABLE
: Note:R_CODE_ANNOTATION_TYPE_CONSTANT_VARIABLE
is the annotation type for constant variables with an address. e.g. string literals.R_CODE_ANNOTATION_TYPE_LOCAL_VARIABLE
andR_CODE_ANNOTATION_TYPE_FUNCTION_PARAMETER
:Here, I'm linking a file with the
pdg
output and formattedpdgj
output of multiple functions that will cover all new types of annotations, and the binary used. This is just for illustrating the kind of information we need. AllAnnotationsWithBinary.zipIf any more information is needed, I will be happy to help.