summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-08-19 21:13:46 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-08-19 21:13:46 +0000
commitd64d0bc0ea6864eb209b55d5a5faae988dea296b (patch)
tree906d55427f70479caaac7c76bcafc0cfef24c410 /lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
parent4ad83e69a01ab401267d46f933e7fc33e9fcccea (diff)
downloadbcm5719-llvm-d64d0bc0ea6864eb209b55d5a5faae988dea296b.tar.gz
bcm5719-llvm-d64d0bc0ea6864eb209b55d5a5faae988dea296b.zip
- Now using ${var} as the summary for an aggregate type will produce "name-of-type @ object-location" instead of giving an error
e.g. you may get "foo_class @ 0x123456" when typing "type summary add -f ${var} foo_class" - Added a new special formatting token %T for summaries. This shows the type of the object. Using it, the new "type @ location" summary could be manually generated by writing ${var%T} @ ${var%L} - Bits and pieces required to support "frame variable array[n-m]" The feature is not enabled yet because some additional design and support code is required, but the basics are getting there - Fixed a potential issue where a ValueObjectSyntheticFilter was not holding on to its SyntheticChildrenSP Because of the way VOSF are being built now, this has never been an actual issue, but it is still sensible for a VOSF to hold on to the SyntheticChildrenSP as well as to its FrontEnd llvm-svn: 138080
Diffstat (limited to 'lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py')
-rw-r--r--lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index a5862ac1e87..1667aeb25ef 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -195,7 +195,34 @@ class DataFormatterTestCase(TestBase):
'[2] = cool object @ 0x',
'[3] = cool object @ 0x',
'[4] = cool object @ 0x'])
+
+ # test getting similar output by exploiting ${var} = 'type @ location' for aggregates
+ self.runCmd("type summary add -f \"${var}\" i_am_cool")
+
+ # this test might fail if the compiler tries to store
+ # these values into registers.. hopefully this is not
+ # going to be the case
+ self.expect("frame variable cool_array",
+ substrs = ['[0] = i_am_cool @ 0x',
+ '[1] = i_am_cool @ 0x',
+ '[2] = i_am_cool @ 0x',
+ '[3] = i_am_cool @ 0x',
+ '[4] = i_am_cool @ 0x'])
+
+ # test getting same output by exploiting %T and %L together for aggregates
+ self.runCmd("type summary add -f \"${var%T} @ ${var%L}\" i_am_cool")
+
+ # this test might fail if the compiler tries to store
+ # these values into registers.. hopefully this is not
+ # going to be the case
+ self.expect("frame variable cool_array",
+ substrs = ['[0] = i_am_cool @ 0x',
+ '[1] = i_am_cool @ 0x',
+ '[2] = i_am_cool @ 0x',
+ '[3] = i_am_cool @ 0x',
+ '[4] = i_am_cool @ 0x'])
+
self.runCmd("type summary add -f \"goofy\" i_am_cool")
self.runCmd("type summary add -f \"${var.second_cool%S}\" i_am_cooler")
OpenPOWER on IntegriCloud