| 400 | === Debugging === |
| 401 | |
| 402 | ==== GDB ==== |
| 403 | |
| 404 | Basic Commands |
| 405 | || l/list [file:]function/line/from,to || List/print the actual piece of code || |
| 406 | || b/break [file:]function/line || set a breakpoint at function (in file) || |
| 407 | || r/run [arglist] || run the programm, with arglist if specified || |
| 408 | || bt || backtrace: display the program stack || |
| 409 | || fr/frame number || we go to the selected frame number (like the ones resulting in a backtrace || |
| 410 | || p/print expr || Show the value of the variables, if you want to see the pointed value use *pointer || |
| 411 | || x || examine memory in different data formats/types (string, int, hex, etc), see: help x || |
| 412 | || c || continue running the programm after a stop (like a breakpoint) || |
| 413 | || n/next || execute next program line (after stopping); OVER any function call in the line || |
| 414 | || s/step || execute next program line (after stopping); INTO any function call in the line || |
| 415 | |
| 416 | |
| 417 | |
| 418 | Extra Commands |
| 419 | || help || show a list of extra help || |
| 420 | || info || show things about your program || |
| 421 | || help status || list of available status states of the program || |
| 422 | || info source || display information about the current source file || |
| 423 | || info locals || show values of local variables of actual function || |
| 424 | || info args || show arguments of actual function || |
| 425 | || set args [arguments] || set commandline arguments for the program || |
| 426 | || set listsize number || set the default number of lines for the command list || |
| 427 | || break || (without parameters) set the actual position as the default break point if the program restarts || |
| 428 | || info breakpoints || show all the defined breakpoints || |
| 429 | || tbreak line/function || set a temporal breakpoint; it is removed after to reach it || |
| 430 | || delete [bp_number|range] || delete breakpoints; no parameters = delete all of them || |
| 431 | || disable [bp_number|range] || disable breakpoints; use '''enable''' to enable them again || |
| 432 | || watch || set a watchpoint to an expression, the program stops when the value of the expression changes, use '''rwatch''' to read it at any time || |
| 433 | |
| 434 | |
| 435 | |
| 436 | |