lkml.org 
[lkml]   [2011]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: getter PTRACE_GETSIGINFO should not modify anything [Re: [PATCH 11/11] ptrace: implement group stop notification for ptracer]
Hello, Jan.

On Sun, May 15, 2011 at 04:02:32PM +0200, Jan Kratochvil wrote:
> Or there should be some other way how to query the siginfo_t state
> fully transparently (*).
>
> (*) But if there exists such syscall it probably does not make sense to modify
> anything by PTRACE_GETSIGINFO.

If there's a syscall which doesn't affect notification state, then we
need something which does clear it. Either way, I suppose you're
saying we need both something which clears the notification and
something which doesn't.

> Imagine various LD_PRELOAD tools which try to wrap system/library calls and
> operate with ptrace while keeping it transparent for the original debugger.
> (I have a bunch of such libraries for testing gdb/strace/etc. written there.)
>
> Also complicated debuggers with internal OO hierarchy would need to just wrap
> PTRACE_GETSIGINFO into an internal function to make it transparent for calls
> not intending to modify the debuggee state.

We can add a flag or new request for that but I don't know. Those are
pretty fringe use cases and they don't even strictly require such
feature - Even for LD_PRELOAD, it can simply keep scheduling INTERRUPT
until the application calls the wrapped GETSIGINFO when it detects the
stopped state has changed. It can be easily done from userland.

Thank you.

--
tejun


\
 
 \ /
  Last update: 2011-05-15 16:31    [W:0.164 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site