diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index f34eebc5681..6df6db0959c 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -1157,19 +1157,21 @@ QVariant BreakpointItem::data(int column, int role) const
void BreakpointItem::addToCommand(DebuggerCommand *cmd) const
{
+ QTC_ASSERT(m_globalBreakpoint, return);
+ const BreakpointParameters &requested = requestedParameters();
cmd->arg("modelid", modelId());
cmd->arg("id", m_responseId);
- cmd->arg("type", m_requestedParameters.type);
- cmd->arg("ignorecount", m_requestedParameters.ignoreCount);
- cmd->arg("condition", toHex(m_requestedParameters.condition));
- cmd->arg("command", toHex(m_requestedParameters.command));
- cmd->arg("function", m_requestedParameters.functionName);
- cmd->arg("oneshot", m_requestedParameters.oneShot);
- cmd->arg("enabled", m_requestedParameters.enabled);
- cmd->arg("file", m_requestedParameters.fileName);
- cmd->arg("line", m_requestedParameters.lineNumber);
- cmd->arg("address", m_requestedParameters.address);
- cmd->arg("expression", m_requestedParameters.expression);
+ cmd->arg("type", requested.type);
+ cmd->arg("ignorecount", requested.ignoreCount);
+ cmd->arg("condition", toHex(requested.condition));
+ cmd->arg("command", toHex(requested.command));
+ cmd->arg("function", requested.functionName);
+ cmd->arg("oneshot", requested.oneShot);
+ cmd->arg("enabled", requested.enabled);
+ cmd->arg("file", requested.fileName);
+ cmd->arg("line", requested.lineNumber);
+ cmd->arg("address", requested.address);
+ cmd->arg("expression", requested.expression);
}
void BreakpointItem::updateFromGdbOutput(const GdbMi &bkpt)
@@ -1216,7 +1218,6 @@ void BreakHandler::requestBreakpointRemoval(const Breakpoint &bp)
void BreakHandler::requestBreakpointEnabling(const Breakpoint &bp, bool enabled)
{
if (bp->m_parameters.enabled != enabled) {
- bp->m_requestedParameters.enabled = enabled;
bp->updateMarkerIcon();
bp->update();
requestBreakpointUpdate(bp);
@@ -1802,8 +1803,6 @@ void BreakHandler::editBreakpoints(const Breakpoints &bps, QWidget *parent)
BreakpointItem::BreakpointItem(const GlobalBreakpoint &gbp)
: m_globalBreakpoint(gbp)
{
- if (gbp)
- m_requestedParameters = gbp->requestedParameters();
}
BreakpointItem::~BreakpointItem()
@@ -1843,7 +1842,7 @@ int BreakpointItem::markerLineNumber() const
const BreakpointParameters &BreakpointItem::requestedParameters() const
{
- return m_requestedParameters;
+ return m_globalBreakpoint ? m_globalBreakpoint->requestedParameters() : m_alienParameters;
}
static void formatAddress(QTextStream &str, quint64 address)
@@ -1920,6 +1919,7 @@ QIcon BreakpointItem::icon() const
QString BreakpointItem::toolTip() const
{
+ const BreakpointParameters &requested = requestedParameters();
QString rc;
QTextStream str(&rc);
str << "
" << tr("Breakpoint") << ""
@@ -1932,7 +1932,7 @@ QString BreakpointItem::toolTip() const
str << ", " << tr("pending");
str << ", " << stateToString(m_state) << "";
str << "" << tr("Breakpoint Type:")
- << " | " << typeToString(m_requestedParameters.type) << " |
"
+ << "" << typeToString(requested.type) << " | "
<< "" << tr("Marker File:")
<< " | " << QDir::toNativeSeparators(markerFileName()) << " |
"
<< "" << tr("Marker Line:")
@@ -1949,63 +1949,63 @@ QString BreakpointItem::toolTip() const
}
if (m_parameters.type == BreakpointByFunction) {
str << " |
" << tr("Function Name:")
- << " | " << m_requestedParameters.functionName
+ << " | " << requested.functionName
<< " | " << m_parameters.functionName
<< " |
";
}
if (m_parameters.type == BreakpointByFileAndLine) {
str << "" << tr("File Name:")
- << " | " << QDir::toNativeSeparators(m_requestedParameters.fileName)
+ << " | " << QDir::toNativeSeparators(requested.fileName)
<< " | " << QDir::toNativeSeparators(m_parameters.fileName)
<< " |
"
<< "" << tr("Line Number:")
- << " | " << m_requestedParameters.lineNumber
+ << " | " << requested.lineNumber
<< " | " << m_parameters.lineNumber << " |
";
}
- if (m_requestedParameters.type == BreakpointByFunction || m_parameters.type == BreakpointByFileAndLine) {
+ if (requested.type == BreakpointByFunction || m_parameters.type == BreakpointByFileAndLine) {
str << "" << tr("Module:")
- << " | " << m_requestedParameters.module
+ << " | " << requested.module
<< " | " << m_parameters.module
<< " |
";
}
str << "" << tr("Breakpoint Address:")
<< " | ";
- formatAddress(str, m_requestedParameters.address);
+ formatAddress(str, requested.address);
str << " | ";
formatAddress(str, m_parameters.address);
str << " |
";
- if (!m_requestedParameters.command.isEmpty() || !m_parameters.command.isEmpty()) {
+ if (!requested.command.isEmpty() || !m_parameters.command.isEmpty()) {
str << "" << tr("Command:")
- << " | " << m_requestedParameters.command
+ << " | " << requested.command
<< " | " << m_parameters.command
<< " |
";
}
- if (!m_requestedParameters.message.isEmpty() || !m_parameters.message.isEmpty()) {
+ if (!requested.message.isEmpty() || !m_parameters.message.isEmpty()) {
str << "" << tr("Message:")
- << " | " << m_requestedParameters.message
+ << " | " << requested.message
<< " | " << m_parameters.message
<< " |
";
}
- if (!m_requestedParameters.condition.isEmpty() || !m_parameters.condition.isEmpty()) {
+ if (!requested.condition.isEmpty() || !m_parameters.condition.isEmpty()) {
str << "" << tr("Condition:")
- << " | " << m_requestedParameters.condition
+ << " | " << requested.condition
<< " | " << m_parameters.condition
<< " |
";
}
- if (m_requestedParameters.ignoreCount || m_parameters.ignoreCount) {
+ if (requested.ignoreCount || m_parameters.ignoreCount) {
str << "" << tr("Ignore Count:") << " | ";
- if (m_requestedParameters.ignoreCount)
+ if (requested.ignoreCount)
str << m_parameters.ignoreCount;
str << " | ";
if (m_parameters.ignoreCount)
str << m_parameters.ignoreCount;
str << " |
";
}
- if (m_requestedParameters.threadSpec >= 0 || m_parameters.threadSpec >= 0) {
+ if (requested.threadSpec >= 0 || m_parameters.threadSpec >= 0) {
str << "" << tr("Thread Specification:")
<< " | ";
- if (m_requestedParameters.threadSpec >= 0)
- str << m_requestedParameters.threadSpec;
+ if (requested.threadSpec >= 0)
+ str << requested.threadSpec;
str << " | ";
if (m_parameters.threadSpec >= 0)
str << m_parameters.threadSpec;
diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h
index bdbf4586ce3..118e8ca0225 100644
--- a/src/plugins/debugger/breakhandler.h
+++ b/src/plugins/debugger/breakhandler.h
@@ -205,11 +205,11 @@ private:
void setState(BreakpointState state);
const GlobalBreakpoint m_globalBreakpoint; // Origin, or null for aliens.
- BreakpointParameters m_requestedParameters; // May differ from global value over lifetime of breakpoint.
- BreakpointParameters m_parameters;
+ BreakpointParameters m_parameters; // Parameters acknowledged by engine.
+ BreakpointParameters m_alienParameters; // Requested parameters in case of no associated global bp.
BreakpointState m_state = BreakpointNew; // Current state of breakpoint.
BreakpointMarker *m_marker = nullptr;
- QString m_responseId; //!< Breakpoint number or id assigne by or used in the debugger backend.
+ QString m_responseId; //!< Breakpoint number or id assigned by or used in the debugger backend.
QString m_displayName;
};
|