Debugger: Handle extraction of data from temporary SBValue

Change-Id: I5d79b59e971933fef8ef94c20333035188d33a57
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-01-28 13:20:05 +01:00
parent e6e808669f
commit d40ee224d4
5 changed files with 39 additions and 50 deletions

View File

@@ -947,15 +947,6 @@ class Dumper(DumperBase):
mem.tobytes()
return mem
# FIXME: The commented out versions do not work with
# a Python 3 based GDB due to the bug addressed in
# https://sourceware.org/ml/gdb-patches/2013-09/msg00571.html
def dereference(self, addr):
#return long(gdb.Value(addr).cast(self.voidPtrType().pointer()).dereference())
ptrSize = self.ptrSize()
code = "I" if ptrSize == 4 else "Q"
return struct.unpack(code, self.readRawMemory(addr, ptrSize))[0]
def extractInt64(self, addr):
return struct.unpack("q", self.readRawMemory(addr, 8))[0]
@@ -965,11 +956,6 @@ class Dumper(DumperBase):
def extractByte(self, addr):
return struct.unpack("b", self.readRawMemory(addr, 1))[0]
# Do not use value.address here as this might not have one,
# i.e. be the result of an inferior call
def dereferenceValue(self, value):
return toInteger(value.cast(self.voidPtrType()))
def extractStaticMetaObjectHelper(self, typeobj):
"""
Checks whether type has a Q_OBJECT macro.