From 52c0e10564612b3b83bd0530c587a8d5badd46cd Mon Sep 17 00:00:00 2001 From: krk Date: Tue, 20 Oct 2015 12:21:41 +0300 Subject: [PATCH] Fix: gcview checks output of DbgEng commands correctly. --- cosos/Extension.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cosos/Extension.cpp b/cosos/Extension.cpp index 321d960..50c4a9d 100644 --- a/cosos/Extension.cpp +++ b/cosos/Extension.cpp @@ -104,9 +104,9 @@ HRESULT EXT_CLASS::Initialize() DebugControl->GetWindbgExtensionApis64(&ExtensionApis); #if _DEBUG - dprintf("COSOS v0.2.1 (%s) - Cousin of Son of Strike (DEBUG build) loaded.\n", __TIMESTAMP__); + dprintf("COSOS v0.2.2 (%s) - Cousin of Son of Strike (DEBUG build) loaded.\n", __TIMESTAMP__); #else - dprintf("COSOS v0.2.1 (%s) - Cousin of Son of Strike loaded.\n", __TIMESTAMP__); + dprintf("COSOS v0.2.2 (%s) - Cousin of Son of Strike loaded.\n", __TIMESTAMP__); #endif DebugControl->Release(); @@ -165,10 +165,15 @@ EXT_COMMAND(gcview, auto addressCommandParser = AddressCommandParser(executor, logger); auto addressCommandOutput = addressCommandParser.execute(); - if (addressCommandOutput.has_ranges()) + if (!addressCommandOutput.has_ranges()) { dprintf("Cannot get addresses.\n"); + DebugClient->SetOutputCallbacks(nullptr); + + DebugControl->Release(); + DebugClient->Release(); + return; } @@ -182,10 +187,15 @@ EXT_COMMAND(gcview, auto eeheapParser = EEHeapCommandParser(executor, logger); auto eeheapOutput = eeheapParser.execute(); - if (eeheapOutput.has_ranges()) + if (!eeheapOutput.has_ranges()) { dprintf("Cannot get eeheap information.\n"); + DebugClient->SetOutputCallbacks(nullptr); + + DebugControl->Release(); + DebugClient->Release(); + return; }