Re: RFC: Fix "break *EXP thread NUM"

Andrew Stubbs
2009-11-24T10:33:03Z

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