Debugger: Make some gdb dumper work for libc++

Better user experience on Mac.

Change-Id: Ice1455685e0e9bbe0d45cde20563929b7370695d
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-01-31 16:56:32 +01:00
parent 667390f8da
commit b2874f3bb3
3 changed files with 17 additions and 6 deletions
+8 -1
View File
@@ -755,7 +755,11 @@ class Dumper(DumperBase):
def childAt(self, value, index):
field = value.type.fields()[index]
if len(field.name):
return value[field.name]
try:
return value[field.name]
except:
return value.cast(field.type)
# FIXME: Cheat. There seems to be no official way to access
# the real item, so we pass back the value. That at least
# enables later ...["name"] style accesses as gdb handles
@@ -765,6 +769,9 @@ class Dumper(DumperBase):
def fieldAt(self, type, index):
return type.fields()[index]
def simpleValue(self, value):
return str(value)
def directBaseClass(self, typeobj, index = 0):
# FIXME: Check it's really a base.
return typeobj.fields()[index]