diff --git a/lldb/test/API/commands/target/basic/a.c b/lldb/test/API/commands/target/basic/a.c index b8157275f1a9..9ce587e41453 100644 --- a/lldb/test/API/commands/target/basic/a.c +++ b/lldb/test/API/commands/target/basic/a.c @@ -1,6 +1,8 @@ +#include + int main(int argc, const char* argv[]) { int *null_ptr = 0; printf("Hello, segfault!\n"); printf("Now crash %d\n", *null_ptr); // Crash here. } diff --git a/lldb/test/API/lang/c/global_variables/main.c b/lldb/test/API/lang/c/global_variables/main.c index 864f094edd48..eb7720a6b048 100644 --- a/lldb/test/API/lang/c/global_variables/main.c +++ b/lldb/test/API/lang/c/global_variables/main.c @@ -1,15 +1,17 @@ +#include + 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"; int *g_ptr = &g_file_global_int; extern int g_a; int main (int argc, char const *argv[]) { 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_cstr + *g_file_static_cstr + g_file_global_int + g_a + g_common_1 + *g_ptr; // Set break point at this line. //// break $source:$line; continue; var -global g_a -global g_global_int }