3 ms·
"Meta-x gud-gdb" for the old fashioned, or "Meta-x gdb", starts a gdb session in Emacs. Give it the executable you want to debug, then at the prompt type "run a
by merraksh 10y ago
"Meta-x gud-gdb" for the old fashioned, or "Meta-x gdb", starts a gdb session in Emacs. Give it the executable you want to debug, then at the prompt type "run arg1 arg2...".
"watch p_mydata[34]->blahblah" sets a hardware watchpoint;
Ctrl-x-a-b sets a breakpoint at the cursor in the Emacs;
Ctrl-x-a-u runs until the cursor;
Ctrl-x-a-j jumps at the cursor;
And many other niceties.
There's also a way to create a buffer to monitor some variables.
You can actually attach the emacs-gdb buffer to a process you're running through valgrind when a valgrind error occurs. Not to mention it runs undo-gdb, of course.