aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1992-03-29 22:33:35 +0000
committerPer Bothner <per@bothner.com>1992-03-29 22:33:35 +0000
commit1eeba68641b9b75e2d780759c39a079d8ddda0fc (patch)
tree53b52dab03341261520ae752bb16576121125bfa /gdb/rs6000-tdep.c
parentbe78a1301f2ab2bb13177d15326fb1aa3e372bf3 (diff)
downloadgdb-1eeba68641b9b75e2d780759c39a079d8ddda0fc.zip
gdb-1eeba68641b9b75e2d780759c39a079d8ddda0fc.tar.gz
gdb-1eeba68641b9b75e2d780759c39a079d8ddda0fc.tar.bz2
Merged in latest RS6000 diffs from Metin G. Ozisik.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index fea31f1..1a26ab2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -187,6 +187,15 @@ int pc;
if ((op & 0xfc000000) == 0x48000000) { /* bl foo, to save fprs??? */
pc += 4;
op = read_memory_integer (pc, 4);
+
+ /* At this point, make sure this is not a trampoline function
+ (a function that simply calls another functions, and nothing else).
+ If the next is not a nop, this branch was part of the function
+ prologue. */
+
+ if (op == 0x4def7b82 || /* crorc 15, 15, 15 */
+ op == 0x0)
+ return pc - 4; /* don't skip over this branch */
}
if ((op & 0xfc1f0000) == 0xbc010000) { /* stm Rx, NUM(r1) */
@@ -546,6 +555,14 @@ function_frame_info (pc, fdata)
if ((op & 0xfc000000) == 0x48000000) { /* bl foo, to save fprs??? */
pc += 4;
op = read_memory_integer (pc, 4);
+ /* At this point, make sure this is not a trampoline function
+ (a function that simply calls another functions, and nothing else).
+ If the next is not a nop, this branch was part of the function
+ prologue. */
+
+ if (op == 0x4def7b82 || /* crorc 15, 15, 15 */
+ op == 0x0)
+ return; /* prologue is over */
}
if ((op & 0xfc1f0000) == 0xd8010000) { /* stfd Rx,NUM(r1) */