Commit b2849c30 authored by Arvid Ephraim Picciani's avatar Arvid Ephraim Picciani
Browse files

Adapt IpcEngine to breakpoint handling changes

parent 9be36be9
......@@ -274,27 +274,31 @@ void IPCEngineGuest::rpcCallback(quint64 f, QByteArray payload)
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
BreakpointParameters d;
s >> id;
s >> d;
addBreakpoint(d);
addBreakpoint(id, d);
}
break;
case IPCEngineHost::RemoveBreakpoint:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
quint64 token;
s >> token;
removeBreakpoint(token);
BreakpointId id;
s >> id;
removeBreakpoint(id);
}
break;
case IPCEngineHost::ChangeBreakpoint:
{
QDataStream s(payload);
SET_NATIVE_BYTE_ORDER(s);
BreakpointId id;
BreakpointParameters d;
s >> id;
s >> d;
changeBreakpoint(d);
changeBreakpoint(id, d);
}
break;
case IPCEngineHost::RequestUpdateWatchData:
......
......@@ -74,9 +74,9 @@ public:
virtual void activateFrame(qint64 token) = 0;
virtual void selectThread(qint64 token) = 0;
virtual void disassemble(quint64 pc) = 0;
virtual void addBreakpoint(const BreakpointParameters &bp) = 0;
virtual void removeBreakpoint(quint64 id) = 0;
virtual void changeBreakpoint(const BreakpointParameters &bp) = 0;
virtual void addBreakpoint(BreakpointId id, const BreakpointParameters &bp) = 0;
virtual void removeBreakpoint(BreakpointId id) = 0;
virtual void changeBreakpoint(BreakpointId id, const BreakpointParameters &bp) = 0;
virtual void requestUpdateWatchData(const WatchData &data,
const WatchUpdateFlags & flags = WatchUpdateFlags()) = 0;
......
......@@ -241,20 +241,22 @@ void IPCEngineHost::fetchDisassembler(DisassemblerViewAgent *v)
rpcCall(Disassemble, p);
}
void IPCEngineHost::addBreakpoint(const BreakpointParameters &bp)
void IPCEngineHost::insertBreakpoint(BreakpointId id)
{
breakHandler()->notifyBreakpointInsertProceeding(id);
QByteArray p;
{
QDataStream s(&p, QIODevice::WriteOnly);
SET_NATIVE_BYTE_ORDER(s);
s << bp;
s << id;
s << breakHandler()->breakpointData(id);
}
rpcCall(AddBreakpoint, p);
}
void IPCEngineHost::removeBreakpoint(quint64 id)
void IPCEngineHost::removeBreakpoint(BreakpointId id)
{
breakHandler()->notifyBreakpointRemoveProceeding(id);
QByteArray p;
{
QDataStream s(&p, QIODevice::WriteOnly);
......@@ -264,13 +266,15 @@ void IPCEngineHost::removeBreakpoint(quint64 id)
rpcCall(RemoveBreakpoint, p);
}
void IPCEngineHost::changeBreakpoint(const BreakpointParameters &bp)
void IPCEngineHost::changeBreakpoint(BreakpointId id)
{
breakHandler()->notifyBreakpointChangeProceeding(id);
QByteArray p;
{
QDataStream s(&p, QIODevice::WriteOnly);
SET_NATIVE_BYTE_ORDER(s);
s << bp;
s << id;
s << breakHandler()->breakpointData(id);
}
rpcCall(RemoveBreakpoint, p);
}
......
......@@ -104,9 +104,9 @@ public:
void activateFrame(int index);
void selectThread(int index);
void fetchDisassembler(DisassemblerViewAgent *);
void addBreakpoint(const BreakpointParameters &bp);
void removeBreakpoint(quint64 id);
void changeBreakpoint(const BreakpointParameters &bp);
void insertBreakpoint(BreakpointId id);
void removeBreakpoint(BreakpointId id);
void changeBreakpoint(BreakpointId id);
void updateWatchData(const WatchData &data,
const WatchUpdateFlags &flags = WatchUpdateFlags());
......
Supports Markdown
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