From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Vladimir Prus <vladimir@codesourcery.com>
Subject: Re: [MI non-stop 01/11] Report thread state in -thread-info output.
Date: Mon, 14 Jul 2008 15:01:00 -0000 [thread overview]
Message-ID: <200807141601.03909.pedro@codesourcery.com> (raw)
In-Reply-To: <g5c4d6$b9s$2@ger.gmane.org>
A Sunday 13 July 2008 06:38:50, Vladimir Prus wrote:
> Daniel Jacobowitz wrote:
> > On Sat, Jun 28, 2008 at 08:34:58PM +0400, Vladimir Prus wrote:
> >> + if (tp->state_ == THREAD_EXITED)
> >> + state = "exited";
> >
> > /* This field is internal to thread.c. Never access it directly,
> > use is_running instead. */
> > int state_;
> >
> > Aren't there accessors you can use here?
>
> Well, we talked with Pedro about this, I believe. The issue now is that
> is_xxx function take ptid, and do lookup. The right solution would be to
> have is_xxx_ptid functions taking ptid and is_xxx functions taking
> thread_info*.
>
> Pedro, does this approach seem OK for you, in the end?
Sure, that, or is_ptid_STATE/is_thread_STATE, or rename state_ to state
and allow access to it directly when we have a thread_info (or adding a
thread_state(thread_info) accessor and make the state enum public). The
main reason is_$(STATE) were introduced, the member was named state_ and
accessing it directly was noted as forbidden, was because of targets that
don't record the main thread.
Any approach taken is fine with me.
--
Pedro Alves
prev parent reply other threads:[~2008-07-14 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-28 16:40 Vladimir Prus
2008-06-29 5:33 ` Nick Roberts
2008-06-29 6:03 ` Vladimir Prus
2008-06-29 17:41 ` Nick Roberts
2008-07-11 13:42 ` Daniel Jacobowitz
2008-07-13 5:40 ` Vladimir Prus
2008-07-14 15:01 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200807141601.03909.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=vladimir@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox