From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32146 invoked by alias); 27 Nov 2004 23:28:26 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32131 invoked from network); 27 Nov 2004 23:28:24 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 27 Nov 2004 23:28:24 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CYBzC-0001T7-Ed; Sat, 27 Nov 2004 18:28:14 -0500 Date: Sun, 28 Nov 2004 01:26:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb@sources.redhat.com Subject: Re: PTRACE_SINGLESTEP into signal handler Message-ID: <20041127232814.GA5593@nevyn.them.org> Mail-Followup-To: Ulrich Weigand , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00247.txt.bz2 On Fri, Nov 26, 2004 at 06:25:26PM +0100, Ulrich Weigand wrote: > Does gdb assume PTRACE_SINGLESTEP into a handle returns *before* > the first instruction of the handler was executed? > > We could change the kernel to do that, and this fixes the test case > failures, but I'm not sure if this is the right thing to do -- > the ptrace documentation says "arranges for the child to be stopped > after execution of a single instruction", which would appear to > indicate the current behaviour is correct. > > How does this work on other platforms? I'm pretty sure that the answer is yes - we should stop on the first instruction. It does seem a little strange as a behavior when requesting single-step to step no instructions, but we have no other way to get to the beginning of the handler. i386 was changed recently. -- Daniel Jacobowitz