diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-08-02 17:27:39 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-08-02 17:27:39 +0000 |
commit | c3e320a7a0ccf754bd9e4ec0cac252845d5a24d2 (patch) | |
tree | ffc06a5a8545d9043ff96ee8cd576a84238d1cfe /lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py | |
parent | 9ab728bb058429358fc1aba008e2d32c71106240 (diff) | |
download | bcm5719-llvm-c3e320a7a0ccf754bd9e4ec0cac252845d5a24d2.tar.gz bcm5719-llvm-c3e320a7a0ccf754bd9e4ec0cac252845d5a24d2.zip |
Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
- expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
- Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target
llvm-svn: 136695
Diffstat (limited to 'lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py')
-rw-r--r-- | lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py index e17b6fc195b..31a64a439e8 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py @@ -164,7 +164,7 @@ class DataFormatterTestCase(TestBase): 'inline = ', 'explicit = ', 'content = ', - 'a very much boring task to write a string this way!!\\xe4\\x8c\\xb3']) + 'a very much boring task to write a string this way!!\\xcf\\x83']) self.expect('frame variable str10 -P 1 -Y', substrs = ['mutable =', @@ -215,7 +215,7 @@ class DataFormatterTestCase(TestBase): self.expect('frame variable str8', substrs = ['hasVeryLongExtensionThisTime']) self.expect('frame variable str9', - substrs = ['a very much boring task to write a string this way!!\\xe4\\x8c\\xb3']) + substrs = ['a very much boring task to write a string this way!!\\xcf\\x83']) self.expect('frame variable str10', substrs = ['This is a Unicode string \\xcf\\x83 number 4 right here']) self.expect('frame variable str11', @@ -224,6 +224,25 @@ class DataFormatterTestCase(TestBase): substrs = ['a.out']) self.expect('frame variable str12', substrs = ['Process Name: a.out Process Id:']) + self.expect('frame variable dyn_test', matching=False, + substrs = ['Process Name: a.out Process Id:']) + self.expect('frame variable dyn_test -d run-target', + substrs = ['(id, dynamic type:', + 'Process Name: a.out Process Id:']) + + + # check that we can format stuff out of the expression parser + self.expect('expression ((id)@"Hello")', matching=False, + substrs = ['Hello']) + + self.expect('expression -d true -- ((id)@"Hello")', + substrs = ['Hello']) + + self.expect('expr -d true -- label1', + substrs = ['Process Name']) + + self.expect('expr -d true -- @"Hello"', + substrs = ['Hello']) if __name__ == '__main__': import atexit |