forked from qt-creator/qt-creator
Debugger: Robustify extraction of integral values using LLDB
Change-Id: Ieabad21e5e00bef12eb51046235890840b5a77a1 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user