From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25084 invoked by alias); 30 Dec 2005 09:32:58 -0000 Received: (qmail 25074 invoked by uid 22791); 30 Dec 2005 09:32:57 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Dec 2005 09:32:54 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id jBU9WCKL011123; Fri, 30 Dec 2005 10:32:12 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id jBU9WBL9007024; Fri, 30 Dec 2005 10:32:11 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id jBU9WBn6015669; Fri, 30 Dec 2005 10:32:11 +0100 (CET) Date: Fri, 30 Dec 2005 09:32:00 -0000 Message-Id: <200512300932.jBU9WBn6015669@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb@sourceware.org In-reply-to: <20051230023830.GA26004@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 29 Dec 2005 21:38:31 -0500) Subject: Re: Stepping over longjmp presumably broken for glibc References: <20051223152021.GA26794@nevyn.them.org> <20051223170913.GA28791@nevyn.them.org> <20051224162302.GA11929@nevyn.them.org> <8f2776cb0512252006i4b28abe7if0fd67dd8cee6f10@mail.gmail.com> <8f2776cb0512262024n39deb5e9q64ab62c48652e336@mail.gmail.com> <20051230023830.GA26004@nevyn.them.org> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00218.txt.bz2 > Date: Thu, 29 Dec 2005 21:38:31 -0500 > From: Daniel Jacobowitz > > On Mon, Dec 26, 2005 at 08:24:30PM -0800, Jim Blandy wrote: > > Here's my (non-qualifying because it relies on help from the runtime) > > idea: can't we use Dwarf CFI here? That is, treat longjmp as a weird > > function whose CFI indicates that it unwinds to the setjmp. The > > DW_CFA_val_expression operator, new in the released Dwarf 3 spec, > > allows CFI to use an arbitrary expression to compute the saved value > > of the register; we can apply that to the return address column just > > as well as anything else. In the case Daniel described, the > > expression would use DW_OP_xor (probably the first use ever of that > > opcode!). > > How would you distinguish a longjmp with CFI that returns to caller > from a longjmp with CFI that returns to setjmp? Huh? longjmp() always returns to a context saved by a setjmp(). Mark