Setting library path

Arun Biyani abiyani@unix.telasic.com
Mon Jan 8 19:04:00 GMT 2007


I have been trying to setup GDB for cross debugging. Host x86 Linux. 
Remote Coldfire 5272. Gdb behaves
strangely. Setting a breakpoint causes illegal instruction trap after 
the breakpoint is executed. While searching
the web, I came across this hint below.

    * When cross-debugging (i.e. when the remote system is running a 
different OS or on a different processor type),
       you may have to set the path gdb uses to find shared libraries 
when you start gdb, or it will fail with strange errors.
       The GDB manual is silent on this important topic; Daniel 
Jacobowitz told me about it, and I also found some
       doc about it at Axis Communications. My recipe takes care of this 
for my environment, but you may need to
        futz around a bit with this if gdb acts insane on startup.

How do I tell gdb where the libraries are? I am using "m68k-elf-gdb" 
which I found at snapgear.org. On the
system, I can see /usr/local/m68k-uclinux/lib

[lib$:617] ls
m5407/   m5200/                libstdc++.a    crti.o      libpthread.a
mcpu32/  libiberty.a           libstdc++.la*  crtn.o      libresolv.a
m5307/   libssp.a              libsupc++.a    libc.a      librt.a
m528x/   libssp_nonshared.a    libsupc++.la*  libcrypt.a  libutil.a
m68000/  libssp_nonshared.la*  crt0.o         libm.a      elf2flt.ld
m5206e/  libssp.la*            crt1.o         libnsl.a    ldscripts/
[tmp$:526]

Are these the libraries gdb is looking for?
Thx




More information about the Gdb mailing list