From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1216 invoked by alias); 8 Nov 2007 18:00:52 -0000 Received: (qmail 1068 invoked by uid 22791); 8 Nov 2007 18:00:49 -0000 X-Spam-Check-By: sourceware.org Received: from lsd-gw.ic.unicamp.br (HELO marquesa.lsd.ic.unicamp.br) (143.106.7.165) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Nov 2007 18:00:27 +0000 Received: from freie.oliva.athome.lsd.ic.unicamp.br (gw-to-emilia.oliva.athome.lsd.ic.unicamp.br [172.31.160.17] (may be forged)) by marquesa.lsd.ic.unicamp.br (8.14.1/8.14.1) with ESMTP id lA8I05Do008747; Thu, 8 Nov 2007 16:00:05 -0200 Received: from free.oliva.athome.lsd.ic.unicamp.br (free.oliva.athome.lsd.ic.unicamp.br [172.31.160.1]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1) with ESMTP id lA8I05dM022501; Thu, 8 Nov 2007 16:00:05 -0200 Received: from free.oliva.athome.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1) with ESMTP id lA8I05ws003019; Thu, 8 Nov 2007 16:00:05 -0200 Received: (from aoliva@localhost) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1/Submit) id lA8I05Gq003018; Thu, 8 Nov 2007 16:00:05 -0200 Resent-To: Mark Mitchell , Ian Lance Taylor , Richard Guenther , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Resent-From: Alexandre Oliva Resent-Date: Thu, 08 Nov 2007 16:00:05 -0200 Resent-Message-ID: Received: from free (localhost.localdomain [127.0.0.1]) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1) with ESMTP id lA85s23m018629 for ; Thu, 8 Nov 2007 03:54:45 -0200 Received: from gmail-pop.l.google.com [72.14.247.109] by free with POP3 (fetchmail-6.3.8) for (single-drop); Thu, 08 Nov 2007 03:54:45 -0200 (BRST) Received: by 10.115.58.17 with SMTP id l17cs97482wak; Wed, 7 Nov 2007 21:44:07 -0800 (PST) Received: by 10.70.83.8 with SMTP id g8mr321217wxb.1194500646343; Wed, 07 Nov 2007 21:44:06 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by mx.google.com with ESMTP id i35si521495wxd.2007.11.07.21.44.05; Wed, 07 Nov 2007 21:44:06 -0800 (PST) Received-SPF: pass (google.com: domain of aoliva@redhat.com designates 66.187.233.31 as permitted sender) client-ip=66.187.233.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aoliva@redhat.com designates 66.187.233.31 as permitted sender) smtp.mail=aoliva@redhat.com Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lA85fxrj007228; Thu, 8 Nov 2007 00:41:59 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lA85fwJd022240; Thu, 8 Nov 2007 00:41:58 -0500 Received: from free.oliva.athome.lsd.ic.unicamp.br (vpn-14-51.rdu.redhat.com [10.11.14.51]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lA85fuYQ013600; Thu, 8 Nov 2007 00:41:57 -0500 Received: from free.oliva.athome.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1) with ESMTP id lA85fs2T011711; Thu, 8 Nov 2007 03:41:54 -0200 Received: (from aoliva@localhost) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1/Submit) id lA85fqde011405; Thu, 8 Nov 2007 03:41:52 -0200 To: Mark Mitchell Cc: Ian Lance Taylor , Richard Guenther , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: Designs for better debug info in GCC References: <84fc9c000711050327x74845c78ya18a3329fcf9e4d2@mail.gmail.com> <4732519C.6070802@codesourcery.com> From: Alexandre Oliva Errors-To: aoliva@lsd.ic.unicamp.br Date: Thu, 08 Nov 2007 19:13:00 -0000 In-Reply-To: <4732519C.6070802@codesourcery.com> (Mark Mitchell's message of "Wed\, 07 Nov 2007 16\:00\:28 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00252.txt.bz2 Message-ID: <20071108191300.uc7tnoT9OMRcbdbsodPiLU1fI_-ZlTSFm2SoqKlTFCc@z> On Nov 7, 2007, Mark Mitchell wrote: > Until we all know what we're trying to do Here's what I am trying to do: 1. Ensure that, for every user variable for which we emit debug information, the information is correct, i.e., if it says the value of a variable at a certain instruction is at certain locations, or is a known constant, then the variable must not be at any other location at that point, and the locations or values must match reasonable expectations based on source code inspection. 2. Defining "reasonable expectations" is tricky, for code reordering typical of optimization can make room for numerous surprises. I don't have a precise definition for this yet, but very clearly to me saying that a variable holds a value that it couldn't possibly hold (e.g., because it is only assigned that value in a code path that is knowingly not taken) is a very clear indication that something is amiss. The general guiding rule is, if we aren't sure the information is correct (or we're sure it isn't), we shouldn't pretend that it is. 3. Try to ensure that, if the value of a variable is a known constant at a certain point in the program, this information is present in debug information. 4. Try to ensure that, if the value of a variable is available at any location at a certain point in the program, this information is present in debug information. 5. Stop missing optimizations for the sake of improving debug information. 6. Avoid using additional memory and CPU cycles that would be needed only for debug information when compiling without generating debug information -- Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/ FSF Latin America Board Member http://www.fsfla.org/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}