A software bug is an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.
The process of finding and fixing bugs is termed "debugging" and often uses formal techniques or tools to pinpoint bugs.
breakpoint
debug mode
re-run
resume
pause
stop
step over
step into
step out
check output
call stack
list of variables
right click
sudo apt install gdb
gcc -g -o to_debug debug.c
gdb to_debug
commands | abbr. | usage |
---|---|---|
list | l | print lines from a source file |
run | r | run the program |
break <location> | b | set a breakpoint at the given location |
info break | i b | print a table of all breakpoints |
enable / disable <breakpoint> | en/dis | enable / disable the breakpoint |
step | s | execute next step (step into) |
next | n | execute next step (step over) |
finish | fin | continue running until exiting current function |
continue | c | resume program execution |
print <variable> | p | print the variable's value |
... | ... | ... |