From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20415 invoked by alias); 16 May 2008 16:27:02 -0000 Received: (qmail 20395 invoked by uid 22791); 16 May 2008 16:27:01 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 May 2008 16:26:41 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jx2lR-0004yY-Q7 for gdb@sources.redhat.com; Fri, 16 May 2008 16:26:37 +0000 Received: from mobius.qnx.com ([209.226.137.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 May 2008 16:26:37 +0000 Received: from aristovski by mobius.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 May 2008 16:26:37 +0000 To: gdb@sources.redhat.com From: Aleksandar Ristovski Subject: Stepping out of signal handler problem Date: Fri, 16 May 2008 16:27:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00128.txt.bz2 Hello, I have a problem with stepping out of signal handler (on Neutrino OS). I am using sigstep (testsuite/gdb.base) test: When breakpoint is hit inside 'handler', and then doing step or stepi, gdb will not stop inside 'main'. I have identified the problem, but do not know how to solve it. The description of the problem: After 'handler' returns to signal trampoline, we can properly identify context using current method (retrieving context pointer from EDI register) up to a point where our function restores EDI to state before signal (which is exactly the next stepi away). After this, until the sigreturn kernel call, the context is wrong. The question 1: how should this (properly) be handled? I tried to make a static var and keep context pointer until a non-sigtramp frame is identified, but that didn't work either, even with proper context gdb would still not 'land' into the main where it's supposed to, but rather behaves as if 'continue' was given. This makes question 2: Is the only way to implement this similar to linux-nat (scanning for sigreturn kernel call)? Is there anything 'cleaner'? Any hint would be appreciated. Thanks, Aleksandar Ristovski QNX Software Systems