Debugging with GDB

Debugging with GDB

GDB

gdb -q Quiet mode entering gdb (gdb no longer print version information)
commonly used command
file filepath to load the specified path of the executable file.
Add the source file directory path to search the directory
list display source
list to display 15 lines before and after a total of 15 default number of rows (10) lines of code displayed can be changed by command xx listsize the SET
Show listsize display the current list shows the number of rows
list 10,50 Showing 10-50 lines of code
list func func function code is displayed near the
break 12 break point at line 12
to print a list of breakpoints breakpoints info
disable 12 disable line 12 breakpoint
clear 12 deletion breakpoints line 12
delete 12 delete 12 line breakpoint
delete delete all breakpoints
next to the next piece of code
continue to continue until the next breakpoint
print i print variable values
kill to end the current debugging process

DDD Linux embedded GDB graphical debugger tool

Reference under linux how to use gdb debugging

Guess you like

Origin www.cnblogs.com/qiangge-blog/p/11301414.html