ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] On-target debugging


From: Stuart Hughes
Subject: Re: [Ltib] On-target debugging
Date: Fri, 09 Oct 2009 14:14:42 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Vadim,

I'm not sure.  The only obvious questions are:

1/ Are you using the gdb in <ltib_proj>/bin
2/ Can you run this on it's own and get something sane from it (run version)
3/ Are all the parts of glibc on the target from the same origin (the toolchain normally made by base_libs). 4/ Is the executable on your host the actual one made by LTIB (i.e. from rpm/BUILD/xxx/.... 5/ Make sure you're not using an executable from rpm/BUILD/xxxx/ that is linking using the local .la files, these will pull in the wrong libraries from /usr/lib (maybe). You need to get a fully linked final executable that is not stripped. You can if necessary do this by putting this at the top of your .spec file making the package:

%define __os_install_post %{nil}

Regards, Stuart


Vadim Lebedev wrote:
While following the instructions:

I'm getting follwing:
on the target
gdbserver :1234  /usr/bin/linphonec -d 6  -D
Process /usr/bin/linphonec created; pid = 1008
Listening on port 1234
Remote debugging from host 192.168.10.85
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between
libthread_db and libpthread
============================

on the host:

path ~/castel-gip/rootfs Executable and object file path: /home/vadim/castel-gip/rootfs:/home/vadim/tortoisehg-dev/contrib:/home/vadim/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
(reverse-i-search)`t': path
~/castel-gip/rooQuit
(gdb) b
main
Breakpoint 1 at 0xb200: file linphonec.c, line
533.
(gdb)
cont Continuing.
Error while mapping shared library
sections:
/usr/lib/liblinphone.so.3: No such file or
directory.
warning: .dynamic section for "/usr/lib/libeXosip2.so.4" is not at the
expected address (wrong library or version mismatch?) warning: .dynamic section for "/usr/lib/libmediastreamer.so.0" is not at the expected address (wrong library or version mismatch?) Error while mapping shared library sections:
/usr/lib/libortp.so.8: No such file or
directory.
warning: .dynamic section for "/usr/lib/libasound.so.2" is not at the
expected address (wrong library or version mismatch?) warning: .dynamic section for "/usr/lib/libspeexdsp.so.1" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/usr/lib/libavcodec.so.51" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/usr/lib/libavutil.so.49" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/usr/lib/libSDL-1.2.so.0" is not at the
expected address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/librt.so.1" is not at the expected
address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libdl.so.2" is not at the expected
address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libpthread.so.0" is not at the
expected address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libm.so.6" is not at the expected
address (wrong library or version mismatch?)
warning: .dynamic section for "/usr/lib/libspeex.so.1" is not at the
expected address (wrong library or version mismatch?)
warning: .dynamic section for "/usr/lib/libosipparser2.so.3" is not at
the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/usr/lib/libosip2.so.3" is not at the
expected address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libc.so.6" is not at the expected
address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libnsl.so.1" is not at the expected
address (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/libssl.so.0.9.8: No such file or directory.
warning: .dynamic section for "/lib/libresolv.so.2" is not at the
expected address (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/libstdc++.so.6: No such file or directory.
warning: .dynamic section for "/lib/libgcc_s.so.1" is not at the
expected address (wrong library or version mismatch?)
Error while mapping shared library sections:
/usr/lib/libvpu.so: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libdirectfb-1.1.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libfusion-1.1.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libdirect-1.1.so.0: No such file or directory.
warning: .dynamic section for "/usr/lib/libts-0.0.so.0" is not at the
expected address (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/ld-linux.so.3: No such file or directory.
Error while mapping shared library sections:
/lib/libcrypto.so.0.9.8: No such file or directory.
warning: .dynamic section for "/usr/lib/libz.so.1" is not at the
expected address (wrong library or version mismatch?)

Breakpoint 1, main (argc=4, argv=0xbefe8e44) at linphonec.c:533
533             if (! linphonec_init(argc, argv) ) exit(EXIT_FAILURE);
(gdb)
==================

As the code i'm trying to debug is inside the DLL's (liblinphone.so  and
libavcodec.so)  i'm stuck now....



Any advice
Thanks













Stuart Hughes wrote:
Hi Vadim,

I've not tried on the i.mx27, but the method for building is the same.

$ ./ltib -m config

find the entry for gdb (hint use the 's' search).  Enable it, it
should set as below (--- means selected by something else).


        [*] gdb
        [ ]   gdb to run natively on the target
        [*]   cross gdb (runs on build machine)
        [ ]     XML support
        ---   gdbserver to run natively on the target

$ ./ltib

When it's finished you'll have gdbserver on the target.  You can start
this with: gdbserver :1235 /some/thing/to/debug

On the build machine the cross-gdb is in the bin directory.  You can
run this on it's own or wrap with a GUI gdb (such as ddd --debugger
bin/gdb <unstripped_target>

Once the client gdb is running you run:

gdb> b main
gdb> target remote _IPADDR_:1234
gdb> cont


Regards, Stuart


Vadim Lebedev wrote:
Hello,

Folks can somebdoy share his experience with debugging on the target (in
my case it's a Freescale i.mx27)

How do you build the gdbserver for the target?
and how do you build a gdb running on host and connecting to the target?

Thanks
Vadim



_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib





_______________________________________________
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]