Skip to contentSkip to conversation

How to get the c source code in disassembly?

DISCUSSION Long Li 2 participants 2 messages Jan 30, 2003 – Jan 31, 2003 MIPS

lore
Share & tools
lore

Long Li

author
#0 lore raw

Hi,

I am having a problem with intermixing the C source code in the disassembly. I am using a MIPS crosscompiler on Redhat 7.1, gcc-3.0.4, binutils-2.11.2. When I compiled the C code, I added the -g option, and then use 'objdump -Sd' to get the disassembly. However, I did not see any C code mixed with the assembly, as said in the objdump manual when using -S option. Could you give me some help or suggestions?

Thanks a lot!

Long

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

#1 lore raw
Quoted 9 lines · Long Li

I am having a problem with intermixing the C source code in the disassembly. I am using a MIPS crosscompiler on Redhat 7.1, gcc-3.0.4, binutils-2.11.2. When I compiled the C code, I added the -g option, and then use 'objdump -Sd' to get the disassembly. However, I did not see any C code mixed with the assembly, as said in the objdump manual when using -S option. Could you give me some help or suggestions?

objdump -S only works when the code is compiled with -g. And sometimes not even then, objdump -S is flaky for ia64, although that could be the old gcc/binutils I have to use :(.