debugging threads

Pierre Abbat phma at
Mon Sep 16 23:10:25 PDT 2013

This is the same program as in my previous email. It has a main thread which 
starts two threads. I run gdb on it. On caracal it says:

(gdb) break initnetwork
Breakpoint 1 at 0x429950: file /home/phma/src/ampelos/network.cpp, line 25.
(gdb) run
Starting program: /home/phma/build/ampelos/dbg/ampelos 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7ffff6bce700 (LWP 13873)]
ampelos 1443699307
Starting exp thread
(debugging output omitted)
[New Thread 0x7ffff63cd700 (LWP 13874)]
Starting net thread
[Switching to Thread 0x7ffff63cd700 (LWP 13874)]

Breakpoint 1, initnetwork () at /home/phma/src/ampelos/network.cpp:25
25      {

On darner it says:

(gdb) break initnetwork
Breakpoint 1 at 0x80536e5: file /home/phma/crypt/ampelos/network.cpp, line 27.
(gdb) run
Starting program: /crypt/phma/build/ampelos/dbg/ampelos 
ampelos 1443699307Starting exp thread
(debugging output omitted)
Starting net thread

Program received signal SIGTRAP, Trace/breakpoint trap.
0x282dbe3b in nanosleep () from /usr/lib/

Trying to switch threads in DFly doesn't work. Is this a bug in gdb, or what? 
Where should I report it?

Don't buy a French car in Holland. It may be a citroen.

More information about the Users mailing list