gdb 执行脚本

cat gdb.cmd 
handle SIG37 nostop noprint
handle SIGSTOP nostop noprint
set height 0
set follow-fork-mode child
set logging on 
b read if $rdi == 169
commands
bt
c
end
c
gdb att pidxxx -ex “source gdb.cmd”

这样就会执行gdb.cmd文件中的命令

 

posted on 2023-03-17 10:26  爱新觉罗玄烨  阅读(181)  评论(0)    收藏  举报

导航