forked from qt-creator/qt-creator
Debugger: Fix pointer arithmetic in lldbbridge.py
Cut-and-past-o in a currently unused code path. Change-Id: I2c690e5010ade7f3ebbb4a94163d7b44da13c10d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -144,7 +144,7 @@ def impl_SBValue__add__(self, offset):
|
||||
def impl_SBValue__sub__(self, other):
|
||||
if self.GetType().IsPointerType():
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
address = self.GetValueAsUnsigned() - offset.GetValueAsSigned()
|
||||
address = self.GetValueAsUnsigned() - other
|
||||
address = address & 0xFFFFFFFFFFFFFFFF # Force unsigned
|
||||
return self.CreateValueFromAddress(None, address, self.GetType())
|
||||
if other.GetType().IsPointerType():
|
||||
|
||||
Reference in New Issue
Block a user