Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752409AbaAJN5h (ORCPT ); Fri, 10 Jan 2014 08:57:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41683 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbaAJN5f (ORCPT ); Fri, 10 Jan 2014 08:57:35 -0500 Date: Fri, 10 Jan 2014 14:58:02 +0100 From: Oleg Nesterov To: Pedro Alves Cc: Sergio Durigan Junior , LKML , Roland McGrath , Denys Vlasenko , Tom Tromey , Jan Kratochvil , Tejun Heo , Linus Torvalds Subject: Re: [RFC/PATCH] Implement new PTRACE_EVENT_SYSCALL_{ENTER,EXIT} Message-ID: <20140110135802.GA26953@redhat.com> References: <20140107153036.GA4749@redhat.com> <52CEEF1F.90803@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52CEEF1F.90803@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- 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/