find_saved_register(frame) -> next/prev frame?

Michael Snyder msnyder@redhat.com
Mon Jul 24 15:26:00 GMT 2000


Andrew Cagney wrote:
> 
> > It seems that find_saved_register is called only by mips_get_saved_register()
> > and default_get_saved_register().
> >
> > There is another function, generic_get_saved_register() in
> > blockframe.c which is basically identical to
> > default_get_saved_register 

Not at all!  generic_get_saved_register is a special
purpose function, and if you look at the code you 
should be able to see that it is very different
from default_get_saved_register.

> > and which doesn't call
> > find_saved_register(). Maybe the author realized that
> > find_saved_register() was wrong, but didn't want to touch the exisitng
> > code.
> 
> This is probably true (Hi mike :-).  

In fact it's not true.

> However, only a few targets are
> using that new version.  Most targets appear to still use
> default_get_saved_register().  Surely someone will have noticed that
> up/down didn't work right?
> 
> > Probably we should switch the macro GET_SAVED_REGISTER to be
> > generic_get_saved_register instead of default_get_saved_register and
> > see what happens.
> 
> If we can demonstrate that it is wrong then yes.
> 
> > Elena
> 
>         Andrew


More information about the Gdb-patches mailing list