This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS_STABS_ELF is now broken


On Tue, Jun 11, 2002 at 03:19:20PM -0400, Daniel Jacobowitz wrote:
> On Tue, Jun 11, 2002 at 12:10:14PM -0700, H . J . Lu wrote:
> > On Tue, Jun 11, 2002 at 01:44:35PM -0400, Daniel Jacobowitz wrote:
> > > 
> > > Those .file entries don't make any sense for stabs either.  They were
> > > causing bogus debug information to be emitted, last time that I
> > > checked.
> > 
> > It is the .file directive in the stabs output which sets filename.
> > Otherwise, gas will encode the input asm filename. Why did you say
> > it doesn't make any sense for stabs? Your gcc patch is wrong for
> > stabs. gcc should emit one .file directive for stabs. We just need
> > to deal with it in gas.
> 
> Wait, you're saying the ".file" directive is supposed to have an effect
> in stabs?  I would have thought this would come from the first .stab
> instead.
> 
> If so, then we need to change GCC to emit '.file "foo.c"' like other

Yes.

> ports do.  '.file 1 "foo.c"' is DWARF-2 usage, not STABS usage, and gas
> has no business trying to second-guess the compiler.
> 

But it is not an excuse to break the existing gcc binaries. Here is a
new patch. It basically treats

	.file 1 "foo.c"

like

	.file 1 "foo.c"
	.file "foo.c"

for MIPS_STABS_ELF.


H.J.

Attachment: gas-stabs.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]