Debugger: Consolidate special type lookups in *bridge.py

Change-Id: If5f255a32f1cfde925345f4a33e6fa4de01d10d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-09-28 09:13:14 +02:00
parent cce9159c3a
commit 412d7b2255
4 changed files with 17 additions and 58 deletions
-25
View File
@@ -124,11 +124,6 @@ class Dumper(DumperBase):
self.dyldLibraryPath = None
self.dyldFrameworkPath = None
self.charType_ = None
self.intType_ = None
self.sizetType_ = None
self.charPtrType_ = None
self.voidPtrType_ = None
self.isShuttingDown_ = False
self.isInterrupting_ = False
self.interpreterBreakpointResolvers = []
@@ -525,26 +520,6 @@ class Dumper(DumperBase):
self.qtVersionAndNamespace()
return self.qtVersionAndNamespace()[1]
def ptrSize(self):
return self.target.GetAddressByteSize()
def intType(self):
return self.fromNativeType(self.target.GetBasicType(lldb.eBasicTypeInt))
def charType(self):
return self.fromNativeType(self.target.GetBasicType(lldb.eBasicTypeChar))
def charPtrType(self):
return self.fromNativeType(self.target.GetBasicType(lldb.eBasicTypeChar).GetPointerType())
def voidPtrType(self):
return self.fromNativeType(self.target.GetBasicType(lldb.eBasicVoid).GetPointerType())
def sizetType(self):
if self.sizetType_ is None:
self.sizetType_ = self.lookupType('size_t')
return self.fromNativeType(self.sizetType)
def handleCommand(self, command):
result = lldb.SBCommandReturnObject()
self.debugger.GetCommandInterpreter().HandleCommand(command, result)