From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6468 invoked by alias); 12 Apr 2005 18:13:40 -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 6419 invoked from network); 12 Apr 2005 18:13:35 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 12 Apr 2005 18:13:35 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DLPtG-000223-Bv; Tue, 12 Apr 2005 14:13:34 -0400 Date: Tue, 12 Apr 2005 18:13:00 -0000 From: Daniel Jacobowitz To: "Maciej W. Rozycki" Cc: gdb-patches@sources.redhat.com Subject: Re: Support for "break *ADDRESS thread THREADNO" Message-ID: <20050412181334.GA2560@nevyn.them.org> Mail-Followup-To: "Maciej W. Rozycki" , gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00094.txt.bz2 On Tue, Apr 12, 2005 at 04:53:55PM +0100, Maciej W. Rozycki wrote: > Hello, > > The current version of gdb does not accept the "thread THREADNO" clause > for breakpoints at an address. I'm not sure if that's a bug or feature as > the info pages carefully avoid documenting what should happen in this > case, referring to source lines instead. > > Anyway I've found the inability to set up such breakpoints an obstacle, > so I've implemented the missing bits for it to work. Here's the result. > I've run-time tested the C language bit only (i.e. c-exp.y), but the other > .y changes are essentially the same, so they should work as well. > Unfortunately I haven't found a way of testing the Ada part which is > significantly different; I hope it's OK. > > 2005-04-12 Maciej W. Rozycki > > * ada-lex.l: Support the "thread THREADNO" clause with breakpoints > at an address. > * c-exp.y (yylex): Likewise. > * f-exp.y (yylex): Likewise. > * jv-exp.y (yylex): Likewise. > * m2-exp.y (yylex): Likewise. > * objc-exp.y (yylex): Likewise. > * p-exp.y (yylex): Likewise. > > This has been verified for the HEAD version with the test suite for the > i386-linux-gnu system natively with no regressions. Please consider. No, sorry. Consider: (gdb) p *thread No symbol table is loaded. Use the "file" command. After your patch: (gdb) b *thread A parse error in expression, near `thread'. We can get away with this for 'if', because 'if' is a keyword in just about every language GDB supports, and an unlikely name for a variable. That's not going to fly for 'thread', however. -- Daniel Jacobowitz CodeSourcery, LLC