diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py | 1 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py index a881117ed7a..46cf54397ac 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py @@ -52,6 +52,7 @@ class GlobalVariablesTestCase(TestBase): # Check that GLOBAL scopes are indicated for the variables. self.expect("frame variable --show-types --scope --show-globals --no-args", VARIABLES_DISPLAYED_CORRECTLY, substrs = ['GLOBAL: (int) g_file_global_int = 42', + 'STATIC: (const int) g_file_static_int = 2', 'GLOBAL: (const char *) g_file_global_cstr', '"g_file_global_cstr"', 'STATIC: (const char *) g_file_static_cstr', diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c index d0ac6a9534f..499b2504774 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c +++ b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c @@ -10,13 +10,14 @@ int g_common_1; // Not initialized on purpose to cause it to be undefined external in .o file int g_file_global_int = 42; +static const int g_file_static_int = 2; const char *g_file_global_cstr = "g_file_global_cstr"; static const char *g_file_static_cstr = "g_file_static_cstr"; extern int g_a; int main (int argc, char const *argv[]) { - g_common_1 = g_file_global_int / 2; + g_common_1 = g_file_global_int / g_file_static_int; static const char *g_func_static_cstr = "g_func_static_cstr"; printf ("%s %s\n", g_file_global_cstr, g_file_static_cstr); return g_file_global_int + g_a + g_common_1; // Set break point at this line. //// break $source:$line; continue; var -global g_a -global g_global_int |