This is the mail archive of the binutils@sourceware.org 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: Compiler emitting .debug_line versus binutils


On Fri, Jun 29, 2007 at 04:16:09PM +0100, Will Newton wrote:
> On 6/29/07, Daniel Jacobowitz <drow@false.org> wrote:
> > On Fri, Jun 29, 2007 at 03:34:35PM +0100, Will Newton wrote:
> > > This seems to be done by dwarf2out_finish() in dwarf2out.c inside gcc.
> > >
> > > I assemble the result with gas, which then outputs another .debug_line
> > > section in dwarf2_finish() in dwarf2dbg.c.
> >
> > It sounds to me like your gcc is passing -g to gas, but not using
> > .file and .loc directives.  If it did use .loc, gas wouldn't add its
> > own impression of the line number table.  If it didn't pass -g, it
> > wouldn't either.
> 
> Yes, the compiler isn't outputting .loc directives but a whole
> .debug_line section. I had a look at what the i386 gcc does and it
> outputs .loc but an empty .debug_line, pretty much the opposite. Would
> you recommend in the absence of .loc directives that I not pass -g to
> the assembler?

That, or else ignore it if the extra sections are not causing a major
problem.  It sounds like you're mixing a Very Old gcc with a
relatively recent binutils; this is a teething problem I'd expect
with that combination.

-- 
Daniel Jacobowitz
CodeSourcery


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