From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31010 invoked by alias); 3 Aug 2004 20:09:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30991 invoked from network); 3 Aug 2004 20:09:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Aug 2004 20:09:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i73K9Be3030497 for ; Tue, 3 Aug 2004 16:09:11 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i73K90a10317; Tue, 3 Aug 2004 16:09:05 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 2179D2B9D; Tue, 3 Aug 2004 16:08:55 -0400 (EDT) Message-ID: <410FF0D6.3060902@gnu.org> Date: Tue, 03 Aug 2004 20:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: Daniel Jacobowitz , Eli Zaretskii , allenh@eecs.berkeley.edu Cc: gdb@sources.redhat.com Subject: Re: breaking at for-loop test line References: <4108321A.6070306@eecs.berkeley.edu> <20040729152940.GA7326@nevyn.them.org> <2914-Fri30Jul2004134328+0300-eliz@gnu.org> <20040803191957.GB25595@nevyn.them.org> In-Reply-To: <20040803191957.GB25595@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00012.txt.bz2 > On Fri, Jul 30, 2004 at 01:43:28PM +0200, Eli Zaretskii wrote: > >>>> > Date: Thu, 29 Jul 2004 11:29:40 -0400 >>>> > From: Daniel Jacobowitz >>>> > >>>> > I've been thinking for a while about a better interface for this, but I >>>> > haven't come up with one yet. >> >>> >>> Does GCC tell us in any way (via the debug info) that a single source >>> line has more than a single statement? >>> >>> If not, the only way for GDB to figure that out is to parse the source >>> code by itself. > > > No, it doesn't, but there is more information available from the > machine code than there is from the source code. For "for" statements, > it's conceivable to work out that there are multiple places in the > statement which serve as branch targets, via assembly analysis. Better > would be to record this in the debug info; there's no way to do it, > yet, but someone was bouncing around a proposal to record it in the > line table. Does dwarf3 include column information? That would let us break: for (i ; i < 10 ; i++) into: for (i ; i < 10 ; i++) which, at least on a graphics device, could be very effectively represented to the user - the section of code to next be executed could be highlighted. Andrew >>>> > GDB could also make it much easier to figure out where the condition is >>>> > than it does now... >> >>> >>> How? > > > By providing a version of "info line" which described all the ranges of > code belonging to a line instead of just the first one, or by a command > which disassembled an entire line. >