From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28139 invoked by alias); 1 Jul 2003 04:18:43 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28101 invoked from network); 1 Jul 2003 04:18:31 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 1 Jul 2003 04:18:31 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6B3662B5F; Tue, 1 Jul 2003 00:18:23 -0400 (EDT) Message-ID: <3F010B8F.9060700@redhat.com> Date: Tue, 01 Jul 2003 04:18:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jafa Cc: Daniel Jacobowitz , gdb@sources.redhat.com Subject: Re: Frame handling References: <09a601c33f6e$b05a3480$0a02a8c0@scenix.com> <20030701034232.GB3434@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00006.txt.bz2 >> this_id - Given a frame, return a unique identifier for the caller's frame >> based on the caller's frame base address and the calling functions entry >> point. >> prev_register - Given a frame, return the value of a specified register as >> it was on entry to this function (registers that are known to be saved on >> the stack) >> >> Question - what registers is gdb expecting prev_register to give reasonable >> results for? Just PC? Or SP and FP as well? > > > As many as possible. This _completely_ replaces all other unwinding, > for instance frame_chain and the extra_info/saved_registers data. > Might want to take a look at the ARM conversion I just posted; I don't > promise it's right... Yes. GDB now relies on the prev_register method when popping a frame so unless it works well, things fail pretty quick. >> Question - reading through this again I think the goal of call these >> functions is to work with the current frame and the function get passed the >> child frame so they can do a backtrace if it hasn't already been done... why >> not call a function to do a 1 level backtrace and then eliminate the >> next_frame parameter? It would recduce confusion and most ports will have an >> internal unwind function anyway. > Because it doesn't make much difference, I think. The key is that the > info generated when doing the backtrace is target specific, and opaque. I'm not sure I understand the question. Andrew