Emacs gdb没有运行 [英] Emacs gdb not running

查看:184
本文介绍了Emacs gdb没有运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 M-x gdb 在emacs内输入gdb。然后,当我执行 b main 时,我得到以下输出:

I enter gdb within emacs using M-x gdb. Then, when I execute b main, I get the following output:

b main                                                                             
Breakpoint 1 at 0x100000d61: file hanoi.c, line 27.                                
                        (gdb)                                                        
MI_HOOK_RESULT={HOOK_TYPE="breakpoint_create",bkpt={number="1",type="breakpoint",d\
  isp="keep",enabled="y",addr="0x0000000100000d61",func="main",file="hanoi.c",line="\
  27",shlib="/Users/rdp/Desktop/Hanoi-Moves_testcases/play",times="0"}},time={wallcl\
  ock="0.00104",user="0.00049",system="0.00027",start="1347691065.681152",end="13476\
  91065.682197"}       

当我尝试运行程序时,我得到这个输出:

When I try to run the program, I get this output:

r                                                                    |21  } 14Starting program: /Users/rdp/Desktop/Hanoi-Moves_testcases/play                   
                                            (gdb)                                    |24} 16time={wallclock="0.00009",user="0.00005",system="0.00004",start="1347691082.360725\|25 ",end="1347691082.360816"}                                                       (gdb)  n

The program is not being run.                           

为什么我得到一个详细的输出,为什么我不能遍历代码? p>

Why do I get a verbose output, and why can't I step through the code?

推荐答案

Emacs 24似乎已经破坏了GUD(gdb和其他调试器的接口)。在IRC频道上有一些争吵,有一个人实际上声称为他工作,但我也变得非常奇怪的行为。谷歌搜索也揭示了以下(还有一些): gud-gdb emacs 24不工作

Emacs 24 seems to have broken GUD (the interface to gdb and other debuggers). There was some brawl about it on the IRC channel, and one person was actually claiming it to work for him, but I'm also getting very weird behavior. Googling also reveals the following (and some more): gud-gdb emacs 24 not working

我会尝试做一个最小的测试案例,它失败并提交错误报告。

I would try to make a minimal test-case of it failing and file a bug report.

编辑:您可能需要尝试 gud-gdb 代替 gdb 。我不知道有什么区别,但似乎对我有用。 (未全面测试。)

You might want to try gud-gdb in place of gdb. I don't know what differences there are but it seems to work for me. (Didn't test comprehensively.)

这篇关于Emacs gdb没有运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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