summaryrefslogtreecommitdiff
path: root/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-01-18 15:28:55 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-01-18 15:34:58 +0100
commitcd3b6c7b234712487ebe80f3db16fc5041acd936 (patch)
treedaa9a2ac2820c3347cc409f84b382daa4777b451 /src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
parentf0a54abf6b4bbd71bd9a5148f3ebabda6df438fa (diff)
downloadqt-creator-cd3b6c7b234712487ebe80f3db16fc5041acd936.tar.gz
Debugger[CDB]: Switch to thread 0 after DebugBreak().
Do not show artificial thread that is created by DebugBreak() as it causes a switch to disassembly. Forcibly discard the symbol group for each locals update as the lazy creation mechanism does not trigger on thread changes back and forth involving assembly, which causes the symbol group to become stale.
Diffstat (limited to 'src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp')
-rw-r--r--src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
index ef3fd00ec0..785efdcc8e 100644
--- a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
+++ b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
@@ -125,6 +125,7 @@ static const CommandDescription commandDescriptions[] = {
"-u uninitialized-list Comma-separated list of uninitialized inames\n"
"-I formatmap map of 'hex-encoded-iname=typecode'\n"
"-T formatmap map of 'hex-encoded-type-name=typecode'\n"
+ "-D Discard existing symbol group\n"
"-W Synchronize watch items (-w)\n"
"-w iname expression Watch item"},
{"watches",
@@ -403,6 +404,7 @@ static std::string commmandLocals(ExtensionCommandContext &commandExtCtx,PCSTR a
StringVector uninitializedInames;
InameExpressionMap watcherInameExpressionMap;
bool watchSynchronization = false;
+ bool discardSymbolGroup = false;
// Parse away options
for (bool optionLeft = true; optionLeft && !tokens.empty(); ) {
switch (parameters.parseOption(&tokens)) {
@@ -446,6 +448,9 @@ static std::string commmandLocals(ExtensionCommandContext &commandExtCtx,PCSTR a
case 'W':
watchSynchronization = true;
break;
+ case 'D':
+ discardSymbolGroup = true;
+ break;
} // case option
}
break;
@@ -466,6 +471,8 @@ static std::string commmandLocals(ExtensionCommandContext &commandExtCtx,PCSTR a
iname = tokens.front();
const SymbolGroupValueContext dumpContext(commandExtCtx.dataSpaces(), commandExtCtx.symbols());
+ if (discardSymbolGroup)
+ extCtx.discardSymbolGroup();
SymbolGroup * const symGroup = extCtx.symbolGroup(commandExtCtx.symbols(), commandExtCtx.threadId(), frame, errorMessage);
if (!symGroup)
return std::string();