45 lines · cpp
1 2#define BUFFER_SIZE 163struct PointType {4 int x;5 int y;6 int buffer[BUFFER_SIZE];7};8#include <vector>9int g_global = 123;10static int s_global = 234;11int test_indexedVariables();12int test_return_variable();13 14int main(int argc, char const *argv[]) {15 static float s_local = 2.25;16 PointType pt = {11, 22, {0}};17 for (int i = 0; i < BUFFER_SIZE; ++i)18 pt.buffer[i] = i;19 int x = s_global - g_global - pt.y; // breakpoint 120 {21 int x = 42;22 {23 int x = 72;24 s_global = x; // breakpoint 225 }26 }27 {28 int return_result = test_return_variable();29 }30 return test_indexedVariables(); // breakpoint 331}32 33int test_indexedVariables() {34 int small_array[5] = {1, 2, 3, 4, 5};35 int large_array[200];36 std::vector<int> small_vector;37 std::vector<int> large_vector;38 small_vector.assign(5, 0);39 large_vector.assign(200, 0);40 return 0; // breakpoint 441}42 43int test_return_variable() {44 return 300; // breakpoint 545}