From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25063 invoked by alias); 12 Nov 2005 03:32:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25056 invoked by uid 22791); 12 Nov 2005 03:32:46 -0000 Received: from ip127.bb146.pacific.net.hk (HELO stl.com.hk) (202.64.146.127) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 12 Nov 2005 03:32:46 +0000 Received: from rccomp.stl.com.hk ([192.168.100.200]) by stl.com.hk with esmtp (Exim 4.50) id 1Eam54-0001Lu-MW; Sat, 12 Nov 2005 11:29:30 +0800 Message-ID: <4375624D.1070202@tausq.org> Date: Sat, 12 Nov 2005 04:59:00 -0000 From: Randolph Chung User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050805) MIME-Version: 1.0 To: Jim Blandy CC: Joel Brobecker , gdb-patches@sources.redhat.com Subject: Re: [hppa] FYI: confusion in unwind descriptor field meaning References: <20051109203108.GX1635@adacore.com> <43735815.3070805@tausq.org> <20051111001017.GJ1635@adacore.com> <437548AF.5090107@tausq.org> <8f2776cb0511111838m64d478d9s2e04db338fbf7fc8@mail.gmail.com> In-Reply-To: <8f2776cb0511111838m64d478d9s2e04db338fbf7fc8@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-11/txt/msg00155.txt.bz2 >>For that matter, how do you find the beginning of the function without >>unwind data? > > Linker symbols. If you don't have them, then prologue analysis isn't useful. This is what I meant - on hppa, even without linker symbols, we can still do prologue analysis because the ABI mandates unwind records. So we can actually do unwinding more robustly based on the unwind records. This is especially useful when you have mixed code compiled with different flags and/or have been stripped. We have this comment in hppa-tdep.c: /* We used to use frame_func_unwind () to locate the beginning of the function to pass to skip_prologue (). However, when objects are compiled without debug symbols, frame_func_unwind can return the wrong function (or 0). We can do better than that by using unwind records. */ >>OTOH, if you can combine all the prologue analysis code in hppa-tdep.c >>and make it more robust, I think it will certainly be a good thing. > > In my experience, the new analysis framework (which I've kind of been > forgetting about for a while now) makes things a lot more robust. I > wrote it because I was getting fed up with corrupted backtraces > debugging GDB on the S/390. With the new framework, I got a > multi-page backtrace through optimized code the first time. It makes > a big difference. Yes, I saw some of the discussions about the new framework and I think it's a very good thing. gdb on hppa-linux can do pretty good backtraces now with optimized code. On hpux we still have some work to do. In either case, as Mark pointed out, the code is rather ugly so doing some cleanup with some more structure will be nice. randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/