Skip to content

Commit 2639306

Browse files
committed
Debug with with gdb
1 parent 699ff01 commit 2639306

File tree

1 file changed

+21
-0
lines changed
  • Advanced Debugging and Analysis/Debugging with the GNU Project Debugger gdb

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <stdio.h>
2+
3+
int myFunction()
4+
{
5+
//do nothing
6+
}
7+
8+
int main(void)
9+
{
10+
const int data[]={1,3,5,6,7};
11+
int i=0, sum=0;
12+
13+
for(i=0;i>=0; ++i)
14+
{
15+
sum+=data[i];
16+
}
17+
18+
printf("The sum is %i.\n", sum);
19+
20+
return 0;
21+
}

0 commit comments

Comments
 (0)