# Configuring emacs gdb behavior

Emacs Asked by Onye on December 17, 2020

I’ve been using gdb in emacs for a bit now and I mostly love it, but there are some minor quirks about its behavior that I find bothersome and I wanted to know how to go about tweaking them. I also want to say I know almost nothing about modifying emacs in general.

I’ve been using gdb-many-windows when I debug. The thing I want to change is the behavior around breakpoints. After a breakpoint is hit, the source window moves to the line I placed the breakpoint on. This is good, I like that. But after that, if I move to a different part of the source file myself and then run any gdb command, the source window will automatically move back to the line containing the breakpoint. So if I want to, say, set a breakpoint at a different line of the source file, the moment I do so the source window snaps back to the first breakpoint. This has me constantly moving up and down the source file.

Is there any way I can change this? I’ve tried googling and I can’t seem to find anything about this.

## Related Questions

### Can I take vector (SVG) screenshots of Emacs?

2  Asked on September 2, 2021 by clment

### tramp and sudo: how to edit files under another account

3  Asked on September 2, 2021 by daniel-wu

### How to programmatically surround a string with escaped double-quote

1  Asked on September 2, 2021 by lawlist

### Tramp session fails to recover from inactivity

2  Asked on September 2, 2021 by bignose

### Make pdf-tools remember the page I was on

1  Asked on September 2, 2021

### Switch from Dired to Wdired rename file and directory errors when using “-F” or “–classify” ls switch regex help

1  Asked on September 2, 2021 by j-spen

### How company-mode suggestions are delivered?

1  Asked on September 2, 2021 by seonghyun-park

### How to set utf-8 encoding for *markdown-output* buffer?

1  Asked on September 2, 2021 by volodymyr

### Emacs keybindings / invocation for Apple iMac keyboard, similar to LMI or Knight?

1  Asked on September 2, 2021

### How to Redefine Meta Key to Use Esc Key Only and Allow Using Alt Key for Another Purpose

2  Asked on September 2, 2021 by vikram

### Bind keybord shortcuts to a MIDI keyboard?

1  Asked on September 2, 2021 by gabriele-nicolardi

### How to wrap lines at window edge

2  Asked on September 2, 2021 by lambda-pumpkin

### Can magit stage a hunk / selected lines in ‘diff-mode’?

1  Asked on September 2, 2021

### Properly exporting latex to HTML from org-mode using dvisvgm / dvipng

1  Asked on September 2, 2021 by nilaksh-singh

### How do I make emacs indent relative to the beginning of the previous line?

1  Asked on September 2, 2021 by x-yuri

### gnus: fetch mails over IMAP from Outlook mail server

1  Asked on September 2, 2021

### C-h v gives ” Symbol’s value as variable is void: default

0  Asked on September 2, 2021 by brian-postow

### How to display list of previous copies/kills (M-w or C-w)?

3  Asked on September 2, 2021 by erwann

### Fixed length buffer for shell

1  Asked on September 2, 2021

### How to overwrite by pasting a string without selecting a region?

1  Asked on September 2, 2021 by starquake