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 10:03:05AM -0700, H . J . Lu wrote:
> On Tue, Jun 11, 2002 at 12:49:00PM -0400, Daniel Jacobowitz wrote:
> > > > 
> > > > HJ, the debug information being emitted by GCC is obviously in error. 
> > > > If you ignore the first .file directive, you will then not accept
> > > > _VALID_ DWARF-2 debug information.  You can't have it both ways.  This
> > > > is not the first time recently that an advance in GCC or binutils for
> > > > Linux/MIPS has required a corresponding advance in the other.
> > > > 
> > > > Eric, if you think this sort of compatibility is important we could
> > > > accept HJ's patch to ignore the first .file directive, and modify GCC
> > > > to emit '.file "dummy"' or the like to make the situation clear.  I
> > > > think this will just hurt our interactions with other assemblers,
> > > > though.  We should probably talk about this.
> > > 
> > > On x86, gcc 3.1 emits
> > > 
> > >         .file   "f.c"
> > >         .file 1 "f.c"
> > >         .section        .debug_abbrev,"",@progbits
> > > .Ldebug_abbrev0:
> > > 
> > > for dwarf. Can't mips take 2 .file directives?
> > 
> > See the difference between those two?  The first one is '.file "foo"',
> > not '.file 1 "foo"'.  Unfortunately MIPS uses a '.file 1 "f.c"' for
> > this.  I suppose we could document and tolerate this, however it is not
> > enough.  GCC is still wrong.  Witness:
> > 
> > See how much is wrong there?  GCC needs to be fixed.
> > 
> 
> I never said dwarf in gcc 3.1.1 was ok on Linux/mips. In fact, I even
> submitted a patch to switch to stabs just so that I could debug programs
> compiled with gcc 3.1.1. I appreciate your work on fixing dwarf in gcc and
> gas. However, IMHO, it is not a good idea to break the existing gcc
> binaries. Maybe we can add a new switch to gas, like "--debug=dwarf", to
> tell gas that the directives are generated for dwarf.

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.

-- 
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]