public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: archer@sourceware.org, utrace-devel@redhat.com
Subject: Re: gdbstub initial code, v8 && ptrace
Date: Fri, 10 Sep 2010 10:10:00 -0000	[thread overview]
Message-ID: <20100910100948.C0254405D5@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of  Monday, 6 September 2010 22:59:27 +0200 <20100906205927.GA30471@redhat.com>

> I am a bit confused... OK, ugdb is wrong wrt multitracing.
> UTRACE_SIGNAL_REPORT case shouldn't return "UTRACE_STOP | UTRACE_SIGNAL_IGN",
> it should return "UTRACE_STOP | UTRACE_SIGNAL_REPORT" to keep report->result.

No, UTRACE_SIGNAL_REPORT is not meant for a return value.  Its only use is
in the incoming argument to tell you that a given report_signal call is
standing in for a report_quiesce(0) call.

> But it needs to return UTRACE_SIGNAL_DELIVER?

That's what you return when you want the signal delivered.
When you are stopping the tracee to decide about the signal,
that's not what you want.

UTRACE_STOP | UTRACE_SIGNAL_IGN is correct to not deliver the signal right
now, and stop instead.  If you want to deliver the signal later, then
you'll resume with UTRACE_INTERRUPT to ensure you get back to report_signal
and that can fill in the details and return UTRACE_SIGNAL_DELIVER.

> Probably we can check orig_ka != NULL and treat orig_ka == NULL as
> UTRACE_SIGNAL_REPORT. Hopefully this can't be confused with
> UTRACE_SIGNAL_HANDLER.

I'm not really sure what you mean here.

> Not sure about UTRACE_SIGNAL_HOLD, but this is very unlikely race.

You probably don't want to use that, but I'm not entirely sure.  ptrace
doesn't use it, and the signal interception model is pretty much the same.


Thanks,
Roland

  reply	other threads:[~2010-09-10 10:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03 22:44 gdbstub initial code, v8 Oleg Nesterov
2010-09-05 19:41 ` Jan Kratochvil
2010-09-06 18:21   ` Oleg Nesterov
2010-09-06 18:31     ` Jan Kratochvil
2010-09-06 20:48       ` Oleg Nesterov
2010-09-07  2:59         ` Frank Ch. Eigler
2010-09-08 19:24           ` Oleg Nesterov
2010-09-10 10:02           ` Roland McGrath
2010-09-06 18:27 ` gdbstub initial code, v8 && ptrace Oleg Nesterov
2010-09-06 19:45   ` Oleg Nesterov
2010-09-06 21:02     ` Oleg Nesterov
2010-09-10 10:10       ` Roland McGrath [this message]
2010-09-10 19:10         ` Oleg Nesterov
2010-10-13  7:14           ` Roland McGrath
2010-10-15 13:57             ` Oleg Nesterov

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=20100910100948.C0254405D5@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=archer@sourceware.org \
    --cc=oleg@redhat.com \
    --cc=utrace-devel@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).