Re: [PATCH] ptrace on stopped processes (2.4)

From: Werner Almesberger (wa@almesberger.net)
Date: Tue Mar 25 2003 - 08:48:42 EST


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/____________________________________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:19 EST