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]

Debugging totally broken with latest everything?


    Hi list,

  I can't debug anything any more.  GDB completely locks up within the first
few instructions.  An example:

> $ gdb ./hw.exe
> GNU gdb (GDB) 7.6.50.20130408-cvs (cygwin-special)
> Copyright (C) 2013 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 /home/DKAdmin/hw.exe...done.
> (gdb) disass main
> Dump of assembler code for function main:
>    0x00401170 <+0>:     push   %ebp
>    0x00401171 <+1>:     mov    %esp,%ebp
>    0x00401173 <+3>:     and    $0xfffffff0,%esp
>    0x00401176 <+6>:     sub    $0x10,%esp
>    0x00401179 <+9>:     call   0x401210 <__main>
>    0x0040117e <+14>:    movl   $0x402080,(%esp)
>    0x00401185 <+21>:    call   0x401218 <puts>
>    0x0040118a <+26>:    mov    $0x0,%eax
>    0x0040118f <+31>:    leave
>    0x00401190 <+32>:    ret
> End of assembler dump.
> (gdb) b *0x00401170
> Breakpoint 1 at 0x401170: file hw.c, line 5.
> (gdb) r
> Starting program: /home/DKAdmin/hw.exe
> [New Thread 1192.0xdf4]
> dll path too long
> [New Thread 1192.0x358]
> 
> Breakpoint 1, main () at hw.c:5
> 5       {
> (gdb) stepi
> 0x00401171      5       {
> (gdb) stepi

  At this point, GDB is completely hung.  I can attach it from a second shell
window, which shows:

> $ gdb --pid 2428
> GNU gdb (GDB) 7.6.50.20130408-cvs (cygwin-special)
> Copyright (C) 2013 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 5536
> [New Thread 5536.0x1640]
> [New Thread 5536.0xe2c]
> [New Thread 5536.0x17d8]
> dll path too long
> dll path too long
> dll path too long
> dll path too long
> dll path too long
> [New Thread 5536.0x16bc]
> Reading symbols from /usr/bin/gdb.exe...(no debugging symbols found)...done.
> (gdb) sym /usr/lib/debug/usr/bin/cygwin1.dbg
> Load new symbol table from "/usr/lib/debug/usr/bin/cygwin1.dbg"? (y or n) y
> Reading symbols from /usr/lib/debug/usr/bin/cygwin1.dbg...done.
> (gdb) thread apply all bt
> 
> Thread 4 (Thread 5536.0x16bc):
> #0  0x77f9193d in ntdll!DbgBreakPoint () from /win/c/WINNT/system32/ntdll.dll
> #1  0x7c57fecd in ?? ()
> #2  0x6100533d in _cygtls::call2 (this=<optimized out>, func=0x0, arg=0x0,
>     buf=0x610054cb <_cygtls::call(unsigned long (*)(void*, void*), void*)+91>)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/cygtls.cc:99
> #3  0x0344ffb4 in ?? ()
> #4  0x7c57b3bc in ?? ()
> #5  0x00000000 in ?? ()
> 
> Thread 3 (Thread 5536.0x17d8):
> #0  0x77f88f13 in ntdll!ZwWaitForSingleObject ()
>    from /win/c/WINNT/system32/ntdll.dll
> #1  0x7c59a0a2 in ?? ()
> #2  0x7c57b40f in ?? ()
> #3  0x000017d8 in ?? ()
> 
> Thread 2 (Thread 5536.0xe2c):
> #0  0x77f88a87 in ntdll!ZwReadFile () from /win/c/WINNT/system32/ntdll.dll
> #1  0x7c586381 in ?? ()
> #2  0x610dd075 in wait_sig ()
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/sigproc.cc:1360
> #3  0x61003e65 in cygthread::callfunc (this=0x6118a400 <threads>,
>     issimplestub=<optimized out>)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/cygthread.cc:51
> #4  0x610043ef in cygthread::stub (arg=0x6118a400 <threads>)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/cygthread.cc:93
> #5  0x6100533d in _cygtls::call2 (this=<optimized out>,
>     func=0x610043a0 <cygthread::stub(void*)>, arg=0x6118a400 <threads>,
>     buf=0x610054cb <_cygtls::call(unsigned long (*)(void*, void*), void*)+91>)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/cygtls.cc:99
> #6  0x0270ffb4 in ?? ()
> #7  0x7c57b3bc in ?? ()
> #8  0x00000000 in ?? ()
> 
> Thread 1 (Thread 5536.0x1640):
> #0  0x77f88f43 in ntdll!ZwWriteFile () from /win/c/WINNT/system32/ntdll.dll
> #1  0x7c5864f9 in ?? ()
> #2  0x610dc3f4 in sig_send (p=0x14ea444, si=..., tls=0x0)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/sigproc.cc:736
> #3  0x6106b028 in tty_min::kill_pgrp (this=0x60fc0000, sig=-43)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/fhandler_termios.cc:133
> #4  0x6106b129 in fhandler_termios::tcsetpgrp (
>     this=0x61274690 <__real__Znwj+1629963920>, pgid=2428)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/fhandler_termios.cc:85
> #5  0x610f9f78 in tcsetpgrp (fd=0, pgid=2428)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/termios.cc:237
> #6  0x610d6745 in _sigfe () from /usr/bin/cygwin1.dll
> #7  0x200bbb70 in ?? ()
> #8  0x00418662 in ?? ()
> #9  0x00521908 in ?? ()
> #10 0x004eb052 in ?? ()
> ---Type <return> to continue, or q <return> to quit---
> #11 0x004eb265 in ?? ()
> #12 0x004dd4a0 in ?? ()
> #13 0x004dd6a5 in ?? ()
> #14 0x005b11ab in ?? ()
> #15 0x004feccb in ?? ()
> #16 0x004ff6c0 in ?? ()
> #17 0x005f2de2 in ?? ()
> #18 0x004fed3b in ?? ()
> #19 0x004fd9a0 in ?? ()
> #20 0x004fdfc4 in ?? ()
> #21 0x004fe4b8 in ?? ()
> #22 0x004fe537 in ?? ()
> #23 0x004f8345 in ?? ()
> #24 0x004f6e0a in ?? ()
> #25 0x004f8a85 in ?? ()
> #26 0x004f6e0a in ?? ()
> #27 0x004f9632 in ?? ()
> #28 0x004011a8 in ?? ()
> #29 0x6100763a in _cygwin_exit_return ()
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/dcrt0.cc:974
> #30 0x6100533d in _cygtls::call2 (this=<optimized out>,
>     func=0x61006c50 <dll_crt0_1(void*)>, arg=0x0,
>     buf=0x610054cb <_cygtls::call(unsigned long (*)(void*, void*), void*)+91>)
>     at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/cygtls.cc:99
> #31 0x014eff78 in ?? ()
> #32 0x006c1df2 in ?? ()
> #33 0x00401015 in ?? ()
> #34 0x7c5989d5 in ?? ()
> #35 0x00000000 in ?? ()
> (gdb)

  Some notes on the above:

  The same happens with both the previous version and current snapshot of the
cygwin dll.  It also happens with both current gdb and an old gdb
6.8.0.20080328-cvs that I have lying around.

  The hw.exe in question is your bog-standard hello world, compiled with "-g
-O0" using gcc4-4.5.3-3.

  "kill -9" won't kill gdb; I have to use Windows task manager.  If I've
attached gdb to the hung gdb, I can kill it from there using the "k" instruction.

  Anyone else having similar problems?

    cheers,
      DaveK

Attachment: cygcheck.out
Description: Text document

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