From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9187 invoked by alias); 3 Sep 2004 20:49:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9179 invoked from network); 3 Sep 2004 20:49:37 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Sep 2004 20:49:37 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i83KnWS2015413 for ; Fri, 3 Sep 2004 16:49:32 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i83KnL317156; Fri, 3 Sep 2004 16:49:27 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7C6BC28D2; Fri, 3 Sep 2004 16:48:10 -0400 (EDT) Message-ID: <4138D88A.3080902@gnu.org> Date: Fri, 03 Sep 2004 20:49:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: Sherry Samuel Cc: gdb-patches@sources.redhat.com Subject: Re: Porting h8300 - gdb frame to new frame code References: <4A1BE23A7B777442B60F4B4916AE0F130292EAE4@sohm.kpit.com> In-Reply-To: <4A1BE23A7B777442B60F4B4916AE0F130292EAE4@sohm.kpit.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00063.txt.bz2 > I have introduced the new frame related functions as shown in the patch below. > > Also the following function has been modified: > h8300_examine_prologue > > But while executing the command "info f" I am getting wrong location of args and locals > (i.e. it is giving the location as the location of sp, where as is it should be the location > of frame). I have changed only the "get_frame_base " argument in "h8300_examine_prologue" to > the cache->base as it would be the location of stack address. There are two ``frame base''s. The ``id.stack_addr'' used by frame-unwind and the stack variables base address. For Dwarf2 it is Call Frame Information's Call Frame Address, and DDW_AT_frame_base. For a traditional frame unwinder it's typically the previous frame's top-of-stack, and the [virtual] frame pointer (typically the fp register). What's going wrong depends on which of the two is being used, however: - for tradtional frames the base is often simply wrong - dwarf2-frame doesn't compute the variables base address correctly, it isn't a major problem as the other dwarf2 code doesn't use it :-( > Is it due to the fact that the generated dwarf 2 information for H8300 is not correct? Andrew