gdb调试带参数和调试core
gdb调试:
LD_LIBRARY_PATH=./lib:./where/3rd gdb --args bin/your-exe -Cfg ./cfg/my_settings.cfg
。。。
run
gdb调试已经启动的进程:
1. sudo gdb attach 23045 (进程ID)
2. info thread (查看线程)
3. t 3 (切换到 thread 3)
4. bt (查看该线程的堆栈信息 )
gdb调试core:
gdb your-exe core.file