Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh5/sh5 Don't try to trace back through proc_trampo...



details:   https://anonhg.NetBSD.org/src/rev/08579c761930
branches:  trunk
changeset: 538028:08579c761930
user:      scw <scw%NetBSD.org@localhost>
date:      Thu Oct 10 08:53:22 2002 +0000

description:
Don't try to trace back through proc_trampoline.

diffstat:

 sys/arch/sh5/sh5/db_trace.c |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 7b209ef15a73 -r 08579c761930 sys/arch/sh5/sh5/db_trace.c
--- a/sys/arch/sh5/sh5/db_trace.c       Thu Oct 10 08:52:31 2002 +0000
+++ b/sys/arch/sh5/sh5/db_trace.c       Thu Oct 10 08:53:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.6 2002/09/22 20:31:19 scw Exp $ */
+/*     $NetBSD: db_trace.c,v 1.7 2002/10/10 08:53:22 scw Exp $ */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -216,18 +216,23 @@
                (*pr)("\n");
 
                /*
-                * There really is no point trying to trace back
-                * through "idle". It has no valid "context" anyway.
+                * There really is no point trying to trace back through
+                * "idle" or "proc_trampoline". The former has no valid
+                * "context" anyway, and the latter is the first function
+                * called for each new process/kernel thread.
                 */
-               if (strcmp(symp, "idle") == 0)
+               if (strcmp(symp, "idle") == 0 ||
+                   strcmp(symp, ___STRING(_C_LABEL(proc_trampoline))) == 0) {
+                       pc = fp = SH5_KSEG0_BASE;
                        break;
+               }
 
                if (strcmp(symp, "Lsh5_event_sync") == 0 ||
                    strcmp(symp, "Ltrapagain") == 0 ||
                    strcmp(symp, "Ltrapepilogue") == 0 ||
                    strcmp(symp, "Ltrapexit") == 0) {
                        /*
-                        * We're tracing back through a syncronous exception.
+                        * We're tracing back through a synchronous exception.
                         * The previous PC and FP are available from the
                         * 'struct trapframe' saved on the stack.
                         */
@@ -250,7 +255,7 @@
                if (strcmp(symp, "Lsh5_event_interrupt") == 0 ||
                    strcmp(symp, "Lintrexit") == 0) {
                        /*
-                        * We're tracing back through an asyncronous
+                        * We're tracing back through an asynchronous
                         * exception (hardware interrupt). The previous PC
                         * and FP are available from the 'struct intrframe'
                         * saved on the stack.



Home | Main Index | Thread Index | Old Index