1.gcc -g gbd.c -o my_debug -lpthread 2.list [行号] b 4.r 5.delete [断点号] 6.n 7.p [变量名] 9.thread apply all bt,thread apply [编号…] [命令] threads,thread+线程编号 11.set scheduler-locking on 11. c 12.finish 13.q 二、GDB调试多进程 1.show follow-fork-mode,set foll...
(gdb) set detach-on-fork off (gdb) set schedule-multiple on (gdb) r Breakpoint 1, main () at example2.c:19 19 pid_t pid = fork(); (gdb) n [New inferior 3 (process 5805)] Reading symbols from /home/wangqi/winshare/C-Thread-Pool/a.out... Reading symbols from /usr/lib/deb...
only threadsofthe current inferiortorun.Forexample,ifGDBisattachedtotwo inferiors,eachwithtwo threads, thecontinuecommand resumes only the two threadsofthe current inferior. Thisisuseful,forexample,whenyou debug a program that forksandyou wanttohold the parent stopped (so that,forinstance, it doesn...
Reading symbols from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0...Reading symbols from /usr/lib/debug/.build-id/78/5ce90f42d13a60a36853327823ef5f90f2e8f1.debug...done. 所有我关心的symbols就加载完了。 使用gdb debug 程序 debug 主线程 首先,可以是用info threads,查看当前的线程 (gdb)info...
(gdb) info inferiors ###显示正在调试的进程 Num Description Executable 2 process 23873 /home/vfhky/bin/gdb_pthread ###子进程 * 1 process 23869 /home/vfhky/bin/gdb_pthread ###父进程 (gdb) info threads ###查看所有运行的线程,父进程23869、子进程23873、线程24024,由星号可以发现目前调试已经切...
info target -- Names of targets and files being debugged info terminal -- Print inferior's saved terminal status info threads -- IDs of currently known threads info tracepoints -- Status of tracepoints info types -- All type names
debugged info tasks -- Provide information about all known Ada tasks info terminal -- Print inferior's saved terminal status info threads -- Display currently known threads info tracepoints -- Status of specified tracepoints (all tracepoints if no argument) info tvariables -- Status of trace ...
(gdb) p argc $1 = 1 (gdb) p argv $2 = (char **) 0x7fffffffca38 (gdb) p argv[0] $3 = 0x7fffffffcd94 "/home/jinbo/gitme/linux/gdb/book_debug/chapter_3.3/myexe" (gdb) p $4 = 0x7fffffffcd94 "/home/jinbo/gitme/linux/gdb/book_debug/chapter_3.3/myexe" Breakpoint 2,...
5.3.3. Remote Debugging There are multiple methods to remote debug an application with CUDA-GDB. In addition to using SSH or VNC from the host system to connect to the target system, it is also possible to use the target remote GDB feature. Using this option, the local cuda-gdb (client...
When developing massively parallel applications on the GPU, you need a debugger capable of handling thousands of threads running simultaneously on each GPU in the system. CUDA-GDB delivers a seamless debugging experience that allows you to debug both the CPU and GPU portions of your application sim...