Commit 97afa6f7 authored by hjk's avatar hjk
Browse files

debugger: move code around

parent 45d2fd07
......@@ -3032,13 +3032,19 @@ void GdbEngine::updateSubItem(const WatchData &data0)
qDebug() << "IT'S A POINTER";
#endif
#if 1
insertData(data.pointerChildPlaceHolder());
data.setChildrenUnneeded();
insertData(data);
WatchData data1;
data1.iname = data.iname + QLatin1String(".*");
data1.name = QLatin1Char('*') + data.name;
data1.exp = QLatin1String("(*(") + data.exp + QLatin1String("))");
data1.type = stripPointerType(data.type);
data1.setValueNeeded();
insertData(data1);
#else
// Try automatic dereferentiation
data.exp = "*(" + data.exp + ")";
data.type = data.type + "."; // FIXME: fragile HACK to avoid recursion
data.exp = _("*(") + data.exp + _(")");
data.type = data.type + _("."); // FIXME: fragile HACK to avoid recursion
insertData(data);
#endif
return;
......
......@@ -198,17 +198,6 @@ void WatchData::setAddress(const QString &str)
addr = str;
}
WatchData WatchData::pointerChildPlaceHolder() const
{
WatchData data1;
data1.iname = iname + QLatin1String(".*");
data1.name = QLatin1Char('*') + name;
data1.exp = QLatin1String("(*(") + exp + QLatin1String("))");
data1.type = stripPointerType(type);
data1.setValueNeeded();
return data1;
}
QString WatchData::toString() const
{
const char *doubleQuoteComma = "\",";
......
......@@ -102,8 +102,6 @@ public:
void setHasChildren(bool c) { hasChildren = c; setHasChildrenUnneeded();
if (!c) setChildrenUnneeded(); }
WatchData pointerChildPlaceHolder() const;
QString toString() const;
QString toToolTip() const;
bool isLocal() const { return iname.startsWith(QLatin1String("local.")); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment