wargio / r2dec-js

radare2 plugin - converts asm to pseudo-C code.
522 stars 51 forks source link

Option to spit .h instead of .c #95

Open radare opened 6 years ago

radare commented 6 years ago

Just to get the function definitions so it can be used to call functions from an object or dylib without having to do that by hand.

#define FCN
FCN int sumstuff(int a, int b);
FCN void printstring(const char *str);
...

this way the user can later edit this define to be export, static, etc... and write the main at the bottom

wargio commented 6 years ago

shouldn't this be easily done in r2? i mean seems useful, but i was wondering if it was more appropriate for r2 or r2dec

elicn commented 6 years ago

I would move the "#include" directives there too, instead of appearing on top of every function.