Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i configure emacs to use gdb like a graphical debugger?

Tags:

linux

emacs

gdb

I'm pretty sure that this how other IDE's do it, e.g. on windows eclipse uses the output of gdb from MinGW (the windows port of GNU toolchain) to map where execution is in the source code and what values variables hold, etc. I'm stuck using gdb via a script that prepares our application in a chroot and does some other bootstrap for debug purposes. Once the script starts moving, the output is all gdb. Is there any way that I can configure emacs so that it will use gdb's output and allow for a sort of graphical debugger, comparable to that of eclipse or ms visual studio?

like image 265
Joey Carson Avatar asked Dec 13 '25 15:12

Joey Carson


2 Answers

The M-x gdb command expects GDB to be put in a particular mode. In Emacs-21/22 gdb had to be started with --fullname, in Emacs-23, it needs --annotate=3 and in Emacs-24 it needs -i=mi, so the most likely problem is that your script fails to provide this argument. BTW in Emacs-23/24 you can still use the old --fullname mode, under the name M-x gud-gdb: it's less fancy but I find it more reliable.

like image 125
Stefan Avatar answered Dec 16 '25 13:12

Stefan


I'm not sure, but try M-x gdb and then do like this M-x gdb-many-windows , maybe that can help you..

like image 35
emaniacs Avatar answered Dec 16 '25 12:12

emaniacs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!