This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] h8300-tdep.c: Fix saved regs location
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 20 Sep 2002 16:26:42 +0200
- Subject: [PATCH] h8300-tdep.c: Fix saved regs location
- Reply-to: gdb-patches at sources dot redhat dot com
Hi,
another obvious one. Especially the usage of the local var 'r' is very
interesting here and it's weird that it didn't result in FAILs in the
testsuite even though it's totally wrong.
Corinna
* h8300-tdep.c (h8300_examine_prologue): Match saved regs location
with what gcc thinks is correct.
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.20
diff -u -p -r1.20 h8300-tdep.c
--- h8300-tdep.c 20 Sep 2002 12:08:37 -0000 1.20
+++ h8300-tdep.c 20 Sep 2002 14:20:36 -0000
@@ -412,10 +412,10 @@ h8300_examine_prologue (register CORE_AD
if (IS_PUSH (insn_word))
{
+ auto_depth += 2 + adjust;
+ fsr[insn_word & 0x7] = after_prolog_fp - auto_depth;
ip = next_ip;
next_ip = h8300_next_prologue_insn (ip, limit, &insn_word);
- fsr[r] = after_prolog_fp + auto_depth;
- auto_depth += 2 + adjust;
continue;
}
@@ -431,8 +431,8 @@ h8300_examine_prologue (register CORE_AD
for (i = start; i < start + count; i++)
{
- fsr[i] = after_prolog_fp + auto_depth;
auto_depth += 4;
+ fsr[i] = after_prolog_fp - auto_depth;
}
}
break;
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com