From c4aafc354a73754a2f528c7da64a03e92087d26b Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 3 May 2010 15:16:30 +0200 Subject: [PATCH] debugger: get nested python types right --- share/qtcreator/gdbmacros/pdumper.py | 65 +++++++++++++++++++++------- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/share/qtcreator/gdbmacros/pdumper.py b/share/qtcreator/gdbmacros/pdumper.py index 7d9a465e1d1..8ca75eb3353 100644 --- a/share/qtcreator/gdbmacros/pdumper.py +++ b/share/qtcreator/gdbmacros/pdumper.py @@ -12,7 +12,7 @@ class qdebug: individualformats = None, watchers = None): self.options = options - self.expanded = expanded + self.expandedINames = expanded self.typeformats = typeformats self.individualformats = individualformats self.watchers = watchers @@ -34,6 +34,8 @@ class qdebug: t = str(type) if t.startswith(""): t = t[7:-2] + if t.startswith(""): + t = t[8:-2] return t def putType(self, type, priority = 0): @@ -51,14 +53,12 @@ class qdebug: def putName(self, name): self.put('name="%s",' % name) - def isExpanded(self, item): - #warn("IS EXPANDED: %s in %s" % (item.iname, self.expandedINames)) - if item.iname is None: - raise "Illegal iname 'None'" - if item.iname.startswith("None"): - raise "Illegal iname '%s'" % item.iname - #warn(" --> %s" % (item.iname in self.expandedINames)) - return item.iname in self.expandedINames + def isExpanded(self, iname): + #self.warn("IS EXPANDED: %s in %s" % (iname, self.expandedINames)) + if iname.startswith("None"): + raise "Illegal iname '%s'" % iname + #self.warn(" --> %s" % (iname in self.expandedINames)) + return iname in self.expandedINames def isExpandedIName(self, iname): return iname in self.expandedINames @@ -88,11 +88,16 @@ class qdebug: tt = self.cleanType(t) if tt == "module" or tt == "function": return + if str(value).startswith(" 1: + v = "@" + v[p + 11:-1] + elif v.startswith("