aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerstreamops.cpp
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2010-11-10 16:33:11 +0100
committerhjk <qtc-committer@nokia.com>2010-11-15 12:09:25 +0100
commit8ae541b36fc342c8f02c4b674a68a21c0ed8034d (patch)
treea0e0de05d986987110aec1783d213dfb16337567 /src/plugins/debugger/debuggerstreamops.cpp
parent33bae0d7845e546c019d9bda3af44c3411ebcacb (diff)
debugger: Refactor breakpoint handling.
The breakpoints are now (fairly) tightly guarded by the BreakpointHandler. Engines and Views are only supposed to refer to them by id. They also have individual states now. The breakpoint data is split into a "user requested" "fixed" part in BreakpointData and the engines' acknowledged data in a new struct BreakpointResponse. TODO: Move m_state and m_engine members to BreakpointResponse. Fix regressions in the marker handling.
Diffstat (limited to 'src/plugins/debugger/debuggerstreamops.cpp')
-rw-r--r--src/plugins/debugger/debuggerstreamops.cpp56
1 files changed, 32 insertions, 24 deletions
diff --git a/src/plugins/debugger/debuggerstreamops.cpp b/src/plugins/debugger/debuggerstreamops.cpp
index aea66f5a6b..024560d5d1 100644
--- a/src/plugins/debugger/debuggerstreamops.cpp
+++ b/src/plugins/debugger/debuggerstreamops.cpp
@@ -134,56 +134,64 @@ QDataStream &operator>>(QDataStream &stream, StackFrames &frames)
return stream;
}
-QDataStream &operator<<(QDataStream &stream, const BreakpointData &s)
+QDataStream &operator<<(QDataStream &stream, const BreakpointResponse &s)
{
- stream << s.fileName;
- stream << s.condition;
- stream << (quint64)s.ignoreCount;
- stream << (quint64)s.lineNumber;
- stream << s.address;
- stream << s.funcName;
- stream << s.useFullPath;
-
stream << s.bpNumber;
stream << s.bpCondition;
stream << s.bpIgnoreCount;
stream << s.bpFileName;
stream << s.bpFullName;
stream << s.bpLineNumber;
- stream << s.bpCorrectedLineNumber;
+ //stream << s.bpCorrectedLineNumber;
stream << s.bpThreadSpec;
stream << s.bpFuncName;
stream << s.bpAddress;
-
return stream;
}
-QDataStream &operator>>(QDataStream &stream, BreakpointData &s)
+QDataStream &operator>>(QDataStream &stream, BreakpointResponse &s)
{
- quint64 t;
- stream >> s.fileName;
- stream >> s.condition;
- stream >> t;
- s.ignoreCount = t;
- stream >> t;
- s.lineNumber = t;
- stream >> s.address;
- stream >> s.funcName;
- stream >> s.useFullPath;
-
stream >> s.bpNumber;
stream >> s.bpCondition;
stream >> s.bpIgnoreCount;
stream >> s.bpFileName;
stream >> s.bpFullName;
stream >> s.bpLineNumber;
- stream >> s.bpCorrectedLineNumber;
+ //stream >> s.bpCorrectedLineNumber;
stream >> s.bpThreadSpec;
stream >> s.bpFuncName;
stream >> s.bpAddress;
return stream;
}
+QDataStream &operator<<(QDataStream &stream, const BreakpointData &s)
+{
+ stream << s.fileName();
+ stream << s.condition();
+ stream << quint64(s.ignoreCount());
+ stream << quint64(s.lineNumber());
+ stream << quint64(s.address());
+ stream << s.functionName();
+ stream << s.useFullPath();
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, BreakpointData &s)
+{
+ quint64 t;
+ QString str;
+ QByteArray ba;
+ bool b;
+ stream >> str; s.setFileName(str);
+ stream >> ba; s.setCondition(ba);
+ stream >> t; s.setIgnoreCount(t);
+ stream >> t; s.setLineNumber(t);
+ stream >> t; s.setAddress(t);
+ stream >> str; s.setFunctionName(str);
+ stream >> b; s.setUseFullPath(b);
+ return stream;
+}
+
QDataStream &operator<<(QDataStream &stream, const WatchData &wd)
{
stream << wd.id;