summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-09-15 18:21:40 +0200
committerhjk <qtc-committer@nokia.com>2009-09-16 11:10:59 +0200
commit91e60257cd6f357f591f86c81ff297b4978fe38b (patch)
tree620ebf18605e9c8e5a6d83c84c2c2f3b9e7699c0
parent2d9da51892b80369d38ee89f5cd44177d851335d (diff)
downloadqt-creator-91e60257cd6f357f591f86c81ff297b4978fe38b.tar.gz
debugger: special handling for Symbian TInt and TBool.
We know they don't have nested contents
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp12
-rw-r--r--src/plugins/debugger/watchhandler.cpp2
-rw-r--r--src/plugins/debugger/watchutils.cpp7
-rw-r--r--src/plugins/debugger/watchutils.h1
4 files changed, 20 insertions, 2 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 1e80cfa632..bd8f8491d2 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -85,7 +85,7 @@ namespace Internal {
using namespace Debugger::Constants;
//#define DEBUG_PENDING 1
-//#define DEBUG_SUBITEM 1
+#define DEBUG_SUBITEM 1
#if DEBUG_PENDING
# define PENDING_DEBUG(s) qDebug() << s
@@ -3767,6 +3767,16 @@ void GdbEngine::setLocals(const QList<GdbMi> &locals)
// pass through the insertData() machinery
if (isIntOrFloatType(data.type) || isPointerType(data.type))
setWatchDataValue(data, item.findChild("value"));
+ if (isSymbianIntType(data.type)) {
+ setWatchDataValue(data, item.findChild("value"));
+ data.setHasChildren(false);
+ }
+ // Let's be a bit more bold:
+ //if (!hasDebuggingHelperForType(data.type)) {
+ // QByteArray value = item.findChild("value").data();
+ // if (!value.isEmpty() && value != "{...}")
+ // data.setValue(decodeData(value, 0));
+ //}
if (!qq->watchHandler()->isExpandedIName(data.iname))
data.setChildrenUnneeded();
if (isPointerType(data.type) || data.name == __("this"))
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index d8e6cca600..8e71dae961 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -66,7 +66,7 @@ namespace Debugger {
namespace Internal {
static const QString strNotInScope =
- QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>");
+ QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>");
static int watcherCounter = 0;
static int generationCounter = 0;
diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp
index 1663f94266..ff706a13bf 100644
--- a/src/plugins/debugger/watchutils.cpp
+++ b/src/plugins/debugger/watchutils.cpp
@@ -339,6 +339,13 @@ bool isIntType(const QString &type)
return types.contains(type);
}
+bool isSymbianIntType(const QString &type)
+{
+ static const QStringList types = QStringList()
+ << QLatin1String("TInt") << QLatin1String("TBool");
+ return types.contains(type);
+}
+
bool isIntOrFloatType(const QString &type)
{
static const QStringList types = QStringList()
diff --git a/src/plugins/debugger/watchutils.h b/src/plugins/debugger/watchutils.h
index f085179d41..395ba5f5ea 100644
--- a/src/plugins/debugger/watchutils.h
+++ b/src/plugins/debugger/watchutils.h
@@ -73,6 +73,7 @@ bool extractTemplate(const QString &type, QString *tmplate, QString *inner);
QString extractTypeFromPTypeOutput(const QString &str);
bool isIntOrFloatType(const QString &type);
bool isIntType(const QString &type);
+bool isSymbianIntType(const QString &type);
enum GuessChildrenResult { HasChildren, HasNoChildren, HasPossiblyChildren };
GuessChildrenResult guessChildren(const QString &type);