Re: [Linux-ia64] Script for decoding PSR in oopses

From: Peter Chubb <peter_at_chubb.wattle.id.au>
Date: 2003-01-31 14:31:43
>>>>> "David" == David Mosberger <davidm@napali.hpl.hp.com> writes:

>>>>> On Fri, 31 Jan 2003 13:10:58 +1100, Keith Owens <kaos@ocs.com.au> said:
Keith> On Fri, 31 Jan 2003 12:46:00 +1100, Peter Chubb
Keith> <peter@chubb.wattle.id.au> wrote:

>>> I find trying to work out what the PSR is after an oops to be a
>>> bit of a pain, so here's an awk script to do it for you.

>>> Usage is decode_psr hex_number if you save the script as
>>> decode_psr.

Keith> Below are Perl ia64_psr and ia64_isr.  Run as echo hex_number |
Keith> ia64_[pi]sr

David> OK, now where is the Python version?? ;-))

Who cares?  Once you've got a script you can use it.  

BTW, there's a bug in the AWK script:
--- decode_psr-old 2003-01-31 13:33:51.000000000 +1100
+++ decode_psr	   2003-01-31 13:11:13.000000000 +1100
@@ -77,7 +77,7 @@
 	psr = int(psr / 2)
 	if (psr % 2 == 1)
 	   decoded = decoded "rt "
-	psr = int(psr / 16)
+	psr = int(psr / 32)
  
 	cpl = psr % 4;
 	decoded = decoded "cpl=" cpl " "
Received on Thu Jan 30 19:31:57 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST