Questions tagged [gud]

Grand Unified Debugger

Filter by
Sorted by
Tagged with
6
votes
1answer
1k views

How do I change the working directory used by pdb/gud?

When running M-x pdb from Emacs, the current directory seems to be set to that of the directory of the script you are running, so pdb ~/path/to/project/__main__.py Would set the working directory ...
0
votes
0answers
21 views

emacs c++ gud cannot skip non existing file, making it unusable

I have this file: #include <string> using namespace std; string remove(string s) { return s; } int main() { string s1 = "aaaa"; string s2 = remove(s1); return 0; } g++9 ...
0
votes
1answer
29 views

Set colour/font for markers [duplicate]

Is it possible to set the colour or font of markers (e.g. the ones set by gud in gud-display-line by using make-marker). The theme I am using shows markers in a difficult-to-see light gray. I would ...
5
votes
2answers
804 views

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 ...
0
votes
0answers
21 views

`gud-print` results in “Text is read-only” message

Whenever I run gud-print (C-xC-aC-p) with my cursor positioned on a variable while debugging with GUD (specifically via the gdb command), I get the message "Text is read-only" in the echo area. I can'...
0
votes
1answer
110 views

After `M-x pdb` switch to `compilation-mode` automatically?

M-x pdb is great while debugging. When the python process exits though, often there is a traceback left behind in the gud buffer that I'd like to view using compilation-mode so I can use next-error ...
3
votes
0answers
246 views

Debugging in Unity3d with emacs?

I develop in Unity, and have been using emacs as my text editor for development. Debugging however has always needed to be done through monodevelop (and it crashes half the time while doing this). My ...
4
votes
0answers
183 views

How to map file paths when using docker

I'm running code in development using docker. I do that using the -v flag to docker run to mount my code in the container. I've set directory-abbrev-alist and configured compilation-error-regexp-...
2
votes
2answers
111 views

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 ...
1
vote
1answer
101 views

Problem debugging in `gud-mode' (M-x `gdb' with `many-windows' enabled)

I'm debugging a large codebase (written in C++). Everything works perfectly if I run gdb from a regular terminal as follows: $ gdb <program-name> Reading symbols from <program-name>......
2
votes
1answer
304 views

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 ...
8
votes
2answers
915 views

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 ...
0
votes
0answers
45 views

Gdb: run a hook when the program is being started

I'm using M-x gdb to debug a program that produces some output. The output appears in the buffer *input/output of a.out*. I often run the same program multiple times during a session, often after ...
0
votes
1answer
183 views

How to step into a c++ std library function in gdb/gud

This is most likely an issue with g++/gdb/other, but an indirect issue within Emacs nonetheless. Whilst debugging, I would like for Emacs to step into the standard library implementation of the ...
3
votes
1answer
919 views

highlight breakpoints with pdb

I use pdb with gud to debug python scripts. I am just wondering if there is way to highlight the lines with breakpoints? For example, in some screenshots of gud-gdb, some people seem to have red ...
1
vote
1answer
184 views

Can't start gdb over ssh

I am able to open a remote C source file using tramp (via ssh). However, when I try to debug it using M-x gdb gdb -i=mi /ssh:localhost#8022:/usr/bin/httrack I get Current directory is /ssh:...
1
vote
0answers
53 views

Show the current command line the frame title in a GDB session

I sometimes run multiple instances of Emacs, each running a GDB session. These GDB sessions are often running different versions of the same program, or the same program with different arguments, so I'...
3
votes
3answers
2k views

How do you break a running program under gud?

In the vanilla gdb interface, I can hit C-c to break the running program, insert breakpoints, etc., and then run continue to resume execution of the program being debugged. Is this possible with gud? ...
1
vote
1answer
279 views

Bindings for source code when debugging in gdb/gud

We can define a bunch of bindings for gud-mode through gud-mode-map. But it seems these bindings only hold when the active window is one of the dedicated gdb windows (or simply the comint window if ...
3
votes
0answers
216 views

Is it possible to debug Django from gud-pdb?

Brand new to gud/pdb and I am trying to run the Django development server from emacs. I can't seem to set breakpoints that affect the running server, though. I am invoking PDB with M-x pdb, then ...
1
vote
0answers
218 views

How I can show the breakpoints dots per-line on file-buffer using gud-gdb?

Using gdb defined by package gdb-mi.el I got the breakpoints red dots after click on line with mouse or defining on gdb buffer. However, using a alternative wrapper for gdb present on the stantard ...
0
votes
1answer
2k views

GUD debugger says: Undefined command: “-interpreter-exec”

I am following the tutorial Open GDB (within Emacs for added functionality) on Emacs 25.2.1 with Evil Spacemacs and Ivy (the commands gud-gdb and gdb get the same results): SPC f f (counsel-find-file)...
1
vote
2answers
826 views

gud opening source in gud interaction window

When debugging with gud and gdb in many-windows mode, some source files are opened in the gud interaction window instead of the source window. This appears to happen to files, and only those files, ...
1
vote
1answer
218 views

Conditional Keybinding for gdb: gud-step if debugging, otherwise gud-run

I have been trying around getting one keybinding <F7> to perform one gud-step command if a debugging process is running. If it is not running it shall perform gud-run. I am not very familiar ...
1
vote
0answers
192 views

Enabling compilation-shell-minor-mode in GUD (for next-error)

I want to see stack trace lines highlighted in GUD and have next-error work there. That works for me if, after starting GUD (via M-x pdb) I enable compilation-shell-minor-mode. However, if I do this:...
1
vote
0answers
76 views

Jumping from gud-interaction-buffer to code

I'm trying to use GUD more as a front-end to GDB. I mostly work in the interaction buffer as I do normally on the command line. However when I come across a particular line in the code (through bt or ...
0
votes
1answer
236 views

gud-break doesn't work with jdb

I successfully attach to my java app with emacs & gud, but gud-break doesn't work as expected: it runs only: stop at :48 if the line number is 48. So even the class name is missing and the ...
2
votes
1answer
326 views

Is gud working at all in emacs 24?

I am trying to switch from vim to evil mode and got very far. The last thing what is missing is debugging with "gdb". I want to be equally productive as with clewn in vim (this means source level ...
0
votes
1answer
156 views

GUD mode: check if program is running

I'd like to use one hotkey for continuing running (gud-cont) and starting running (gud-run). How can I check if gdb (or other debugger, if possible) is running a program right now? Is there a debugger-...
1
vote
1answer
1k views

How to browse through the gdb command history in gud?

From time to time I am using gdb through the gud Emacs interface to debug my C programs. Nevertheless, I find extremely annoying to not be able to browse the gdb command history by just using the Up ...
2
votes
1answer
277 views

Make comint-mode behave more like term-mode

I am constantly getting frustrated with the GDB comint-mode buffer when using GUD. Somehow my cursor always ends up straying from the bottom of the buffer, and then my input is not interpreted how I ...
6
votes
0answers
809 views

gud: highlight breakpoints with custom debugger

I use go-dlv to debug Go programs. This package is very simple and relies on standard gud functionality (https://github.com/benma/go-dlv.el/blob/master/go-dlv.el) One thing that I found missing is ...
2
votes
1answer
555 views

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 ...
1
vote
0answers
217 views

emacs gdb *gud* “window” undisplayed/deleted after command

(Manually moved by copy/pasting from this Unix SE deleted question) I'm debugging my MELT monitor, in relation with MELT (a domain specific language & meta-plugin to extend & customize the ...
4
votes
1answer
1k views

Customizing the layout of gdb-many-windows

I really like all of the information that is available to me when I run GUD/GDB with gdb-many-windows, but I would like to be able to move the windows around some. Specifically I would like to use ...
2
votes
1answer
463 views

Show breakpoints when debugging Matlab

I am using matlab-emacs to debug a matlab script from inside of emacs with GUD. Everything seems to be working as expected except that I don't see any breakpoint indicators in the fringe. This is ...