我试图在gdb的linux中为创建线程的程序设置一个断点。我想在线程创建时设置一个断点,但不幸的是 pthread_create 是一个版本化的符号,我无法得到它的全名。
如果我输入:
catch thread_start我得到
thread_start尚未实现的捕获在这种情况下,如何在gdb中捕获线程创建的最佳方式?试试这个:
(gdb)b __pthread_create_2_1 $ b $ b或者用 GDB =sourceware/ml/gdb-patches/2008-05/msg00396.html =noreferrer>此修补程序应用。
或者试试最新的预发布 GDB 这里,它应该允许你做catch syscall clone
I am trying to set a breakpoint in linux in gdb for a program creating threads. I would like to set a breakpoint on thread creation, but unfortunately pthread_create is a versioned symbol, and I can't get its full name.
If I type:
catch thread_startI get
Catch of thread_start not yet implementedHow is the best way to catch thread creation in gdb for this situation?
解决方案Try this:
(gdb) b __pthread_create_2_1Or build your own GDB with this patch applied.
Or try the latest pre-release GDB here, which should allow you to do "catch syscall clone"
更多推荐
GDB断点在pthread
发布评论