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.

About DM8127 Boa webserver debugging

How can i setup CCS V5 to debug a boa web server on DM8127 platform ?

using arm-arago-linux-gdb works and gdb list command shows boa source files , but in CCS v5 , remote debug configuration can not lookup boa source files so i can not setup  breakpoints .

 

 

  • Hello,

    Have you loaded the debug symbols for the program in CCS? And have directed CCS to the location of the source files? You will need to do those two steps for source level debug visibility when debugging your linux application in CCS.

    There are more details on Linux debug in the Linux debug training module that can help:

    http://processors.wiki.ti.com/index.php/CCS_Modules_Library#Linux_Debug

    Thanks

    ki


  • below are Boa debugging steps with CCS v5 .

    1. import boa webserver sources as a  makefile project

     

    2. remote debug setup as follows ,  using GDB Manual Remote Debugging Launcher

     

      

     

     

     

    3.  Dm8127 console says

    root@DM8127_IPNC:/opt/ipnc# /dsp/gdbserver  :1000 ./boa -c /etc
    Process ./boa created; pid = 654
    Listening on port 1000
    Remote debugging from host 192.168.0.21
    readchar: Got EOF
    Remote side has terminated connection.  GDBserver will reopen the connection.
    Listening on port 1000
    Remote debugging from host 192.168.0.21
    readchar: Got EOF
    Remote side has terminated connection.  GDBserver will reopen the connection.
    Listening on port 1000

    4. Error popup displays

     

     

     

  • the .gdbinit file often defines sysroot, which is needed to have debug visibility of the shared libraries. I see in your third screenshot that you did specify a location for .gdbinit, just left the default name. Do you have a .gdbinit file and does it define sysroot?

    Thanks

    ki

  •  

    Thanks Ki .

    It works now.

    I made a mistake.  I had forgotten to copy the last boa debug binary to dm8127 .

    As you noted  , I corrected .gdbinit path setting .

  • Hi,
    i'm new to gdb/gdbserver debugging and i'm trying to debug a sample application on a DM8127 and gdbserver with RDK 3.5 and gdbserver 6.6. But i have got some problems, this is my .gdbinit file

    set sysroot /home/andrea/IPNC_RDK_Release_V3.5/Source/ipnc_rdk/target/filesys/lib
    set solib-absolute-prefix /home/andrea/IPNC_RDK_Release_V3.5/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi

    i obtain an error launching debug "No symbol table is loaded. Use the "file" command." on line 1. But if i remove that first line using just solib-absolute-prefix command the debugging start (i see on target "Remote debugging from host ...") but the application doesn't start (i can't see the attached thread on debug tab) and no break becomes active. The only way to let execution proceed is to type 'continue' command on gdb console.

    Could someone help me? Have i to use a particular gdbserver version or 6.6 is fitting?
     I have followed http://processors.wiki.ti.com/index.php/Debugging_a_Linux_Application_with_MontaVista_5.0 and others documents to configure gdbserver

    thanks
    regards
    Andrea

  •  

    Maybe it seems to be a configuration problem ..

    My gdbserver info is follows .

    root@DM8127_IPNC:/dsp# ./gdbserver --version
    GNU gdbserver (GDB) 7.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    gdbserver is free software, covered by the GNU General Public License.
    This gdbserver was configured as "arm-arago-linux-gnueabi"

    When a CCS gdb starts ,  it breaks Main function because a  remote GDB setting  was configured as "STOP on startup at main '.  So to run a program , continue command should be entered .  

    You can refer remote GDB setting in the same posting .   

    Thanks.

     

     

     

     

     

  • Hi JeongHwan, thank you for the reply
    i have tried to install gdb 7.2 and now i obtain a different error executing a sample application. This is the output on host side

    software@software-desktop:~/IPNC_RDK_Release_V3.5/Source/ipnc_rdk/target/filesys/opt/sample/Debug$ /home/software/IPNC_RDK_Release_V3.5/Source/ti_tools/linux_devkit/bin/arm-arago-linux-gnueabi-gdb ./sample
    GNU gdb (GDB) 7.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-arago-linux-gnueabi".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/software/IPNC_RDK_Release_V3.5/Source/ipnc_rdk/target/filesys/opt/sample/Debug/sample...done.
    (gdb) set sysroot /home/software/IPNC_RDK_Release_V3.5/Source/ipnc_rdk/target/filesys/lib
    (gdb) set solib-absolute-prefix /home/software/IPNC_RDK_Release_V3.5/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi
    (gdb) target remote 172.27.130.131:1000
    Remote debugging using 172.27.130.131:1000
    warning: Can not parse XML target description; XML support was disabled at compile time
    Reading symbols from /home/software/IPNC_RDK_Release_V3.5/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi/lib/ld-linux.so.3...(no debugging symbols found)...done.
    Loaded symbols for /home/software/IPNC_RDK_Release_V3.5/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi/lib/ld-linux.so.3
    0x4009f790 in ?? () from /home/software/IPNC_RDK_Release_V3.5/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi/lib/ld-linux.so.3
    (gdb)

    Does it sound familiar to someone?
    regards

    Andrea

  • Hi Andrea

    I setup gdb debugging as below..

    --- DM8127  side ----

    root@DM8127_IPNC:/opt/ipnc# /dsp/gdbserver :1000 ./boa -c /etc
    Process ./boa created; pid = 667
    Listening on port 1000
    Remote debugging from host 192.168.0.21
    Killing all inferiors
    root@DM8127_IPNC:/opt/ipnc# /dsp/gdbserver :1000 ./boa -c /etc
    Process ./boa created; pid = 671
    Listening on port 1000
    Remote debugging from host 192.168.0.21
    ApproDrvInit: 3
    queue id:131076
    queue id:0
    queue id:32769
    HASH_TABLE_SIZE = 587
    server_port=80
    [10/Nov/2012:11:42:44 +0000] boa: server version Boa/0.94.13
    [10/Nov/2012:11:42:44 +0000] boa: server built Jan 24 2014 at 10:48:44.
    [10/Nov/2012:11:42:44 +0000] boa: starting server pid=671, port 80
    Killing all inferiors
    root@DM8127_IPNC:/opt/ipnc# /dsp/gdbserver :1000 ./boa -c /etc
    Process ./boa created; pid = 677
    Listening on port 1000
    Remote debugging from host 192.168.0.21

     

    ---  Host PC side ---

    jeonghwan@ubuntu:~/workspace/dm8127/Source/ipnc_rdk/ipnc_app/network/boa-0.94.13/src$ ~/workspace/dm8127/Source/ti_tools/linux_devkit/bin/arm-arago-linux-gnueabi-gdb ./boa
    GNU gdb (GDB) 7.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "--host=i686-linux --target=arm-arago-linux-gnueabi".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/jeonghwan/workspace/dm8127/Source/ipnc_rdk/ipnc_app/network/boa-0.94.13/src/boa...done.
    (gdb) target remote 192.168.0.26:1000
    Remote debugging using 192.168.0.26:1000
    Reading symbols from /home/jeonghwan/workspace/dm8127/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi/lib/ld-linux.so.3...(no debugging symbols found)...done.
    Loaded symbols for /home/jeonghwan/workspace/dm8127/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi/lib/ld-linux.so.3
    0x40062790 in ?? ()
       from /home/jeonghwan/workspace/dm8127/Source/ti_tools/linux_devkit/arm-arago-linux-gnueabi/lib/ld-linux.so.3
    (gdb) list
    Cannot access memory at address 0x0
    117     {
    118             int c;                      /* command line arg */
    119             int server_s;                   /* boa socket */
    120             struct soap *soap;
    121
    122
    123             pthread_t hello_thread;
    124
    125             /* set umask to u+rw, u-x, go-rwx */
    126             c = umask(~0600);
    (gdb) c
    Continuing.

     

    jeonghwan@ubuntu:~/workspace/dm8127/Source/ti_tools$ find . -name gdbserver
    ./linux_devkit/arm-arago-linux-gnueabi/usr/bin/gdbserver

    Above gdbserver should be copied to DM8127

     Hoping this t may be helpful ..

    Thanks .