forked from qt-creator/qt-creator
debugger: remove intermediate BreakpointData stucture layer
This commit is contained in:
@@ -84,30 +84,30 @@ static inline bool fileNameMatch(const QString &f1, const QString &f2)
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isSimilarTo(const BreakpointData &data, const BreakpointResponse &needle)
|
||||
static bool isSimilarTo(const BreakpointParameters &data, const BreakpointResponse &needle)
|
||||
{
|
||||
// Clear hit.
|
||||
// Clear miss.
|
||||
if (needle.type != UnknownType && data.type() != UnknownType
|
||||
&& data.type() != needle.type)
|
||||
if (needle.type != UnknownType && data.type != UnknownType
|
||||
&& data.type != needle.type)
|
||||
return false;
|
||||
|
||||
// Clear hit.
|
||||
if (data.address() && data.address() == needle.address)
|
||||
if (data.address && data.address == needle.address)
|
||||
return true;
|
||||
|
||||
// At least at a position we were looking for.
|
||||
// FIXME: breaks multiple breakpoints at the same location
|
||||
if (!data.fileName().isEmpty()
|
||||
&& fileNameMatch(data.fileName(), needle.fileName)
|
||||
&& data.lineNumber() == needle.lineNumber)
|
||||
if (!data.fileName.isEmpty()
|
||||
&& fileNameMatch(data.fileName, needle.fileName)
|
||||
&& data.lineNumber == needle.lineNumber)
|
||||
return true;
|
||||
|
||||
// At least at a position we were looking for.
|
||||
// FIXME: breaks multiple breakpoints at the same location
|
||||
if (!data.fileName().isEmpty()
|
||||
&& fileNameMatch(data.fileName(), needle.fileName)
|
||||
&& data.lineNumber() == needle.lineNumber)
|
||||
if (!data.fileName.isEmpty()
|
||||
&& fileNameMatch(data.fileName, needle.fileName)
|
||||
&& data.lineNumber == needle.lineNumber)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -119,7 +119,7 @@ BreakpointId BreakHandler::findSimilarBreakpoint(const BreakpointResponse &needl
|
||||
ConstIterator it = m_storage.constBegin(), et = m_storage.constEnd();
|
||||
for ( ; it != et; ++it) {
|
||||
const BreakpointId id = it.key();
|
||||
const BreakpointData &data = it->data;
|
||||
const BreakpointParameters &data = it->data;
|
||||
const BreakpointResponse &response = it->response;
|
||||
qDebug() << "COMPARING " << data.toString() << " WITH " << needle.toString();
|
||||
if (response.number && response.number == needle.number)
|
||||
@@ -144,7 +144,7 @@ BreakpointId BreakHandler::findBreakpointByFunction(const QString &functionName)
|
||||
{
|
||||
ConstIterator it = m_storage.constBegin(), et = m_storage.constEnd();
|
||||
for ( ; it != et; ++it)
|
||||
if (it->data.functionName() == functionName)
|
||||
if (it->data.functionName == functionName)
|
||||
return it.key();
|
||||
return BreakpointId(-1);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ BreakpointId BreakHandler::findBreakpointByAddress(quint64 address) const
|
||||
{
|
||||
ConstIterator it = m_storage.constBegin(), et = m_storage.constEnd();
|
||||
for ( ; it != et; ++it)
|
||||
if (it->data.address() == address)
|
||||
if (it->data.address == address)
|
||||
return it.key();
|
||||
return BreakpointId(-1);
|
||||
}
|
||||
@@ -173,14 +173,14 @@ const BreakpointParameters &BreakHandler::breakpointData(BreakpointId id) const
|
||||
static BreakpointParameters dummy;
|
||||
ConstIterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return dummy);
|
||||
return it->data.parameters();
|
||||
return it->data;
|
||||
}
|
||||
|
||||
BreakpointId BreakHandler::findWatchpointByAddress(quint64 address) const
|
||||
{
|
||||
ConstIterator it = m_storage.constBegin(), et = m_storage.constEnd();
|
||||
for ( ; it != et; ++it)
|
||||
if (it->data.isWatchpoint() && it->data.address() == address)
|
||||
if (it->data.isWatchpoint() && it->data.address == address)
|
||||
return it.key();
|
||||
return BreakpointId(-1);
|
||||
}
|
||||
@@ -211,30 +211,30 @@ void BreakHandler::saveBreakpoints()
|
||||
QList<QVariant> list;
|
||||
ConstIterator it = m_storage.constBegin(), et = m_storage.constEnd();
|
||||
for ( ; it != et; ++it) {
|
||||
const BreakpointData &data = it->data;
|
||||
const BreakpointParameters &data = it->data;
|
||||
QMap<QString, QVariant> map;
|
||||
// Do not persist Watchpoints.
|
||||
if (data.isWatchpoint())
|
||||
continue;
|
||||
if (data.type() != BreakpointByFileAndLine)
|
||||
map.insert(_("type"), data.type());
|
||||
if (!data.fileName().isEmpty())
|
||||
map.insert(_("filename"), data.fileName());
|
||||
if (data.lineNumber())
|
||||
map.insert(_("linenumber"), data.lineNumber());
|
||||
if (!data.functionName().isEmpty())
|
||||
map.insert(_("funcname"), data.functionName());
|
||||
if (data.address())
|
||||
map.insert(_("address"), data.address());
|
||||
if (!data.condition().isEmpty())
|
||||
map.insert(_("condition"), data.condition());
|
||||
if (data.ignoreCount())
|
||||
map.insert(_("ignorecount"), data.ignoreCount());
|
||||
if (!data.threadSpec().isEmpty())
|
||||
map.insert(_("threadspec"), data.threadSpec());
|
||||
if (!data.isEnabled())
|
||||
if (data.type != BreakpointByFileAndLine)
|
||||
map.insert(_("type"), data.type);
|
||||
if (!data.fileName.isEmpty())
|
||||
map.insert(_("filename"), data.fileName);
|
||||
if (data.lineNumber)
|
||||
map.insert(_("linenumber"), data.lineNumber);
|
||||
if (!data.functionName.isEmpty())
|
||||
map.insert(_("funcname"), data.functionName);
|
||||
if (data.address)
|
||||
map.insert(_("address"), data.address);
|
||||
if (!data.condition.isEmpty())
|
||||
map.insert(_("condition"), data.condition);
|
||||
if (data.ignoreCount)
|
||||
map.insert(_("ignorecount"), data.ignoreCount);
|
||||
if (!data.threadSpec.isEmpty())
|
||||
map.insert(_("threadspec"), data.threadSpec);
|
||||
if (!data.enabled)
|
||||
map.insert(_("disabled"), _("1"));
|
||||
if (data.useFullPath())
|
||||
if (data.useFullPath)
|
||||
map.insert(_("usefullpath"), _("1"));
|
||||
list.append(map);
|
||||
}
|
||||
@@ -351,7 +351,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
||||
BreakpointId id = findBreakpointByIndex(mi);
|
||||
ConstIterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return QVariant());
|
||||
const BreakpointData &data = it->data;
|
||||
const BreakpointParameters &data = it->data;
|
||||
const BreakpointResponse &response = it->response;
|
||||
|
||||
switch (mi.column()) {
|
||||
@@ -363,7 +363,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
||||
if (role == Qt::DecorationRole) {
|
||||
if (data.isWatchpoint())
|
||||
return m_watchpointIcon;
|
||||
if (!data.isEnabled())
|
||||
if (!data.enabled)
|
||||
return m_disabledBreakpointIcon;
|
||||
return it->isPending() ? m_pendingBreakPointIcon : m_breakpointIcon;
|
||||
}
|
||||
@@ -371,20 +371,20 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
||||
case 1:
|
||||
if (role == Qt::DisplayRole) {
|
||||
const QString str = it->isPending()
|
||||
? data.functionName() : response.functionName;
|
||||
? data.functionName : response.functionName;
|
||||
return str.isEmpty() ? empty : str;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (role == Qt::DisplayRole) {
|
||||
QString str = it->isPending()
|
||||
? data.fileName() : response.fileName;
|
||||
? data.fileName : response.fileName;
|
||||
str = QFileInfo(str).fileName();
|
||||
// FIXME: better?
|
||||
//if (data.bpMultiple && str.isEmpty() && !data.markerFileName.isEmpty())
|
||||
// str = data.markerFileName;
|
||||
str = str.isEmpty() ? empty : str;
|
||||
if (data.useFullPath())
|
||||
if (data.useFullPath)
|
||||
str = QDir::toNativeSeparators(QLatin1String("/.../") + str);
|
||||
return str;
|
||||
}
|
||||
@@ -395,48 +395,48 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
||||
//if (data.bpMultiple && str.isEmpty() && !data.markerFileName.isEmpty())
|
||||
// str = data.markerLineNumber;
|
||||
const int nr = it->isPending()
|
||||
? data.lineNumber() : response.lineNumber;
|
||||
? data.lineNumber : response.lineNumber;
|
||||
return nr ? QString::number(nr) : empty;
|
||||
}
|
||||
if (role == Qt::UserRole + 1)
|
||||
return data.lineNumber();
|
||||
return data.lineNumber;
|
||||
break;
|
||||
case 4:
|
||||
if (role == Qt::DisplayRole)
|
||||
return it->isPending() ? data.condition() : response.condition;
|
||||
return it->isPending() ? data.condition : response.condition;
|
||||
if (role == Qt::ToolTipRole)
|
||||
return tr("Breakpoint will only be hit if this condition is met.");
|
||||
if (role == Qt::UserRole + 1)
|
||||
return data.condition();
|
||||
return data.condition;
|
||||
break;
|
||||
case 5:
|
||||
if (role == Qt::DisplayRole) {
|
||||
const int ignoreCount =
|
||||
it->isPending() ? data.ignoreCount() : response.ignoreCount;
|
||||
it->isPending() ? data.ignoreCount : response.ignoreCount;
|
||||
return ignoreCount ? QVariant(ignoreCount) : QVariant(QString());
|
||||
}
|
||||
if (role == Qt::ToolTipRole)
|
||||
return tr("Breakpoint will only be hit after being ignored so many times.");
|
||||
if (role == Qt::UserRole + 1)
|
||||
return data.ignoreCount();
|
||||
return data.ignoreCount;
|
||||
break;
|
||||
case 6:
|
||||
if (role == Qt::DisplayRole) {
|
||||
if (it->isPending())
|
||||
return !data.threadSpec().isEmpty() ? data.threadSpec() : tr("(all)");
|
||||
return !data.threadSpec.isEmpty() ? data.threadSpec : tr("(all)");
|
||||
else
|
||||
return !response.threadSpec.isEmpty() ? response.threadSpec : tr("(all)");
|
||||
}
|
||||
if (role == Qt::ToolTipRole)
|
||||
return tr("Breakpoint will only be hit in the specified thread(s).");
|
||||
if (role == Qt::UserRole + 1)
|
||||
return data.threadSpec();
|
||||
return data.threadSpec;
|
||||
break;
|
||||
case 7:
|
||||
if (role == Qt::DisplayRole) {
|
||||
QString displayValue;
|
||||
const quint64 address =
|
||||
data.isWatchpoint() ? data.address() : response.address;
|
||||
data.isWatchpoint() ? data.address : response.address;
|
||||
if (address)
|
||||
displayValue += QString::fromAscii("0x%1").arg(address, 0, 16);
|
||||
if (!response.state.isEmpty()) {
|
||||
@@ -462,24 +462,25 @@ type BreakHandler::getter(BreakpointId id) const \
|
||||
QTC_ASSERT(it != m_storage.end(), \
|
||||
qDebug() << "ID" << id << "NOT KNOWN"; \
|
||||
return type()); \
|
||||
return it->data.getter(); \
|
||||
return it->data.getter; \
|
||||
}
|
||||
|
||||
#define SETTER(type, setter) \
|
||||
#define SETTER(type, getter, setter) \
|
||||
void BreakHandler::setter(BreakpointId id, const type &value) \
|
||||
{ \
|
||||
Iterator it = m_storage.find(id); \
|
||||
QTC_ASSERT(it != m_storage.end(), \
|
||||
qDebug() << "ID" << id << "NOT KNOWN"; return); \
|
||||
if (!it->data.setter(value)) \
|
||||
if (it->data.getter == value) \
|
||||
return; \
|
||||
it->data.getter = value; \
|
||||
it->state = BreakpointChangeRequested; \
|
||||
scheduleSynchronization(); \
|
||||
}
|
||||
|
||||
#define PROPERTY(type, getter, setter) \
|
||||
GETTER(type, getter) \
|
||||
SETTER(type, setter)
|
||||
SETTER(type, getter, setter)
|
||||
|
||||
|
||||
PROPERTY(bool, useFullPath, setUseFullPath)
|
||||
@@ -496,7 +497,7 @@ bool BreakHandler::isEnabled(BreakpointId id) const
|
||||
{
|
||||
ConstIterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return false);
|
||||
return it->data.isEnabled();
|
||||
return it->data.enabled;
|
||||
}
|
||||
|
||||
void BreakHandler::setEnabled(BreakpointId id, bool on)
|
||||
@@ -504,13 +505,14 @@ void BreakHandler::setEnabled(BreakpointId id, bool on)
|
||||
Iterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return);
|
||||
//qDebug() << "SET ENABLED: " << id << it->data.isEnabled() << on;
|
||||
if (it->data.setEnabled(on)) {
|
||||
if (it->data.enabled == on)
|
||||
return;
|
||||
it->data.enabled = on;
|
||||
it->destroyMarker();
|
||||
it->state = BreakpointChangeRequested;
|
||||
updateMarker(id);
|
||||
scheduleSynchronization();
|
||||
}
|
||||
}
|
||||
|
||||
void BreakHandler::setMarkerFileAndLine(BreakpointId id,
|
||||
const QString &fileName, int lineNumber)
|
||||
@@ -565,7 +567,7 @@ void BreakHandler::ackCondition(BreakpointId id)
|
||||
{
|
||||
Iterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return);
|
||||
it->response.condition = it->data.condition();
|
||||
it->response.condition = it->data.condition;
|
||||
updateMarker(id);
|
||||
}
|
||||
|
||||
@@ -573,7 +575,7 @@ void BreakHandler::ackIgnoreCount(BreakpointId id)
|
||||
{
|
||||
Iterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return);
|
||||
it->response.ignoreCount = it->data.ignoreCount();
|
||||
it->response.ignoreCount = it->data.ignoreCount;
|
||||
updateMarker(id);
|
||||
}
|
||||
|
||||
@@ -581,7 +583,7 @@ void BreakHandler::ackEnabled(BreakpointId id)
|
||||
{
|
||||
Iterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return);
|
||||
it->response.enabled = it->data.isEnabled();
|
||||
it->response.enabled = it->data.enabled;
|
||||
updateMarker(id);
|
||||
}
|
||||
|
||||
@@ -620,7 +622,7 @@ void BreakHandler::appendBreakpoint(const BreakpointParameters &data)
|
||||
|
||||
BreakpointId id(++currentId);
|
||||
BreakpointItem item;
|
||||
item.data.m_parameters = data;
|
||||
item.data = data;
|
||||
item.markerFileName = data.fileName;
|
||||
item.markerLineNumber = data.lineNumber;
|
||||
m_storage.insert(id, item);
|
||||
@@ -674,10 +676,10 @@ void BreakHandler::breakByFunction(const QString &functionName)
|
||||
// combinations of multiple conditions and ignore counts, though.
|
||||
ConstIterator it = m_storage.constBegin(), et = m_storage.constEnd();
|
||||
for ( ; it != et; ++it) {
|
||||
const BreakpointData &data = it->data;
|
||||
if (data.functionName() == functionName
|
||||
&& data.condition().isEmpty()
|
||||
&& data.ignoreCount() == 0)
|
||||
const BreakpointParameters &data = it->data;
|
||||
if (data.functionName == functionName
|
||||
&& data.condition.isEmpty()
|
||||
&& data.ignoreCount == 0)
|
||||
return;
|
||||
}
|
||||
BreakpointParameters data(BreakpointByFunction);
|
||||
@@ -689,7 +691,7 @@ QIcon BreakHandler::icon(BreakpointId id) const
|
||||
{
|
||||
ConstIterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return pendingBreakPointIcon());
|
||||
if (!it->data.isEnabled())
|
||||
if (!it->data.enabled)
|
||||
return m_disabledBreakpointIcon;
|
||||
if (it->state == BreakpointInserted)
|
||||
return breakpointIcon();
|
||||
@@ -719,7 +721,7 @@ void BreakHandler::gotoLocation(BreakpointId id) const
|
||||
ConstIterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return);
|
||||
debuggerCore()->gotoLocation(
|
||||
it->data.fileName(), it->data.lineNumber(), false);
|
||||
it->data.fileName, it->data.lineNumber, false);
|
||||
}
|
||||
|
||||
void BreakHandler::updateLineNumberFromMarker(BreakpointId id, int lineNumber)
|
||||
@@ -744,7 +746,7 @@ void BreakHandler::updateLineNumberFromMarker(BreakpointId id, int lineNumber)
|
||||
// the next line that generated code.
|
||||
// FIXME: Do we need yet another data member?
|
||||
if (it->response.number == 0) {
|
||||
it->data.setLineNumber(lineNumber);
|
||||
it->data.lineNumber = lineNumber;
|
||||
updateMarker(id);
|
||||
}
|
||||
}
|
||||
@@ -853,9 +855,9 @@ void BreakHandler::setBreakpointData(BreakpointId id, const BreakpointParameters
|
||||
{
|
||||
Iterator it = m_storage.find(id);
|
||||
QTC_ASSERT(it != m_storage.end(), return);
|
||||
if (data == it->data.m_parameters)
|
||||
if (data == it->data)
|
||||
return;
|
||||
it->data.m_parameters = data;
|
||||
it->data = data;
|
||||
updateMarker(id);
|
||||
layoutChanged();
|
||||
}
|
||||
@@ -907,7 +909,7 @@ static QString stateToString(BreakpointState state)
|
||||
bool BreakHandler::BreakpointItem::isLocatedAt
|
||||
(const QString &fileName, int lineNumber, bool useMarkerPosition) const
|
||||
{
|
||||
int line = useMarkerPosition ? markerLineNumber : data.lineNumber();
|
||||
int line = useMarkerPosition ? markerLineNumber : data.lineNumber;
|
||||
return lineNumber == line && fileNameMatch(fileName, markerFileName);
|
||||
}
|
||||
|
||||
@@ -915,7 +917,7 @@ QString BreakHandler::BreakpointItem::toToolTip() const
|
||||
{
|
||||
QString t;
|
||||
|
||||
switch (data.type()) {
|
||||
switch (data.type) {
|
||||
case BreakpointByFileAndLine:
|
||||
t = tr("Breakpoint by File and Line");
|
||||
break;
|
||||
@@ -967,22 +969,22 @@ QString BreakHandler::BreakpointItem::toToolTip() const
|
||||
<< "<tr><td>" << tr("Internal Number:")
|
||||
<< "</td><td>—</td><td>" << response.number << "</td></tr>"
|
||||
<< "<tr><td>" << tr("File Name:")
|
||||
<< "</td><td>" << QDir::toNativeSeparators(data.fileName())
|
||||
<< "</td><td>" << QDir::toNativeSeparators(data.fileName)
|
||||
<< "</td><td>" << QDir::toNativeSeparators(response.fileName)
|
||||
<< "</td></tr>"
|
||||
<< "<tr><td>" << tr("Function Name:")
|
||||
<< "</td><td>" << data.functionName()
|
||||
<< "</td><td>" << data.functionName
|
||||
<< "</td><td>" << response.functionName << "</td></tr>"
|
||||
<< "<tr><td>" << tr("Line Number:") << "</td><td>";
|
||||
if (data.lineNumber())
|
||||
str << data.lineNumber();
|
||||
if (data.lineNumber)
|
||||
str << data.lineNumber;
|
||||
str << "</td><td>";
|
||||
if (response.lineNumber)
|
||||
str << response.lineNumber;
|
||||
str << "</td></tr>"
|
||||
<< "<tr><td>" << tr("Breakpoint Address:")
|
||||
<< "</td><td>";
|
||||
formatAddress(str, data.address());
|
||||
formatAddress(str, data.address);
|
||||
str << "</td><td>";
|
||||
formatAddress(str, response.address);
|
||||
//str << "</td></tr>"
|
||||
@@ -994,17 +996,17 @@ QString BreakHandler::BreakpointItem::toToolTip() const
|
||||
// str << '-';
|
||||
str << "</td></tr>"
|
||||
<< "<tr><td>" << tr("Condition:")
|
||||
<< "</td><td>" << data.condition()
|
||||
<< "</td><td>" << data.condition
|
||||
<< "</td><td>" << response.condition << "</td></tr>"
|
||||
<< "<tr><td>" << tr("Ignore Count:") << "</td><td>";
|
||||
if (data.ignoreCount())
|
||||
str << data.ignoreCount();
|
||||
if (data.ignoreCount)
|
||||
str << data.ignoreCount;
|
||||
str << "</td><td>";
|
||||
if (response.ignoreCount)
|
||||
str << response.ignoreCount;
|
||||
str << "</td></tr>"
|
||||
<< "<tr><td>" << tr("Thread Specification:")
|
||||
<< "</td><td>" << data.threadSpec()
|
||||
<< "</td><td>" << data.threadSpec
|
||||
<< "</td><td>" << response.threadSpec << "</td></tr>"
|
||||
<< "</table></body></html>";
|
||||
return rc;
|
||||
|
@@ -180,7 +180,7 @@ private:
|
||||
bool useMarkerPosition) const;
|
||||
QString toToolTip() const;
|
||||
|
||||
BreakpointData data;
|
||||
BreakpointParameters data;
|
||||
BreakpointState state; // Current state of breakpoint.
|
||||
DebuggerEngine *engine; // Engine currently handling the breakpoint.
|
||||
BreakpointResponse response;
|
||||
|
@@ -37,12 +37,12 @@ namespace Internal {
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BreakpointData
|
||||
// BreakpointParameters
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
BreakpointParameters::BreakpointParameters(BreakpointType t) :
|
||||
type(t), enabled(true), useFullPath(false),
|
||||
BreakpointParameters::BreakpointParameters(BreakpointType t)
|
||||
: type(t), enabled(true), useFullPath(false),
|
||||
ignoreCount(0), lineNumber(0), address(0)
|
||||
{
|
||||
}
|
||||
@@ -57,68 +57,10 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
|
||||
&& functionName == rhs.functionName;
|
||||
}
|
||||
|
||||
BreakpointData::BreakpointData(BreakpointType type)
|
||||
: m_parameters(type)
|
||||
{}
|
||||
|
||||
BreakpointResponse::BreakpointResponse()
|
||||
: number(0), multiple(false)
|
||||
{}
|
||||
|
||||
#define SETIT(var, value) return (var != value) && (var = value, true)
|
||||
|
||||
bool BreakpointData::setUseFullPath(bool on)
|
||||
{
|
||||
SETIT(m_parameters.useFullPath, on);
|
||||
}
|
||||
|
||||
bool BreakpointData::setFileName(const QString &file)
|
||||
{
|
||||
SETIT(m_parameters.fileName, file);
|
||||
}
|
||||
|
||||
bool BreakpointData::setEnabled(bool on)
|
||||
{
|
||||
SETIT(m_parameters.enabled, on);
|
||||
}
|
||||
|
||||
bool BreakpointData::setIgnoreCount(int count)
|
||||
{
|
||||
SETIT(m_parameters.ignoreCount, count);
|
||||
}
|
||||
|
||||
bool BreakpointData::setFunctionName(const QString &name)
|
||||
{
|
||||
SETIT(m_parameters.functionName, name);
|
||||
}
|
||||
|
||||
bool BreakpointData::setLineNumber(int line)
|
||||
{
|
||||
SETIT(m_parameters.lineNumber, line);
|
||||
}
|
||||
|
||||
bool BreakpointData::setAddress(quint64 address)
|
||||
{
|
||||
SETIT(m_parameters.address, address);
|
||||
}
|
||||
|
||||
bool BreakpointData::setThreadSpec(const QByteArray &spec)
|
||||
{
|
||||
SETIT(m_parameters.threadSpec, spec);
|
||||
}
|
||||
|
||||
bool BreakpointData::setType(BreakpointType type)
|
||||
{
|
||||
SETIT(m_parameters.type, type);
|
||||
}
|
||||
|
||||
bool BreakpointData::setCondition(const QByteArray &cond)
|
||||
{
|
||||
SETIT(m_parameters.condition, cond);
|
||||
}
|
||||
|
||||
#undef SETIT
|
||||
|
||||
bool BreakpointParameters::conditionsMatch(const QByteArray &other) const
|
||||
{
|
||||
// Some versions of gdb "beautify" the passed condition.
|
||||
@@ -129,17 +71,17 @@ bool BreakpointParameters::conditionsMatch(const QByteArray &other) const
|
||||
return s1 == s2;
|
||||
}
|
||||
|
||||
QString BreakpointData::toString() const
|
||||
QString BreakpointParameters::toString() const
|
||||
{
|
||||
QString result;
|
||||
QTextStream ts(&result);
|
||||
ts << fileName();
|
||||
ts << condition();
|
||||
ts << ignoreCount();
|
||||
ts << lineNumber();
|
||||
ts << address();
|
||||
ts << functionName();
|
||||
ts << useFullPath();
|
||||
ts << fileName;
|
||||
ts << condition;
|
||||
ts << ignoreCount;
|
||||
ts << lineNumber;
|
||||
ts << address;
|
||||
ts << functionName;
|
||||
ts << useFullPath;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -40,13 +40,6 @@ typedef quint64 BreakpointId; // FIXME: make Internal.
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class BreakWindow;
|
||||
class BreakpointDialog;
|
||||
class BreakHandler;
|
||||
class BreakpointData;
|
||||
|
||||
QDataStream &operator>>(QDataStream& stream, BreakpointData &data);
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BreakpointData
|
||||
@@ -85,6 +78,12 @@ public:
|
||||
explicit BreakpointParameters(BreakpointType = UnknownType);
|
||||
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.
|
||||
QString toString() const;
|
||||
|
||||
bool operator==(const BreakpointParameters &p) const { return equals(p); }
|
||||
bool operator!=(const BreakpointParameters &p) const { return !equals(p); }
|
||||
|
||||
BreakpointType type; // Type of breakpoint.
|
||||
bool enabled; // Should we talk to the debugger engine?
|
||||
@@ -98,58 +97,6 @@ public:
|
||||
QString functionName;
|
||||
};
|
||||
|
||||
inline bool operator==(const BreakpointParameters &p1, const BreakpointParameters &p2)
|
||||
{ return p1.equals(p2); }
|
||||
inline bool operator!=(const BreakpointParameters &p1, const BreakpointParameters &p2)
|
||||
{ return !p1.equals(p2); }
|
||||
|
||||
class BreakpointData
|
||||
{
|
||||
private:
|
||||
friend class BreakHandler; // This should be the only class manipulating data.
|
||||
friend class BreakWindow; // FIXME: Remove.
|
||||
friend class BreakpointDialog; // FIXME: Remove.
|
||||
friend QDataStream &operator>>(QDataStream& stream, BreakpointData &data);
|
||||
|
||||
public:
|
||||
explicit BreakpointData(BreakpointType type = UnknownType);
|
||||
|
||||
BreakpointType type() const { return m_parameters.type; }
|
||||
quint64 address() const { return m_parameters.address; }
|
||||
bool useFullPath() const { return m_parameters.useFullPath; }
|
||||
QString toString() const;
|
||||
|
||||
QString functionName() const { return m_parameters.functionName; }
|
||||
QString fileName() const { return m_parameters.fileName; }
|
||||
int lineNumber() const { return m_parameters.lineNumber; }
|
||||
int ignoreCount() const { return m_parameters.ignoreCount; }
|
||||
bool isEnabled() const { return m_parameters.enabled; }
|
||||
QByteArray threadSpec() const { return m_parameters.threadSpec; }
|
||||
QByteArray condition() const { return m_parameters.condition; }
|
||||
const BreakpointParameters ¶meters() const { return m_parameters; }
|
||||
|
||||
bool isWatchpoint() const { return type() == Watchpoint; }
|
||||
bool isBreakpoint() const { return type() != Watchpoint; } // Enough for now.
|
||||
|
||||
private:
|
||||
// All setters return true on change.
|
||||
bool setUseFullPath(bool on);
|
||||
bool setMarkerFileName(const QString &file);
|
||||
bool setMarkerLineNumber(int line);
|
||||
bool setFileName(const QString &file);
|
||||
bool setEnabled(bool on);
|
||||
bool setIgnoreCount(int count);
|
||||
bool setFunctionName(const QString &name);
|
||||
bool setLineNumber(int line);
|
||||
bool setAddress(quint64 address);
|
||||
bool setThreadSpec(const QByteArray &spec);
|
||||
bool setType(BreakpointType type);
|
||||
bool setCondition(const QByteArray &cond);
|
||||
|
||||
private:
|
||||
// This "user requested information" will get stored in the session.
|
||||
BreakpointParameters m_parameters;
|
||||
};
|
||||
|
||||
// This is what debuggers produced in response to the attempt to
|
||||
// insert a breakpoint. The data might differ from the requested bits.
|
||||
|
@@ -1323,12 +1323,12 @@ void DebuggerEngine::notifyBreakpointChangeFailed(BreakpointId id)
|
||||
breakHandler()->notifyBreakpointChangeFailed(id);
|
||||
}
|
||||
|
||||
/*
|
||||
void DebuggerEngine::notifyBreakpointAdjusted(BreakpointId id)
|
||||
void DebuggerEngine::notifyBreakpointAdjusted(BreakpointId id,
|
||||
const BreakpointParameters &data)
|
||||
{
|
||||
breakHandler()->notifyChangeBreakpointAdjusted(id);
|
||||
QTC_ASSERT(false, /* FIXME */);
|
||||
breakHandler()->setBreakpointData(id, data);
|
||||
}
|
||||
*/
|
||||
|
||||
void DebuggerEngine::selectThread(int)
|
||||
{
|
||||
|
@@ -129,7 +129,7 @@ class StackFrame;
|
||||
class SourceFilesHandler;
|
||||
class ThreadsHandler;
|
||||
class WatchHandler;
|
||||
class BreakpointData;
|
||||
class BreakpointParameters;
|
||||
|
||||
struct WatchUpdateFlags
|
||||
{
|
||||
@@ -195,6 +195,8 @@ public:
|
||||
virtual void changeBreakpoint(BreakpointId id); // FIXME: make pure
|
||||
virtual void notifyBreakpointChangeOk(BreakpointId id);
|
||||
virtual void notifyBreakpointChangeFailed(BreakpointId id);
|
||||
virtual void notifyBreakpointAdjusted(BreakpointId id,
|
||||
const Internal::BreakpointParameters &data);
|
||||
|
||||
virtual void assignValueInDebugger(const Internal::WatchData *data,
|
||||
const QString &expr, const QVariant &value);
|
||||
|
@@ -164,31 +164,31 @@ QDataStream &operator>>(QDataStream &stream, BreakpointResponse &s)
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &stream, const BreakpointData &s)
|
||||
QDataStream &operator<<(QDataStream &stream, const BreakpointParameters &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();
|
||||
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)
|
||||
QDataStream &operator>>(QDataStream &stream, BreakpointParameters &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);
|
||||
stream >> str; s.fileName = str;
|
||||
stream >> ba; s.condition = ba;
|
||||
stream >> t; s.ignoreCount = t;
|
||||
stream >> t; s.lineNumber = t;
|
||||
stream >> t; s.address = t;
|
||||
stream >> str; s.functionName = str;
|
||||
stream >> b; s.useFullPath = b;
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
@@ -29,11 +29,13 @@
|
||||
|
||||
#ifndef DEBUGGERPLUGIN_STREAMOPS_H
|
||||
#define DEBUGGERPLUGIN_STREAMOPS_H
|
||||
#include <QtCore/QDataStream>
|
||||
|
||||
#include "breakpoint.h"
|
||||
#include "stackframe.h"
|
||||
#include "watchdata.h"
|
||||
#include "threaddata.h"
|
||||
#include "watchdata.h"
|
||||
|
||||
#include <QtCore/QDataStream>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
namespace Debugger {
|
||||
@@ -47,8 +49,8 @@ QDataStream &operator<<(QDataStream& stream, const StackFrame& frame);
|
||||
QDataStream &operator>>(QDataStream& stream, StackFrame &frame);
|
||||
QDataStream &operator<<(QDataStream& stream, const StackFrames& frames);
|
||||
QDataStream &operator>>(QDataStream& stream, StackFrames &frames);
|
||||
QDataStream &operator<<(QDataStream& stream, const BreakpointData &data);
|
||||
QDataStream &operator>>(QDataStream& stream, BreakpointData &data);
|
||||
QDataStream &operator<<(QDataStream& stream, const BreakpointParameters &data);
|
||||
QDataStream &operator>>(QDataStream& stream, BreakpointParameters &data);
|
||||
QDataStream &operator<<(QDataStream& stream, const BreakpointResponse &data);
|
||||
QDataStream &operator>>(QDataStream& stream, BreakpointResponse &data);
|
||||
QDataStream &operator<<(QDataStream& stream, const WatchData &data);
|
||||
|
@@ -60,7 +60,6 @@ class AbstractGdbProcess;
|
||||
class GdbResponse;
|
||||
class GdbMi;
|
||||
|
||||
class BreakpointData;
|
||||
class WatchData;
|
||||
class DisassemblerAgentCookie;
|
||||
|
||||
|
@@ -94,8 +94,8 @@ void IPCEngineGuest::rpcCall(IPCEngineGuest::Function f, QByteArray payload )
|
||||
QDataStream s(m_device);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
s << m_cookie++;
|
||||
s << (quint64) f;
|
||||
s << (quint64) payload.size();
|
||||
s << quint64(f);
|
||||
s << quint64(payload.size());
|
||||
}
|
||||
m_device->write(payload);
|
||||
m_device->putChar('T');
|
||||
@@ -274,7 +274,7 @@ void IPCEngineGuest::rpcCallback(quint64 f, QByteArray payload )
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
BreakpointData d;
|
||||
BreakpointParameters d;
|
||||
s >> d;
|
||||
addBreakpoint(d);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ void IPCEngineGuest::rpcCallback(quint64 f, QByteArray payload )
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
BreakpointData d;
|
||||
BreakpointParameters d;
|
||||
s >> d;
|
||||
changeBreakpoint(d);
|
||||
}
|
||||
@@ -511,7 +511,7 @@ void IPCEngineGuest::disassembled(quint64 pc, const QString &da)
|
||||
rpcCall(Disassembled, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyAddBreakpointOk(quint64 id)
|
||||
void IPCEngineGuest::notifyAddBreakpointOk(BreakpointId id)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -522,7 +522,7 @@ void IPCEngineGuest::notifyAddBreakpointOk(quint64 id)
|
||||
rpcCall(NotifyAddBreakpointOk, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyAddBreakpointFailed(quint64 id)
|
||||
void IPCEngineGuest::notifyAddBreakpointFailed(BreakpointId id)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -533,7 +533,7 @@ void IPCEngineGuest::notifyAddBreakpointFailed(quint64 id)
|
||||
rpcCall(NotifyAddBreakpointFailed, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyRemoveBreakpointOk(quint64 id)
|
||||
void IPCEngineGuest::notifyRemoveBreakpointOk(BreakpointId id)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -544,7 +544,7 @@ void IPCEngineGuest::notifyRemoveBreakpointOk(quint64 id)
|
||||
rpcCall(NotifyRemoveBreakpointOk, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyRemoveBreakpointFailed(quint64 id)
|
||||
void IPCEngineGuest::notifyRemoveBreakpointFailed(BreakpointId id)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -555,7 +555,7 @@ void IPCEngineGuest::notifyRemoveBreakpointFailed(quint64 id)
|
||||
rpcCall(NotifyRemoveBreakpointFailed, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyChangeBreakpointOk(quint64 id)
|
||||
void IPCEngineGuest::notifyChangeBreakpointOk(BreakpointId id)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -566,7 +566,7 @@ void IPCEngineGuest::notifyChangeBreakpointOk(quint64 id)
|
||||
rpcCall(NotifyChangeBreakpointOk, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyChangeBreakpointFailed(quint64 id)
|
||||
void IPCEngineGuest::notifyChangeBreakpointFailed(BreakpointId id)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -577,18 +577,19 @@ void IPCEngineGuest::notifyChangeBreakpointFailed(quint64 id)
|
||||
rpcCall(NotifyChangeBreakpointFailed, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::notifyBreakpointAdjusted(const Internal::BreakpointData &bp)
|
||||
void IPCEngineGuest::notifyBreakpointAdjusted(BreakpointId id,
|
||||
const BreakpointParameters &bp)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
QDataStream s(&p, QIODevice::WriteOnly);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
s << bp;
|
||||
s << id << bp;
|
||||
}
|
||||
rpcCall(NotifyBreakpointAdjusted, p);
|
||||
}
|
||||
|
||||
void IPCEngineGuest::updateWatchData(bool fullCycle, const QList<Internal::WatchData> &wd)
|
||||
void IPCEngineGuest::updateWatchData(bool fullCycle, const QList<WatchData> &wd)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
|
@@ -30,14 +30,14 @@
|
||||
#ifndef DEBUGGER_IPCENGINE_H
|
||||
#define DEBUGGER_IPCENGINE_H
|
||||
|
||||
#include "debuggerengine.h"
|
||||
#include "threadshandler.h"
|
||||
#include "stackhandler.h"
|
||||
#include "breakhandler.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "stackhandler.h"
|
||||
#include "threadshandler.h"
|
||||
|
||||
#include <QtCore/QQueue>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
@@ -74,11 +74,11 @@ public:
|
||||
virtual void activateFrame(qint64 token) = 0;
|
||||
virtual void selectThread(qint64 token) = 0;
|
||||
virtual void disassemble(quint64 pc) = 0;
|
||||
virtual void addBreakpoint(const Internal::BreakpointData &bp) = 0;
|
||||
virtual void addBreakpoint(const BreakpointParameters &bp) = 0;
|
||||
virtual void removeBreakpoint(quint64 id) = 0;
|
||||
virtual void changeBreakpoint(const Internal::BreakpointData &bp) = 0;
|
||||
virtual void requestUpdateWatchData(const Internal::WatchData &data,
|
||||
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags()) = 0;
|
||||
virtual void changeBreakpoint(const BreakpointParameters &bp) = 0;
|
||||
virtual void requestUpdateWatchData(const WatchData &data,
|
||||
const WatchUpdateFlags & flags = WatchUpdateFlags()) = 0;
|
||||
|
||||
enum Function
|
||||
{
|
||||
@@ -154,15 +154,15 @@ public:
|
||||
void listThreads(const Threads &);
|
||||
void disassembled(quint64 pc, const QString &da);
|
||||
|
||||
void notifyAddBreakpointOk(quint64 id);
|
||||
void notifyAddBreakpointFailed(quint64 id);
|
||||
void notifyRemoveBreakpointOk(quint64 id);
|
||||
void notifyRemoveBreakpointFailed(quint64 id);
|
||||
void notifyChangeBreakpointOk(quint64 id);
|
||||
void notifyChangeBreakpointFailed(quint64 id);
|
||||
void notifyBreakpointAdjusted(const Internal::BreakpointData &bp);
|
||||
void notifyAddBreakpointOk(BreakpointId id);
|
||||
void notifyAddBreakpointFailed(BreakpointId id);
|
||||
void notifyRemoveBreakpointOk(BreakpointId id);
|
||||
void notifyRemoveBreakpointFailed(BreakpointId id);
|
||||
void notifyChangeBreakpointOk(BreakpointId id);
|
||||
void notifyChangeBreakpointFailed(BreakpointId id);
|
||||
void notifyBreakpointAdjusted(BreakpointId id, const BreakpointParameters &bp);
|
||||
|
||||
void updateWatchData(bool fullCycle, const QList<Internal::WatchData> &);
|
||||
void updateWatchData(bool fullCycle, const QList<WatchData> &);
|
||||
|
||||
void rpcCall(Function f, QByteArray payload = QByteArray());
|
||||
public slots:
|
||||
|
@@ -228,7 +228,7 @@ void IPCEngineHost::selectThread(int index)
|
||||
rpcCall(SelectThread, p);
|
||||
}
|
||||
|
||||
void IPCEngineHost::fetchDisassembler(Internal::DisassemblerViewAgent *v)
|
||||
void IPCEngineHost::fetchDisassembler(DisassemblerViewAgent *v)
|
||||
{
|
||||
quint64 address = v->frame().address;
|
||||
m_frameToDisassemblerAgent.insert(address, v);
|
||||
@@ -242,7 +242,7 @@ void IPCEngineHost::fetchDisassembler(Internal::DisassemblerViewAgent *v)
|
||||
}
|
||||
|
||||
|
||||
void IPCEngineHost::addBreakpoint(const Internal::BreakpointData &bp)
|
||||
void IPCEngineHost::addBreakpoint(const BreakpointParameters &bp)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -264,7 +264,7 @@ void IPCEngineHost::removeBreakpoint(quint64 id)
|
||||
rpcCall(RemoveBreakpoint, p);
|
||||
}
|
||||
|
||||
void IPCEngineHost::changeBreakpoint(const Internal::BreakpointData &bp)
|
||||
void IPCEngineHost::changeBreakpoint(const BreakpointParameters &bp)
|
||||
{
|
||||
QByteArray p;
|
||||
{
|
||||
@@ -275,8 +275,8 @@ void IPCEngineHost::changeBreakpoint(const Internal::BreakpointData &bp)
|
||||
rpcCall(RemoveBreakpoint, p);
|
||||
}
|
||||
|
||||
void IPCEngineHost::updateWatchData(const Internal::WatchData &data,
|
||||
const Internal::WatchUpdateFlags &flags)
|
||||
void IPCEngineHost::updateWatchData(const WatchData &data,
|
||||
const WatchUpdateFlags &flags)
|
||||
{
|
||||
Q_UNUSED(flags);
|
||||
QByteArray p;
|
||||
@@ -442,7 +442,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
QString da;
|
||||
s >> pc;
|
||||
s >> da;
|
||||
Internal::DisassemblerViewAgent *view = m_frameToDisassemblerAgent.take(pc);
|
||||
DisassemblerViewAgent *view = m_frameToDisassemblerAgent.take(pc);
|
||||
if (view)
|
||||
view->setContents(da);
|
||||
}
|
||||
@@ -473,7 +473,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
quint64 id;
|
||||
BreakpointId id;
|
||||
s >> id;
|
||||
notifyBreakpointInsertOk(id);
|
||||
}
|
||||
@@ -481,7 +481,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
quint64 id;
|
||||
BreakpointId id;
|
||||
s >> id;
|
||||
notifyBreakpointInsertFailed(id);
|
||||
}
|
||||
@@ -489,7 +489,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
quint64 id;
|
||||
BreakpointId id;
|
||||
s >> id;
|
||||
notifyBreakpointRemoveOk(id);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
quint64 id;
|
||||
BreakpointId id;
|
||||
s >> id;
|
||||
notifyBreakpointRemoveFailed(id);
|
||||
}
|
||||
@@ -505,7 +505,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
quint64 id;
|
||||
BreakpointId id;
|
||||
s >> id;
|
||||
notifyBreakpointChangeOk(id);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
quint64 id;
|
||||
BreakpointId id;
|
||||
s >> id;
|
||||
notifyBreakpointChangeFailed(id);
|
||||
}
|
||||
@@ -521,10 +521,10 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
|
||||
{
|
||||
QDataStream s(payload);
|
||||
SET_NATIVE_BYTE_ORDER(s);
|
||||
BreakpointData d;
|
||||
s >> d;
|
||||
qDebug() << "FIXME";
|
||||
//notifyBreakpointAdjusted(d);
|
||||
BreakpointId id;
|
||||
BreakpointParameters d;
|
||||
s >> id >> d;
|
||||
notifyBreakpointAdjusted(id, d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -103,12 +103,12 @@ public:
|
||||
void executeJumpToLine(const QString &fileName, int lineNumber);
|
||||
void activateFrame(int index);
|
||||
void selectThread(int index);
|
||||
void fetchDisassembler(Internal::DisassemblerViewAgent *);
|
||||
void addBreakpoint(const Internal::BreakpointData &bp);
|
||||
void fetchDisassembler(DisassemblerViewAgent *);
|
||||
void addBreakpoint(const BreakpointParameters &bp);
|
||||
void removeBreakpoint(quint64 id);
|
||||
void changeBreakpoint(const Internal::BreakpointData &bp);
|
||||
void updateWatchData(const Internal::WatchData &data,
|
||||
const Internal::WatchUpdateFlags &flags = Internal::WatchUpdateFlags());
|
||||
void changeBreakpoint(const BreakpointParameters &bp);
|
||||
void updateWatchData(const WatchData &data,
|
||||
const WatchUpdateFlags &flags = WatchUpdateFlags());
|
||||
|
||||
void rpcCall(Function f, QByteArray payload = QByteArray());
|
||||
public slots:
|
||||
@@ -123,7 +123,7 @@ private:
|
||||
quint64 m_nextMessagePayloadSize;
|
||||
quint64 m_cookie;
|
||||
QIODevice *m_device;
|
||||
QHash <quint64, Internal::DisassemblerViewAgent *> m_frameToDisassemblerAgent;
|
||||
QHash <quint64, DisassemblerViewAgent *> m_frameToDisassemblerAgent;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user