Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753215Ab1CBPbG (ORCPT ); Wed, 2 Mar 2011 10:31:06 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:51189 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752146Ab1CBPbF (ORCPT ); Wed, 2 Mar 2011 10:31:05 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=aoQGpMtULmzjFYKW5AQqOl4mmbfREYGvgc8hf2LL8VsMzIedjI9x/lOcKCCM+Wqra1 SmOrPxcB2+BX4glH284R7tq+bswZKLa/KgpcK7IhjOWAzVexhkGDW2ePUKd/8DCxmy6L zyWX7Khdy7wW30Lh1RpPU5ZM15VudTIQvq7to= Date: Wed, 2 Mar 2011 16:25:50 +0100 From: Tejun Heo To: Denys Vlasenko Cc: Oleg Nesterov , Roland McGrath , jan.kratochvil@redhat.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org Subject: Re: [RFC] Proposal for ptrace improvements Message-ID: <20110302152550.GM3319@htj.dyndns.org> References: <20110301152457.GE26074@htj.dyndns.org> <20110302073727.GD19669@htj.dyndns.org> <20110302112756.GI3319@htj.dyndns.org> <20110302144322.GJ3319@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1472 Lines: 45 Hey, On Wed, Mar 02, 2011 at 04:16:50PM +0100, Denys Vlasenko wrote: > Assuming the program is run under simple debugger which > resumes execution using PTRACE_CONT(sig) on signal delivery stops, > with PTRACE_CONT(0) on ptrace stops, > and doesn't do any PTRACE_CONT on job control stops, > with your proposal the debugger will see and perform > the following actions: > > waitpid... > <------ kill -STOP 16382 > waitpid returns WSTOPPED, WSTOPSIG = SIGSTOP > ptrace(PTRACE_GETSIGINFO) doesn't fail (=> it's signal delivery) > ptrace(PTRACE_CONT, SIGSTOP) > waitpid returns WSTOPPED, WSTOPSIG = SIGSTOP > ptrace(PTRACE_GETSIGINFO) fails (=> it's job control stop) > waitpid... > <------ kill -ABRT 16382 > ...debugger doesn't wake up... > <------ kill -WINCH 16382 > ...debugger doesn't wake up... > <------ kill -CONT 16382 > waitpid returns WSTOPPED, WSTOPSIG = SIGTRAP (it's a ptrace-stop) > ptrace(PTRACE_CONT, 0) > waitpid returns WSTOPPED, WSTOPSIG = SIGWINCH > ptrace(PTRACE_CONT, SIGWINCH) > waitpid returns WSTOPPED, WSTOPSIG = SIGCONT > ptrace(PTRACE_CONT, SIGCONT) > waitpid returns WSTOPPED, WSTOPSIG = SIGABRT > ptrace(PTRACE_CONT, SIGABRT) > > Correct? Yeah, seems correct to me. Thanks. -- tejun -- 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/