uClinux & ColdFire pthread debugging using CodeSourcery 4.4-53
Harry Gunnarsson
mrharryg at gmail.com
Tue Mar 9 06:11:41 UTC 2010
Hello,
I am using the CodeSourcery toolchain for a ColdFire 5272 board, and I am
interested in getting gdbserver working with pthread built apps.
At risk of providing a too lengthy explanation to a problem I am seeing,
I'll be deliberately very brief and if discussion occurs I am happy to
provide more details.
This board used to run the following
- uClinux build based on the uclinux.org provided 2007 distribution (kernel
2.6.22)
- Essentially provided Freescale M5272C3 configuration + customizations.
- CodeSourcery 4.2-153
- App using pthreads and debugging using gdb/gdbserver from CodeSourcery
worked fine (or at least with minor problems)
Target: $ gdbserver :5000 ./theapp
Host: $ gdb theapp.gdb
$ ...target remote etc....
Now I am trying to get the latest uclinux.org distro from 2009 running
(kernel 2.6.[29-31]). The main reason is to look into improvements (kernel,
busybox etc) in general (stability) and JFFS2 enhancements in general.
- uClinux 2009 distro
- CodeSourcery 4.4-53
My port seems to work well in all aspects except for debugging multi-thread
user apps.
I have tried many permutations of target build flags (-mcpu, -m etc), and
according to CS website it seems recommended to -m5208 runtime with M5272
ColdFire. Therefore, I have lately tried '-mcpu=5272' for .c sources and
'-m5208' during link.
But I cannot get it to work. Typically I see any of the following problems
- gdbserver saying upon 'target remote...' comand from GDB
'gdbserver: error initializing thread_db library: version mismatch between
libthread_db and libpthread'
And debugging goes belly up when stepping over pthread_create calls
- gdbserver 'unattaches' from the app upon 'target remote...' comand from
GDB and let the app continue unhindered.
GDB on host notices socket closed.
- Any other kind of complaint from gdbserver....
And the bizarre thing is that using that I see the same kinds of problems
when using
- CodeSourcery 4.4, 4.3 or 4.2
- New kernel
That's strange, I think. Do I need to enable something on the kernel side???
The only combination that I got to work somewhat satisfactory is the uclinux
2007+CS4.2
I even tried to build my own gdb/gdbserver from source, version 7.0.1, but
then I saw even more bizzare problems
I would appreciate any piece of advice... Thanks in advance
Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/coldfire-gnu-discuss/attachments/20100308/953bd120/attachment.html>
More information about the coldfire-gnu-discuss
mailing list