From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17906 invoked by alias); 28 Sep 2006 01:15:50 -0000 Received: (qmail 17896 invoked by uid 22791); 28 Sep 2006 01:15:48 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 28 Sep 2006 01:15:42 +0000 Received: from localhost ([127.0.0.1] ident=amavis) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1GSkV2-0002V7-LO for gdb@sourceware.org; Wed, 27 Sep 2006 18:15:40 -0700 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08953-07 for ; Wed, 27 Sep 2006 18:15:40 -0700 (PDT) Received: from maxim_fc3.hq.tensilica.com ([192.168.11.68]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1GSkV2-0002V2-CU for gdb@sourceware.org; Wed, 27 Sep 2006 18:15:40 -0700 Message-ID: <451B223C.6090204@hq.tensilica.com> Date: Thu, 28 Sep 2006 01:15:00 -0000 From: Maxim Grigoriev User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Xtensa port Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2006-09/txt/msg00173.txt.bz2 I just sent an updated patch with the following comments: After some investigation, it turns out that the get_fp_num() function, which was "grubbing around in the private data structures of the symbol reader", is not needed at all. Perhaps that code was left over from an earlier version of GDB. Stack unwinding on Xtensa can be done using the register windows -- it requires neither prologue analysis to find the frame pointer nor DWARF unwind info. The only thing the get_fp_num() function was used for was identifying frames, but it seems like we can just use the stack pointer for the frame ID. (Is that right?) I've changed the code to do this and it appears to work fine: no DejaGnu regression has been detected, and manual testing on alloca-tests hasn't exposed anything. The other suggestions that I've received so far were easy to use and I've done that. By the way, I also removed the line to use the dwarf2_frame_sniffer, because DWARF unwind info is not currently used for Xtensa. Maxim Grigoriev Tensilica, Inc. 3255-6 Scott Boulevard Santa Clara, CA 95054-3013 (w) 408-566-1770