diff options
author | Pedro Alves <palves@redhat.com> | 2016-01-15 21:46:23 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-01-15 21:46:23 +0000 |
commit | 71ef29a86b252a4780517fc9b2bf9f7d3dd2d991 (patch) | |
tree | 6906fc0e6297b079fa951857e19f15aefd7143cc /gdb/tid-parse.h | |
parent | 3f5b7598805c8253c43c989a540a2408c8b685ad (diff) | |
download | gdb-71ef29a86b252a4780517fc9b2bf9f7d3dd2d991.zip gdb-71ef29a86b252a4780517fc9b2bf9f7d3dd2d991.tar.gz gdb-71ef29a86b252a4780517fc9b2bf9f7d3dd2d991.tar.bz2 |
Star wildcard ranges (e.g., "info thread 2.*")
Add support for specifying "all threads of inferior N", by writing "*"
as thread number/range in thread ID lists.
E.g., "info threads 2.*" or "thread apply 2.* bt".
gdb/ChangeLog:
2016-01-15 Pedro Alves <palves@redhat.com>
* NEWS: Mention star wildcard ranges.
* cli/cli-utils.c (get_number_or_range): Check state->in_range first.
(number_range_setup_range): New function.
* cli/cli-utils.h (number_range_setup_range): New declaration.
* thread.c (thread_apply_command): Support star TID ranges.
* tid-parse.c (tid_range_parser_finished)
(tid_range_parser_string, tid_range_parser_skip)
(get_tid_or_range, get_tid_or_range): Handle
TID_RANGE_STATE_STAR_RANGE.
(tid_range_parser_star_range): New function.
* tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
New value.
(tid_range_parser_star_range): New declaration.
gdb/doc/ChangeLog:
2016-01-15 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Threads) <thread ID lists>: Document star ranges.
gdb/testsuite/ChangeLog:
2016-01-15 Pedro Alves <palves@redhat.com>
* gdb.multi/tids.exp: Test star wildcard ranges.
Diffstat (limited to 'gdb/tid-parse.h')
-rw-r--r-- | gdb/tid-parse.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/tid-parse.h b/gdb/tid-parse.h index a690edf..830cf36 100644 --- a/gdb/tid-parse.h +++ b/gdb/tid-parse.h @@ -44,6 +44,9 @@ enum tid_range_state /* Parsing the thread number or thread number range. */ TID_RANGE_STATE_THREAD_RANGE, + + /* Parsing a star wildcard thread range. E.g., "1.*". */ + TID_RANGE_STATE_STAR_RANGE, }; /* An object of this type is passed to tid_range_parser_get_tid. It @@ -142,6 +145,10 @@ extern int tid_range_parser_get_tid_range (struct tid_range_parser *parser, int *inf_num, int *thr_start, int *thr_end); +/* Returns non-zero if processing a star wildcard (e.g., "1.*") + range. */ +extern int tid_range_parser_star_range (struct tid_range_parser *parser); + /* Returns non-zero if parsing has completed. */ extern int tid_range_parser_finished (struct tid_range_parser *parser); |