Hot answers tagged

6 votes
Accepted

How can I prevent gdb *input/output* buffer from aggressively popping up in frame?

As soon as emacs 25 lands, there will be a variable gdb-display-io-nopopup to fix this problem
user avatar
  • 393
4 votes

Customizing the layout of gdb-many-windows

So, the layout itself is hardcoded (as mentioned in the documentation of the gdb function). This layout is defined in gdb-setup-windows But then, since it's defined only in gdb-setup-windows, and ...
user avatar
  • 4,440
4 votes
Accepted

How to browse through the gdb command history in gud?

Emacs does generally use C-p and C-n for moving the cursor up and down, <up> and <down> are usually bound to the same command. That's why you get the unfamiliar behaviour of the arrow ...
user avatar
  • 21k
3 votes
Accepted

Show breakpoints when debugging Matlab

Unless some thing has changed with newer versions of MatLab, short answer is you cannot (MaTLaB 2011b here). Eric Ludlam, maintainer of matlab-emacs, does say so here in the matlab-emacs mailing list. ...
user avatar
  • 3,826
3 votes
Accepted

How do you break a running program under gud?

This works for me using C-c C-c Current directory is /src/build/emacs-24.5/src/ GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. ... (gdb) run Starting ...
user avatar
  • 858
2 votes

How can I delete all the gdb related windows/buffers after `q` in gdb CLI window

After googling around and tweaking the code snippets from the internet, I got this solution and it works as expected: (defvar all-gud-modes '(gud-mode comint-mode gdb-locals-mode gdb-frames-mode ...
user avatar
  • 2,559
2 votes

gud opening source in gud interaction window

I'm having similar issue with 24.5.1 which comes with Ubuntu 16 LTS. Seems to be somehow related to this issue and using "gud-gdb" command as suggested in an answer to revert to the old GUD behavior ...
user avatar
  • 121
2 votes
Accepted

How to set gud gdb -i=mi not to replace current buffer?

The automatic pop-up of the i/o buffer can be disabled by setting gdb-display-io-nopopup to t. In your .emacs file, add: ;; Prevent gdb from popping i/o window to the foreground on every output op (...
user avatar
1 vote
Accepted

gdb-many-windows causes hangs in emacs 24.5

If thats indeed gdb-many-windows problem. One can avoid using gdb-many-windows and define similar functionality inside the function gdb-get-source-file. You can modify the source file and build from ...
user avatar
1 vote

gud opening source in gud interaction window

I also had problems with gdb-many-windows. My window and buffer setup was always messed after certain events. I decided to rewrite it myself, so I can also customize my window setup better. You have ...
user avatar
  • 1,639
1 vote

How do you break a running program under gud?

A working solution for myself: (global-set-key (kbd "<f6>") (lambda () (interactive) (gud-stop-subjob) ...
user avatar
  • 111
1 vote
Accepted

gdb over ssh via tramp fails (but gdb-gud works?)

This is bug#44151, see https://debbugs.gnu.org/44151. I've fixed this in Tramp 2.4.4.3, which will be released later today on GNU ELPA. Note that this bug describes a further problem, which seems to ...
user avatar
1 vote
Accepted

Configure gud to invoke python3 debugger instead of python debugger

At least in emacs 27, this is controlled by the customization gud_pdb_command_name. The easy way to set it is to invoke pdb once, to get past any autoload issues, then M-x customize_option ...
user avatar
  • 1,859
1 vote
Accepted

Set colour/font for markers

See this answer. Except in your case: (set-fringe-bitmap-face 'right-triangle 'my-custom-curly-face)
user avatar
  • 2,185
1 vote

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

I solved this by upgrading to gdb-8.2.
user avatar
1 vote

Highlight current line in GUD disassembler window

This is the solution I came up with using hl-line. I needed to advise the function that updates the disassembly buffer and invoke hl-line-highlight directly to make it work. (defadvice gdb-...
user avatar
  • 7,793
1 vote

Highlight current line in GUD disassembler window

Thanks to @lawlist nudging me into the source code, I found out that gdb mode will highlight the line for me, but only on the condition that the window containing the disassembly does not have fringes....
user avatar
  • 7,793
1 vote
Accepted

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

There's nothing you can do with Emacs that will change how this works, since you're just asking Emacs to ask gdb to step. Try compiling your program with -Og -ggdb, to ensure that you have the maximum ...
user avatar
  • 11.7k
1 vote

Can't start gdb over ssh

My problem was I didn't have gdb installed on the remote side.
user avatar
1 vote
Accepted

Bindings for source code when debugging in gdb/gud

The right place is gud-minor-mode-map. I have got the following bindings in my setup. Pick whatever suits you for your setup. (defun gdbTZA-gud-run-or-cont (arg) "Combination of `gud-run' and `gud-...
user avatar
  • 30.3k
1 vote
Accepted

gud-break doesn't work with jdb

OK I got it... I started jdb with: jdb -attach <port> but starting it with: jdb -attach <port> -sourcepath<source path on disk> gud-break now works as expected.
user avatar
1 vote

Is gud working at all in emacs 24?

M-x gud-gdb is fine when debugging on emacs24, this works on gdb6+ M-x gdb requires gdb7+ when debugging, you need compile your program with gcc -g -O0. I use M-x gud-gdb on both Mac/Linux without ...
user avatar
  • 4,611
1 vote

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

Emacs specific: Using a custom elisp function to call pdb with the -c COMMAND option, specifying the command as import os; os.chdir('..') (modifying directory as needed). Working example: (defun pdb-...
user avatar
  • 341
1 vote
Accepted

GUD mode: check if program is running

Alas, I don't think this will be easily doable if at all. gud with gdb works a little differently (and, overall, better) than the other debuggers gud supports because it has a more tighter ...
user avatar
  • 858
1 vote
Accepted

highlight breakpoints with pdb

However, realgud is lacking documentation, Although I largely agree, there is a wiki How-to-Use which anyone can contribute to. And I suppose you can open an issue to get help. By the way, why ...
user avatar
  • 858
1 vote

Make comint-mode behave more like term-mode

I'm not sure if this will help, but realgud doesn't have to use comint (although it can). It also works inside eshell. For use with gdb, You have to run "set annotate 1" to get it to track source-code ...
user avatar
  • 858

Only top scored, non community-wiki answers of a minimum length are eligible