[英]Linux, How to wait some seconds before run the c code in GDB
I am using the following command to load the c file program and run it in GDB from terminal in one click: 我使用以下命令加载c文件程序并在终端只需点击一下即可在GDB中运行它:
gdb --eval-command='file c.out' --eval-command='c'
I want to sleep some seconds after loading the program but before starting the program in GDB, some thing like: 我想在加载程序后几秒钟睡觉,但在GDB中启动程序之前,有些事情如下:
gdb --eval-command='file c.out' --eval-command='<sleep 5>' --eval-command='c'
为gdb提供一个让它暂停5秒的命令行选项的一种方法是告诉它在shell中运行“sleep 5”命令:
--eval-command="shell sleep 5"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.