Commit adba4c95 authored by hjk's avatar hjk
Browse files

debugger: remove breakpoint notification indirection through the engine

parent 4e1452fd
......@@ -676,6 +676,18 @@ void BreakHandler::notifyBreakpointReleased(BreakpointId id)
layoutChanged();
}
void BreakHandler::notifyBreakpointAdjusted(BreakpointId id,
const BreakpointParameters &data)
{
QTC_ASSERT(state(id) == BreakpointInserted, /**/);
Iterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return);
it->data = data;
if (it->needsChange())
setState(id, BreakpointChangeRequested);
}
void BreakHandler::ackCondition(BreakpointId id)
{
Iterator it = m_storage.find(id);
......
......@@ -143,6 +143,8 @@ public:
void notifyBreakpointRemoveOk(BreakpointId id);
void notifyBreakpointRemoveFailed(BreakpointId id);
void notifyBreakpointReleased(BreakpointId id);
void notifyBreakpointAdjusted(BreakpointId id,
const BreakpointParameters &data);
private:
public:
......
......@@ -1280,53 +1280,16 @@ void DebuggerEngine::insertBreakpoint(BreakpointId)
QTC_ASSERT(false, /**/);
}
void DebuggerEngine::notifyBreakpointInsertOk(BreakpointId id)
{
breakHandler()->notifyBreakpointInsertOk(id);
}
void DebuggerEngine::notifyBreakpointInsertFailed(BreakpointId id)
{
breakHandler()->notifyBreakpointInsertFailed(id);
}
void DebuggerEngine::removeBreakpoint(BreakpointId)
{
QTC_ASSERT(false, /**/);
}
void DebuggerEngine::notifyBreakpointRemoveOk(BreakpointId id)
{
breakHandler()->notifyBreakpointRemoveOk(id);
}
void DebuggerEngine::notifyBreakpointRemoveFailed(BreakpointId id)
{
breakHandler()->notifyBreakpointRemoveFailed(id);
}
void DebuggerEngine::changeBreakpoint(BreakpointId)
{
QTC_ASSERT(false, /**/);
}
void DebuggerEngine::notifyBreakpointChangeOk(BreakpointId id)
{
breakHandler()->notifyBreakpointChangeOk(id);
}
void DebuggerEngine::notifyBreakpointChangeFailed(BreakpointId id)
{
breakHandler()->notifyBreakpointChangeFailed(id);
}
void DebuggerEngine::notifyBreakpointAdjusted(BreakpointId id,
const BreakpointParameters &data)
{
QTC_ASSERT(false, /* FIXME */);
breakHandler()->setBreakpointData(id, data);
}
void DebuggerEngine::selectThread(int)
{
}
......
......@@ -187,16 +187,8 @@ public:
virtual void attemptBreakpointSynchronization();
virtual bool acceptsBreakpoint(BreakpointId id) const; // FIXME: make pure
virtual void insertBreakpoint(BreakpointId id); // FIXME: make pure
virtual void notifyBreakpointInsertOk(BreakpointId id);
virtual void notifyBreakpointInsertFailed(BreakpointId id);
virtual void removeBreakpoint(BreakpointId id); // FIXME: make pure
virtual void notifyBreakpointRemoveOk(BreakpointId id);
virtual void notifyBreakpointRemoveFailed(BreakpointId id);
virtual void changeBreakpoint(BreakpointId id); // FIXME: make pure
virtual void notifyBreakpointChangeOk(BreakpointId id);
virtual void notifyBreakpointChangeFailed(BreakpointId id);
virtual void notifyBreakpointAdjusted(BreakpointId id,
const Internal::BreakpointParameters &data);
virtual void assignValueInDebugger(const Internal::WatchData *data,
const QString &expr, const QVariant &value);
......
......@@ -290,6 +290,7 @@ void IPCEngineHost::updateWatchData(const WatchData &data,
void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
{
BreakHandler *handler;
switch (f) {
default:
showMessage(QLatin1String("IPC Error: unhandled id in guest to host call"));
......@@ -475,7 +476,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
s >> id;
notifyBreakpointInsertOk(id);
handler->notifyBreakpointInsertOk(id);
}
case IPCEngineGuest::NotifyAddBreakpointFailed:
{
......@@ -483,7 +484,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
s >> id;
notifyBreakpointInsertFailed(id);
handler->notifyBreakpointInsertFailed(id);
}
case IPCEngineGuest::NotifyRemoveBreakpointOk:
{
......@@ -491,7 +492,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
s >> id;
notifyBreakpointRemoveOk(id);
handler->notifyBreakpointRemoveOk(id);
}
case IPCEngineGuest::NotifyRemoveBreakpointFailed:
{
......@@ -499,7 +500,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
s >> id;
notifyBreakpointRemoveFailed(id);
handler->notifyBreakpointRemoveFailed(id);
}
case IPCEngineGuest::NotifyChangeBreakpointOk:
{
......@@ -507,7 +508,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
s >> id;
notifyBreakpointChangeOk(id);
handler->notifyBreakpointChangeOk(id);
}
case IPCEngineGuest::NotifyChangeBreakpointFailed:
{
......@@ -515,7 +516,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
s >> id;
notifyBreakpointChangeFailed(id);
handler->notifyBreakpointChangeFailed(id);
}
case IPCEngineGuest::NotifyBreakpointAdjusted:
{
......@@ -524,7 +525,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
BreakpointId id;
BreakpointParameters d;
s >> id >> d;
notifyBreakpointAdjusted(id, d);
handler->notifyBreakpointAdjusted(id, d);
}
}
}
......
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