summaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
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 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;