From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29926 invoked by alias); 3 Jan 2007 20:28:18 -0000 Received: (qmail 29914 invoked by uid 22791); 3 Jan 2007 20:28:17 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 03 Jan 2007 20:28:09 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8) with ESMTP id l03KRw7U015389; Wed, 3 Jan 2007 21:27:58 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8/Submit) id l03KRv4h000275; Wed, 3 Jan 2007 21:27:57 +0100 (CET) Date: Wed, 03 Jan 2007 20:28:00 -0000 Message-Id: <200701032027.l03KRv4h000275@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20070103161257.GA14162@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 3 Jan 2007 11:12:57 -0500) Subject: Re: [patch RFC] Re: Notes on a frame_unwind_address_in_block problem References: <20060706222157.GA1377@nevyn.them.org> <200607132020.k6DKKCSB023812@elgar.sibelius.xs4all.nl> <20060718183910.GB17864@nevyn.them.org> <20070101191927.GA14930@nevyn.them.org> <200701011954.l01Js85r031019@brahms.sibelius.xs4all.nl> <20070101200248.GA19073@nevyn.them.org> <200701031137.l03Bb0rT031898@brahms.sibelius.xs4all.nl> <20070103161257.GA14162@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00075.txt.bz2 > Date: Wed, 3 Jan 2007 11:12:57 -0500 > From: Daniel Jacobowitz > > On Wed, Jan 03, 2007 at 12:37:00PM +0100, Mark Kettenis wrote: > > The basic principle of unwinding is that you get information about > > THIS_FRAME from NEXT_FRAME; you always walk the frame chain in one > > direction. This means that the only requirement for calling > > frame_unwind_xxx functions is that you have a NEXT_FRAME. Your change > > introduces a function that breaks this rule, by requiring THIS_FRAME > > to be there, walking the frame chain in the other direction. And it > > didn't take you very long to hit the problem with that: infinite > > recursion. > > > > Now the problem we're facing is that frame_unwind_address_in_block() > > (frame_func_unwind() is nothing but a fancy wrapper around that call) > > cannot be implemented reliably without knowledge about THIS_FRAME; it > > needs to know whether THIS_FRAME could be a fake frame set up by the > > kernel in order to determine whether it is a good idea to adjust the > > unwound PC or not. In our current implementation that information is > > carried by the frame type. > > > > The solution I think, is to pass this information explicitly to > > frame_unwind_address_in_block(), i.e. we change it's prototype from: > > I've hit one hiccup with this... dwarf2_frame_this_id isn't calling > frame_unwind_address_in_block, just frame_func_unwind. So, if > we want frame_func_unwind to do the right thing, that's the > call site which needs to know the right frame type. Oh sorry Daniel, I thought it was obvious that frame_func_unwind() needed the same treatment as frame_unwind_address_in_block(). Mark