From: Pedro Alves <pedro@codesourcery.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb@sourceware.org, Marc Khouzam <marc.khouzam@ericsson.com>
Subject: Re: Displaced stepping not always working as expected
Date: Wed, 21 Sep 2011 15:44:00 -0000 [thread overview]
Message-ID: <201109211644.14128.pedro@codesourcery.com> (raw)
In-Reply-To: <4E7A051A.3050801@codesourcery.com>
On Wednesday 21 September 2011 16:39:06, Yao Qi wrote:
> On 09/21/2011 06:23 PM, Pedro Alves wrote:
> > On Wednesday 21 September 2011 07:08:43, Yao Qi wrote:
> >> The line of log looks strange to me. Why LWP 763 switch to itself?
> >
> > This is non-stop mode, and fetch_inferior_event always prints the
> > "context switch":
> >
> > if (non_stop
> > && ecs->ws.kind != TARGET_WAITKIND_IGNORE
> > && ecs->ws.kind != TARGET_WAITKIND_EXITED
> > && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED)
> > /* In non-stop mode, each thread is handled individually. Switch
> > early, so the global state is set correctly for this
> > thread. */
> > context_switch (ecs->ptid);
> >
>
> Pedro,
> I don't quite understand this piece of code and the comments here, but I
> think that debug log "context switch from Thread A to Thread A" is not
> useful, if not confusing.
I guess you'd have to back to a time where context_switch really did more
than just switching the thread. It used to swap a _bunch_ of globals
with the copies in the thread structure. It was horrible.
> How about this patch?
Sure. Okay.
--
Pedro Alves
next prev parent reply other threads:[~2011-09-21 15:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 19:54 Marc Khouzam
2011-09-21 6:09 ` Yao Qi
2011-09-21 10:23 ` Pedro Alves
2011-09-21 15:39 ` Yao Qi
2011-09-21 15:44 ` Pedro Alves [this message]
2011-09-21 10:20 ` Pedro Alves
2011-09-21 20:46 ` Marc Khouzam
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=201109211644.14128.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=marc.khouzam@ericsson.com \
--cc=yao@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