From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15304 invoked by alias); 12 Apr 2005 18:55:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15289 invoked from network); 12 Apr 2005 18:55:51 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 12 Apr 2005 18:55:51 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DLQY9-0002Ys-2J; Tue, 12 Apr 2005 14:55:49 -0400 Date: Tue, 12 Apr 2005 18:55:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: "Maciej W. Rozycki" , gdb-patches@sources.redhat.com Subject: Re: Support for "break *ADDRESS thread THREADNO" Message-ID: <20050412185549.GA9715@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , "Maciej W. Rozycki" , gdb-patches@sources.redhat.com References: <20050412181334.GA2560@nevyn.them.org> <01c53f90$Blat.v2.4$17427900@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c53f90$Blat.v2.4$17427900@zahav.net.il> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00098.txt.bz2 On Tue, Apr 12, 2005 at 09:46:31PM +0300, Eli Zaretskii wrote: > In addition to the above, I don't like the idea of supporting a > general feature in language-specific files. That seems wrong. > > Why was it done like this? because "*ADDRESS" is interpreted as an > expression in the current language, or is there some other reason? I assume so. It is parsed as an expression, not just an address; for instance "break *thread" would actually work if thread is a pointer to a function. There's already common code for this, that's where most of the 'thread THREADNO' support is. I think it's in linespec.c somewhere, but it might be in breakpoint.c. It seems to need a little extra help from the language... we need to know that a 'thread NUMBER' suffix is not part of the expression. TBH, the mechanism is fragile; I can't think of a more robust way but there must be one. Right now if and thread are handled similarly. But if separates two expressions, whereas thread can only be followed by a thread number. Perhaps that can be used to simplify. -- Daniel Jacobowitz CodeSourcery, LLC