diff options
author | dim <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 |
commit | 78b9749c0a4ea980a8b934645da6ae98fcc665e8 (patch) | |
tree | dd2a1ddf0476664c2b823409c36cbccd52662ca7 /packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp | |
parent | 60cb593f9d55fa5ca7a5372b731f2330345b4b9a (diff) | |
download | FreeBSD-src-78b9749c0a4ea980a8b934645da6ae98fcc665e8.zip FreeBSD-src-78b9749c0a4ea980a8b934645da6ae98fcc665e8.tar.gz |
Vendor import of lldb trunk r256945:
https://llvm.org/svn/llvm-project/lldb/trunk@256945
Diffstat (limited to 'packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp')
-rw-r--r-- | packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp b/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp new file mode 100644 index 0000000..8030fe8 --- /dev/null +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp @@ -0,0 +1,59 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include <stdio.h> + +const char g_CharArray[] = "\x10\x11\x12\x13"; +static const char s_CharArray[] = "\x20\x21\x22\x23"; + +void +local_array_test_inner() +{ + char array[] = { 0x01, 0x02, 0x03, 0x04 }; + char *first_element_ptr = &array[0]; + // BP_local_array_test_inner + return; +} + +void +local_array_test() +{ + char array[] = { 0x05, 0x06, 0x07, 0x08 }; + // BP_local_array_test + local_array_test_inner(); + return; +} + +void +local_2d_array_test() +{ + int array2d[2][3]; + array2d[0][0] = 1; + array2d[0][1] = 2; + array2d[0][2] = 3; + array2d[1][0] = 4; + array2d[1][1] = 5; + array2d[1][2] = 6; + return; // BP_local_2d_array_test +} + +void +hello_world() +{ + printf("Hello, World!\n"); // BP_hello_world +} + +int +main(int argc, char const *argv[]) +{ // FUNC_main + local_array_test(); + hello_world(); + local_2d_array_test(); + return 0; +} |