From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] infrun: don't resume the inferior when we notice a new thread (new_thread_event).
Date: Mon, 28 May 2012 21:19:00 -0000 [thread overview]
Message-ID: <20120528211937.GA14224@host2.jankratochvil.net> (raw)
In-Reply-To: <20120528204623.25996.69879.stgit@brno.lan>
On Mon, 28 May 2012 22:46:23 +0200, Pedro Alves wrote:
> If anyone as any idea why things are done in the current way, please
> speak up.
Not much, just that linux-nat.c linux_handle_extended_wait has this code by
you:
if (non_stop)
{
/* Add the new thread to GDB's lists as soon as possible
so that:
if (!thread_db_attach_lwp (new_lp->ptid))
{
/* We're not using thread_db. Add it to GDB's
list. */
target_post_attach (GET_LWP (new_lp->ptid));
add_thread (new_lp->ptid);
}
And for !non_stop mode add_thread gets delayed till handle_inferior_event;
which should not hurt. If this add would be done unconditionally in
linux-nat.c then this handle_inferior_event would never be reached.
But I do not see why to make that change, handle_inferior_event works.
Thanks,
Jan
next prev parent reply other threads:[~2012-05-28 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-28 20:46 Pedro Alves
2012-05-28 21:19 ` Jan Kratochvil [this message]
2012-05-28 21:27 ` Pedro Alves
2012-06-06 18:12 ` Pedro Alves
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=20120528211937.GA14224@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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