aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-13 21:10:30 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-13 21:10:30 +0000
commit8f87102502242e23f901af040c8eb904de162f87 (patch)
tree5e2f7ee452611b31cf43b0732fc1e03619f319fd /gdb/frame.c
parent3f565f1eb5001c29a32b383d8b7fe05f73557db8 (diff)
downloadgdb-8f87102502242e23f901af040c8eb904de162f87.zip
gdb-8f87102502242e23f901af040c8eb904de162f87.tar.gz
gdb-8f87102502242e23f901af040c8eb904de162f87.tar.bz2
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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index acc163e..503cfa7 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;