X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4FA48C7C.9000005@cs.utoronto.ca> Date: Fri, 04 May 2012 20:12:12 -0600 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] Updated: {emacs,emacs-X11,emacs-el}-24.0.96-1 (TEST) References: <4F9F32ED DOT 3030808 AT cs DOT utoronto DOT ca> <4F9F3751 DOT 6000406 AT cs DOT utoronto DOT ca> <4F9F45A1 DOT 60500 AT cornell DOT edu> <4F9F5DEF DOT 30804 AT cs DOT utoronto DOT ca> <4FA13CB9 DOT 6000903 AT cornell DOT edu> <4FA16BEE DOT 3070605 AT cs DOT utoronto DOT ca> <4FA1A0DF DOT 3040101 AT cs DOT utoronto DOT ca> <4FA299FD DOT 9070903 AT cornell DOT edu> <4FA2E61C DOT 5070809 AT cs DOT utoronto DOT ca> <4FA43057 DOT 1030602 AT cornell DOT edu> In-Reply-To: <4FA43057.1030602@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 04/05/2012 1:39 PM, Ken Brown wrote: > On 5/3/2012 4:10 PM, Ryan Johnson wrote: >> On 03/05/2012 10:45 AM, Ken Brown wrote: >>> On 5/2/2012 5:02 PM, Ryan Johnson wrote: >>>> On 02/05/2012 1:16 PM, Ryan Johnson wrote: >>>> The gdb-mi integration also seems to work reasonably well, with a few >>>> exceptions: > [...] >>> (This was fixed once and was a Cygwin bug, so I think it won't be hard >>> for me to resurrect my test case and get it fixed again.) > > This is now fixed (http://cygwin.com/ml/cygwin/2012-05/msg00084.html). Ack. > >>>> One last note: I normally use emacs in terminal mode, but couldn't do >>>> that inside gdb (for obvious reasons). Some of the behaviors I >>>> observed >>>> before -- including seg faults -- may be terminal-specific, and >>>> some of >>>> the new strangeness I'm pointing out now may be X11-specific... or it >>>> might just be the difference between -O0 and -O2. >>> >>> What do you mean by "terminal mode"? Do you mean you run emacs under >>> mintty? Or do you run it under xterm with the -nw switch? And could >>> you elaborate on the "obvious reasons"? I don't see why you can't run >>> emacs in a terminal under gdb; or attach to it from a different >>> terminal if that's more convenient. >> I usually run under mintty with -nw. When following the instructions in >> that /etc/DEBUG file you pointed me at, the .gdbinit included >> breakpoints and other pre-main intializations to perform that would not >> happen if I merely attached to a running emacs. However, that will >> probably be my next attempt, since the X11 route didn't pan out (and I >> dislike using the graphical version). > > I'm not sure why you're using the -nw switch when you start emacs in > mintty. As far as I can tell from the documentation, -nw shouldn't do > anything if you're not running under X. I have DISPLAY defined for things like gnuplot, but don't want emacs to use it even when X is available... > I still don't see why you can't run emacs under gdb in mintty: > > $ cd emacs-24.0.95/src/ > $ gdb ./emacs.exe > GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special) > Copyright (C) 2011 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show > copying" > and "show warranty" for details. > This GDB was configured as "i686-cygwin". > For bug reporting instructions, please see: > ... > Reading symbols from /tmp/emacs-24.0.95/src/emacs.exe...done. > SIGINT is used by the debugger. > Are you sure you want to change it? (y or n) [answered Y; input not > from terminal] > Environment variable "DISPLAY" not defined. > TERM = xterm > Breakpoint 1 at 0x4ded26: file emacs.c, line 394. > Temporary breakpoint 2 at 0x4f8970: file sysdep.c, line 855. > (gdb) r -Q > [...] > > Now if it crashes, won't you be returned to gdb where you can get a > backtrace? I guess that might work, since I wouldn't do anything but grab the backtrace. It just doesn't work well to mix gdb and curses-using apps in the same terminal. > And attaching from another mintty also works; gdb processes the > .gdbinit file just fine as long as you start gdb from the emacs src > directory: Duh... I hadn't thought to specify the --pid switch; I usually just attach inside gdb, and that's too late for the purposes of .gdbinit. Thanks! Ryan -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple