gdb 调试SIGTRAP
gdb 调试任何程序都提示 “Program received signal SIGTRAP, Trace/breakpoint trap.”
(gdb) handle SIGTRAP nostop pass
SIGTRAP is used by the debugger.
Are you sure you want to change it? (y or n) Y
Signal Stop Print Pass to program Description
SIGTRAP No Yes Yes Trace/breakpoint trap
(gdb) c
Continuing.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
One of the reasons this may happen is when your GDB loads "wrong" libthread_db.so
(one that doesn't match the target libc.so.6
).