如何使gdb发出它以批处理模式执行的命令 [英] How to make gdb emit the commands it is executing in batch mode

查看:65
本文介绍了如何使gdb发出它以批处理模式执行的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以调用 gdb --batch --commands some_gdb_script some_executable 并让它同时发出执行的命令和命令结果?我不想安装除gdb以外的任何东西,例如xdotool等.它应该只在没有扩展名的普通gdb中工作.

Is there a way to call gdb --batch --commands some_gdb_script some_executable and have it emit both the commands it executes, along with the command results? I do not want to install anything other than gdb, such as xdotool etc. It should just work within stock gdb with no extensions.

推荐答案

它是否发出了它执行的所有命令以及命令结果?

have it emit both the commands it executes, along with the command results?

请参见错误.

几乎上使用 set trace-commands可以达到预期的效果.

Using set trace-commands on almost achieves the desired result.

这篇关于如何使gdb发出它以批处理模式执行的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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