Getting gdb to work with emacs 24
Asked Answered
A

1

4

Realised after much head-scratching in relation to this question that gdb seems to be broken in emacs 24

So I have switched to gud-gdb

But I now notice that the very handy red dots on break points don't seem to work in gud-gdb

Does anyone have a definitive answer on how to be able to sensibly debug C code using emacs 24?

I never had any problems in emacs 23 but 24 has caused me all sorts of bother..

Maybe I should switch back to emacs 23 but this seems a little regressive?

Is the new method to use gdb-mi in some way?

Would be very interested to learn what best-practice is with respect to emacs 24 - haven't been able to find any relevant (emacs 24 specific) tutorials on the interwebs

Alwitt answered 18/12, 2013 at 15:45 Comment(1)
please ignore drive-by downvote from a disgruntled cut-and-paster..Alwitt
T
2

gdb is working for me out of box on GNU Emacs 24.3.1.

If it still doesn't work for you, please try to use command:

gdb --fullname binary_name

insead of default

gdb -i=mi binary_name
Tisbe answered 21/12, 2013 at 13:49 Comment(3)
i think that might be what running M-x gud-gdb is doingAlwitt
Can you try download latest version of gdb-mi.el from github.com/mirrors/emacs/blob/master/lisp/progmodes/gdb-mi.el an try to load it?Tisbe
--fullname did not work for me. I get:(gdb) Undefined command: "1-gdb-set". Try "help". (gdb) Undefined command: "2-gdb-set". Try "help". (gdb) Undefined command: "3-gdb-set". Try "help". (gdb) Undefined command: "4-gdb-set". Try "help". (gdb) Undefined command: "5-enable-pretty-printing". Try "help". (gdb) Undefined command: "6-file-list-exec-source-files". Try "help". (gdb) Undefined command: "7-file-list-exec-source-file". Try "help". (gdb) Undefined command: "8-gdb-show". Try "help". (gdb) Undefined command: "9-stack-info-frame". Try "help"Hoofed

© 2022 - 2024 — McMap. All rights reserved.