This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Fix "break *EXP thread NUM"
- From: Andrew Stubbs <ams at codesourcery dot com>
- To: gdb-patches at sourceware dot org, "Maciej W. Rozycki" <macro at codesourcery dot com>, Vladimir Prus <vladimir at codesourcery dot com>, Eli Zaretskii <eliz at gnu dot org>
- Date: Tue, 24 Nov 2009 10:32:50 +0000
- Subject: Re: RFC: Fix "break *EXP thread NUM"
- References: <20091123212736.GA3828@caradoc.them.org>
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