Closed AetiasHax closed 10 months ago
m2ctx.py
is now in the /tools
directory. However, it uses gcc -E -P -undef -dD
, which preprocesses everything, including macros. Fortunately, it still leaves the #define
directives in the output, so the macros can be used in decomp.me.
m2ctx.py
generates a context for decomp.me, including type definitions, macros and function declarations that you may need in order to decompile a function.All it has to do is to accept one C/C++ file and recursively preprocess all
#include
s. We may also want to preprocess#if
s,#ifdef
s and similar directives so that the context gets smaller. But do not preprocess macros! They are meant to be used in the decompiled code, after all.