如何在GDB的文本编辑器的当前行中打开当前文件? [英] How to open the current file at the current line in a text editor from GDB?

查看:135
本文介绍了如何在GDB的文本编辑器的当前行中打开当前文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

l - 所有时间都不方便,并且缺少语法高亮和跳转到定义。

如何在当前行上运行一个打开编辑器(可能是CLI编辑器,如Vim)的外部命令?



我已经知道编辑器插件集成,如下所示: https://vi.stackexchange.com/questions/2046/how-can-i-integrate-gdb-with-vim 或Eclipse,但是从GDB打开编辑器的优点是它应该和任何编辑一起工作,并且更轻巧,因此不太可能中断。成本较差,例如

解决方案

编辑命令,没有参数,会做你想做的。


Doing l and l - all the time is inconvenient, and misses feature like syntax highlight and jumping to definitions.

How to I run an external command that opens an editor (possibly a CLI editor like Vim) on the current file, at the current line?

I already know about editor plugins integrations as mentioned at: https://vi.stackexchange.com/questions/2046/how-can-i-integrate-gdb-with-vim or Eclipse, but opening the editor from GDB has the advantage that it should work with any editor, and is more lightweight, and therefore less likely to break. The cost is worse integration, e.g. can't set breakpoints from editor, but I'm fine with that.

解决方案

The edit command, with no arguments, will do what you want.

这篇关于如何在GDB的文本编辑器的当前行中打开当前文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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