Re: [patch wip] Delete get_saved_register()

Andrew Cagney
2003-03-13T00:05:26Z

> Hello,
>
> The attached deletes the function get_saved_register(). It's been superseeded by frame_register() et.al.
>
> Right now, this patch causes a (major) regression. The sequence:
>
> $ gdb program
> (gdb) print $pc
>
> gets an internal error. An examination of a backtrace reveals that the code was using `deprecated_selected_frame' and that was NULL. Before committing the attached, I'm going to have to relace a few `deprecated_selected_frame's with `get_selected_frame()' (the latter throws an error if there really is no frame).
>
> So at this stage, this patch is largely a heads up. Once I've eliminated all the regressions, I'll commit the attached.

FYI, I've fixed the failures. I'll commit in a few days.

Andrew

>
> 2003-03-12 Andrew Cagney <cagney@redhat.com>
>
> * frame.c (get_saved_register): Delete function.
> * xstormy16-tdep.c: Update comment.
> * regcache.h: Update comments.
> * sparc-tdep.c (sparc_init_extra_frame_info): Instead of
> get_saved_register and extract_address, use
> frame_read_unsigned_register.
> (sparc_frame_saved_pc): Ditto.
> (sparc_get_saved_register): Instead of get_saved_register, use
> frame_register.
> (sparc_pop_frame): Ditto.
> * frame.h (get_saved_register): Delete declaration.
> * findvar.c: Update comments.
> (value_of_register): Call frame_register instead of
> get_saved_register.
> (value_from_register): Ditto.
> * config/sparc/tm-sparc.h: Update comment.
> * breakpoint.c: Update comment.
>
> Index: doc/ChangeLog
> 2003-03-12 Andrew Cagney <cagney@redhat.com>
>
> * gdbint.texinfo (Target Architecture Definition): Delete
> references to get_saved_register.
>