mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Werner Almesberger <wa@almesberger.net>
To: raj <raj@cs.wisc.edu>, linux-kernel@vger.kernel.org, zandy@cs.wisc.edu
Subject: Re: [PATCH] ptrace on stopped processes (2.4)
Date: Tue, 25 Mar 2003 10:48:42 -0300	[thread overview]
Message-ID: <20030325104842.A7468@almesberger.net> (raw)
In-Reply-To: <20030324150552.GA26287@nevyn.them.org>; from dan@debian.org on Mon, Mar 24, 2003 at 10:05:53AM -0500

Daniel Jacobowitz wrote:
> No, that's not what I meant.  When you attach using GDB, there is no
> way for GDB to determine if the process was previously stopped or
> running.

Likewise, there's a race condition with any other concurrent use
of SIGSTOP.

Perhaps one could introduce a PTRACE_ATTACH2 that uses "addr" to
indicate the signal that should be used to sychronize attaching.
That way, programs that use STOP/CONT for their own purposes could
be attached to with ptrace(PTRACE_ATTACH2,pid,SIGTRAP,0), or such.

If the process is already stopped, the debugger would be notified
with WSTOPSIG set to that signal instead of SIGTRAP.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

  reply	other threads:[~2003-03-25 13:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 21:24 Rajesh Rajamani
2003-03-24  4:09 ` Daniel Jacobowitz
2003-03-24  6:24   ` raj
2003-03-24 15:05     ` Daniel Jacobowitz
2003-03-25 13:48       ` Werner Almesberger [this message]
2003-03-25 13:58         ` Daniel Jacobowitz
2003-03-25 14:53           ` Werner Almesberger
  -- strict thread matches above, loose matches on Subject: below --
2001-12-21 19:53 vic
2001-12-21 23:19 ` Jeff Dike
2001-12-22  3:56 ` OGAWA Hirofumi
2001-12-22 17:38 ` Mike Coleman
2002-01-17 16:57   ` vic
2002-01-17 19:23     ` OGAWA Hirofumi
2002-01-23 17:58       ` vic
2002-01-23 22:14         ` OGAWA Hirofumi
2002-01-23 22:29           ` vic
2002-01-24  1:41             ` OGAWA Hirofumi
2002-01-21  3:09     ` Mike Coleman
2002-01-28 20:15       ` vic
2002-03-19  3:59         ` vic

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=20030325104842.A7468@almesberger.net \
    --to=wa@almesberger.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raj@cs.wisc.edu \
    --cc=zandy@cs.wisc.edu \
    /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

all inboxes | Powered by JetHome®