summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/tests/breakpoints/main.cpp
blob: 81a5851fd35a9728df05510c7717af773c71a8d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

void foo(int);

void set_value(int* i)
{
    *i = 10;
}

void modify(int* i)
{
    *i = 15;
}

void read(int* i)
{
    static int i2;
    i2 = *i;
}

int test_main(int* i)
{
    foo(5);
    set_value(i);
    
    modify(i);
    read(i);
    
    for(unsigned j = 0; j < 10; ++j)
	foo(j);
        
    return 0;    
}

int main()
{
    int var;
    return test_main(&var);
}