forked from qt-creator/qt-creator
debugger: start with some infrastructure for tracepoint support
This commit is contained in:
@@ -83,6 +83,12 @@ QIcon BreakHandler::watchpointIcon()
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QIcon BreakHandler::tracepointIcon()
|
||||||
|
{
|
||||||
|
static QIcon icon(_(":/debugger/images/tracepoint.png"));
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
QIcon BreakHandler::emptyIcon()
|
QIcon BreakHandler::emptyIcon()
|
||||||
{
|
{
|
||||||
static QIcon icon(_(":/debugger/images/breakpoint_pending_16.png"));
|
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
|
// 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).
|
// cursor is near a line with a breakpoint marker (+/- 2 lines or so).
|
||||||
|
if (data.isTracepoint())
|
||||||
|
return BreakHandler::tracepointIcon();
|
||||||
if (data.type == Watchpoint)
|
if (data.type == Watchpoint)
|
||||||
return BreakHandler::watchpointIcon();
|
return BreakHandler::watchpointIcon();
|
||||||
if (!data.enabled)
|
if (!data.enabled)
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public:
|
|||||||
static QIcon pendingBreakpointIcon();
|
static QIcon pendingBreakpointIcon();
|
||||||
static QIcon emptyIcon();
|
static QIcon emptyIcon();
|
||||||
static QIcon watchpointIcon();
|
static QIcon watchpointIcon();
|
||||||
|
static QIcon tracepointIcon();
|
||||||
|
|
||||||
BreakpointId findBreakpointByFileAndLine(const QString &fileName,
|
BreakpointId findBreakpointByFileAndLine(const QString &fileName,
|
||||||
int lineNumber, bool useMarkerPosition = true);
|
int lineNumber, bool useMarkerPosition = true);
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ namespace Internal {
|
|||||||
|
|
||||||
BreakpointParameters::BreakpointParameters(BreakpointType t)
|
BreakpointParameters::BreakpointParameters(BreakpointType t)
|
||||||
: type(t), enabled(true), useFullPath(false),
|
: 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
|
bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
|
||||||
@@ -57,7 +58,8 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
|
|||||||
&& lineNumber == rhs.lineNumber
|
&& lineNumber == rhs.lineNumber
|
||||||
&& address == rhs.address
|
&& address == rhs.address
|
||||||
&& threadSpec == rhs.threadSpec
|
&& threadSpec == rhs.threadSpec
|
||||||
&& functionName == rhs.functionName;
|
&& functionName == rhs.functionName
|
||||||
|
&& tracepoint == rhs.tracepoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BreakpointParameters::conditionsMatch(const QByteArray &other) const
|
bool BreakpointParameters::conditionsMatch(const QByteArray &other) const
|
||||||
@@ -81,6 +83,7 @@ QString BreakpointParameters::toString() const
|
|||||||
ts << " Address: " << address;
|
ts << " Address: " << address;
|
||||||
ts << " FunctionName: " << functionName;
|
ts << " FunctionName: " << functionName;
|
||||||
ts << " UseFullPath: " << useFullPath;
|
ts << " UseFullPath: " << useFullPath;
|
||||||
|
ts << " Tracepoint: " << tracepoint;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public:
|
|||||||
bool equals(const BreakpointParameters &rhs) const;
|
bool equals(const BreakpointParameters &rhs) const;
|
||||||
bool conditionsMatch(const QByteArray &other) const;
|
bool conditionsMatch(const QByteArray &other) const;
|
||||||
bool isWatchpoint() const { return type == Watchpoint; }
|
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;
|
QString toString() const;
|
||||||
|
|
||||||
bool operator==(const BreakpointParameters &p) const { return equals(p); }
|
bool operator==(const BreakpointParameters &p) const { return equals(p); }
|
||||||
@@ -93,6 +95,7 @@ public:
|
|||||||
quint64 address; // Address for watchpoints.
|
quint64 address; // Address for watchpoints.
|
||||||
int threadSpec; // Thread specification.
|
int threadSpec; // Thread specification.
|
||||||
QString functionName;
|
QString functionName;
|
||||||
|
bool tracepoint;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,20 @@
|
|||||||
<item row="9" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditThreadSpec"/>
|
<widget class="QLineEdit" name="lineEditThreadSpec"/>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ void BreakpointDialog::clearParts(unsigned partsMask)
|
|||||||
void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data) const
|
void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data) const
|
||||||
{
|
{
|
||||||
data->enabled = m_ui.checkBoxEnabled->isChecked();
|
data->enabled = m_ui.checkBoxEnabled->isChecked();
|
||||||
|
data->tracepoint = m_ui.checkBoxTracepoint->isChecked();
|
||||||
|
|
||||||
if (partsMask & FileAndLinePart) {
|
if (partsMask & FileAndLinePart) {
|
||||||
data->lineNumber = m_ui.lineEditLineNumber->text().toInt();
|
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)
|
void BreakpointDialog::setParts(unsigned mask, const BreakpointParameters &data)
|
||||||
{
|
{
|
||||||
m_ui.checkBoxEnabled->setChecked(data.enabled);
|
m_ui.checkBoxEnabled->setChecked(data.enabled);
|
||||||
|
m_ui.checkBoxUseFullPath->setChecked(data.useFullPath);
|
||||||
|
|
||||||
if (mask & FileAndLinePart) {
|
if (mask & FileAndLinePart) {
|
||||||
m_ui.pathChooserFileName->setPath(data.fileName);
|
m_ui.pathChooserFileName->setPath(data.fileName);
|
||||||
m_ui.lineEditLineNumber->setText(QString::number(data.lineNumber));
|
m_ui.lineEditLineNumber->setText(QString::number(data.lineNumber));
|
||||||
m_ui.checkBoxUseFullPath->setChecked(data.useFullPath);
|
m_ui.checkBoxTracepoint->setChecked(data.tracepoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask & FunctionPart)
|
if (mask & FunctionPart)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<file>images/debugger_stop.png</file>
|
<file>images/debugger_stop.png</file>
|
||||||
<file>images/debugger_stop_small.png</file>
|
<file>images/debugger_stop_small.png</file>
|
||||||
<file>images/watchpoint.png</file>
|
<file>images/watchpoint.png</file>
|
||||||
|
<file>images/tracepoint.png</file>
|
||||||
<file>images/breakpoint_16.png</file>
|
<file>images/breakpoint_16.png</file>
|
||||||
<file>images/breakpoint_24.png</file>
|
<file>images/breakpoint_24.png</file>
|
||||||
<file>images/breakpoint_disabled_16.png</file>
|
<file>images/breakpoint_disabled_16.png</file>
|
||||||
|
|||||||
BIN
src/plugins/debugger/images/tracepoint.png
Normal file
BIN
src/plugins/debugger/images/tracepoint.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 641 B |
Reference in New Issue
Block a user