要开始调试,我需要执行以下步骤:
screen -S gdb_program gdb/path/to/program
处理 SIGPIPE nostop noprint pass
- 是 gdb 命令
c
- 是 gdb 命令
如何编写一个可以运行的 shell 脚本:
./gdb.sh
最佳答案
使用 Here Document :
#!/bin/bash
screen -S gdb_program gdb /path/to/program <<EOF
handle SIGPIPE nostop noprint pass
EOF
关于linux - 从 shell 脚本启动 GDB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13785244/