aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.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/gdbarch.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/gdbarch.c')
-rw-r--r--gdb/gdbarch.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9519bb3..069e566 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -739,9 +739,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of extract_struct_value_address, has predicate */
/* Skip verify of deprecated_extract_struct_value_address, has predicate */
/* Skip verify of use_struct_convention, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_init_saved_regs == 0))
- fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
+ /* Skip verify of frame_init_saved_regs, has predicate */
/* Skip verify of init_extra_frame_info, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->skip_prologue == 0))
@@ -1464,6 +1462,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_chain_valid
/*FRAME_CHAIN_VALID ()*/);
#endif
+#ifdef FRAME_INIT_SAVED_REGS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_INIT_SAVED_REGS_P()",
+ XSTRING (FRAME_INIT_SAVED_REGS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_INIT_SAVED_REGS_P() = %d\n",
+ FRAME_INIT_SAVED_REGS_P ());
+#endif
#ifdef FRAME_INIT_SAVED_REGS
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -4356,6 +4363,13 @@ set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
gdbarch->use_struct_convention = use_struct_convention;
}
+int
+gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_init_saved_regs != 0;
+}
+
void
gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
{