Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin

From: Ken Brown <[email-masked]>
Date: Mon, 17 Jun 2013 16:15:33 -0400

On 6/17/2013 11:06 AM, Eli Zaretskii wrote:
>> Cc: Eli Zaretskii <[email-masked]>,
>>   "[email-masked]" <[email-masked]>
>> From: Jan Djärv <[email-masked]>
>> Date: Mon, 17 Jun 2013 08:22:54 +0200
>>
>> emacsdbg = EMACSLOADPATH=$(lisp) LC_ALL=C gdb -ex 'b abort' -ex run --args $(EMACS) $(EMACSOPT)
>
> This should make your life quality better, I think:
>
>    emacsdbg = EMACSLOADPATH=$(lisp) LC_ALL=C gdb --batch-silent --return-child-result -ex 'b abort' -ex run --args $(EMACS) $(EMACSOPT)

This causes gdb to exit, whether or not the breakpoint was hit, without 
giving the user a chance to get a backtrace.  I tried adding

   -x $(lisp)/commands.txt

where commands.txt contains

   commands
   bt
   end

but that didn't work.  gdb still exited (with an error) when 
compile-onefile failed, but it didn't print a backtrace first.  There 
has to be a way to get a backtrace when gdb runs in batch mode.  Do you 
know how, Eli?

Ken