This is the mail archive of the gdb@sources.redhat.com 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]

SIGTRAP or SIG32 when remote debugging threads


I'm trying to do thread debugging on an arm7 target with a gdb 6.0 snapshot 
and gdbserver. I've been searching this list for two days now but haven't 
found an answer to my problem.

I get a SIG32 when a new thread is created with pthread_create(...). If I use

handle SIG32 nostop
handle SIG32 noprint

thread creation seems to work. However, I still see only one (main) thread 
with 'info thread'
and receive a SIGTRAP when setting a breakpoint inside a thread.

I have libthread_db-1.0.so
       libthread_db.so -> libthread_db.so.1
       libthread_db.so.1 -> libthread_db-1.0.so

installed in usr/lib on the target and gdbserver seems to load it (there's no 
message, but gdbserver complains
if I remove those libraries).

the application and libpthread-0.8.so in /lib are unstripped.


Here is a session log in case it might help:

	This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux"...
	(gdb) set debug remote 1
	(gdb) handle SIG32 nostop noprint
	Signal        Stop      Print   Pass to program Description
	SIG32         No        No      Yes             Real-time event 32
	(gdb) target remote /dev/ttyS0
	Remote debugging using /dev/ttyS0
	Sending packet: $Hc-1#09...Ack
	Packet received: OK
	Sending packet: $qC#b4...Ack
	Packet received:
	Sending packet: $qOffsets#4b...Ack
	Packet received:
	Sending packet: $?#3f...Ack
	Packet received: T050b:00000000;0d:40feffbf;0f:70250040;
	Sending packet: $m40002570,4#5f...Ack
	Packet received: 0d00a0e1
	0x40002570 in ?? ()
	Sending packet: $m202ad84,b0#f0...Ack
	Packet received: 
0100000001000000010000005700000001000000190100000c000000301200020d00000054d10102040000003001000205000000780a000206000000480400020a0000006e0300000b0000001000000015000000000000000300000000ac020202000000e8020000140000001100000017000000480f000211000000400f000212000000080000001300000008000000feffff6fc00e0002ffffff6f03000000f0ffff6ffa0d00020000000000000000
	Sending packet: $qSymbol::#5b...Ack
	Packet received: qSymbol:5f5f707468726561645f746872656164735f6576656e7473
	Packet qSymbol (symbol-lookup) is supported
	Sending packet: 
$qSymbol::5f5f707468726561645f746872656164735f6576656e7473#47...Ack
	Packet received: OK
	(gdb) c

	...

	Program received signal SIGTRAP, Trace/breakpoint trap.
	Sending packet: $M4000f6c0,4:000050e3#97...Ack
	Packet received: OK
	Sending packet: $M20018ec,4:0670a0e1#9e...Ack
	Packet received: OK
	Sending packet: $M201b9a8,4:0510a0e1#9b...Ack
	Packet received: OK
	Sending packet: $m2001930,4#2c...Ack
	Packet received: 000053e3
	0x02001930 in main () at main/main.c:174
	174             while( bPowerDownFlag == false );

--
Any help would be much appreciated

Lukas Heinier


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