[prev in list] [next in list] [prev in thread] [next in thread]
List: linuxppc64-dev
Subject: [PATCH] ppc64 kdb to print SDR1 along with other SPRs
From: aprasad () in ! ibm ! com (Anil K Prasad)
Date: 2003-12-07 1:10:06
Message-ID: OF312A2141.D294045F-ON86256DF5.0003D1E4-86256DF5.00045B3F () in ! ibm ! com
[Download RAW message or body]
Hi,
I am not sure why there is no option to see SDR1 value in kdb. I had
expected it to be under 'superreg' option.
Anyway, I have just added extra printf for SDR1.. and below is patch for
the same.
Thanks,
Anil.
--------------------------------------------------------------------------PATCH
BEGIN---------------------------------------------------------------------------------
--- linux-2.4.21/arch/ppc64/kdb/kdbasupport.c 2003-12-06
16:30:53.000000000 -0800
+++ linux-myfix/arch/ppc64/kdb/kdbasupport.c 2003-12-06
15:13:10.000000000 -0800
@@ -1661,6 +1661,7 @@
kdb_printf("toc = %.16lx dar = %.16lx\n", toc, get_dar());
kdb_printf("srr0 = %.16lx srr1 = %.16lx\n", get_srr0(),
get_srr1());
kdb_printf("asr = %.16lx\n", mfasr());
+ kdb_printf("sdr1 = %.16lx\n", mfsdr1());
for (i = 0; i < 8; ++i)
kdb_printf("sr%.2ld = %.16lx sr%.2ld = %.16lx\n", (long
int)i, (unsigned long)get_sr(i), (long int)(i+8), (long unsigned int)
get_sr(i+8));
--- linux-2.4.21/include/asm-ppc64/processor.h 2003-12-06
16:29:13.000000000 -0800
+++ linux-myfix/include/asm-ppc64/processor.h 2003-12-06
16:28:56.000000000 -0800
@@ -594,6 +594,8 @@
#define mfasr() ({unsigned long rval; \
asm volatile("mfasr %0" : "=r" (rval)); rval;})
+#define mfsdr1() ({unsigned long rval; \
+ asm volatile("mfsdr1 %0" : "=r" (rval)); rval;})
#ifndef __ASSEMBLY__
extern int have_of;
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic