This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

debug multithreaded application in Linux

Hi,

I am running my Linux application on Zoom eXperimenter Kit from Logic. The processor is TI OMAP L138. The GDB debugger is from Soucery G++ Lite, ie arm-none-linux-gnueabi-gdb.

I am performing the debugging remotely using gdbserver. Whenever a breakpoint is hit on any thread, the main returns with the following print out.

Child terminated with signal = 0x5 (SIGTRAP)

Thus, there is no way for me to debug multithreaded application in Linux.

Is there any way out of this ?

rgds,

kc Wong

  • Given that you are not using a TI hardware development board or the software associated with such, you would be better served to ask your question through the Logic PD support link.  They should be better equipped to handle your questions.  Thanks.

     

    http://support.logicpd.com/support/askaquestion.php

  • But the eXperimenter Kit is using the same tool chain and target file system as described in processors.wiki.ti.com. I have been following the steps to setup the development environment. Everything works fine until when I need to debug multithreaded application.

    I wonder the shared libraries provided in Arago file system, are they the same with the shared libraries provided in the Sourcery G++ tool chain.

    Installing the Software for OMAP-L1

    http://processors.wiki.ti.com/index.php/GSG:_Installing_the_Software_for_OMAP-L1

    Setting up OMAP-L1 Target File System

    http://processors.wiki.ti.com/index.php/GSG:_Setting_up_OMAP-L1_Target_File_System

    I am not sure is it appropriate to ask Logic PD as all these steps seem to be from TI. So, I guess TI should have at least tested them to be working before posting to the wiki.

    rgds,

    kc Wong

  • After few days of searching internet, I found the below discussion thread.

    http://www.codesourcery.com/archives/arm-gnu/msg01434.html

    From the discussion thread, I got to know that the shared libraries (/usr/lib and /lib) on the target file system are all stripped version. In order to debug, I have to copy the not stripped version of shared libraries to the target file system.

    kiunwong@ubu1004:~/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/armv4t/lib$ file libpthread-2.8.so
    libpthread-2.8.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
    kiunwong@ubu1004:~/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/armv4t/lib$ file ~/workdir/filesys/lib/libc-2.8.so
    /home/kiunwong/workdir/filesys/lib/libc-2.8.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped

    Once this is done, the application will no longer terminated with below message when a breakpoint is hit on any thread other than main. And I am able to perform debugging on multithreaded application now.

    Child terminated with signal = 0x5(SIGTRAP)