linux - 从 shell 脚本启动 GDB

标签 linux shell terminal gdb

要开始调试,我需要执行以下步骤:

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/

相关文章:

linux - pkill 生成的字符串中数字的含义

c - 在 C linux 中使用命名管道从客户端向服务器发送数据

php - 备份网站文件并通过电子邮件发送

c++ - C、C++ 中的 Shell 上下文菜单

用于跟踪进程中的线程和系统调用的 Linux 终端命令

linux - Ubuntu 或 Centos 中的 prstat

Python 脚本 grep 目录

linux - 配置 linux 启动器以传递变量

javascript - 使用 Node.js 初始化和配置 AWS

python - 将变量从 python 脚本传递到 bash 脚本