This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

[Bug gdb/15739] New: cygwin gdb hangs on step or next command


http://sourceware.org/bugzilla/show_bug.cgi?id=15739

            Bug ID: 15739
           Summary: cygwin gdb hangs on step or next command
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: critical
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: stevegale0 at yahoo dot com

GNU gdb (GDB) 7.6.50.20130508-cvs (cygwin-special)
This GDB was configured as "i686-cygwin".

It hangs when executing next or step command on very simple programs.
An example is given below.


------
hello.cpp program:
#include <iostream>

using namespace std;

int main()
{
  int a = 5;
  float b = 6;
  cout << "hello world" << endl;
  cout << a << endl;
  cout << b << endl;
  return 0;
}

Compiled with: g++ -g hello.cpp -o hello
g++ version 4.7.3


------
Running gdb hangs as follows:

$ gdb hello
GNU gdb (GDB) 7.6.50.20130508-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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /cygdrive/c/hello...done.
(gdb) b main
Breakpoint 1 at 0x40118e: file hello.cpp, line 7.
(gdb) r
Starting program: /cygdrive/c/hello
[New Thread 9044.0x2300]
[New Thread 9044.0x2c90]

Breakpoint 1, main () at hello.cpp:7
7         int a = 5;
(gdb) n
8         float b = 6;
(gdb) n
9         cout << "hello world" << endl;
(gdb) n


------
Ctrl-C cannot un-hang gdb. Killing the cygwin window can.
I managed to catch the last message a fraction of second before the window was
killed:


Once the message was 
[New Thread 9044.0x2e4]
[Switching to Thread 9044.0x2e4]
0x77e40190 in ntdll!RtlUserThreadStart ()
   from /cygdrive/c/windows/system32/ntdll.dll
Quit
(gdb is killed)


And another time the message was:
warning: SuspendThread(0x1a0) failed. (winerr 5)
PC register is not available
PC register is not available
(gdb is killed at this point)


------
I have had gdb hangs in the past on cygwin. They seem to be recurrent.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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