From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21912 invoked by alias); 3 Aug 2004 19:21:31 -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 21905 invoked from network); 3 Aug 2004 19:21:30 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 3 Aug 2004 19:21:30 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1Bs4pK-0006yQ-1S; Tue, 03 Aug 2004 15:19:58 -0400 Date: Tue, 03 Aug 2004 19:21:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: allenh@eecs.berkeley.edu, gdb@sources.redhat.com Subject: Re: breaking at for-loop test line Message-ID: <20040803191957.GB25595@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , allenh@eecs.berkeley.edu, gdb@sources.redhat.com References: <4108321A.6070306@eecs.berkeley.edu> <20040729152940.GA7326@nevyn.them.org> <2914-Fri30Jul2004134328+0300-eliz@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2914-Fri30Jul2004134328+0300-eliz@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-08/txt/msg00011.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. > > 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. -- Daniel Jacobowitz