lkml.org 
[lkml]   [1999]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectPTRACE_SYSCALL questions
Date
From
I'm trying to use PTRACE_SYSCALL for a profiling-type program I'm 
working on. The facility I need is to be able to set a breakpoint
at the end of a system call, which must be able to be set during
the system call from the parent (or ptrace-ing) process.

From looking at entry.S on x86, PF_TRACESYS is only checked on
system call entry, but the trap is triggered both before and after
the system call.

Is there any other facility for a trap only after the system call?
Would it be reasonable to change entry.S to check after a normal
(non-traced) system call for PF_TRACESYS, and trap (and clear the
flag) then? I don't believe that this would alter the operation
of most programs using PTRACE_SYSCALL, as they would be resetting
the tracing after the second syscall anyhow.

Failing this, what would be a reasonable way to add this
functionality? My thoughts are that an additional ptrace call,
PTRACE_SYSCALLEXIT, and a PF_TRACESYSEXIT flag, could do this
fairly easily. Does this seem like a reasonable idea?

(I'm not subscribed, please cc: me, thanks)

- Daniel Nash

http://www.cs.wisc.edu/paradyn/
Paradyn Parallel Performance Tools
University of Wisconsin - Madison


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.086 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site