diff options
author | hjk <hjk@theqtcompany.com> | 2016-07-21 09:19:30 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2016-07-25 08:56:34 +0000 |
commit | 7037644252fd9cac6d4c2fb919542163453ad820 (patch) | |
tree | 051133b9edcd724e5a2cbd756c80e551e93df333 /share | |
parent | b47b9ea9511db6330db22c8abfd67658323430ea (diff) | |
download | qt-creator-7037644252fd9cac6d4c2fb919542163453ad820.tar.gz |
Debugger: Show object address with LLDB if there is nothing better
Mimic what GDB does.
Change-Id: Ied3fff41339220eacc5c942b3f30e744f9f32a21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/debugger/lldbbridge.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 8e4cb83ef1..afbff9099f 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -206,7 +206,7 @@ class Dumper(DumperBase): self.currentType = ReportItem() self.currentNumChild = None self.currentMaxNumChild = None - self.currentPrintsAddress = None + self.currentPrintsAddress = True self.currentChildType = None self.currentChildNumChild = -1 self.currentWatchers = {} @@ -250,12 +250,14 @@ class Dumper(DumperBase): if item.name == '**&': item.name = '*' self.put('name="%s",' % item.name) + item.savedCurrentAddress = self.currentAddress item.savedIName = self.currentIName item.savedValue = self.currentValue item.savedType = self.currentType self.currentIName = item.iname self.currentValue = ReportItem() self.currentType = ReportItem() + self.currentAddress = None def exitSubItem(self, item, exType, exValue, exTraceBack): if not exType is None: @@ -278,10 +280,13 @@ class Dumper(DumperBase): self.put('value="%s",' % self.currentValue.value) except: pass + if not self.currentAddress is None: + self.put(self.currentAddress) self.put('},') self.currentIName = item.savedIName self.currentValue = item.savedValue self.currentType = item.savedType + self.currentAddress = item.savedCurrentAddress return True def stateName(self, s): @@ -962,7 +967,7 @@ class Dumper(DumperBase): #if int(addr) == 0xffffffffffffffff: # raise RuntimeError("Illegal address") if self.currentPrintsAddress and not addr is None: - self.put('address="0x%x",' % int(addr)) + self.currentAddress = 'address="0x%x",' % toInteger(addr) def isFunctionType(self, typeobj): if self.isGoodLldb: @@ -1174,6 +1179,7 @@ class Dumper(DumperBase): return self.output = '' + self.currentAddress = None partialVariable = args.get('partialvar', "") isPartial = len(partialVariable) > 0 |