aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-01-15 21:46:23 +0000
committerPedro Alves <palves@redhat.com>2016-01-15 21:46:23 +0000
commit71ef29a86b252a4780517fc9b2bf9f7d3dd2d991 (patch)
tree6906fc0e6297b079fa951857e19f15aefd7143cc /gdb/doc
parent3f5b7598805c8253c43c989a540a2408c8b685ad (diff)
downloadgdb-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/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo39
2 files changed, 33 insertions, 10 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 4b59057..db280b9 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-15 Pedro Alves <palves@redhat.com>
+
+ * gdb.texinfo (Threads) <thread ID lists>: Document star ranges.
+
2016-01-13 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Threads): Document the $_gthread convenience
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7da31c8..a08a196 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2912,16 +2912,35 @@ of inferior 1, the initial inferior.
@anchor{thread ID lists}
@cindex thread ID lists
Some commands accept a space-separated @dfn{thread ID list} as
-argument. A list element can be a thread ID as shown in the first
-field of the @samp{info threads} display, with or without an inferior
-qualifier (e.g., @samp{2.1} or @samp{1}); or can be a range of thread
-numbers, again with or without an inferior qualifier, as in
-@var{inf1}.@var{thr1}-@var{thr2} or @var{thr1}-@var{thr2} (e.g.,
-@samp{1.2-4} or @samp{2-4}). For example, if the current inferior is
-1, the thread list @samp{1 2-3 4.5 6.7-9} includes threads 1 to 3 of
-inferior 1, thread 5 of inferior 4 and threads 7 to 9 of inferior 6.
-That is, in expanded qualified form, the same as @samp{1.1 1.2 1.3 4.5
-6.7 6.8 6.9}.
+argument. A list element can be:
+
+@enumerate
+@item
+A thread ID as shown in the first field of the @samp{info threads}
+display, with or without an inferior qualifier. E.g., @samp{2.1} or
+@samp{1}.
+
+@item
+A range of thread numbers, again with or without an inferior
+qualifier, as in @var{inf}.@var{thr1}-@var{thr2} or
+@var{thr1}-@var{thr2}. E.g., @samp{1.2-4} or @samp{2-4}.
+
+@item
+All threads of an inferior, specified with a star wildcard, with or
+without an inferior qualifier, as in @var{inf}.@code{*} (e.g.,
+@samp{1.*}) or @code{*}. The former refers to all threads of the
+given inferior, and the latter form without an inferior qualifier
+refers to all threads of the current inferior.
+
+@end enumerate
+
+For example, if the current inferior is 1, and inferior 7 has one
+thread with ID 7.1, the thread list @samp{1 2-3 4.5 6.7-9 7.*}
+includes threads 1 to 3 of inferior 1, thread 5 of inferior 4, threads
+7 to 9 of inferior 6 and all threads of inferior 7. That is, in
+expanded qualified form, the same as @samp{1.1 1.2 1.3 4.5 6.7 6.8 6.9
+7.1}.
+
@anchor{global thread numbers}
@cindex global thread number