目標機上
gdbserver --multi localhost:12345 &
調試主機上
1) file xxxxx, 加載符號表。
(gdb)
2) target extended-remote x.x.x.x:12345
連接目標機。
3) set remote exec-file /xxxxx
設置遠程調試進程,路徑爲目標機上的路徑。
4) b main
設置斷點。
5) handle SIG32 pass noprint nostop
忽略SIG32信號
(gdb) run --xx
運行程序, xx爲參數。
solution of gdb issue “Program received signal SIG32, Real-time event 32”
先是“no debugging symbols found",google下發現是因爲程序使用strip去掉了debug信息。
然後gdb顯示"Program received signal SIG32, Real-time event 32."
因爲用到的lib庫被strip掉了,在dbg prompt後鍵入"handle SIG32 pass noprint nostop"即可。