Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run gdb-many-windows in new frame?

Tags:

emacs

gdb

I know I can open a new frame and M+xgdb. But just doing M+xgdb and having gdb executed in a new frame would be much better.

gdb-many-windows destroy original windows layout when I run it and it can not restore the layout when I kill it. So I want to run it in a new frame and close that frame.

Update: I use (setq gdb-many-windows t). If I invoke gdb, it uses the gdb-many-windows layout automatically.

like image 775
louxiu Avatar asked Nov 27 '12 04:11

louxiu


1 Answers

Here is a simple function to call gdb with many windows in a newly created frame:

(defun my-gdb-other-frame ()
  (interactive)
  (select-frame (make-frame))
  (call-interactively 'gdb))

Another way I use to solve the window layout problem with gdb-many-windows is to save the different windows configurations to registers. FWIW, here is my workflow:

  1. C-xrwa (save window configuration to register a)

  2. M-xgdbRET

  3. M-xgdb-many-windowsRET

  4. C-xrwb (save the new window configuration to register b)

Afterwards, I can jump from one window layout to the other using C-xrja and C-xrjb

like image 77
François Févotte Avatar answered Oct 07 '22 13:10

François Févotte