AnsweredAssumed Answered

Why is there a problem using CodeWarrior to debug a multi-threaded program?

Question asked by evaneimer on May 18, 2017

I am having a problem using CodeWarrior to debug a multi-threaded program.
I am using an eval version of CodeWarrior:
CodeWarrior for Power Architecture, Version: 10.5.1 Build Id:160128
My target is a NXP T2080RDB, REV C.
I am using a yocto generated build from QorIQ-SDK-V2.0-20160527-yocto.

In general, everything is working fine. I can create projects and run them
on the T2080RDB. I can also use the debugger to Download or Attach to simple single-threaded and debug them.
However, if I try to debug a multi-threaded program, I can only set breakpoints and debug the "parent"
thread. If I set a breakpoint in a "child" thread, and that line of code gets executed, the debug session is
immediately terminated and I get an error message on the console:
TwoThreads.elf[2164]: unhandled signal 4 at 0000000010000b30 nip 0000000010000b30 lr 0000000010000b5c code 30001


Attached is the very simple TwoThreads program which exhibits the problem I am encountering.
For example, setting a breakpoint at the "sleep(2);" line causes the debug session to terminate.


I saw some similiar problem discussions talking about the need to run with non-stripped version of certain libraries.
From October 15, 2013, "Why does CodeWarrior halt unexpectedly when debugging threads?".
Is this my problem? - Do I need unstripped libraries?
If so, how do I know what files/libraries I need and where do I get them, or how do I generate them?


Note: At the moment, I am only trying to debug user space applications.


Note: I also get the following warning when I start AppTRK:
Warning: /lib64/ used by /var/volatile/tmp/TwoThreads.elf
The dynamic loader does not contain the symbols needed for shared
library debugging. To enable shared library debugging, use an
un-stripped version of this library.

Thanks in advance.

Original Attachment has been moved to:

Original Attachment has been moved to: