Beginner questions #1286
-
I build the common hello world program in C and compiled it on MSYS2. I have been trying to use Reko with it as an exercise.
I'm a Python programmer these days; my C and C++ is very rusty now, and I'm not ready to dive into C# yet, but at some point I may have to. I might be more productive writing python scripts. TIA |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
How do I compile the C code generated. I've tried VS2022 using the legacy, 2011, and 2017 standards. I've also tried gcc (via CodeBlocks) using the C99 standard. However, they all generate 1000's of errors. I wouldn't expect it to be perfect "right out the box" (so to speak), but it seems way off. What is the recommended way of compile the C code generated using Reko? Reko Version 0.11.4.0 (64-bit) Any suggestions are greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
@djhenderson : Sorry for the very late response. I didn't receive a notification from GitHub about your query, and was unaware of its existence until others pointed it out to me. I hope to be more responsive in the future! I build the common hello world program in C and compiled it on MSYS2. I have been trying to use Reko with it as an exercise.
The
Clearly this needs to be improved; you should be able to enter any high-level types you want. Now that Reko has a full C parser, it should be updated to allow users to enter C types.
Agreed, this is not clear from the user interface. If you type a space followed by a label name, you're good: I'm going to add a new issue to Reko that collects these thoughts; the user interface for setting types is weak and can be improved.
During the decompilation process, Reko translates machine instructions into an architecture-neutral intermediate representation (IR). A later stage translates the IR into high-level language. The latter stage is supposed to use type information to translate
That's a clear bug, and should be fixed. Reko currently doesn't manage dirty stage not undo, so really it's a feature request.
Currently, metadata files with an <Loader Extension="meta" Type="Reko.Core.Loading.CHeaderLoader,Reko.Core"
Label="RekoCHeader" />
Reko does have an early-stage Python script interpreter. We use IronPython to execute said scripts. I'd love to have some real use cases to chew on, as it guides development work. Again, my apologies for the late response. I will add a few open issues to cover the items above. Thanks for taking the time to write down your comments! |
Beta Was this translation helpful? Give feedback.
@djhenderson : Sorry for the very late response. I didn't receive a notification from GitHub about your query, and was unaware of its existence until others pointed it out to me. I hope to be more responsive in the future!
I build the common hello world program in C and compiled it on MSYS2. I have been trying to use Reko with it as an exercise.
The
Mark Type
command lets the user dictate the data type of a range of memory addresses. When you execute the command, t…