Kaydet (Commit) 18485400 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat Kaydeden (comit) Cédric Bosdonnat

SmartPtr pretty printer now behaves according to set print object value

Change-Id: Ie8a092b7d91e0f379c7102c3aa12da8eb7666840
üst 9f4c8a8b
......@@ -32,9 +32,14 @@ class SmartPtrPrinter:
def to_string(self):
if self.value['px']:
return "%s %s" % (self.typename, self.value['px'].dereference())
print_object = gdb.parameter('print object')
value = self.value['px'].dereference()
if print_object:
dynamic_type = self.value['px'].dynamic_type
value = self.value['px'].cast(dynamic_type).dereference()
return "%s %s" % (self.typename, value)
else:
return "empty %s" % (self.typename,)
return "empty %s" % (self.typename)
printer = None
......
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