Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64/aarch64 "machine cpu" command shows pc of t...



details:   https://anonhg.NetBSD.org/src/rev/02799fc79e07
branches:  trunk
changeset: 981379:02799fc79e07
user:      ryo <ryo%NetBSD.org@localhost>
date:      Tue Mar 09 16:43:13 2021 +0000

description:
"machine cpu" command shows pc of trapframe and the symbol

diffstat:

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

diffs (39 lines):

diff -r 6b837275e2c1 -r 02799fc79e07 sys/arch/aarch64/aarch64/db_machdep.c
--- a/sys/arch/aarch64/aarch64/db_machdep.c     Tue Mar 09 16:42:36 2021 +0000
+++ b/sys/arch/aarch64/aarch64/db_machdep.c     Tue Mar 09 16:43:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.35 2021/03/09 16:42:36 ryo Exp $ */
+/* $NetBSD: db_machdep.c,v 1.36 2021/03/09 16:43:13 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.35 2021/03/09 16:42:36 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.36 2021/03/09 16:43:13 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -944,11 +944,16 @@
 
        if (!have_addr) {
                for (i = 0; i < ncpu; i++) {
-                       if (db_readytoswitch[i] != NULL)
-                               db_printf("cpu%d: ready. tf=%p\n", i,
-                                   db_readytoswitch[i]);
-                       else
+                       if (db_readytoswitch[i] != NULL) {
+                               db_printf("cpu%d: ready. tf=%p, pc=%016lx ", i,
+                                       db_readytoswitch[i],
+                                       db_readytoswitch[i]->tf_pc);
+                               db_printsym(db_readytoswitch[i]->tf_pc,
+                                       DB_STGY_ANY, db_printf);
+                               db_printf("\n");
+                       } else {
                                db_printf("cpu%d: not responding\n", i);
+                       }
                }
                return;
        }



Home | Main Index | Thread Index | Old Index