emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb with many windows: kill associated buffers doesn't always work


From: Nick Roberts
Subject: Re: gdb with many windows: kill associated buffers doesn't always work
Date: Wed, 24 May 2006 09:26:57 +1200

 > >> > The gdb process only dies if you quit the session.
 > >> It can die for any reason.
 > > If GDB crashes then thats a bug in GDB and this should rarely happen.
 > 
 > "Should" is the operative word here.

Well it rarely happens to me.  Please report such occurances to the GDB
mailing list to help stop this happening.

 > > Could you name a few other reasons?
 > 
 > Even if it doesn't crash, it can get into a state that I find easier to
 > cleanup by quit&restart than by trying to figure out whether the situation
 > can be salvaged and how.  It may even happen without any bug whatsoever,
 > just because you've set enough GDB envvars and options and you want to reset
 > them to some default state.  Maybe GDB offers such a command, but using
 > quit&restart has the advantage that it's a universal way to do it,
 > non-specific to GDB.

OK, I hear that people are saying that they may want to keep the GUD buffer.
I now see that I made a mistake in gud-sentinel in gud.el.

Klaus,

Does the patch below give you the behaviour you want?


-- 
Nick                                           http://www.inet.net.nz/~nickrob



*** gud.el      24 May 2006 09:21:32 +1200      1.107
--- gud.el      24 May 2006 09:24:48 +1200      
*************** It is saved for when this flag is not se
*** 2693,2702 ****
        ((memq (process-status proc) '(signal exit))
         ;; Stop displaying an arrow in a source file.
         (setq gud-overlay-arrow-position nil)
!        (with-current-buffer gud-comint-buffer
!          (if (memq gud-minor-mode-type '(gdbmi gdba))
!              (gdb-reset)
!            (gud-reset)))
         (let* ((obuf (current-buffer)))
           ;; save-excursion isn't the right thing if
           ;;  process-buffer is current-buffer
--- 2693,2702 ----
        ((memq (process-status proc) '(signal exit))
         ;; Stop displaying an arrow in a source file.
         (setq gud-overlay-arrow-position nil)
!        (if (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
!                  '(gdba gdbmi))
!            (gdb-reset)
!          (gud-reset))
         (let* ((obuf (current-buffer)))
           ;; save-excursion isn't the right thing if
           ;;  process-buffer is current-buffer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]