12 void sideeffect(void){
16 uint8_t myfunction(uint8_t x){
25 uint8_t x = foo + bla;
28 uint8_t y = myfunction(bla);
30 uint8_t * verybad = 0;
34 // use this printf to cause a segfault
35 // printf("%d\n", *verybad);
37 for(i = 0; i < 10; ++i){
50 * Vorlesungsfolien Betriebssysteme UE auf der TU Wien:
51 [Debugging](http://ti.tuwien.ac.at/cps/teaching/courses/osue/slides/ss14_entwicklung_in_c.pdf)
52 * Online Tutorial auf [beej.us](http://beej.us/guide/bggdb/)
57 * gcc -g test.c -o test
86 Show preprocessor macros
87 ------------------------
90 SO](http://stackoverflow.com/questions/2934006/how-do-i-print-a-defined-constant-in-gdb)
94 (gdb) info macro MYCONST
95 (gdb) macro expand MYCONST
100 * print myfunction(y+23/7)/23.0
101 * print printf("%d\n", 23 > 42 ? 111 : 222)
107 create a file .gdbinit in ~ and put this line in: