public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: utrace-devel@redhat.com, archer@sourceware.org
Subject: Re: gdbstub initial code, v7
Date: Wed, 13 Oct 2010 07:23:00 -0000	[thread overview]
Message-ID: <20101013072346.1F239401B2@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of  Friday, 10 September 2010 21:20:01 +0200 <20100910192001.GA30490@redhat.com>

> On 09/10, Roland McGrath wrote:
> >
> > > ugdb sets "please stop" flag and does utrace_control(INTERRUPT). However,
> > > in unlikely case the tracee can stop before ->report_signal() reporting
> >
> > I don't think this is the right thing to do.  When the intent is explicitly
> > to interrupt, there is no reason to stop before the interruption is
> > complete, i.e. report_signal.
> 
> This means that ugdb_report_quiesce() should never return UTRACE_STOP,
> and that is all.

I'm not sure about this.

> But what about multitracing? Suppose that "(gdb) interrupt" happens
> just before, say, do_report_syscall_entry() and another engine wants
> to stop. If ugdb_report_quiesce() doesn't return UTRACE_STOP, then
> gdb will wait until another debugger resumes the tracee.

Yes, I do think that's a problem.  We want gdb to report back promptly.
One possibility is to have report_quiesce notice its argument is
UTRACE_EVENT(SYSCALL_ENTRY) and roll back to before the syscall.
That is, it enables SYSCALL_ENTRY and SYSCALL_EXIT reporting, then
its report_syscall_entry uses UTRACE_SIGNAL_ABORT, report_syscall_exit
does syscall_set_return_value(-ERESTARTNOHAND, 0) and then returns 
UTRACE_INTERRUPT.  Now, we'll reenter a UTRACE_SIGNAL_REPORT callback
"before" the system call, and we can stop there without being in any
sticky situation.


Thanks,
Roland

  reply	other threads:[~2010-10-13  7:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 19:02 Oleg Nesterov
2010-08-30 19:20 ` Jan Kratochvil
2010-08-31  7:21   ` Jan Kratochvil
2010-09-02 20:09     ` Oleg Nesterov
2010-09-03  6:40       ` Jan Kratochvil
2010-09-03 19:59         ` Roland McGrath
2010-09-03 20:03           ` Jan Kratochvil
2010-09-03 20:10             ` Roland McGrath
2010-09-03 23:13         ` Oleg Nesterov
2010-09-10 10:15           ` Roland McGrath
2010-09-10 18:32             ` Oleg Nesterov
2010-09-10 19:06               ` Roland McGrath
2010-09-10 19:23                 ` Oleg Nesterov
2010-10-13  7:23                   ` Roland McGrath [this message]
2010-10-15 14:32                     ` Oleg Nesterov
2010-09-03 14:17       ` Frank Ch. Eigler
2010-09-03 23:00         ` 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=20101013072346.1F239401B2@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).