aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-09-26 22:34:07 +0000
committerAndrew Cagney <cagney@redhat.com>2002-09-26 22:34:07 +0000
commit9f3b7f0716a642710dfe1c3c34052b9b761bcf05 (patch)
tree3802c289f94c0c3f086287aa7ffed278cd0407d2 /gdb/rs6000-tdep.c
parent11269d7ebb9762618ee8084e77d54bffe547be63 (diff)
downloadgdb-9f3b7f0716a642710dfe1c3c34052b9b761bcf05.zip
gdb-9f3b7f0716a642710dfe1c3c34052b9b761bcf05.tar.gz
gdb-9f3b7f0716a642710dfe1c3c34052b9b761bcf05.tar.bz2
2002-09-26 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy frame.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index ee5305e..e6a68ef 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;
}