From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25486 invoked by alias); 24 Nov 2007 20:46:05 -0000 Received: (qmail 25469 invoked by uid 22791); 24 Nov 2007 20:46:05 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 24 Nov 2007 20:45:59 +0000 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 lAOKhuSB006788; Sat, 24 Nov 2007 15:43:56 -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 lAOKhumk022326; Sat, 24 Nov 2007 15:43:56 -0500 Received: from livre.oliva.athome.lsd.ic.unicamp.br (vpn-14-114.rdu.redhat.com [10.11.14.114]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAOKhthg019188; Sat, 24 Nov 2007 15:43:55 -0500 Received: from livre.oliva.athome.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by livre.oliva.athome.lsd.ic.unicamp.br (8.14.2/8.13.8) with ESMTP id lAOKhsYV005857; Sat, 24 Nov 2007 18:43:54 -0200 Received: (from aoliva@localhost) by livre.oliva.athome.lsd.ic.unicamp.br (8.14.2/8.13.5/Submit) id lAOKhqa6005855; Sat, 24 Nov 2007 18:43:52 -0200 To: Joe Buck Cc: Mark Mitchell , Ian Lance Taylor , Richard Guenther , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: Designs for better debug info in GCC References: <4732519C.6070802@codesourcery.com> <4733554D.4040402@codesourcery.com> <4737BBBF.3080400@codesourcery.com> <20071112180518.GA29269@synopsys.com> From: Alexandre Oliva Errors-To: aoliva@oliva.athome.lsd.ic.unicamp.br Date: Sat, 24 Nov 2007 22:12:00 -0000 In-Reply-To: <20071112180518.GA29269@synopsys.com> (Joe Buck's message of "Mon\, 12 Nov 2007 10\:05\:18 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (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/msg00617.txt.bz2 On Nov 12, 2007, Joe Buck wrote: > consider dropping observable points where the states will not match. We can't really do that. The line number mapping is from PC to line number, regardless of how far into the execution or earlier lines the code is. Omitting certain mappings from PC to line numbers would be wrong. The piece of the puzzle we're still missing is how to get debuggers clever enough to decide where to set a breakpoint. Nowadays, debuggers (at least those I'm familiar with) tend to set breakpoints at the lowest-numbered PC corresponding to a given source line number. While this is useful at times, at other times what you want is the lowest PC after all instructions corresponding to the previous line, because at that point you know all the state of the previous line should be stable and hopefully still observable. Or something along these lines. I don't have a complete solution for this problem. It's very far from trivial, and I don't see that debug information can carry enough information for the compiler to aid the debugger in selecting where to place breakpoints in this regard. -- 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}