Skip to content

Can't use arguments in !py script command #1

@ssbssa

Description

@ssbssa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions