我在集群的计算节点上有代码。我无法直接 ssh 到计算节点,因此我首先使用
设置 ssh 隧道ssh -f cluster.master.node -L 2222:cluster.compute.node:22 -N.
接下来我访问该文件
C-x C-f/ssh:user@localhost#2222/path/to/blah.c。
我终于做到了
M-xgdb。
在 emacs 23 中我会这样做
运行 gdb (像这样) gdb --annotate=3/ssh:localhost#2222:/path/to/program
但是 emacs 24 中 gdb 函数的文档说“命令行 选项应包括 -i=mi 以使用 gdb 的 MI 文本界面。请注意,不再支持旧的“--annotate”选项。”
正在运行
gdb(像这样)gdb --i=mi/ssh:loalhost#2222:/path/to/program
似乎可以工作,但是当我尝试运行该程序时,我得到“正在启动程序:/misc/home/joey/git/proteus/proteus/dev/pts/5:没有这样的文件或目录。”问题似乎在于可执行文件路径前面不存在的/misc/目录。即使当我对/home/joey/git/proteus/执行 cd 操作时,响应也是“工作目录/home/joey/git/proteus(规范为/misc/home/joey/git/proteus)。”
我可以在 Emacs 24 中远程调试我的程序还是应该回到 23?
最佳答案
尝试 M-x gud-gdb RET:它会给你旧的 Emacs-22 行为。
关于emacs - 远程调试 emacs 24 和 gdb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9404501/