Messages in this thread | | | Subject | PTRACE_SYSCALL questions | Date | Fri, 02 Apr 1999 14:07:57 -0600 | From | Daniel Nash <> |
| |
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/
| |