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: PATCH: Output dwarf debug info only when needed


On Tue, Jun 11, 2002 at 03:12:48PM -0700, H . J . Lu wrote:
> On Tue, Jun 11, 2002 at 06:00:38PM -0400, Daniel Jacobowitz wrote:
> > On Tue, Jun 11, 2002 at 02:45:56PM -0700, H . J . Lu wrote:
> > > On Tue, Jun 11, 2002 at 02:07:43PM -0700, Richard Henderson wrote:
> > > > On Tue, Jun 11, 2002 at 01:59:43PM -0700, H . J . Lu wrote:
> > > > >    /* If no debug information was recorded, nothing to do.  */
> > > > > -  if (all_segs == NULL && files_in_use <= 1)
> > > > > +  if (all_segs == NULL
> > > > > +      && (debug_type != DEBUG_DWARF2 || files_in_use <= 1))
> > > > 
> > > > This is wrong.  When the compiler is emitting .file and .loc
> > > > directives, debug_type == DEBUG_NONE.
> > > > 
> > > 
> > > I don't know what I was thinking :-). How about this patch?
> > 
> > Oddly, even without this patch the extra .file information is not put
> > into a section.  I'd rather know why not before changing this... it's
> > not obvious to me.
> 
> # cat f.s
>         .file 1 "f.c"
> # gcc -f c.s
> # readelf -S f.o 
> There are 8 section headers, starting at offset 0x90:

Sure enough, I see this too.  Must have been a problem in my testing.

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