summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/functionalities/target_command/TestTargetCommand.py4
-rw-r--r--lldb/test/functionalities/target_command/globals.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/lldb/test/functionalities/target_command/TestTargetCommand.py b/lldb/test/functionalities/target_command/TestTargetCommand.py
index 7b2648c6df1..afcf5ee5681 100644
--- a/lldb/test/functionalities/target_command/TestTargetCommand.py
+++ b/lldb/test/functionalities/target_command/TestTargetCommand.py
@@ -107,6 +107,8 @@ class targetCommandTestCase(TestBase):
substrs = ["my_global_char", "'X'"])
self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ['my_global_str', '"abc"'])
+ self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
+ substrs = ['my_static_int', '228'])
self.runCmd("run")
@@ -116,6 +118,8 @@ class targetCommandTestCase(TestBase):
substrs = ["my_global_char", "'X'"])
self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ['my_global_str', '"abc"'])
+ self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
+ substrs = ['my_static_int', '228'])
if __name__ == '__main__':
diff --git a/lldb/test/functionalities/target_command/globals.c b/lldb/test/functionalities/target_command/globals.c
index 000104890ef..51f08856518 100644
--- a/lldb/test/functionalities/target_command/globals.c
+++ b/lldb/test/functionalities/target_command/globals.c
@@ -10,12 +10,15 @@
char my_global_char = 'X';
const char* my_global_str = "abc";
+static int my_static_int = 228;
int main (int argc, char const *argv[])
{
printf("global char: %c\n", my_global_char);
printf("global str: %s\n", my_global_str);
+
+ printf("argc + my_static_int = %d\n", (argc + my_static_int));
return 0;
}
OpenPOWER on IntegriCloud