2004-03-01 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Tue, 2 Mar 2004 02:20:25 +0000 (02:20 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 2 Mar 2004 02:20:25 +0000 (02:20 +0000)
* rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error,
use frame_relative_level and get_next_frame.

gdb/ChangeLog
gdb/rs6000-tdep.c

index 4770aa5154c6582c5a52acee959a869e48aad6bd..ca7fa6de537c0aacf258adec16821bd1dc2a2956 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-01  Andrew Cagney  <cagney@redhat.com>
+
+       * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error,
+       use frame_relative_level and get_next_frame.
+
 2004-02-29  Andrew Cagney  <cagney@redhat.com>
 
        * rs6000-tdep.c (rs6000_init_frame_pc_first): New function.
index 05eb44211417b61130bd4d89cb33d6b0d294e00b..529fb3b00a8ca76d3dcbee1a32c599ec47af0c30 100644 (file)
@@ -213,8 +213,11 @@ rs6000_frame_init_saved_regs (struct frame_info *fi)
 static CORE_ADDR
 rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev)
 {
-  return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next)
-         : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ());
+  return (fromleaf
+         ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev))
+         : frame_relative_level (prev) > 0
+         ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev))
+         : read_pc ());
 }
 
 static CORE_ADDR