[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gdbserver crash
From: |
Thomas . E . Daley |
Subject: |
gdbserver crash |
Date: |
Fri, 23 May 2003 12:21:03 -0600 |
OVERVIEW
--------
gdbserver keeps crashing with:
thread getmsg err: no event message for getmsg
Segmentation fault
when trying to debug threaded applications.
THE DETAILS
-----------
I have been trying to get gdbserver working from a i686-linux host
to a powerpc-linux target. I have built the cross development tools
myself from:
binutils-2.13.1
gcc-3.2.3
glibc-2.3.2
glibc-linuxthreads-2.3.2
I have built the Linux kernel with the tools and have had no kernel
problems.
I started with insight-5.3 and had several problems.
1) solib-absolute-prefix, solib-search-path not set.
2) Realtime signal not recognized, had to add REALTIME_LO, REALTIME_HI to
gdbserver/server.h, then got SIG32 messages.
Then set "handle SIG32 nostop".
3) Can't interrupt a running program.
4) gdbserver crashes with "thread getmsg err: no event message for getmsg"
Problems 1 and 2 I fixed.
Then I got the latest snapshot insight+dejagnu-20030522 and things are
better. I added REALTIME_LO, REALTIME_HI to gdbserver/server.h and
configured and built.
cd gdb/gdbserver
mkdir powerpc-linux
cd powerpc-linux
CC=powerpc-linux-gcc ../configure powerpc-linux
make
# Copy executable to nfs mounted target /bin
Now I don't get the SIG32 messages and I can break into a running program.
The only problem left is the gdbserver crash.
PROBLEM DETAILS
---------------
The crash does not always happen at the same place in the program, so may
be timing related. Using "set debug remote 1" I see that gdbserver
always crashes after the same packet exchange:
Sending packet: $M1001a3b4,4:7d821008#a1...Ack
Packet received: OK
Sending packet: $m3000c0d8,4#bf...Ack
Packet received: 9421ffe0
Sending packet: $M3000c0d8,4:7d821008#a7...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
in thread_db_create_event() I see that the message is from the failure of
the td_ta_event_getmsg() call. gdbserver crashes because the td_event_msg_t
doesn't have valid data.
CONCLUSION
----------
Can someone shed some light on this prolem? I'll keep digging into it
but would like some help if anyone has a suggestion.
Thanks in advance!
t o m . d a l e y @ s e a g a t e . c o m
- gdbserver crash,
Thomas . E . Daley <=