Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 fix "Frame really belongs to next callpc"...



details:   https://anonhg.NetBSD.org/src/rev/dbb8498a483f
branches:  trunk
changeset: 547066:dbb8498a483f
user:      yamt <yamt%NetBSD.org@localhost>
date:      Mon May 12 13:38:49 2003 +0000

description:
fix "Frame really belongs to next callpc" case.

diffstat:

 sys/arch/i386/i386/db_trace.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r d8d0d8327bfc -r dbb8498a483f sys/arch/i386/i386/db_trace.c
--- a/sys/arch/i386/i386/db_trace.c     Mon May 12 13:16:11 2003 +0000
+++ b/sys/arch/i386/i386/db_trace.c     Mon May 12 13:38:49 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.37 2003/05/12 13:16:11 yamt Exp $       */
+/*     $NetBSD: db_trace.c,v 1.38 2003/05/12 13:38:49 yamt Exp $       */
 
 /* 
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.37 2003/05/12 13:16:11 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.38 2003/05/12 13:38:49 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -469,9 +469,11 @@
 
                if (lastframe == 0 && offset == 0 && !have_addr) {
                        /* Frame really belongs to next callpc */
-                       lastframe = (int *)(ddb_regs.tf_esp-4);
+                       struct i386_frame *fp = (void *)(ddb_regs.tf_esp-4);
+
+                       lastframe = (int *)fp;
                        callpc = (db_addr_t)
-                                db_get_value((int)lastframe, 4, FALSE);
+                           db_get_value((db_addr_t)&fp->f_retaddr, 4, FALSE);
                        continue;
                }
 



Home | Main Index | Thread Index | Old Index