Commit 744b0ef0 authored by hjk's avatar hjk
Browse files

debugger: fine-tuning change of breakpoint conditions and ignore count

parent 0d4b3ee8
...@@ -2213,6 +2213,14 @@ void GdbEngine::handleBreakList(const GdbMi &table) ...@@ -2213,6 +2213,14 @@ void GdbEngine::handleBreakList(const GdbMi &table)
m_breakListOutdated = false; m_breakListOutdated = false;
} }
void GdbEngine::handleBreakDisable(const GdbResponse &response)
{
BreakHandler *handler = manager()->breakHandler();
if (response.resultClass == GdbResultDone) {
handler->updateMarkers();
}
}
void GdbEngine::handleBreakIgnore(const GdbResponse &response) void GdbEngine::handleBreakIgnore(const GdbResponse &response)
{ {
int index = response.cookie.toInt(); int index = response.cookie.toInt();
...@@ -2421,24 +2429,30 @@ void GdbEngine::attemptBreakpointSynchronization() ...@@ -2421,24 +2429,30 @@ void GdbEngine::attemptBreakpointSynchronization()
} else if (data->bpNumber.toInt()) { } else if (data->bpNumber.toInt()) {
if (data->bpMultiple && data->bpFileName.isEmpty()) { if (data->bpMultiple && data->bpFileName.isEmpty()) {
postCommand("info break " + data->bpNumber, postCommand("info break " + data->bpNumber,
RebuildBreakpointModel, NeedsStop | RebuildBreakpointModel,
CB(handleBreakInfo), data->bpNumber.toInt()); CB(handleBreakInfo), data->bpNumber.toInt());
continue; continue;
} }
// update conditions if needed if (data->condition != data->bpCondition && !data->conditionsMatch()) {
if (data->condition != data->bpCondition && !data->conditionsMatch()) // Update conditions if needed.
postCommand("condition " + data->bpNumber + ' ' + data->condition, postCommand("condition " + data->bpNumber + ' ' + data->condition,
RebuildBreakpointModel, NeedsStop | RebuildBreakpointModel,
CB(handleBreakCondition), index); CB(handleBreakCondition), index);
// update ignorecount if needed }
if (data->ignoreCount != data->bpIgnoreCount) else // Because gdb won't do both changes at a time anyway.
if (data->ignoreCount != data->bpIgnoreCount) {
// Update ignorecount if needed.
postCommand("ignore " + data->bpNumber + ' ' + data->ignoreCount, postCommand("ignore " + data->bpNumber + ' ' + data->ignoreCount,
RebuildBreakpointModel, NeedsStop | RebuildBreakpointModel,
CB(handleBreakIgnore), index); CB(handleBreakIgnore), index);
continue;
}
if (!data->enabled && data->bpEnabled) { if (!data->enabled && data->bpEnabled) {
postCommand("-break-disable " + data->bpNumber, postCommand("-break-disable " + data->bpNumber,
NeedsStop | RebuildBreakpointModel); NeedsStop | RebuildBreakpointModel,
CB(handleBreakInfo));
data->bpEnabled = false; data->bpEnabled = false;
continue;
} }
} }
} }
......
...@@ -337,6 +337,7 @@ private: ////////// View & Data Stuff ////////// ...@@ -337,6 +337,7 @@ private: ////////// View & Data Stuff //////////
void handleBreakList(const GdbResponse &response); void handleBreakList(const GdbResponse &response);
void handleBreakList(const GdbMi &table); void handleBreakList(const GdbMi &table);
void handleBreakIgnore(const GdbResponse &response); void handleBreakIgnore(const GdbResponse &response);
void handleBreakDisable(const GdbResponse &response);
void handleBreakInsert1(const GdbResponse &response); void handleBreakInsert1(const GdbResponse &response);
void handleBreakInsert2(const GdbResponse &response); void handleBreakInsert2(const GdbResponse &response);
void handleBreakCondition(const GdbResponse &response); void handleBreakCondition(const GdbResponse &response);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment