1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | save breakpoints file-name-to-save source file-name-to-save dprintf /dir/to/file.c:2368,"err is %d\n",err x /8xw key info files info source info variables info locals info args set python print-stack full dump binary memory ./file_path_to_save $from_addr $to_addr cond 1 $rdi==0x0 thread apply all bt set print elements 0 set follow-fork-mode [parent|child] set logging file <file name> set logging on info functions set logging off |
refer to:
https://www.wenjiangs.com/doc/gdb-save-breakpoints
https://gist.github.com/nmcv/212250dc8eb865a5282e