Quantcast
Channel: Python extension for WinDbg
Viewing all articles
Browse latest Browse all 1625

Commented Unassigned: [0.3.x] getCurrentProcessId() always returns 0 [13716]

$
0
0
I am noticing that getCurrentProcessId() seems to always return 0 for 0.3.x versions. I have tested this on a WinXP 32bit and Win7 64bit machine. It appears to be an issue going back to build 0.3.5. Here's what I'm noticing:

```
0:000> !py
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import pykd
>>> pykd.getCurrentProcessId()
0
```

It appears the difference is:

0.2.x:
```
hres = g_dbgEng->system->GetCurrentProcessSystemId( &pid );
```

0.3.x:
```
hres = g_dbgMgr->system->GetCurrentProcessId( &id );
```

Not sure if that difference is causing my issue. There's also a very good chance I could be doing something wrong :)
Comments: ** Comment from web user: tdlgrice **

Thanks for the explanation ussrhero. Makes a lot of sense, didn't realize that pykd supports multiple process debugging. Thanks again!


Viewing all articles
Browse latest Browse all 1625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>