Commit 700eca4b authored by hjk's avatar hjk

Debugger: Make memory accessible again with gdb < 7.4

gdb.selected_inferior is too new for now.

Change-Id: I4290574b6dd2803a2fd2f860700693e7b2ac6efb
Reviewed-by: default avatarRainer Keller <>
Reviewed-by: default avatarhjk <>
parent dbb95ba7
......@@ -1208,8 +1208,15 @@ class Dumper(DumperBase):
# Try _some_ fallback (good enough for the std::complex dumper)
return gdb.parse_and_eval("{%s}%s" % (referencedType, address))
def selectedInferior(self):
return gdb.selected_inferior()
# Pre gdb 7.4. Right now we don't have more than one inferior anyway.
return gdb.inferiors()[0]
def readRawMemory(self, addr, size):
mem = gdb.selected_inferior().read_memory(addr, size)
mem = self.selectedInferior().read_memory(addr, size)
if sys.version_info[0] >= 3:
return mem
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment