Debuggeri[CDB]: Add breakpoint command.

Report back breakpoints with modules.
This commit is contained in:
Friedemann Kleint
2011-02-02 13:45:40 +01:00
parent acb36acf15
commit 285d216bed
10 changed files with 155 additions and 14 deletions

View File

@@ -45,6 +45,7 @@
WINDBG_EXTENSION_APIS ExtensionApis = {sizeof(WINDBG_EXTENSION_APIS), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const char *ExtensionContext::stopReasonKeyC = "reason";
const char *ExtensionContext::breakPointStopReasonC = "breakpoint";
ExtensionContext::ExtensionContext() :
m_hookedClient(0),
@@ -197,6 +198,17 @@ void ExtensionContext::notifyIdleCommand(CIDebugClient *client)
} else {
str << ",stack=" << stackInfo;
}
// Report breakpoints
const StopReasonMap::const_iterator rit = stopReasons.find(stopReasonKeyC);
if (rit != stopReasons.end() && rit->second == breakPointStopReasonC) {
const std::string breakpoints = gdbmiBreakpoints(exc.control(), exc.symbols(),
false, false, &errorMessage);
if (breakpoints.empty()) {
str << ",breakpointserror=" << gdbmiStringFormat(errorMessage);
} else {
str << ",breakpoints=" << breakpoints;
}
}
str << '}';
reportLong('E', 0, "session_idle", str.str());
}