This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Using Binutils to view source code?
- From: Nick Clifton <nickc at redhat dot com>
- To: i_am_triumph at ofir dot dk
- Cc: binutils at sources dot redhat dot com
- Date: 22 Jan 2003 10:02:51 +0000
- Subject: Re: Using Binutils to view source code?
- References: <20030122074638.3FE2C91067@postfix7.ofir.com>
Hi James,
> >The "objdump" program can do this. Try using the "-dS" switches.
>
> Thanks - This only shows the assembly code though?
Actually the 'S' part of '-dS' will make objdump try to show the
source code interleaved with the disassembly. The problem is that it
does not, currently, support all debug formats.
If you find that it does not work for your binaries, try changing
debug format. (eg compiling with -gstabs). This may work.
Cheers
Nick