如何记录我在GDB中键入的命令? [英] How can I log the command I typed in GDB?

查看:51
本文介绍了如何记录我在GDB中键入的命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在GDB中,我可以使用 set logging on打开设置,但这仅记录命令的结果,而不记录命令本身。如果我还可以看到命令键入的信息,将很有用。

In GDB, I can turn logging on with "set logging on", but this only logs the results of my commands, and not the command itself. It would be useful if I could see the command typed as well. Is there any way to log the command typed?

推荐答案

尝试 man脚本

另请参阅此古老的错误。这个问题十年没有得到解决的事实使我相信它不太可能得到解决。

See also this ancient bug. The fact that this hasn't been fixed in 10 years makes me believe that it's unlikely to ever be fixed.

大多数GDB开发人员都使用 emacs ,从 emacs 内部运行GDB,并免费获得所需的功能。

Most GDB developers use emacs, run GDB from inside of emacs, and get the functionality you desire "for free".

这篇关于如何记录我在GDB中键入的命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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