GDB and thread

Ken Brown kbrown@cornell.edu
Sat Dec 28 22:28:00 GMT 2019


On 12/28/2019 4:27 PM, Marco Atzeri wrote:
> Hi,
> I am trying to debug the libuv test failures,
> but it seems I am not able to convince GDB on stopping
> just before the failure.
> 
> Is "thread apply all" working on Cygwin ?
> The fact that produces no output in comparison to
> a normal break command is a bit strange
> 
> (gdb) break test-dlerror.c:34
> Breakpoint 1 at 0x10040b0b0: file /pub/devel/libuv/libuv-1.34.0/test/test-dlerro
> r.c, line 34.
> (gdb) thread apply all break test-dlerror.c:34

Others know this better than I do, but I seem to recall that a break command 
automatically applies to all threads.  In other words, "thread apply all" is 
redundant.

> (gdb) run dlerror
> Starting program: /cygdrive/d/cyg_pub/devel/libuv/libuv-1.34.0-build/test/.libs/
> run-tests.exe dlerror
> [New Thread 139176.0x231a0]
> [New Thread 139176.0x231c8]
> [New Thread 139176.0x21a0c]
> [New Thread 139176.0x2332c]
> [New Thread 139176.0x230b0]
> [New Thread 139176.0x231cc]
> [New Thread 139176.0x23028]
> [New Thread 139176.0x23214]
> [Thread 139176.0x23028 exited with code 0]
> not ok 1 - dlerror
> # exit code 134
> # Output from process `dlerror`:
> # Assertion failed in /pub/devel/libuv/libuv-1.34.0/test/test-dlerror.c on line
> 45: strstr(msg, path) != NULL
> [Thread 139176.0x231c8 exited with code 134]
> [Thread 139176.0x230b0 exited with code 134]
> [Thread 139176.0x2332c exited with code 134]
> [Thread 139176.0x23214 exited with code 134]
> [Thread 139176.0x21a0c exited with code 134]
> [Inferior 1 (process 139176) exited with code 0206]
> (gdb)
> 
> 
> Any hint will be appreciated

Might this be related to optimization?  That could change the order in which 
lines of code are executed.  Have you tried building without optimization?

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



More information about the Cygwin mailing list