This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFC/RFA] Deal with -g1 generated DWARF2 debug info


On Sun, Dec 04, 2005 at 02:00:21PM -0800, Jim Blandy wrote:
> On 12/4/05, Daniel Jacobowitz <drow@false.org> wrote:
> > I don't see why we care what the prototype for malloc in the debugging
> > information is.  We know the type of malloc.  A system which uses a
> > different type for malloc won't work here anyway.
> 
> You mean, just ignore malloc's type altogether, and unconditionally
> construct our own type?

Yes.

> I'd prefer that over Mark's patch, but this isn't great.  If malloc
> has a bogus type, I think we should at least complain.  On
> free-standing systems that might be real information.
> 
> The central issue here is that the compiler is emitting incorrect
> debug info.  The GCC manual says of -g1:
> 
>      Level 1 produces minimal information, enough for making backtraces
>      in parts of the program that you don't plan to debug.  This
>      includes descriptions of functions and external variables, but no
>      information about local variables and no line numbers.
> 
> Nothing there about reducing all return types to 'void'.

The compiler is buggy, but I object to any classification of this as a
BSD-specific change; it's GCC that's buggy and Debian used -g1 too for
a while.  It ICEs on some targets, and does this sort of thing.

Mark, FYI, we ended up removing all dwarf sections other than
.debug_frame.  This plus .symtab are enough to make backtraces useful;
it works quite well and avoids the undertested -g1.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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