pykd 0.3 - Receiving error when trying to set registers

Sep 25, 2015 at 4:09 PM
Hello again,

I am experiencing strange behavior in pykd 0.3.x. I currently have the latest (0.3.0.30) installed. I am running on Win7 64-bit. I simply start windbg and open any executable. For reproducing my issue, I used notepad.exe.
0:000> .load pykd
0:000> !py
Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import pykd
>>> pykd.dbgCommand('r rax=1')
>>> pykd.getProcessSystemID()
2284
>>> pykd.dbgCommand('r rax=1')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
DbgException: Call IDebugControl::ExecuteWide failed
HRESULT 0x80040205
>>> quit()
0:000> r rax=1
Last set context:
             ^ Bad register error in 'r rax=1'
Have you guys seen this issue before?
Sep 25, 2015 at 4:40 PM
I also just confirmed that I am seeing the same behavior on WinXP 32-bit for pykd 0.3.0.30.
Sep 26, 2015 at 3:29 PM
Also seeing something similar when using pykd.getCurrentThread():
0:000> ~
.  0  Id: 580.758 Suspend: 1 Teb: 000007ff`fffde000 Unfrozen
0:000> .load pykd
0:000> !py
Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import pykd
>>> pykd.dbgCommand('r rax=1')
>>> hex(pykd.getCurrentThread())
'0x7fffffde000L'
>>> pykd.dbgCommand('r rax=1')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
DbgException: Call IDebugControl::ExecuteWide failed
HRESULT 0x80040205
>>> quit()
0:000> ~
.  0  Id: 580.758 Suspend: 1 Teb: 000007ff`fffde000 Unfrozen
0:000> r rax=1
Last set context:
             ^ Bad register error in 'r rax=1'
Sep 27, 2015 at 9:23 PM
Bug confirmed.
It is a regression after fix for issue #13499

I've opened an new issue #13725
Oct 2, 2015 at 11:32 AM
Fixed with 0.3.0.31, please try.
Oct 2, 2015 at 5:48 PM
Just tested out 0.3.0.31, and it fixed the issue for me :)

Thanks!