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]

emacs debugging conundrum


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Any ideas on how I should go about debugging a core dump, when the dump
doesn't occur under the debugger?  Is it more likely to be a cygwin bug,
or an app bug?  I am experimenting with CVS emacs, and the build process
fails when it gets to this command line (I've tried with both 1.5.19 and
the latest snapshot):

$ EMACSLOADPATH=/home/eblake/emacs/lisp ../src/bootstrap-emacs.exe -batch
- --no-site-file --multibyte -f batch-byte-compile-if-not-done
~/emacs/lisp/emacs-lisp/byte-opt.el
Compiling /home/eblake/emacs/lisp/emacs-lisp/byte-opt.el
Fatal error (6)*** starting debugger for pid 1996, tid 3732
*** continuing pid 1996 from debugger call (1)
Aborted (core dumped)

But retrying under the debugger succeeds!

$ EMACSLOADPATH=/home/eblake/emacs/lisp gdb --args
../src/bootstrap-emacs.exe -batch --no-site-file --multibyte -f
batch-byte-compile-if-not-done ~/emacs/lisp/emacs-lisp/byte-opt.el
...
(gdb) r
Starting program: /home/eblake/emacs/src/bootstrap-emacs.exe -batch
- --no-site-file --multibyte -f batch-byte-compile-if-not-done
/home/eblake/emacs/lisp/emacs-lisp/byte-opt.el
Wrote /home/eblake/emacs/lisp/emacs-lisp/byte-opt.elc

Program exited normally.
(gdb) q


Examining the dump shows that the problem lies somewhere in Windows calls:

$ gdb --core bootstrap-emacs.exe.core
...
#0  0x7c90eb94 in ntdll!LdrAccessResource ()
(gdb) info threads
  3 process 108  0x7c95077b in ntdll!KiIntSystemCall ()
  2 process 2824  0x7c90eb94 in ntdll!LdrAccessResource ()
* 1 process 3760  0x7c90eb94 in ntdll!LdrAccessResource ()
(gdb) bt
#0  0x7c90eb94 in ntdll!LdrAccessResource ()
#1  0x7c90e9c0 in ntdll!ZwWaitForSingleObject ()
#2  0x7c8025db in WaitForSingleObjectEx ()
   from /home/eblake/emacs/lisp/kernel32.dll
#3  0x00000714 in ?? ()
(gdb) thread 2
[Switching to thread 2 (process 2824)]#0  0x7c90eb94 in
ntdll!LdrAccessResource
    ()
(gdb) bt
#0  0x7c90eb94 in ntdll!LdrAccessResource ()
#1  0x00000000 in ?? () from
(gdb) thread 3
[Switching to thread 3 (process 108)]#0  0x7c95077b in
ntdll!KiIntSystemCall ()
(gdb) bt
#0  0x7c95077b in ntdll!KiIntSystemCall ()



This problem may have come up before, in
http://sourceware.org/ml/cygwin/2006-02/msg00950.html, although it
mentioned a differently named executable temacs instead of
bootstrap-emacs, and that thread never seemed to reached a resolution
other than how to get the coredump.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFESqdT84KuGfSFAYARArBtAKCvyOdbKHfhyl5w2gpxyt5XApIlOwCcC8F/
W8oiwh2TE+9+bgvDrkOGWA8=
=LDj4
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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