From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1550 invoked by alias); 4 Dec 2005 22:15:52 -0000 Received: (qmail 1542 invoked by uid 22791); 4 Dec 2005 22:15:51 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 04 Dec 2005 22:15:50 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Ej295-0006WQ-7t; Sun, 04 Dec 2005 17:15:47 -0500 Date: Mon, 05 Dec 2005 10:32:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [RFC/RFA] Deal with -g1 generated DWARF2 debug info Message-ID: <20051204221547.GA25034@nevyn.them.org> Mail-Followup-To: Jim Blandy , Mark Kettenis , gdb-patches@sourceware.org References: <200512041859.jB4IxrVO001319@elgar.sibelius.xs4all.nl> <8f2776cb0512041316w14c80cfdka34f84fcbd3c6cdb@mail.gmail.com> <20051204212244.GA24021@nevyn.them.org> <8f2776cb0512041400x257a1889u8fb53eb23e62ce49@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0512041400x257a1889u8fb53eb23e62ce49@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00094.txt.bz2 On Sun, Dec 04, 2005 at 02:00:21PM -0800, Jim Blandy wrote: > On 12/4/05, Daniel Jacobowitz 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