summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/process/TestProcessAPI.py
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-04-16 00:01:13 +0000
committerJim Ingham <jingham@apple.com>2011-04-16 00:01:13 +0000
commit78a685aa2d8bbf48f25f2f93d4c0a74652eb0e9b (patch)
treebccc15a9b0e04bef29c0d2ceeb85a3c355dc9586 /lldb/test/python_api/process/TestProcessAPI.py
parentf46b33852c0294f1dba3303c6810902212fe749d (diff)
downloadbcm5719-llvm-78a685aa2d8bbf48f25f2f93d4c0a74652eb0e9b.tar.gz
bcm5719-llvm-78a685aa2d8bbf48f25f2f93d4c0a74652eb0e9b.zip
Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will have to be changed to also query for the dynamic types & offsets as it is looking up variables. The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var command to get the dynamic or static value of the variables you are printing. There's also a general setting: target.prefer-dynamic-value (boolean) = 'true' which is consulted if you call "frame var" without supplying a value for the -d option. llvm-svn: 129623
Diffstat (limited to 'lldb/test/python_api/process/TestProcessAPI.py')
-rw-r--r--lldb/test/python_api/process/TestProcessAPI.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/test/python_api/process/TestProcessAPI.py b/lldb/test/python_api/process/TestProcessAPI.py
index d00ad19ca09..02dff3c0078 100644
--- a/lldb/test/python_api/process/TestProcessAPI.py
+++ b/lldb/test/python_api/process/TestProcessAPI.py
@@ -209,7 +209,13 @@ class ProcessAPITestCase(TestBase):
if not error.Success() or result != byteSize:
self.fail("SBProcess.WriteMemory() failed")
- # Get the SBValue for the global variable 'my_int' again, with its updated value.
+ # Make sure that the val we got originally updates itself to notice the change:
+ self.expect(val.GetValue(frame),
+ "SBProcess.ReadMemory() successfully writes (int)256 to the memory location for 'my_int'",
+ exe=False,
+ startstr = '256')
+
+ # And for grins, get the SBValue for the global variable 'my_int' again, to make sure that also tracks the new value:
val = frame.FindValue("my_int", lldb.eValueTypeVariableGlobal)
self.expect(val.GetValue(frame),
"SBProcess.ReadMemory() successfully writes (int)256 to the memory location for 'my_int'",
OpenPOWER on IntegriCloud