From e5f6c91be84d784c26e9704c802dca2670085f52 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Mon, 14 Jan 2013 11:33:14 +0000 Subject: [PATCH] =?UTF-8?q?[0.2.x]=20fixed:=20snippets=20cr0.py=20and=20?= =?UTF-8?q?=D1=81r4.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pykd.svn.codeplex.com/svn@82277 9b283d60-5439-405e-af05-b73fd8c4d996 --- snippets/cr0.py | 2 +- snippets/cr4.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/cr0.py b/snippets/cr0.py index 1477ce0..382c10f 100644 --- a/snippets/cr0.py +++ b/snippets/cr0.py @@ -12,7 +12,7 @@ def cr0( value = 0 ): dprintln( "CR0: %x (" % value + "".join( [ ( value & ( 1 << ( 31 - i ) ) ) and "1" or "0" for i in range(0,32) ] ) + ")" ) - for i in range (0, 31): + for i in range (0, 32): bits = { 0 : "PE", 1 : "MP", 2 : "EM", 3 : "TS", 4 : "ET", 5 : "NE", 16 : "WP", 18 : "AM", 29 : "NW", 30 : "CD", 31 : "PG" } if ( ( 1 << ( 31 -i ) ) & value ) and 31-i in bits: dprint( " " + bits[31-i] ) diff --git a/snippets/cr4.py b/snippets/cr4.py index d2f9274..2469bdf 100644 --- a/snippets/cr4.py +++ b/snippets/cr4.py @@ -12,7 +12,7 @@ def cr4( value = 0 ): dprintln( "CR4: %x (" % value + "".join( [ ( value & ( 1 << ( 31 - i ) ) ) and "1" or "0" for i in range(0,32) ] ) + ")" ) - for i in range (0, 31): + for i in range (0, 32): bits = { 0 : "VME", 1 : "PVI", 2 : "TSD", 3 : "DE", 4 : "PSE", 5 : "PAE", 6 : "MCE", 7 : "PGE", 8 : "PCE", 9 : "OSFXSR", 10 : "OSXMMEXCPT", 13 : "VMXE", 14 : "SMXE", 17 : "PCIDE", 18 : "OSXSAVE" } if ( ( 1 << ( 31 -i ) ) & value ) and 31-i in bits: dprint( " " + bits[31-i] )