From: Andrew Cagney Date: Thu, 26 Sep 2002 22:34:07 +0000 (+0000) Subject: 2002-09-26 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f3b7f0716a642710dfe1c3c34052b9b761bcf05;p=binutils-gdb.git 2002-09-26 Andrew Cagney * rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy frame. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2a87dc62ede..9d17e40a557 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-09-26 Andrew Cagney + + * rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy + frame. + 2002-09-26 Andrew Cagney * rs6000-tdep.c (rs6000_extract_struct_value_address): Return 0. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index ee5305e8b77..e6a68ef202b 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1741,7 +1741,9 @@ rs6000_frame_chain (struct frame_info *thisframe) int wordsize = gdbarch_tdep (current_gdbarch)->wordsize; if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame)) - return thisframe->frame; /* dummy frame same as caller's frame */ + /* A dummy frame always correctly chains back to the previous + frame. */ + return read_memory_addr ((thisframe)->frame, wordsize); if (inside_entry_file (thisframe->pc) || thisframe->pc == entry_point_address ()) @@ -1758,13 +1760,6 @@ rs6000_frame_chain (struct frame_info *thisframe) fp = FRAME_FP (thisframe); else fp = read_memory_addr ((thisframe)->frame, wordsize); - - lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); - if (lr == entry_point_address ()) - if (fp != 0 && (fpp = read_memory_addr (fp, wordsize)) != 0) - if (PC_IN_CALL_DUMMY (lr, fpp, fpp)) - return fpp; - return fp; }