* Setting library path
@ 2007-01-08 19:04 Arun Biyani
2007-01-08 19:16 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Arun Biyani @ 2007-01-08 19:04 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Setting library path
2007-01-08 19:04 Setting library path Arun Biyani
@ 2007-01-08 19:16 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-01-08 19:16 UTC (permalink / raw)
To: Arun Biyani; +Cc: gdb
On Mon, Jan 08, 2007 at 11:04:19AM -0800, Arun Biyani wrote:
> 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.
> 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
That is for targeting a system using shared libraries. If you are
using m68k-elf, you are probably not using shared libraries, and this
won't help you.
I don't know what might be wrong, but it sounds like your GDB and
target do not agree on the proper breakpoint.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-08 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-08 19:04 Setting library path Arun Biyani
2007-01-08 19:16 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox