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.

Using DDD/GDB debugger - video presentation

  • Hallo Constantine, I am trying to debug segmentation faults from my user space app and after compileing the source with -g have now 3 boards that have dumped core and waiting to be analysed but I am struggling to get the gdb installed.  I also have seen the presentation but they do not go through the process of installing tools so I  need some help as the guide "http://processors.wiki.ti.com/index.php/Debugging_a_Linux_Application_with_MontaVista_5.0" gets me to a dead end where I have to "make && make install".  I am running ubuntu on the host and have tried to set up gdb 6.6 as per the guide but not even using sudo got me through the problems. After doing a second time I get the following toward the end of the output:

    gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -I. -I.././bfd -I.././bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c elf32-arm.c -o elf32-arm.o
    cc1: warnings being treated as errors
    elf32-arm.c: In function 'find_thumb_glue':
    elf32-arm.c:2452: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
    elf32-arm.c: In function 'find_arm_glue':
    elf32-arm.c:2485: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
    make[4]: *** [elf32-arm.lo] Error 1
    make[4]: Leaving directory `/home/gvi/workdir/filesys/gdb-6.6/bfd'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/home/gvi/workdir/filesys/gdb-6.6/bfd'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/gvi/workdir/filesys/gdb-6.6/bfd'
    make[1]: *** [all-bfd] Error 2
    make[1]: Leaving directory `/home/gvi/workdir/filesys/gdb-6.6'
    make: *** [all] Error 2

    Thanks, Jinh T.

  • I've used precompiled gdb.

    You can try to compile without -Werror = Make all warnings into errors.

  • I am not sure where to change this configuration: is it in gdb-6.6 directory or in the gdb directory in configure.sh file?

    How and where do I get a precompiled gdb?  Maybe this does not give me hassles like this?  I am using dvsdk_2_10_01_18 with mv5 on evmdm365.

    Thanks, Jinh T.

  • Figured it out: had to add "--disable-werror" to parameters where ./configure ..... script was called.  May I ever become a linux hacker.

    Thanks, Jinh T.

  • no hacker yet, I reached make[3] and now it complains that it could not read symbols: File in wrong format.  Any ideas how to fix this or where to get those pre-built binaries?

    Thanks, Jinh T.

  • Now I am becoming a hacker.  One hack to TI for using gdb-6.6 in thir wiki that doesn't work.  I downloaded gdb-7.1 (was afraid of the latest 7.2) and got the debugger working.  No of to hack my segmentation fault.  Thanks, Jinh T.

  • Hi Constantine, just check the links you give as useful info, they do not all work. Thanks, Jinh T.

  • Where is the problem?

  • If I select DDD Manual I get to a broken page.  Could it be my browser settings?

  • Jinh said:
    If I select DDD Manual I get to a broken page.

    Thanks, fixed.