Debugger: Make strip_typedefs robust for older LLDB

Change-Id: I9adac11f8997fcb0594d0a67419d4733dd4ed86b
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-06-24 16:49:46 +02:00
parent 4d026f9b53
commit ab94f6ebc5

View File

@@ -332,7 +332,10 @@ lldb.SBType.unqualified = lambda self: self.GetUnqualifiedType()
lldb.SBType.pointer = lambda self: self.GetPointerType() lldb.SBType.pointer = lambda self: self.GetPointerType()
lldb.SBType.code = lambda self: self.GetTypeClass() lldb.SBType.code = lambda self: self.GetTypeClass()
lldb.SBType.sizeof = property(lambda self: self.GetByteSize()) lldb.SBType.sizeof = property(lambda self: self.GetByteSize())
lldb.SBType.strip_typedefs = lambda self: self.GetCanonicalType()
lldb.SBType.strip_typedefs = \
lambda self: self.GetCanonicalType() if hasattr(self, 'GetCanonicalType') else self
lldb.SBType.__orig__str__ = lldb.SBType.__str__ lldb.SBType.__orig__str__ = lldb.SBType.__str__
lldb.SBType.__str__ = lldb.SBType.GetName lldb.SBType.__str__ = lldb.SBType.GetName
@@ -1442,7 +1445,6 @@ class Dumper:
self.reportData() self.reportData()
def updateData(self, args): def updateData(self, args):
warn("UPDATE 1")
if 'expanded' in args: if 'expanded' in args:
self.expandedINames = set(args['expanded'].split(',')) self.expandedINames = set(args['expanded'].split(','))
if 'autoderef' in args: if 'autoderef' in args:
@@ -1455,7 +1457,6 @@ class Dumper:
self.passExceptions = int(args['passexceptions']) self.passExceptions = int(args['passexceptions'])
self.passExceptions = True # FIXME self.passExceptions = True # FIXME
self.reportVariables(args) self.reportVariables(args)
warn("UPDATE 2")
def disassemble(self, args): def disassemble(self, args):
frame = self.currentFrame(); frame = self.currentFrame();