[!] fixed : issue 8458 ( doubled output in windbg )

git-svn-id: https://pykd.svn.codeplex.com/svn@62116 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2011-03-03 08:27:39 +00:00
parent bb0e8328e3
commit 8ec2d9a02a
3 changed files with 64 additions and 5 deletions

View File

@ -261,6 +261,48 @@ SetupDebugEngine( IDebugClient4 *client, DbgExt *dbgExt )
client->QueryInterface( __uuidof(IDebugSystemObjects2), (void**)&dbgExt->system2 ); client->QueryInterface( __uuidof(IDebugSystemObjects2), (void**)&dbgExt->system2 );
} }
DbgExt::~DbgExt()
{
if ( client )
client->Release();
if ( client4 )
client4->Release();
if ( control )
control->Release();
if ( control4 )
control4->Release();
if ( registers )
registers->Release();
if ( symbols )
symbols->Release();
if ( symbols2 )
symbols2->Release();
if ( symbols3 )
symbols3->Release();
if ( dataSpaces )
dataSpaces->Release();
if ( dataSpaces4 )
dataSpaces4->Release();
if ( advanced2 )
advanced2->Release();
if ( system )
system->Release();
if ( system2 )
system2->Release();
}
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
HRESULT HRESULT
@ -273,7 +315,7 @@ py( PDEBUG_CLIENT4 client, PCSTR args)
try { try {
DbgExt ext = { 0 }; DbgExt ext;
SetupDebugEngine( client, &ext ); SetupDebugEngine( client, &ext );
dbgExt = &ext; dbgExt = &ext;
@ -389,8 +431,7 @@ pycmd( PDEBUG_CLIENT4 client, PCSTR args )
{ {
try { try {
DbgExt ext;
DbgExt ext = { 0 };
SetupDebugEngine( client, &ext ); SetupDebugEngine( client, &ext );
dbgExt = &ext; dbgExt = &ext;
@ -491,7 +532,7 @@ HRESULT
CALLBACK CALLBACK
pythonpath( PDEBUG_CLIENT4 client, PCSTR args ) pythonpath( PDEBUG_CLIENT4 client, PCSTR args )
{ {
DbgExt ext = { 0 }; DbgExt ext;
SetupDebugEngine( client, &ext ); SetupDebugEngine( client, &ext );
dbgExt = &ext; dbgExt = &ext;

View File

@ -24,6 +24,24 @@ struct DbgExt {
IDebugSystemObjects *system; IDebugSystemObjects *system;
IDebugSystemObjects2 *system2; IDebugSystemObjects2 *system2;
DbgExt() :
client( NULL ),
client4( NULL ),
control( NULL ),
control4( NULL ),
registers( NULL ),
symbols( NULL ),
symbols2( NULL ),
symbols3( NULL ),
dataSpaces( NULL ),
dataSpaces4( NULL ),
advanced2( NULL ),
system( NULL ),
system2( NULL )
{}
~DbgExt();
}; };
extern DbgExt *dbgExt; extern DbgExt *dbgExt;

View File

@ -4,7 +4,7 @@
#include "dbgeventcb.h" #include "dbgeventcb.h"
#include "dbgsession.h" #include "dbgsession.h"
DbgExt dbgGlobalSession = { 0 }; DbgExt dbgGlobalSession;
bool dbgSessionStarted = false; bool dbgSessionStarted = false;