Debugger: Robustify extraction of integral values using LLDB

Change-Id: Ieabad21e5e00bef12eb51046235890840b5a77a1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-03-26 14:22:33 +01:00
parent 00199039e7
commit cc469f6466

View File

@@ -509,13 +509,16 @@ class Dumper(DumperBase):
return int(value.GetLoadAddress())
def extractInt(self, address):
return int(self.createValue(address, self.intType()))
error = SBError()
return int(self.process.ReadUnsignedFromMemory(address, 4, error))
def extractInt64(self, address):
return int(self.createValue(address, self.int64Type()))
error = SBError()
return int(self.process.ReadUnsignedFromMemory(address, 8, error))
def extractByte(self, address):
return int(self.createValue(address, self.charType())) & 0xFF
error = SBError()
return int(self.process.ReadUnsignedFromMemory(address, 1, error) & 0xFF)
def handleCommand(self, command):
result = lldb.SBCommandReturnObject()