diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c b/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c new file mode 100644 index 00000000000..ec4824ad4ad --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c @@ -0,0 +1,15 @@ +//===-- main.c --------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +#include <stdio.h> + +int main(int argc, const char* argv[]) +{ + int *null_ptr = 0; + printf("Hello, segfault!\n"); + printf("Now crash %d\n", *null_ptr); // Crash here. +} |