diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-13 21:10:30 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-13 21:10:30 +0000 |
commit | 0e1d3bfff5698f13d7842021162830cfd1f477f1 (patch) | |
tree | 17cde8fb78dd36d763df9c002248376539dfa88c /gdb/frame.c | |
parent | 4e7fa4fef0c58b1bea9da2a4ee9443c45a88adb8 (diff) | |
download | gdb-0e1d3bfff5698f13d7842021162830cfd1f477f1.tar.gz |
2003-01-13 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (FRAME_INIT_SAVED_REGS): Change to function with
predicate.
* gdbarch.h, gdbarch.c: Regenerate.
* stack.c (frame_info): Only initialize the saved registers when
FRAME_INIT_SAVED_REGS_P.
* frame.c (frame_saved_regs_register_unwind): Assert
FRAME_INIT_SAVED_REGS_P.
(deprecated_generic_get_saved_register): Ditto.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index acc163e452c..503cfa7b359 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -570,6 +570,10 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache, gdb_assert (!(DEPRECATED_USE_GENERIC_DUMMY_FRAMES && (get_frame_type (frame) == DUMMY_FRAME))); + /* Only (older) architectures that implement the + FRAME_INIT_SAVED_REGS method should be using this function. */ + gdb_assert (FRAME_INIT_SAVED_REGS_P ()); + /* Load the saved_regs register cache. */ if (frame->saved_regs == NULL) FRAME_INIT_SAVED_REGS (frame); @@ -738,6 +742,8 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized, if (!target_has_registers) error ("No registers."); + gdb_assert (FRAME_INIT_SAVED_REGS_P ()); + /* Normal systems don't optimize out things with register numbers. */ if (optimized != NULL) *optimized = 0; |