lkml.org 
[lkml]   [2014]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH] Implement new PTRACE_EVENT_SYSCALL_{ENTER,EXIT}
On 01/09, Pedro Alves wrote:
>
> On 01/07/2014 03:30 PM, Oleg Nesterov wrote:
> >
> > This way PTRACE_O_SYSCALL_* will work like other ptrace options which
> > ask to report an event.
>
> +10^6. With PTRACE_SYSCALL/sysgood, we don't have a way to trace
> syscalls when single-stepping, which isn't much of a problem for
> strace, but of course is for GDB. That is one of the things the
> new API should definitely sort out.

Hmm. I think this is a good point, but this needs more discussion.

So suppose that gdb does ptrace(PTRACE_SINGLESTEP) and the tracee
executes the "syscall" insn. What it should report?

syscall-entry looks obvious, PTRACE_EVENT_SYSCALL_ENTER should be
reported if PTRACE_O_SYSCALL_ENTER was set.

But what should syscall-exit do? Should it still report SIGSEGV as
it currently does, or should it report _SYSCALL_EXIT instead (if
PTRACE_O_SYSCALL_EXIT of course), or should it report both?

Oleg.



\
 
 \ /
  Last update: 2014-01-10 15:41    [W:0.084 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site