debugging pthreads
Aras Vaichas
aras.vaichas@gmail.com
Tue Sep 11 07:48:00 GMT 2012
On 7 September 2012 13:26, Bill Pringlemeir <bpringle@sympatico.ca> wrote:
> On 7 Sep 2012, aras.vaichas@gmail.com wrote:
>
>> I am having trouble debugging pthreads on my target. I am not sure
>> what the cause is, but I suspect it could be either my kernel or my
>> libraries.
>
> It seems that you need symbols to debug threads. I guess that gdb is
> looking for variables to determine what threads/stacks are where.
Yes, you were half right. I was building a *static* gdb and that meant
that the .dynsym table was stripped from the native gdb. This meant
that thread_db could not find the ps_lgetfpregs symbol in gdb and
therefore thread debugging was not available.
i.e. -static causes -rdynamic to be functionally negated.
AFAIK to make a static gdb work with threads, you need to build a
static thread_db as well.
I rebuilt crosstools with a non-static gdb and I can now debug threads
on my target.
> ...probably not a CTNG issue.
A warning in menuconfig would be nice. :)
Aras
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list