于 2011/7/11 17:15, Kai Tietz 写道:
You need to
configure gcc with --enable-threads=posix to have full feature-set
enabled for winpthread.
Sorry, I'm not familiar with some gdb commands, so I type "step 10000" here.
This is the debug log:

GNU gdb (pcx32) 7.3.50.20110709
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-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from e:\t\a.exe...done.
(gdb) b 17
Breakpoint 1 at 0x40cfe5: file main.c, line 17.
(gdb) run
Starting program: e:\t\a.exe
[New Thread 3240.0x1618]

Breakpoint 1, main (argc=1, argv=0x692fc8) at e:\t\main.c:17
17        printf("Range to check for Primes: %d - %d\n\n",start, end);
(gdb) step 10000
[New Thread 3240.0x1450]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 3240.0x1450]
0x00406188 in pthread_self ()
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:737
737      t = (_pthread_v *) TlsGetValue (_pthread_tls);
(gdb) bt
#0  0x00406188 in pthread_self ()
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:737
#1  0x004067d0 in pthread_testcancel ()
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:948
#2  0x004088f7 in sem_std_enter (sem=0x691b70, svp=0xb6fe28)
    at e:\new\gcc\mingw-w64\build\winpthreads\src\sem.c:185
#3  0x00408a4a in sem_wait (sem=0x691b70)
    at e:\new\gcc\mingw-w64\build\winpthreads\src\sem.c:229
#4  0x00404ec0 in gomp_sem_wait (sem=0x691b70)
    at e:\new\gcc\gcc4.6\build\libgomp\config\posix\sem.c:120
#5  0x00404448 in gomp_barrier_wait_end (bar=0x691b68, state=1)
    at e:\new\gcc\gcc4.6\build\libgomp\config\posix\bar.c:83
#6  0x004044e6 in gomp_barrier_wait (barrier=0x691b68)
    at e:\new\gcc\gcc4.6\build\libgomp\config\posix\bar.c:108
#7  0x00402b96 in gomp_thread_start (xdata=0x28fd90)
    at e:\new\gcc\gcc4.6\build\libgomp\team.c:109
#8  0x00407132 in pthread_create_wrapper (args=0x691bf8)
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:1271
#9  0x755b1287 in msvcrt!_itow_s () from C:\Windows\syswow64\msvcrt.dll
#10 0x755b1328 in msvcrt!_endthreadex () from C:\Windows\syswow64\msvcrt.dll
#11 0x764033ca in KERNEL32!BaseCleanupAppcompatCacheSupport ()
   from C:\Windows\syswow64\kernel32.dll
#12 0x00694558 in ?? ()
#13 0x76f69ed2 in wcscat () from C:\Windows\system32\ntdll.dll
#14 0x00694558 in ?? ()
#15 0x76f69ea5 in wcscat () from C:\Windows\system32\ntdll.dll
#16 0x755b12e5 in msvcrt!_endthreadex () from C:\Windows\syswow64\msvcrt.dll
#17 0x00000000 in ?? ()
(gdb)




--
Best Regards,
PcX

GNU gdb (pcx32) 7.3.50.20110709
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-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from e:\t\a.exe...done.
(gdb) b 17
Breakpoint 1 at 0x40cfe5: file main.c, line 17.
(gdb) run
Starting program: e:\t\a.exe 
[New Thread 3240.0x1618]

Breakpoint 1, main (argc=1, argv=0x692fc8) at e:\t\main.c:17
17          printf("Range to check for Primes: %d - %d\n\n",start, end);
(gdb) step 10000
[New Thread 3240.0x1450]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 3240.0x1450]
0x00406188 in pthread_self ()
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:737
737       t = (_pthread_v *) TlsGetValue (_pthread_tls);
(gdb) bt
#0  0x00406188 in pthread_self ()
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:737
#1  0x004067d0 in pthread_testcancel ()
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:948
#2  0x004088f7 in sem_std_enter (sem=0x691b70, svp=0xb6fe28)
    at e:\new\gcc\mingw-w64\build\winpthreads\src\sem.c:185
#3  0x00408a4a in sem_wait (sem=0x691b70)
    at e:\new\gcc\mingw-w64\build\winpthreads\src\sem.c:229
#4  0x00404ec0 in gomp_sem_wait (sem=0x691b70)
    at e:\new\gcc\gcc4.6\build\libgomp\config\posix\sem.c:120
#5  0x00404448 in gomp_barrier_wait_end (bar=0x691b68, state=1)
    at e:\new\gcc\gcc4.6\build\libgomp\config\posix\bar.c:83
#6  0x004044e6 in gomp_barrier_wait (barrier=0x691b68)
    at e:\new\gcc\gcc4.6\build\libgomp\config\posix\bar.c:108
#7  0x00402b96 in gomp_thread_start (xdata=0x28fd90)
    at e:\new\gcc\gcc4.6\build\libgomp\team.c:109
#8  0x00407132 in pthread_create_wrapper (args=0x691bf8)
    at e:\new\gcc\mingw-w64\build\winpthreads\src\thread.c:1271
#9  0x755b1287 in msvcrt!_itow_s () from C:\Windows\syswow64\msvcrt.dll
#10 0x755b1328 in msvcrt!_endthreadex () from C:\Windows\syswow64\msvcrt.dll
#11 0x764033ca in KERNEL32!BaseCleanupAppcompatCacheSupport ()
   from C:\Windows\syswow64\kernel32.dll
#12 0x00694558 in ?? ()
#13 0x76f69ed2 in wcscat () from C:\Windows\system32\ntdll.dll
#14 0x00694558 in ?? ()
#15 0x76f69ea5 in wcscat () from C:\Windows\system32\ntdll.dll
#16 0x755b12e5 in msvcrt!_endthreadex () from C:\Windows\syswow64\msvcrt.dll
#17 0x00000000 in ?? ()
(gdb) 
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to