Wed Dec 2 07:55:53 2009 UTC ()
print the fplwp in "mach cpu" list.


(mrg)
diff -r1.119 -r1.120 src/sys/arch/sparc64/sparc64/db_interface.c

cvs diff -r1.119 -r1.120 src/sys/arch/sparc64/sparc64/db_interface.c (expand / switch to unified diff)

--- src/sys/arch/sparc64/sparc64/db_interface.c 2009/12/01 18:51:20 1.119
+++ src/sys/arch/sparc64/sparc64/db_interface.c 2009/12/02 07:55:53 1.120
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: db_interface.c,v 1.119 2009/12/01 18:51:20 martin Exp $ */ 1/* $NetBSD: db_interface.c,v 1.120 2009/12/02 07:55:53 mrg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. 4 * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
5 * Mach Operating System 5 * Mach Operating System
6 * Copyright (c) 1991,1990 Carnegie Mellon University 6 * Copyright (c) 1991,1990 Carnegie Mellon University
7 * All Rights Reserved. 7 * All Rights Reserved.
8 * 8 *
9 * Permission to use, copy, modify and distribute this software and its 9 * Permission to use, copy, modify and distribute this software and its
10 * documentation is hereby granted, provided that both the copyright 10 * documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the 11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions 12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation. 13 * thereof, and that both notices appear in supporting documentation.
14 * 14 *
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * Pittsburgh PA 15213-3890 24 * Pittsburgh PA 15213-3890
25 * 25 *
26 * any improvements or extensions that they make and grant Carnegie the 26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes. 27 * rights to redistribute these changes.
28 * 28 *
29 * From: db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU) 29 * From: db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU)
30 */ 30 */
31 31
32/* 32/*
33 * Interface to new debugger. 33 * Interface to new debugger.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.119 2009/12/01 18:51:20 martin Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.120 2009/12/02 07:55:53 mrg Exp $");
38 38
39#include "opt_ddb.h" 39#include "opt_ddb.h"
40#include "opt_multiprocessor.h" 40#include "opt_multiprocessor.h"
41 41
42#include <sys/param.h> 42#include <sys/param.h>
43#include <sys/proc.h> 43#include <sys/proc.h>
44#include <sys/reboot.h> 44#include <sys/reboot.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/atomic.h> 46#include <sys/atomic.h>
47 47
48#include <uvm/uvm_extern.h> 48#include <uvm/uvm_extern.h>
49 49
50#include <dev/cons.h> 50#include <dev/cons.h>
@@ -1131,29 +1131,30 @@ db_watch(db_expr_t addr, bool have_addr, @@ -1131,29 +1131,30 @@ db_watch(db_expr_t addr, bool have_addr,
1131 } 1131 }
1132 stxa(0, ASI_MCCR, tmp); 1132 stxa(0, ASI_MCCR, tmp);
1133 } 1133 }
1134} 1134}
1135 1135
1136/* XXX this belongs in cpu.c */ 1136/* XXX this belongs in cpu.c */
1137static void cpu_debug_dump(void); 1137static void cpu_debug_dump(void);
1138static void 1138static void
1139cpu_debug_dump(void) 1139cpu_debug_dump(void)
1140{ 1140{
1141 struct cpu_info *ci; 1141 struct cpu_info *ci;
1142 1142
1143 for (ci = cpus; ci; ci = ci->ci_next) { 1143 for (ci = cpus; ci; ci = ci->ci_next) {
1144 db_printf("cpu%d: self 0x%08lx lwp 0x%08lx pcb 0x%08lx\n", 1144 db_printf("cpu%d: self 0x%08lx lwp 0x%08lx pcb 0x%08lx "
1145 ci->ci_index, (u_long)ci->ci_self, 1145 "fplwp 0x%08lx\n", ci->ci_index, (u_long)ci->ci_self,
1146 (u_long)ci->ci_curlwp, (u_long)ci->ci_cpcb); 1146 (u_long)ci->ci_curlwp, (u_long)ci->ci_cpcb,
 1147 (u_long)ci->ci_fplwp);
1147 } 1148 }
1148} 1149}
1149 1150
1150void 1151void
1151db_cpu_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif) 1152db_cpu_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
1152{ 1153{
1153#ifdef MULTIPROCESSOR 1154#ifdef MULTIPROCESSOR
1154 struct cpu_info *ci; 1155 struct cpu_info *ci;
1155#endif 1156#endif
1156  1157
1157 if (!have_addr) { 1158 if (!have_addr) {
1158 cpu_debug_dump(); 1159 cpu_debug_dump();
1159 return; 1160 return;