开发者

Debugging with GDB in Emacs remote

i am trying to use gdb within emacs, i have gdb running but the first command i need to input is for example;

target remote 192.168.1.1:1234 

to communicate with the target. I type this in at (gdb) after I have some output from gdb about versions. For some reason gdb in emacs does not respond to this开发者_开发百科 command and instead does nothing. It works fine on the command line in a shell so i thought it would simply work in emacs aswell. Does anybody have any ideas as to why this would not work in emacs?

Thanks for your help


what you actually want is to run gdb like this:

M-x gdb ret

gdb --annotate=3 myprog

(gdb) target remote 192.168.1.1:1234

The key appears to be the --annotate=3, I am not sure what tramp is or why you would want to use ssh for anything (gdb will connect directly to the host you pass to it), but this works for me. I was having the same problem connecting to qemu running on localhost.


Have a look at the relevant section of the tramp documentation - you can use Tramp together with gdb to debug remotely. For example:

M-xgdbRET

Run gdb (like this): gdb --annotate=3 /ssh:host:~/myprog RET

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜