Re: C++ to MIPS assembly or binary
--- On Fri, 2/25/11, hana aliee <hanaal2003@yahoo.com> wrote:
>I am new with Debian. I have just read about it.
>My question is how can I convert a c++ code to its MIPS assembly or >binary with GEMU?
>
>Thanks in advance for your help.
>Hana
While many emulators do support some form of dis-assembly or instruction view capability, this is really most useful for debugging certain odd run time behaviors, usually in the kernel or drivers.
If you are wanting to understand application code, then these other options would be most useful to you:
To examine an already constructed binary or library,
objdump
gdb
to examine the results of compilation directly,
gcc -S <file.c>
g++ -S <file.cpp>
the -S option halts gcc at the assembly phase, so the completely unintelligable assembly will be there in all it's glory. (Gcc output is no where near as easy to read as human written assembly, not that I'm knocking the gcc team for their efforts or anything.)
Cheers,
-S-
Reply to: