>>> print(loadExt("C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\sos.dll"))
60326272
>>> stat = callExt(60326272, "dumpheap", "-stat")
...
000007feee3c5b80 1797 261624 System.Object[]
000007feec6d9a78 22922 550128 System.Windows.Forms.Control+MultithreadSafeCallScope
Total 63391 objects
>>> print(stat)
...
000007fef4884650 1 56 PaintDotNet.Metadata
000007fef10a17d0 1 56 PaintDotNet.SystemLayer.Typography.Gdi.GdiSystemF
>>> removeExt(60326272)
>>> exit()
As you can see, the output of callExt() ends different that the output of print(stat). I copied and pasted the complete output of print() to a text editor and it's length is 16383.
Am I doing somthing wrong, is it a limitation of Python or a bug in Pykd?
Version info:
> PyKd 0.2.0.26 x64
> Python 2.7.3
> WinDbg 9.2.9200-16384 x64
Comments: ** Comment from web user: kernelnet **
60326272
>>> stat = callExt(60326272, "dumpheap", "-stat")
...
000007feee3c5b80 1797 261624 System.Object[]
000007feec6d9a78 22922 550128 System.Windows.Forms.Control+MultithreadSafeCallScope
Total 63391 objects
>>> print(stat)
...
000007fef4884650 1 56 PaintDotNet.Metadata
000007fef10a17d0 1 56 PaintDotNet.SystemLayer.Typography.Gdi.GdiSystemF
>>> removeExt(60326272)
>>> exit()
As you can see, the output of callExt() ends different that the output of print(stat). I copied and pasted the complete output of print() to a text editor and it's length is 16383.
Am I doing somthing wrong, is it a limitation of Python or a bug in Pykd?
Version info:
> PyKd 0.2.0.26 x64
> Python 2.7.3
> WinDbg 9.2.9200-16384 x64
Comments: ** Comment from web user: kernelnet **
It is a limit of the Debug Engine. It can not output a big string. Some version of the pykd have workaround and split a big buffer to output by parts. But it leads to another bug: if string has DML tags they can not be handled properly.
So, I don't known how it should be done right :)
May be, the exception should be thrown? So you would notice what something is going wrong and rewrite your script:
```
stat = callExt(60326272, "dumpheap", "-stat")
map(dprintln, stat.splitlines() ) # I suppose the single line does not exceed a output limit
```