GNU Project Debugger - Start it via `M-x gdb` to run the debugger on Ada, C, C++, Objective-C, Pascal, Fortran, Java and other languages.
Questions tagged [gdb]
62 questions
18
votes
1 answer
How do I debug an emacs crash?
I am debugging why emacs crashes when using a function from a package1. The aim of this debug process is to get useful data to submit using M-x report-emacs-bug.
To get help on how to debug emacs crashes, I have already looked at Emacs Manual -…

Kaushal Modi
- 25,203
- 3
- 74
- 179
9
votes
2 answers
How can I prevent gdb *input/output* buffer from aggressively popping up in frame?
When using gdb with M-x gdb, the *input/output* buffer always pops up aggressively in any frame which has focus and isn't already displaying it. I would like the *input/output* buffer to stay quietly in the background unless I manually bring it…

ajp
- 393
- 1
- 9
5
votes
2 answers
How to set gud gdb -i=mi not to replace current buffer?
When using gdb -i=mi to debug a program, I typically split the window into two buffers vertically. But every time my program prints something gud automatically replaces my source code buffer with I/O buffer and pops up a new "frame" that contains my…

Mingheng Wang
- 53
- 4
5
votes
1 answer
How to attach/connect two subprocesses?
The general case:
Simply put, given that I start two processes (Aand B) with, e.g., async-start-process, what is best way of killing B if A terminates?
My specific usecase:
I'm debugging embedded software on an external chip and launch a GDB server…

thomsten
- 53
- 3
4
votes
1 answer
GDB-MI - Displaying complex data-types
The GDB local variable window (in the multi-window view) usually works fine to track local variables. However, I've recently been coding a lot in C++, and almost all variables are some kind of struct/class, which is just displayed as

Xaldew
- 1,181
- 9
- 20
4
votes
1 answer
Command history not saved while using GDB from Emacs
I usually debug in console gdb and now I'm trying to move to Emacs. In my ~/.gdbinit I have the following lines setting up history:
# save history of unlimited size, write always to ~/.gdb_history
set history save on
set history size unlimited
set…

ars
- 183
- 6
3
votes
0 answers
Valgrind interface for emacs
Is there an interface similar to 'gdb-mi' for using Valgrind in emacs?
What are some ways to use Valgrind inside emacs?

hrkrshnn
- 439
- 6
- 14
3
votes
0 answers
Why don't I get a source window using realgud:gdb?
using GNU Emacs 25.2.1 (x86_64-w64-mingw32) and realgud 20171006.1840 (from marmalade), I can't use realgud for debugging with gdb: I start it as described in the docu:
M-x load-library RET realgud RET
realgud:gdb
In the "Start like this"-Prompt, I…

Markus
- 471
- 2
- 12
3
votes
1 answer
Is it possible to use mozilla's rr with gdb multi-window?
I have started using mozilla's rr (timetravelling debugger, github here) on the command line for debugging c++ code.
In emacs I can start it with gud-gdb and writing rr replay (as mentioned here or here).
I cannot start it with gdb followed by rr…

Mike H-R
- 265
- 1
- 8
2
votes
1 answer
How can I delete all the gdb related windows/buffers after `q` in gdb CLI window
I use (setq gdb-many-windows t) and (setq gdb-show-main t) configurations in my init.el, so after executing M-x gdb, there will be six windows in the frame, after typing q in the main gdb cli window to finish debugging, how can I quit/delete all the…

CodyChan
- 2,599
- 1
- 19
- 33
2
votes
1 answer
Preventing shell mode from treating ! as a history reference
Various command-line tools, such as gdb, ftp, sftp, etc, use ! to prefix a command to be run in a shell. So (for instance) !mkdir foo will make a directory called foo. When using these tools inside emacs shell-mode, the shell-mode treats the ! as a…

Nick Barnes
- 141
- 3
2
votes
1 answer
emacs in --deamon mode dies when X display socket closes. How to prevent this?
My initial quest is Can emacs on Mac using native window system connect to an emacs server on a Linux system but I got off on a tangent that might work ok but I hit a speed bump.
As described in the other question, I start emacs in daemon mode via…

pedz
- 365
- 1
- 12
2
votes
2 answers
Highlight current line in GUD disassembler window
I am using GUD for debugging C code. Because many of the lines and variables have been optimized away, it is necessary to follow the C source and the corresponding disassembly simultaneously. I want the current line in the disassembler window to be…

nispio
- 8,175
- 2
- 35
- 73
2
votes
2 answers
Use a specific font face for gdb buffers
Need
Default emacs font for most buffers is okay.
But for coding-related activities I need a smaller, crisp font.
What works
In the spirit of Is it possible to change the font size in specific buffers? - Emacs Stack Exchange
I've…

Stéphane Gourichon
- 431
- 3
- 16
2
votes
1 answer
gdb-many-windows causes hangs in emacs 24.5
When running gdb -i=miand then attach to the process for debugging, emacs hangs for like 5 minutes before I can type anything. After trial and error I found it is caused by the following line in my init.el file:
(setq gdb-many-windows t)
Start…

cdnszip
- 347
- 1
- 7