ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] How to choose 'gdb' debugger when using tool chain 'arm-none-


From: Stuart Hughes
Subject: Re: [Ltib] How to choose 'gdb' debugger when using tool chain 'arm-none-linux-gnueabi' in Code Blocks?
Date: Sun, 25 Jul 2010 11:26:35 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Quentin and all,

The reason LTIB builds gdb (cross, gdbserver, native) rather than using
a version from the toolchain is:

* Not all toolchains include this, gdb is a separate package.  In fact
what we commonly think of as gcc, is actually binutils, gcc and glibc
put in a mixer and blended.

* The toolchain versions of gdb may not match the target setup you are
building.  For example, you can switch toolchains in gdb (fundamentally
to uClibc).  Or you can rebuild with/without EABI, soft float, etc.  The
 idea in LTIB is when you build gdb as a package, it is made to match
your target perfectly (hopefully).  That's why it is stored in "bin" in
your current LTIB project, as it could be specific to that instance.

Regards, Stuart

Quentin YANG wrote:
> Hi,
> 
> Based on '/NXP LPC3250 Evaluation Board Hands-On/',  slides from Arrow
> Electronics, I've been trying to debug the the 'hello world'  using
> CodeBlocks.
> 
> In Code Blocks, you can choose 3rd-party compiler/debugger tool chain
> you want.
> 
> As shown in attached screen shot. I've choosen the tool chain
> 'arm-none-linux-gnueabi' installed by LTIB.
> (
> /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/
> )
> 
> C compiler                                   
> arm-none-linux-gnueabi-gcc-4.1.2
> C++ compiler                                arm-none-linux-gnueabi-g++
> Linker for dynamic libs                   arm-none-linux-gnueabi-gcc-g++
> Linker for static libs                        arm-none-linux-gnueabi-ar
> *Debugger *                                      *?????*
> make program make                       make
> 
> 
> But, which one I should choose to match 'Gdb Debugger' ? 
> 
> address@hidden Gsn_HelloCpp]$ ll
> /opt/nxp/gcc-3.4.5-glibc-2.3.6/arm-linux-gnu/bin/
> total 26228
> -rwxr-xr-x 1 root root 1668274 2008-10-19 07:12 arm-linux-gnu-addr2line
> -rwxr-xr-x 1 root root 1640583 2008-10-19 07:12 arm-linux-gnu-ar
> -rwxr-xr-x 1 root root 2545112 2008-10-19 07:12 arm-linux-gnu-as
> -rwxr-xr-x 1 root root  205745 2008-10-19 07:12 arm-linux-gnu-c++
> -rwxr-xr-x 1 root root 1636180 2008-10-19 07:12 arm-linux-gnu-c++filt
> -rwxr-xr-x 1 root root  204640 2008-10-19 07:12 arm-linux-gnu-cpp
> -rwxr-xr-x 1 root root  205745 2008-10-19 07:12 arm-linux-gnu-g++
> -rwxr-xr-x 1 root root  203709 2008-10-19 07:12 arm-linux-gnu-gcc
> -rwxr-xr-x 1 root root  203709 2008-10-19 07:12 arm-linux-gnu-gcc-3.4.5
> -rwxr-xr-x 1 root root   16214 2008-10-19 07:12 arm-linux-gnu-gccbug
> -rwxr-xr-x 1 root root   63044 2008-10-19 07:12 arm-linux-gnu-gcov
> -rwxr-xr-x 1 root root 1962541 2008-10-19 07:12 arm-linux-gnu-gprof
> -rwxr-xr-x 1 root root 2396647 2008-10-19 07:12 arm-linux-gnu-ld
> -rwxr-xr-x 1 root root 1699566 2008-10-19 07:12 arm-linux-gnu-nm
> -rwxr-xr-x 1 root root 2242984 2008-10-19 07:12 arm-linux-gnu-objcopy
> -rwxr-xr-x 1 root root 2382576 2008-10-19 07:12 arm-linux-gnu-objdump
> -rwxr-xr-x 1 root root 1640582 2008-10-19 07:12 arm-linux-gnu-ranlib
> -rwxr-xr-x 1 root root  391765 2008-10-19 07:12 arm-linux-gnu-readelf
> -rwxr-xr-x 1 root root 1547723 2008-10-19 07:12 arm-linux-gnu-size
> -rwxr-xr-x 1 root root 1530385 2008-10-19 07:12 arm-linux-gnu-strings
> -rwxr-xr-x 1 root root 2243015 2008-10-19 07:12 arm-linux-gnu-strip
> -rwxr-xr-x 1 root root   12992 2008-10-19 07:12 fix-embedded-paths
> 
> address@hidden Gsn_HelloCpp]$ ll
> /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin
> total 8048
> -rwxr-xr-x 1 root root 465401 2007-05-10 04:27
> arm-none-linux-gnueabi-addr2line
> -rwxr-xr-x 2 root root 436451 2007-05-10 04:27 arm-none-linux-gnueabi-ar
> -rwxr-xr-x 2 root root 746982 2007-05-10 04:27 arm-none-linux-gnueabi-as
> -rwxr-xr-x 2 root root 136447 2007-05-10 04:27 arm-none-linux-gnueabi-c++
> -rwxr-xr-x 1 root root 464829 2007-05-10 04:27
> arm-none-linux-gnueabi-c++filt
> -rwxr-xr-x 1 root root 132718 2007-05-10 04:27 arm-none-linux-gnueabi-cpp
> -rwxr-xr-x 2 root root 136447 2007-05-10 04:27 arm-none-linux-gnueabi-g++
> -rwxr-xr-x 2 root root 132335 2007-05-10 04:27 arm-none-linux-gnueabi-gcc
> -rwxr-xr-x 2 root root 132335 2007-05-10 04:27
> arm-none-linux-gnueabi-gcc-4.1.2
> -rwxr-xr-x 1 root root  16302 2007-05-10 04:25 arm-none-linux-gnueabi-gccbug
> -rwxr-xr-x 1 root root  27379 2007-05-10 04:27 arm-none-linux-gnueabi-gcov
> -rwxr-xr-x 1 root root 526172 2007-05-10 04:27 arm-none-linux-gnueabi-gprof
> -rwxr-xr-x 2 root root 733879 2007-05-10 04:27 arm-none-linux-gnueabi-ld
> -rwxr-xr-x 2 root root 476345 2007-05-10 04:27 arm-none-linux-gnueabi-nm
> -rwxr-xr-x 1 root root 621110 2007-05-10 04:27
> arm-none-linux-gnueabi-objcopy
> -rwxr-xr-x 2 root root 717557 2007-05-10 04:27
> arm-none-linux-gnueabi-objdump
> -rwxr-xr-x 2 root root 436451 2007-05-10 04:27 arm-none-linux-gnueabi-ranlib
> -rwxr-xr-x 1 root root 238367 2007-05-10 04:27
> arm-none-linux-gnueabi-readelf
> -rwxr-xr-x 1 root root 416980 2007-05-10 04:27 arm-none-linux-gnueabi-size
> -rwxr-xr-x 1 root root 416428 2007-05-10 04:27
> arm-none-linux-gnueabi-strings
> -rwxr-xr-x 2 root root 621110 2007-05-10 04:27 arm-none-linux-gnueabi-strip
> 
> Don't know which of above commands can match 'gdb debugger' ????
> 
> 
> I tried linking debugger to ' /usr/bin/gdb ', but that 'gdb' is
> configured for ' i386-redhat-linux-gnu ', not ARM.
> As a result, I got error message when I do single step debugging in Code
> Blocks.
> 
> address@hidden nxp]$ gdb --version
> GNU gdb Fedora (6.8-24.fc9)
> Copyright (C) 2008 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 "i386-redhat-linux-gnu".
> 
> 
> 
> I am about to install '*arm-linux-gcc-4.3.2.tgz*', and use
> 'arm-linux-gdb' to match 'Gdb debugger' in Code Blocks.
> Wondering has anyone done this before?
> Why doesn't LTIB install 'arm-linux-gdb' as part of tool chain??
> 
> BTW, has anyone have expertise or experience on what IDE or debugger
> best suit the development of application/driver on Embedded Linux? 
> (After CodeBlocks, I probably will try Eclipse-CDT.)
> 
> Thanks for any comments or suggestions.
> 
> 
> Regards,
> Quentin
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LTIB home page: http://ltib.org
> 
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib



reply via email to

[Prev in Thread] Current Thread [Next in Thread]