diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-08-09 23:50:01 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-08-09 23:50:01 +0000 |
commit | ce68b02c99d4f87b0d8bf7394333b55c56285a08 (patch) | |
tree | 5f6c70622627900db2b4f7323e78a1750572f4fc /lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py | |
parent | b91e48992329d7039c4c3899a5e6df02cbf3cf90 (diff) | |
download | bcm5719-llvm-ce68b02c99d4f87b0d8bf7394333b55c56285a08.tar.gz bcm5719-llvm-ce68b02c99d4f87b0d8bf7394333b55c56285a08.zip |
CFString.py now shows contents in a more NSString-like way (e.g. you get @"Hello" instead of "Hello")
new --raw-output (-R) option to frame variable prevents using summaries and synthetic children
other future formatting enhancements will be excluded by using the -R option
test case enhanced to check that -R works correctly
llvm-svn: 137185
Diffstat (limited to 'lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py')
-rw-r--r-- | lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py index 57c57215235..4d85885235f 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/CFString.py @@ -1,7 +1,13 @@ -# synthetic children provider for CFString +# synthetic children and summary provider for CFString # (and related NSString class) import lldb +def CFString_SummaryProvider (valobj,dict): + provider = CFStringSynthProvider(valobj,dict); + if provider.invalid == False: + return '@'+provider.get_child_at_index(provider.get_child_index("content")).GetSummary(); + return '' + class CFStringSynthProvider: def __init__(self,valobj,dict): self.valobj = valobj; @@ -228,11 +234,4 @@ class CFStringSynthProvider: def update(self): self.adjust_for_architecture(); - self.compute_flags(); - -def CFString_SummaryProvider (valobj,dict): - provider = CFStringSynthProvider(valobj,dict); - if provider.invalid == False: - return provider.get_child_at_index(provider.get_child_index("content")).GetSummary(); - return '' - + self.compute_flags();
\ No newline at end of file |