diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-11-25 20:43:29 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-11-25 20:43:29 +0000 |
commit | b6199126eec56a19b3d4cd365abe3ec29d4911b9 (patch) | |
tree | 21ac1b4b37cbb44eb4c5d186ad0aa43e73d24715 /gdb/c-exp.y | |
parent | b22a05109740305648936be892937c15a5b0c2be (diff) | |
download | gdb-b6199126eec56a19b3d4cd365abe3ec29d4911b9.zip gdb-b6199126eec56a19b3d4cd365abe3ec29d4911b9.tar.gz gdb-b6199126eec56a19b3d4cd365abe3ec29d4911b9.tar.bz2 |
PR gdb/8704
* breakpoint.c (find_condition_and_thread): Correct task error message.
* c-exp.y (yylex): Stop before "thread N", "task N", or abbreviations
of those.
doc/
* gdb.texinfo (Thread-Specific Breakpoints): Thread specifiers
are allowed after the breakpoint condition.
testsuite/
* gdb.base/condbreak.exp: Test combinations of "break *EXP",
"if", and "thread". Correct matching in the previous test.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 8ee323e..d657c92 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -2250,6 +2250,24 @@ yylex (void) return 0; } + /* For the same reason (breakpoint conditions), "thread N" + terminates the expression. "thread" could be an identifier, but + an identifier is never followed by a number without intervening + punctuation. "task" is similar. Handle abbreviations of these, + similarly to breakpoint.c:find_condition_and_thread. */ + if (namelen >= 1 + && (strncmp (tokstart, "thread", namelen) == 0 + || strncmp (tokstart, "task", namelen) == 0) + && (tokstart[namelen] == ' ' || tokstart[namelen] == '\t') + && ! scanning_macro_expansion ()) + { + char *p = tokstart + namelen + 1; + while (*p == ' ' || *p == '\t') + p++; + if (*p >= '0' && *p <= '9') + return 0; + } + lexptr += namelen; tryname: |