gdb breakpoint on pthread_create

后端 未结 3 789
失恋的感觉
失恋的感觉 2020-12-28 17:55

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<

3条回答
  •  甜味超标
    2020-12-28 18:37

    Try this:

    (gdb) b __pthread_create_2_1
    

    Or 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"

提交回复
热议问题