mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[0.3.x] fixed : issue #13386 ( WinDbg crash: !py <nonexistent_file> )
git-svn-id: https://pykd.svn.codeplex.com/svn@89560 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
fd92d228ff
commit
27d34f5c30
@ -25,10 +25,6 @@ bool PykdExt::isInit() {
|
|||||||
|
|
||||||
extern "C" void initpykd();
|
extern "C" void initpykd();
|
||||||
|
|
||||||
//pykd::DbgOut pykdOut;
|
|
||||||
//pykd::DbgOut pykdErr;
|
|
||||||
//pykd::DbgIn pykdIn;
|
|
||||||
|
|
||||||
|
|
||||||
void PykdExt::setUp()
|
void PykdExt::setUp()
|
||||||
{
|
{
|
||||||
@ -58,11 +54,6 @@ void PykdExt::setUp()
|
|||||||
main_namespace[ key ] = pykd_namespace[ key ];
|
main_namespace[ key ] = pykd_namespace[ key ];
|
||||||
}
|
}
|
||||||
|
|
||||||
//// ïåðåíàïðàâëåíèå ñòàíäàðòíûõ ïîòîêîâ ÂÂ
|
|
||||||
//kdlib::dbgout =&pykdOut;
|
|
||||||
//kdlib::dbgerr = &pykdErr;
|
|
||||||
//kdlib::dbgin = &pykdIn;
|
|
||||||
|
|
||||||
python::object sys = python::import("sys");
|
python::object sys = python::import("sys");
|
||||||
|
|
||||||
sys.attr("stdout") = python::object( pykd::DbgOut() );
|
sys.attr("stdout") = python::object( pykd::DbgOut() );
|
||||||
@ -130,7 +121,7 @@ KDLIB_EXT_COMMAND_METHOD_IMPL(PykdExt, py)
|
|||||||
|
|
||||||
if ( scriptFileName.empty() )
|
if ( scriptFileName.empty() )
|
||||||
{
|
{
|
||||||
pykd::eprintln( L"script file not found" );
|
kdlib::eprintln( L"script file not found" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,10 +237,10 @@ void PykdExt::startConsole()
|
|||||||
|
|
||||||
void PykdExt::printUsage()
|
void PykdExt::printUsage()
|
||||||
{
|
{
|
||||||
pykd::dprintln( L"usage: !py [options] [file]" );
|
kdlib::dprintln( L"usage: !py [options] [file]" );
|
||||||
pykd::dprintln( L"Options:" );
|
kdlib::dprintln( L"Options:" );
|
||||||
pykd::dprintln( L"-g --global : run code in the common namespace" );
|
kdlib::dprintln( L"-g --global : run code in the common namespace" );
|
||||||
pykd::dprintln( L"-l --local : run code in the isolate namespace" );
|
kdlib::dprintln( L"-l --local : run code in the isolate namespace" );
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user