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 Wed, Jun 12, 2002 at 10:18:36AM -0700, H . J . Lu wrote:
> On Wed, Jun 12, 2002 at 01:02:36PM -0400, Daniel Jacobowitz wrote:
> > > 
> > > BTW, Daniel, I am afraid your second gcc patch may be still wrong. The
> > > ONLY thing wrong with the current gcc 3.1.1 is the extra ".file" at
> > > the very first line for dwarf with gas. You can do one of 2 things:
> > > 
> > > 1. Don't emit the very first ".file" for dwarf with gas. Or
> > > 2. Change it to
> > > 
> > > 	.file "foo.c"
> > > from
> > > 
> > > 	.file 1 "foo.c"
> > > 
> > > I don't think you should change any other ".file" nor anything related
> > > to stabs. Pick one choice you like. I will submit a patch. Personally,
> > > I prefer #2 since it is what x86 does and we know it works well with
> > > gas.
> > 
> > No, you're incorrect.  Have you tried it?  Perhaps with the example I
> > posted to this list about why it was a problem?  The additional .file
> > directives are a problem which can not be worked around in the
> > assembler.
> 
> Please provide a complete testcase. I can't duplicate your result.

includes.cc:
int func(int baz)
{
  return baz;
}

#include "small1.cc"

int func(int bar, int baq)
{
  return bar + baq;
}

#include "small2.cc"

int main()
{
  int a = 0, b = 0;
  a = func(1);
  b = func(2, 3);
}

small1.cc:
int baz (void) {return 2;}

small2.cc:
int bag (void) {return 2;}

Build GCC in a combined tree with binutils so that it checks version
numbers to determine if .file/.loc are safe.  Watch the .file
directives emitted.

> > Also, changing to .file "foo.c" will break the ECOFF_DEBUGGING case.
> > 
> 
> I thought you wanted to switch all mips ELF targets to DWARF or STABS.
> Why do you care about ECOFF_DEBUGGING for ELF?

I want to switch the _default_ to DWARF-2 and stabs-in-elf.  Not kill
support for ECOFF_DEBUGGING, since there appear to be consumers of it.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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