diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-05 21:44:05 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-05 21:44:05 +0000 |
commit | a216a322341d49ebb6eff80fe9a49542b545c7d0 (patch) | |
tree | b6ff99a9842f2118fd12ead71c31c9a421086205 /gdb/gdbarch.c | |
parent | b7c642601c187ba8e89c4084d0880649ede3aea1 (diff) | |
download | gdb-a216a322341d49ebb6eff80fe9a49542b545c7d0.zip gdb-a216a322341d49ebb6eff80fe9a49542b545c7d0.tar.gz gdb-a216a322341d49ebb6eff80fe9a49542b545c7d0.tar.bz2 |
2002-11-05 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (GET_SAVED_REGISTER): Change to a predicate function.
* gdbarch.h, gdbarch.c: Regnerate.
* frame.h (frame_register): Declare.
* frame.c (frame_register): New function.
(get_saved_register): Test GET_SAVED_REGISTER_P before calling
GET_SAVED_REGISTER, otherwize call
generic_unwind_get_saved_register.
(frame_register_read): Use frame_register instead of
get_saved_register.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index eaa7c47..468726d 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -534,7 +534,6 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->init_frame_pc_first = init_frame_pc_noop; current_gdbarch->init_frame_pc = init_frame_pc_default; current_gdbarch->coerce_float_to_double = default_coerce_float_to_double; - current_gdbarch->get_saved_register = generic_unwind_get_saved_register; current_gdbarch->register_convertible = generic_register_convertible_not; current_gdbarch->convert_register_p = legacy_convert_register_p; current_gdbarch->register_to_value = legacy_register_to_value; @@ -718,7 +717,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of init_frame_pc_first, invalid_p == 0 */ /* Skip verify of init_frame_pc, invalid_p == 0 */ /* Skip verify of coerce_float_to_double, invalid_p == 0 */ - /* Skip verify of get_saved_register, invalid_p == 0 */ + /* Skip verify of get_saved_register, has predicate */ /* Skip verify of register_convertible, invalid_p == 0 */ /* Skip verify of register_convert_to_virtual, invalid_p == 0 */ /* Skip verify of register_convert_to_raw, invalid_p == 0 */ @@ -3678,6 +3677,13 @@ set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch->coerce_float_to_double = coerce_float_to_double; } +int +gdbarch_get_saved_register_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->get_saved_register != 0; +} + void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval) { |