diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 3356f537648413dedf754ab310a1f83b38bff775..6bfce8ea939c22d731e8f46c93532b27fd81b716 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -83,6 +83,12 @@ QIcon BreakHandler::watchpointIcon() return icon; } +QIcon BreakHandler::tracepointIcon() +{ + static QIcon icon(_(":/debugger/images/tracepoint.png")); + return icon; +} + QIcon BreakHandler::emptyIcon() { static QIcon icon(_(":/debugger/images/breakpoint_pending_16.png")); @@ -1064,6 +1070,8 @@ QIcon BreakHandler::BreakpointItem::icon() const { // FIXME: This seems to be called on each cursor blink as soon as the // cursor is near a line with a breakpoint marker (+/- 2 lines or so). + if (data.isTracepoint()) + return BreakHandler::tracepointIcon(); if (data.type == Watchpoint) return BreakHandler::watchpointIcon(); if (!data.enabled) diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h index 9e8c24bb0931f5fab32e39b6ad5077db69817487..d8395992802f3d1818296a9362f12411a63d1701 100644 --- a/src/plugins/debugger/breakhandler.h +++ b/src/plugins/debugger/breakhandler.h @@ -89,6 +89,7 @@ public: static QIcon pendingBreakpointIcon(); static QIcon emptyIcon(); static QIcon watchpointIcon(); + static QIcon tracepointIcon(); BreakpointId findBreakpointByFileAndLine(const QString &fileName, int lineNumber, bool useMarkerPosition = true); diff --git a/src/plugins/debugger/breakpoint.cpp b/src/plugins/debugger/breakpoint.cpp index 9c4d56b9e9089b1e91e641c4d2a01c16844fd4d2..3af66d56deac76cc3f70b143f79dc37398c7e208 100644 --- a/src/plugins/debugger/breakpoint.cpp +++ b/src/plugins/debugger/breakpoint.cpp @@ -43,7 +43,8 @@ namespace Internal { BreakpointParameters::BreakpointParameters(BreakpointType t) : type(t), enabled(true), useFullPath(false), - ignoreCount(0), lineNumber(0), address(0), threadSpec(-1) + ignoreCount(0), lineNumber(0), address(0), threadSpec(-1), + tracepoint(false) {} bool BreakpointParameters::equals(const BreakpointParameters &rhs) const @@ -57,7 +58,8 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const && lineNumber == rhs.lineNumber && address == rhs.address && threadSpec == rhs.threadSpec - && functionName == rhs.functionName; + && functionName == rhs.functionName + && tracepoint == rhs.tracepoint; } bool BreakpointParameters::conditionsMatch(const QByteArray &other) const @@ -81,6 +83,7 @@ QString BreakpointParameters::toString() const ts << " Address: " << address; ts << " FunctionName: " << functionName; ts << " UseFullPath: " << useFullPath; + ts << " Tracepoint: " << tracepoint; return result; } diff --git a/src/plugins/debugger/breakpoint.h b/src/plugins/debugger/breakpoint.h index e4d873cb02fd0acc41a98769c6ee8edf48b70a64..d9c0386b248feba49d929b5e7fa89100eecbebbd 100644 --- a/src/plugins/debugger/breakpoint.h +++ b/src/plugins/debugger/breakpoint.h @@ -77,7 +77,9 @@ public: bool equals(const BreakpointParameters &rhs) const; bool conditionsMatch(const QByteArray &other) const; bool isWatchpoint() const { return type == Watchpoint; } - bool isBreakpoint() const { return type != Watchpoint; } // Enough for now. + // Enough for now. + bool isBreakpoint() const { return type != Watchpoint && !tracepoint; } + bool isTracepoint() const { return tracepoint; } QString toString() const; bool operator==(const BreakpointParameters &p) const { return equals(p); } @@ -93,6 +95,7 @@ public: quint64 address; // Address for watchpoints. int threadSpec; // Thread specification. QString functionName; + bool tracepoint; }; diff --git a/src/plugins/debugger/breakpoint.ui b/src/plugins/debugger/breakpoint.ui index c1c63bd82bf34e2f2719411558d40db6d625410b..be26fbd8f54add28c9b9458c04dfba4207046d70 100644 --- a/src/plugins/debugger/breakpoint.ui +++ b/src/plugins/debugger/breakpoint.ui @@ -124,6 +124,20 @@ <item row="9" column="1"> <widget class="QLineEdit" name="lineEditThreadSpec"/> </item> + <item row="10" column="1"> + <widget class="QCheckBox" name="checkBoxTracepoint"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="10" column="0"> + <widget class="QLabel" name="labelTracepoint"> + <property name="text"> + <string>Tracepoint only:</string> + </property> + </widget> + </item> </layout> </item> <item> diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index f9c8f851fab429c40c3b2a1302cc233787c12821..a8f276ed99392229f87fdd578eb012001243d28a 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -196,6 +196,7 @@ void BreakpointDialog::clearParts(unsigned partsMask) void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data) const { data->enabled = m_ui.checkBoxEnabled->isChecked(); + data->tracepoint = m_ui.checkBoxTracepoint->isChecked(); if (partsMask & FileAndLinePart) { data->lineNumber = m_ui.lineEditLineNumber->text().toInt(); @@ -212,11 +213,12 @@ void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data) void BreakpointDialog::setParts(unsigned mask, const BreakpointParameters &data) { m_ui.checkBoxEnabled->setChecked(data.enabled); + m_ui.checkBoxUseFullPath->setChecked(data.useFullPath); if (mask & FileAndLinePart) { m_ui.pathChooserFileName->setPath(data.fileName); m_ui.lineEditLineNumber->setText(QString::number(data.lineNumber)); - m_ui.checkBoxUseFullPath->setChecked(data.useFullPath); + m_ui.checkBoxTracepoint->setChecked(data.tracepoint); } if (mask & FunctionPart) diff --git a/src/plugins/debugger/debugger.qrc b/src/plugins/debugger/debugger.qrc index 7688ef39a42c1a81211367136b55d49d941e6c3e..c5aa9cc39ef89721871a13242fd724652525ea02 100644 --- a/src/plugins/debugger/debugger.qrc +++ b/src/plugins/debugger/debugger.qrc @@ -19,6 +19,7 @@ <file>images/debugger_stop.png</file> <file>images/debugger_stop_small.png</file> <file>images/watchpoint.png</file> + <file>images/tracepoint.png</file> <file>images/breakpoint_16.png</file> <file>images/breakpoint_24.png</file> <file>images/breakpoint_disabled_16.png</file> diff --git a/src/plugins/debugger/images/tracepoint.png b/src/plugins/debugger/images/tracepoint.png new file mode 100644 index 0000000000000000000000000000000000000000..f08d216bf399ff0e67423516af368f5cf8585b95 Binary files /dev/null and b/src/plugins/debugger/images/tracepoint.png differ