When calling a python script with arguments, like !py path\to\my\script.py arg1 arg2, the arguments arg1 arg2 are not properly forwarded to the script.
My guess it's because the arguments are converted to a std::wstring argw, but the argw variable is immediately afterwards destroyed when the for() scope is left (https://github.com/ivellioscolin/pykd/blob/0.3.4.15_1/pykd/windbgext.cpp#L185), so the pointers inside pythonArgs are invalid in the following PySys_SetArgv call.
When calling a python script with arguments, like
!py path\to\my\script.py arg1 arg2
, the argumentsarg1 arg2
are not properly forwarded to the script. My guess it's because the arguments are converted to astd::wstring argw
, but the argw variable is immediately afterwards destroyed when the for() scope is left (https://github.com/ivellioscolin/pykd/blob/0.3.4.15_1/pykd/windbgext.cpp#L185), so the pointers insidepythonArgs
are invalid in the followingPySys_SetArgv
call.