aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-04-08 21:56:10 +0000
committerAndrew Cagney <cagney@redhat.com>2003-04-08 21:56:10 +0000
commit4443bd8373866e76ec700a8bb3f5df8a50ba3714 (patch)
tree9b8a010feedc37eff9c2dcde41f59f484c9f0418 /gdb/gdbarch.c
parenta66624bc3e854775dc9857ce23ead38b741f9dbe (diff)
downloadgdb-4443bd8373866e76ec700a8bb3f5df8a50ba3714.zip
gdb-4443bd8373866e76ec700a8bb3f5df8a50ba3714.tar.gz
gdb-4443bd8373866e76ec700a8bb3f5df8a50ba3714.tar.bz2
2003-04-08 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (SAVED_PC_AFTER_CALL): Add a predicate. * gdbarch.h, gdbarch.c: Re-generate. * d10v-tdep.c (d10v_saved_pc_after_call): Delete function. (d10v_gdbarch_init): Do not set saved_pc_after_call. * infrun.c (step_over_function): Call SAVED_PC_AFTER_CALL_P conditionally, use frame_pc_unwind as an alternative. Add comments. * arch-utils.c (init_frame_pc_default): Only call SAVED_PC_AFTER_CALL when available.
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 d08f146..257f2b9 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -728,9 +728,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of unwind_pc, has predicate */
/* Skip verify of frame_args_address, invalid_p == 0 */
/* Skip verify of frame_locals_address, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->saved_pc_after_call == 0))
- fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
+ /* Skip verify of saved_pc_after_call, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->frame_num_args == 0))
fprintf_unfiltered (log, "\n\tframe_num_args");
@@ -2152,6 +2150,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->return_value_on_stack
/*RETURN_VALUE_ON_STACK ()*/);
#endif
+#ifdef SAVED_PC_AFTER_CALL_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "SAVED_PC_AFTER_CALL_P()",
+ XSTRING (SAVED_PC_AFTER_CALL_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: SAVED_PC_AFTER_CALL_P() = %d\n",
+ SAVED_PC_AFTER_CALL_P ());
+#endif
#ifdef SAVED_PC_AFTER_CALL
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -4902,6 +4909,13 @@ set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
gdbarch->frame_locals_address = frame_locals_address;
}
+int
+gdbarch_saved_pc_after_call_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->saved_pc_after_call != 0;
+}
+
CORE_ADDR
gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
{