From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23456 invoked by alias); 4 Dec 2005 22:00:26 -0000 Received: (qmail 23448 invoked by uid 22791); 4 Dec 2005 22:00:25 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.193) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 Dec 2005 22:00:23 +0000 Received: by zproxy.gmail.com with SMTP id x3so587689nzd for ; Sun, 04 Dec 2005 14:00:21 -0800 (PST) Received: by 10.36.74.2 with SMTP id w2mr4780267nza; Sun, 04 Dec 2005 14:00:21 -0800 (PST) Received: by 10.37.2.6 with HTTP; Sun, 4 Dec 2005 14:00:21 -0800 (PST) Message-ID: <8f2776cb0512041400x257a1889u8fb53eb23e62ce49@mail.gmail.com> Date: Sun, 04 Dec 2005 23:07:00 -0000 From: Jim Blandy To: Jim Blandy , Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [RFC/RFA] Deal with -g1 generated DWARF2 debug info In-Reply-To: <20051204212244.GA24021@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200512041859.jB4IxrVO001319@elgar.sibelius.xs4all.nl> <8f2776cb0512041316w14c80cfdka34f84fcbd3c6cdb@mail.gmail.com> <20051204212244.GA24021@nevyn.them.org> 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/msg00092.txt.bz2 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? 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'.