This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: {emacs,emacs-X11,emacs-el}-24.0.96-1 (TEST)


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).


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. But it also shouldn't do any harm. In any case, 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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>...
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?

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:

$ gdb --pid=13144
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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 5672
[New Thread 5672.0xd24]
[New Thread 5672.0x2dec]
[New Thread 5672.0x2b08]
[New Thread 5672.0x13c0]
[New Thread 5672.0x2cd4]
[New Thread 5672.0x2de4]
[New Thread 5672.0x2818]
[New Thread 5672.0x33d0]
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) c
Continuing.


Ken

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]