[coldfire-gnu-discuss] m5272, gdb/gdbserver and uClinux/pthreads... again

Harry Gunnarsson mrharryg at gmail.com
Tue May 18 15:37:35 UTC 2010


Thanks for the reply,
I haven't been able to find a uClinux distro on freescale website. Would you
by any chance have a link to that LTIB?

Example:
I attached a very simple app that uses pthreads. I compile this with
'-mcpu=5272 -g3 -pthread' and link this to 'jth'
I pick up 'gdbserver' from
freescale-coldfire-4.4//m68k-uclinux/libc/m5206e/usr/lib. And I copy them to
jffs2 file system on the board.
Now I simply run it like:
> ./gdbserver :5555 ./jth
And from host I connect with (with gdb from same compiler as used above
compiling the source)
$ m68k-uclinux-gdb jth.gdb
..
target remote IP:5555

Now the instance I connect, the gdbserver bails out saying that it couldn't
find 'inferior'. I believe this is a thread thing.

I can however:
- debug a non thread program with the above scheme
- without the debugger, run 'jth' correctly

Let me know if I can provide further details about the test case

Harry

On Tue, May 18, 2010 at 7:44 AM, Maxim Kuvyrkov <maxim at codesourcery.com>wrote:

> On 5/18/10 8:53 AM, Harry Gunnarsson wrote:
>
>> Hi,
>> Back in march 8th I inquired about pthread debugging under uClinux using
>> gdbserver and Maxim and I had a brief discussion on the topic(you could
>> look up the thread on codesourcery website). I believe his stance was
>> that it should work. I tested again using the brand new 4.4-216, but I
>> am still unsuccessful debugging pthread apps under uclinux.
>> Recap; this used to work using uclinux 2007 and CodeSourcery 4.2. Now
>> with newer kernel/distro and newer toolchain, it doesn't work; once
>> doing 'target remote' from host, gdbserver bails out. Also, debugging
>> non-threaded apps works perfectly.
>>
>> BTW, I am using the uClinux distro from uclinux.org <http://uclinux.org>.
>>
>
> FWIW, we test our toolchains against LTIB rootfs.
>
>
>
>> Some other postings on the mailing lists got me wondered;
>> - Is there anything in the kernel configuration that is required for
>> debugging pthreads?
>>
>> Does anyone had any success doing this kind of debugging?
>>
>
> Can you provide a simple testcase that uses pthreads and debugging which
> does not work?
>
> Thank you,
>
> --
> Maxim Kuvyrkov
> CodeSourcery
> maxim at codesourcery.com
> (650) 331-3385 x724
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/coldfire-gnu-discuss/attachments/20100518/473f888c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: join.c
Type: text/x-csrc
Size: 875 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/coldfire-gnu-discuss/attachments/20100518/473f888c/attachment.c>


More information about the coldfire-gnu-discuss mailing list