Subject: RE: bug#11939: 24.1; `save-buffers-kill-emacs' loses minibuffer focus when it calls `list-processes'

From: "Drew Adams" <[email-masked]>
Date: Mon, 23 Jul 2012 11:29:40 -0700

>   . invoke Emacs as you normally do
>   . find out its PID
>   . from the shell prompt, type "gdb -p PID" from the directory where
>     you have .gdbinit
>   . wait until GDB starts and displays its prompt, then type
>     "continue" at that prompt.
>   . go to the Emacs window and reproduce the problem.
>   . when the problem (crash) happens, the debugger will kick in and
>     display its prompt again, so you can type GDB command there.

Got it; thanks.

Unfortunately, I cannot get much in the way of results that way, for this test
at least.

After `(gdb) continue', I followed the recipe I followed before to produce the
crash.  When it would have crashed before (i.e., without gdb) it now just seemed
to hang.

I can, however, see this in the command-prompt window (outside Emacs):

$ gdb -p 4252
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Attaching to process 4252
[Switching to thread 4252.0xc80]
/cygdrive/c/drews-lisp-20/bin/.gdbinit:32: Error in sourced command file:
No symbol "main" in current context.
(gdb) continue
Continuing.
warning: frame 049AE200 (*shell*) obscured

warning: frame 049AE200 (*shell*) reexposed by WM_PAINT

warning: obscured frame 049AE200 (*shell*) found to be visible

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 4252.0xfb0]
0x01252ab3 in ?? ()
(gdb) bt
#0  0x01252ab3 in ?? ()
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or y)
Detaching from program: , Pid 4252

At that point, I did get the MS Windows "encountered a problem and needs to
close" dialog box, and clicked button "Send Error Report", and Emacs exited.

Dunno whether that helps at all.  As the problem is reproducible, I can try
again if you give me more instructions to try.