DWARF debug information with GAS

Aaron W. LaFramboise aaron98wiridge9@aaronwl.com
Tue Oct 19 07:42:00 GMT 2004


sonal sharma wrote:

> I had built the source code for binutils version 2.15 on Linux. I
> assembled an assembly source file with 'as' version 2.15.91 with the
> '-gdwarf-2' option. Then I read the output file generated by 'as' using
> 'readelf' utility of GNU. No dwarf debug information was present in the
> output file.

I don't have access to a recent enough binutils on Linux that supports
-gdwarf-2, so I can't test myself.  I think someone else will have to
comment on why you're seeing this behavior.

> I wanted to know if 'as' (GNU assembler) generates dwarf debug
> information when a hand coded assembly file is assembled with 'as' with
> '-gdwarf-2' option.

Yes, it is supposed to.  I am not sure what version of binutils is
required for this, but at the very least, it should work on mainline.

Since you initially asked about MinGW, the next MinGW.org binutils
release (or if you build binutils from CVS on MinGW) will support
--gdwarf-2.

Aaron W. LaFramboise



More information about the Binutils mailing list