From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26428 invoked by alias); 25 Mar 2004 13:33:34 -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 26359 invoked from network); 25 Mar 2004 13:33:31 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 25 Mar 2004 13:33:31 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2PDXSw2000499 for ; Thu, 25 Mar 2004 14:33:28 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2PDXSvw006984 for ; Thu, 25 Mar 2004 14:33:28 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i2PDXSq7006981; Thu, 25 Mar 2004 14:33:28 +0100 (CET) Date: Thu, 25 Mar 2004 14:47:00 -0000 Message-Id: <200403251333.i2PDXSq7006981@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb@sources.redhat.com Subject: Stepping through signal trampolines X-SW-Source: 2004-03/txt/msg00256.txt.bz2 The recent changes to the signal trampoline stuff have changed the way we deal with stepping through signal trampolines. I did some experimenting with an older GDB and noticed the following differences: * Finish from within a signal handler now makes us end up in the signal trampoline now, whereas an older GDB simply ran until exit. I guess this is a good thing. * Stepping out of the signal handler using "stepi" makes us run until exit now, whereas an older GDB happily continues stepping into the signal trampoline. * If I use finish to get into the signal trampoline with a current GDB, stepi continues until we return from the signal trampoline. Using stepi on the older GDB from within the signal trampoline happily steps through the signal trampoline. So there still seem to be some quirks with stepping through signal trampolines. But before we decide what's the bug, I think we should ask ourselves what the desired behaviour is. In my view: * "finish" from within a signal handler should make us return to the signal trampoline. * "finish" from within a signal trampoline should make us return to the point where the signal interruption occured. * "stepi" from within a signal handler should step through the signal handler and back into the signal trampoline. * "stepi" from within a signal trampoline should step through the signal trampoline until the sigreturn system call. I'm not sure what "next" and "step" should do exactly. Here we must distinguish between systems with libc-provided signal trampolines and systems with kernel-provided signal trampolines. For the latter we usually won't have debug info, so "next" and "step" should probably skip them. For the former, we probably want to make them stop at lines within the signal trampoline if we have debug info for those lines. Thoughts? Mark