summaryrefslogtreecommitdiffstats
path: root/solenv/gdb
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-05-27 19:53:01 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2013-05-28 15:00:39 +0200
commit1848540022f2f50436ec505eb82efa99bb14a5b3 (patch)
tree3b959c6bbdac78847f10a1a17da04d493ec0d88f /solenv/gdb
parentn#816593: Floating table width import fix: adjust the frame width (diff)
downloadcore-1848540022f2f50436ec505eb82efa99bb14a5b3.tar.gz
core-1848540022f2f50436ec505eb82efa99bb14a5b3.zip
SmartPtr pretty printer now behaves according to set print object value
Change-Id: Ie8a092b7d91e0f379c7102c3aa12da8eb7666840
Diffstat (limited to 'solenv/gdb')
-rw-r--r--solenv/gdb/boost/smart_ptr.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/solenv/gdb/boost/smart_ptr.py b/solenv/gdb/boost/smart_ptr.py
index fdf5818b07f4..6646e12ea5f8 100644
--- a/solenv/gdb/boost/smart_ptr.py
+++ b/solenv/gdb/boost/smart_ptr.py
@@ -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