2002-12-08 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / s390-tdep.c
index 622f285073802204d2a921c47de92585337800ab..48842dafc4db590ff338f0b08e52bcef15b0cc58 100644 (file)
@@ -881,25 +881,24 @@ s390_is_sigreturn (CORE_ADDR pc, struct frame_info *sighandler_fi,
   for the moment.
   For some reason the blockframe.c calls us with fi->next->fromleaf
   so this seems of little use to us. */
-void
+CORE_ADDR
 s390_init_frame_pc_first (int next_fromleaf, struct frame_info *fi)
 {
   CORE_ADDR sigcaller_pc;
-
-  fi->pc = 0;
+  CORE_ADDR pc = 0;
   if (next_fromleaf)
     {
-      fi->pc = ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
+      pc = ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
       /* fix signal handlers */
     }
-  else if (fi->next && fi->next->pc)
-    fi->pc = s390_frame_saved_pc_nofix (fi->next);
-  if (fi->pc && fi->next && fi->next->frame &&
-      s390_is_sigreturn (fi->pc, fi->next, NULL, &sigcaller_pc))
+  else if (get_next_frame (fi) && get_frame_pc (get_next_frame (fi)))
+    pc = s390_frame_saved_pc_nofix (get_next_frame (fi));
+  if (pc && get_next_frame (fi) && get_frame_base (get_next_frame (fi))
+      && s390_is_sigreturn (pc, get_next_frame (fi), NULL, &sigcaller_pc))
     {
-      fi->pc = sigcaller_pc;
+      pc = sigcaller_pc;
     }
-
+  return pc;
 }
 
 void
@@ -1790,7 +1789,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_breakpoint_from_pc (gdbarch, s390_breakpoint_from_pc);
   set_gdbarch_skip_prologue (gdbarch, s390_skip_prologue);
   set_gdbarch_init_extra_frame_info (gdbarch, s390_init_extra_frame_info);
-  set_gdbarch_init_frame_pc_first (gdbarch, s390_init_frame_pc_first);
+  set_gdbarch_deprecated_init_frame_pc_first (gdbarch, s390_init_frame_pc_first);
   set_gdbarch_read_fp (gdbarch, s390_read_fp);
   /* This function that tells us whether the function invocation represented
      by FI does not have a frame on the stack associated with it.  If it
This page took 0.024352 seconds and 4 git commands to generate.