Porting h8300 - gdb frame to new frame code

Andrew Cagney cagney@gnu.org
Fri Sep 3 20:49:00 GMT 2004


> 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




More information about the Gdb-patches mailing list