Why does CodeWarrior halt unexpectedly when debugging threads?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Why does CodeWarrior halt unexpectedly when debugging threads?

ソリューションへジャンプ
1,158件の閲覧回数
alanbacklund
Contributor I

I am trying to remote debug the CodeWarrior Linux_Examples/Thread program and the program always appears to halt before it reaches the end. Where it halts varies depending what breakpoints have been set (if any). The program runs fine when it is not being debugged. It also works when it is debugged on the target with gdb.

 

I have unstripped libpthread.so.0 and ld.so.1 libraries. Remote debugging did not work without the unstripped ld.so.1 library. The unstripped libpthread.so.0 does not seem to have any effect.

I have enabled connection logging  but have not found the log.

I am using QorIQ-SDK-V1.4-20130625-yocto to generate Linux, CodeWarrior PA 10.3 (CW_PA_v10.3_Linux_b130315) and a P1020RDB-PC development system.

 

Thanks

ラベル(1)
タグ(4)
0 件の賞賛
1 解決策
710件の閲覧回数
addiyi
NXP Employee
NXP Employee

Hi,

I have reproduced your scenario, using a board with e500v2 cpu and CW PA 10.3 for Windows. So indeed, using un-stripped library CW halt unexpectedly when debugging threads. As an workaround until this issue will be fixed, you can used stripped libraries, which allow you to debug the application, but not the libraries.

Adrian

元の投稿で解決策を見る

0 件の賞賛
6 返答(返信)
710件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hi Alan,

Please try to use AppTRK source provided in CodeWarrior 10.3 C:\Program Files\Freescale\CW PA v10.3\PA\PA_Tools\AppTRK, which should work.

Thanks


0 件の賞賛
710件の閲覧回数
alanbacklund
Contributor I

The code in the CW apptrk is different than the code in the SDK apptrk, but they both have the same the version. It took several attempts before I was sure I had the CW apptrk. It didn't fix the problems.Switching to SDK 1.3.2 also did not help.

I am now testing using gdbserver with eclipse.

Thanks

0 件の賞賛
710件の閲覧回数
addiyi
NXP Employee
NXP Employee

Hi Alan,

Please try to use files attached. I was able to debug correctly Thread project using these libs. Copy libs files to your target board and provide execution rights. (chmod +x). Then copy to n /lib and then change the symbolic links as below:

In /lib folder:

ln -fs ld-2.15_nostrip.so ld.so.1

ln -fs libpthread-2.15_nostrip.so  libpthread.so.0

and rename the libthread lib:

mv libthread_db-1.0_nostrip.so libthread_db.so.1

After that you can start apptrk or apptrk_debug (this will provide debug messages).

NOTE: take a look to screenshots attached.

NOTE2: I used CW 10.3 for Windows and SDK 1.4

0 件の賞賛
711件の閲覧回数
addiyi
NXP Employee
NXP Employee

Hi,

I have reproduced your scenario, using a board with e500v2 cpu and CW PA 10.3 for Windows. So indeed, using un-stripped library CW halt unexpectedly when debugging threads. As an workaround until this issue will be fixed, you can used stripped libraries, which allow you to debug the application, but not the libraries.

Adrian

0 件の賞賛
710件の閲覧回数
alanbacklund
Contributor I

You're right the program finishes with no breakpoints or breakpoints in the main program if the libraries are stripped. Setting a breakpoint in a thread still stops the program unexpectedly.

Thanks

Is there any way I can monitor the status of this issue?

0 件の賞賛
710件の閲覧回数
addiyi
NXP Employee
NXP Employee

Hi Alan,

CW 10.3 doesn't provide support for SDK 1.4, so this is the cause of the issue. For CW 10.3, compatible SDK is 1.3.2. You can get it form here (SDK1.3.2). Also, is mandatory yo use both libpthread.so.0 and ld.so.1 unstripped.

Adrian

0 件の賞賛