This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Always pass signals to the right thread.
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>, Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 28 Jul 2014 12:39:51 -0700
- Subject: Re: [PATCH v2] Always pass signals to the right thread.
- Authentication-results: sourceware.org; auth=none
- References: <1403183341-12581-1-git-send-email-palves at redhat dot com> <53A790DB dot 40908 at codesourcery dot com> <53A9648F dot 1030006 at redhat dot com> <53ABB36D dot 6090909 at codesourcery dot com>
Yao Qi writes:
> >> > We want to know whether thread 1 is selected, so using "info threads 1"
> >> > is simpler in the regexp pattern, like
> >> >
> >> > gdb_test "info threads 1" "\\\* 1${ws}Thread .*" "thread 1 selected"
> > The reason I don't like "info threads 1" this is that if the test fails,
> > when you go look at the logs, you don't see which thread was actually
> > current, which tends to make debugging things a little easier. But we
> > can still simplify the patterns. I was aiming at having no wildcards in
> > the middle of the output, but that's really not necessary.
> > I've simplified the patterns now.
>
> OK.
A good thing to document in the test though, eh?
[i.e., *why* "info threads" is used instead of "info threads 1"]
[I realize the patch has been pushed, just a thought for future reference.]