From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9331 invoked by alias); 30 Dec 2005 02:38:37 -0000 Received: (qmail 9322 invoked by uid 22791); 30 Dec 2005 02:38:36 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 30 Dec 2005 02:38:33 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EsAA3-0006mY-9E for gdb@sourceware.org; Thu, 29 Dec 2005 21:38:31 -0500 Date: Fri, 30 Dec 2005 02:38:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: Stepping over longjmp presumably broken for glibc Message-ID: <20051230023830.GA26004@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org References: <20051223152021.GA26794@nevyn.them.org> <20051223170913.GA28791@nevyn.them.org> <20051224162302.GA11929@nevyn.them.org> <8f2776cb0512252006i4b28abe7if0fd67dd8cee6f10@mail.gmail.com> <8f2776cb0512262024n39deb5e9q64ab62c48652e336@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0512262024n39deb5e9q64ab62c48652e336@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes 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/msg00210.txt.bz2 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? -- Daniel Jacobowitz CodeSourcery, LLC