Mail Archives: djgpp/2002/02/01/03:23:58
> From: "sgrb" <rolando DOT sgarbi3 AT tin DOT it>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 31 Jan 2002 19:40:59 GMT
>
> FAQ 8.20 to have assembly and C listing suggests this options:
> gcc -c -wa ,-a , -ad foo.c
> I get >gcc.exe: unrecognized option '-wa,-a,-ad' .
Sorry, the FAQ failed to mention that you need the -g switch together
with all the rest. Add -g, and it will work.
Also note that it's -Wa, capital W. The full command should be like
this:
gcc -c -g -Wa,-a,-ad foo.c >foo.lst
> Can we see assembler output?
What do you mean by ``assembler output''? The assembler outputs
machine instructions; how do you want to see them?
If you mean you want to disassemble the produced code, either a
"disassemble" command in GDB or the --disassemble option of the
`objdump' utility will do what you want. But that would just show
you the same assembly that "gcc -S" produces. If you want to see the
disassembly in the Intel syntax, type "set disassembly-flavor intel"
in GDB before disassemblying.
> Another thing : in menu of GCC there isn't "extended asm" (Faq 18.2).
Please type exactly what the FAQ tells:
info gcc "C Extensions" "Extended Asm"
and you will land on the correct spot. Alternatively, once you are
inside the GCC manual, type "g Extended Asm" and hit [Enter].
- Raw text -