gdb的“不是从终端输入”消息被压制? [英] Can gdb's "input not from terminal" messages be suppressed?

查看:327
本文介绍了gdb的“不是从终端输入”消息被压制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 gdb 脚本,它以命令 quit 结尾。

I have a gdb script that ends with the command quit.

当我像这样运行脚本时:

When I run the script like this:

gdb -x foo.gdb target_program

最终输出总是有:

The final output always has:

Quit anyway? (y or n) [answered Y; input not from terminal]

有没有办法抑制整个消息,甚至只是部分在 [] 中?

Is there a way to suppress either the entire message, or even just the part inside the []?

[answered Y; input not from terminal]


推荐答案

尝试第一次执行

set confirm off 

在你的foo.gdb中

in your foo.gdb

这篇关于gdb的“不是从终端输入”消息被压制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆