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) ...@@ -3032,13 +3032,19 @@ void GdbEngine::updateSubItem(const WatchData &data0)
qDebug() << "IT'S A POINTER"; qDebug() << "IT'S A POINTER";
#endif #endif
#if 1 #if 1
insertData(data.pointerChildPlaceHolder());
data.setChildrenUnneeded(); data.setChildrenUnneeded();
insertData(data); 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 #else
// Try automatic dereferentiation // Try automatic dereferentiation
data.exp = "*(" + data.exp + ")"; data.exp = _("*(") + data.exp + _(")");
data.type = data.type + "."; // FIXME: fragile HACK to avoid recursion data.type = data.type + _("."); // FIXME: fragile HACK to avoid recursion
insertData(data); insertData(data);
#endif #endif
return; return;
......
...@@ -198,17 +198,6 @@ void WatchData::setAddress(const QString &str) ...@@ -198,17 +198,6 @@ void WatchData::setAddress(const QString &str)
addr = 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 QString WatchData::toString() const
{ {
const char *doubleQuoteComma = "\","; const char *doubleQuoteComma = "\",";
......
...@@ -102,8 +102,6 @@ public: ...@@ -102,8 +102,6 @@ public:
void setHasChildren(bool c) { hasChildren = c; setHasChildrenUnneeded(); void setHasChildren(bool c) { hasChildren = c; setHasChildrenUnneeded();
if (!c) setChildrenUnneeded(); } if (!c) setChildrenUnneeded(); }
WatchData pointerChildPlaceHolder() const;
QString toString() const; QString toString() const;
QString toToolTip() const; QString toToolTip() const;
bool isLocal() const { return iname.startsWith(QLatin1String("local.")); } 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