Estimated read time: 1 minutes
during coding the setup, i noticed some strange behaviours, i debugged then for a long time ;)
so to learn from my faults:
- strcat does not accepts a NULL pointer as a dest char*
- getenv() just gives you a pointer, you have to strdup() it if you want to modify the value
an other thing: i forgot again and again what's the difference between
stepand
nextin gdb:
- setp executes the current line of the program and stops on the next statement to be executed
- next is like step, however, if the current line of the program contains a function call, it executes the function and stops at the next line
ah, and if you want to execute the whole code line by line from the begining, you'll need
break 1and then the usual
run