From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27297 invoked by alias); 24 Nov 2009 10:33:03 -0000 Received: (qmail 27257 invoked by uid 22791); 24 Nov 2009 10:33:02 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Nov 2009 10:32:55 +0000 Received: (qmail 16923 invoked from network); 24 Nov 2009 10:32:53 -0000 Received: from unknown (HELO ?192.168.1.101?) (ams@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Nov 2009 10:32:53 -0000 Message-ID: <4B0BB652.3080303@codesourcery.com> Date: Tue, 24 Nov 2009 10:33:00 -0000 From: Andrew Stubbs User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 MIME-Version: 1.0 To: gdb-patches@sourceware.org, "Maciej W. Rozycki" , Vladimir Prus , Eli Zaretskii Subject: Re: RFC: Fix "break *EXP thread NUM" References: <20091123212736.GA3828@caradoc.them.org> In-Reply-To: <20091123212736.GA3828@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00522.txt.bz2 On 23/11/09 21:27, Daniel Jacobowitz wrote: > In this patch, I have taken advantage of the fact that even if you > have a local variable named "thread", there is no valid C expression > which has a variable name, whitespace, and an integer or floating > point constant. So "thread [0-9]" can also safely be treated > as an expression terminator. > > Does anyone see a problem with this approach? Unfortunately, I can. :( It's also valid to say, for example: (gdb) b main t 999 Unknown thread 999. or (gdb) b main thread -10 Unknown thread -10. or indeed (gdb) b main thread +10 Unknown thread 10. Hex and octal are also allowed, but since they always start with zero, I think you have them covered. Andrew