Commit caa9a992 authored by hjk's avatar hjk
Browse files

debugger: stream line acknowledgement of breakpoint property changes

parent 1a6737cb
......@@ -716,30 +716,6 @@ void BreakHandler::notifyBreakpointAdjusted(BreakpointId id,
}
void BreakHandler::ackCondition(BreakpointId id)
{
Iterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return);
it->response.condition = it->data.condition;
updateMarker(id);
}
void BreakHandler::ackIgnoreCount(BreakpointId id)
{
Iterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return);
it->response.ignoreCount = it->data.ignoreCount;
updateMarker(id);
}
void BreakHandler::ackEnabled(BreakpointId id)
{
Iterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return);
it->response.enabled = it->data.enabled;
updateMarker(id);
}
void BreakHandler::removeBreakpoint(BreakpointId id)
{
Iterator it = m_storage.find(id);
......
......@@ -127,11 +127,6 @@ public:
const BreakpointResponse &response(BreakpointId id) const;
void setResponse(BreakpointId id, const BreakpointResponse &data);
// Incorporate debugger feedback. No synchronization request needed.
void ackCondition(BreakpointId id);
void ackIgnoreCount(BreakpointId id);
void ackEnabled(BreakpointId id);
// State transitions.
void notifyBreakpointInsertProceeding(BreakpointId id);
void notifyBreakpointInsertOk(BreakpointId id);
......
......@@ -2299,10 +2299,12 @@ void GdbEngine::handleBreakList(const GdbMi &table)
void GdbEngine::handleBreakDisable(const GdbResponse &response)
{
QTC_ASSERT(response.resultClass == GdbResultDone, /**/)
const BreakpointId id =response.cookie.toInt();
const BreakpointId id = response.cookie.toInt();
// This should only be the requested state.
QTC_ASSERT(!breakHandler()->isEnabled(id), /* Prevent later recursion */);
breakHandler()->ackEnabled(id);
BreakpointResponse br = breakHandler()->response(id);
br.enabled = false;
breakHandler()->setResponse(id, br);
}
void GdbEngine::handleBreakEnable(const GdbResponse &response)
......@@ -2311,7 +2313,9 @@ void GdbEngine::handleBreakEnable(const GdbResponse &response)
const BreakpointId id = response.cookie.toInt();
// This should only be the requested state.
QTC_ASSERT(breakHandler()->isEnabled(id), /* Prevent later recursion */);
breakHandler()->ackEnabled(id);
BreakpointResponse br = breakHandler()->response(id);
br.enabled = true;
breakHandler()->setResponse(id, br);
}
void GdbEngine::handleBreakIgnore(const GdbResponse &response)
......@@ -2328,15 +2332,15 @@ void GdbEngine::handleBreakIgnore(const GdbResponse &response)
// gdb 6.3 does not produce any console output
QTC_ASSERT(response.resultClass == GdbResultDone, /**/)
QString msg = _(response.data.findChild("consolestreamoutput").data());
BreakpointId id(response.cookie.toInt());
BreakpointResponse br = breakHandler()->response(id);
//if (msg.contains(__("Will stop next time breakpoint")))
// data->bpIgnoreCount = _("0");
// response.ignoreCount = _("0");
//else if (msg.contains(__("Will ignore next")))
// data->bpIgnoreCount = data->ignoreCount;
// response.ignoreCount = data->ignoreCount;
// FIXME: this assumes it is doing the right thing...
BreakpointId id(response.cookie.toInt());
// This should only be the "wish" state.
QTC_ASSERT(!breakHandler()->isEnabled(id), /* prevent later recursion */);
breakHandler()->ackEnabled(id);
br.ignoreCount = breakHandler()->ignoreCount(id);
breakHandler()->setResponse(id, br);
}
void GdbEngine::handleBreakCondition(const GdbResponse &response)
......@@ -2349,7 +2353,9 @@ void GdbEngine::handleBreakCondition(const GdbResponse &response)
// QByteArray msg = response.data.findChild("msg").data();
// if (1 || msg.startsWith("Error parsing breakpoint condition. "
// " Will try again when we hit the breakpoint.")) {
breakHandler()->ackCondition(id);
BreakpointResponse br = breakHandler()->response(id);
br.condition = breakHandler()->condition(id);
breakHandler()->setResponse(id, br);
}
void GdbEngine::extractDataFromInfoBreak(const QString &output, BreakpointId id)
......
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