From d4715e41adbde61d0492f7f5e28c47cf655d24e1 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 2 Mar 2004 02:20:25 +0000 Subject: [PATCH] 2004-03-01 Andrew Cagney * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error, use frame_relative_level and get_next_frame. --- gdb/ChangeLog | 5 +++++ gdb/rs6000-tdep.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4770aa5154c..ca7fa6de537 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-03-01 Andrew Cagney + + * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error, + use frame_relative_level and get_next_frame. + 2004-02-29 Andrew Cagney * rs6000-tdep.c (rs6000_init_frame_pc_first): New function. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 05eb4421141..529fb3b00a8 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -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 -- 2.30.2