This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: howto build gdb / gdbserver for x86 host with arm-linux target?


On Thu, Feb 10, 2005 at 09:29:41PM -0800, Tim Harvey wrote:
> $ cd gdb-6.3
> $ ./configure --target=arm-linux
> $ make
> $ file gdb/gdb
> gdb/gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
> GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
> $ cd gdb/gdbserver
> $ export CC=/usr/local/bin/arm-linux-gcc
> $ ./configure --host=arm-linux
> $ make
> $ file gdbserver
> gdbserver: ELF 32-bit MSB executable, ARM, version 1 (ARM), for GNU/Linux
> 2.4.3, dynamically linked (uses shared libs), not stripped
> 
> When trying to execute my app on the target with this gdbserver I get:
> 
> # gdbserver foo:1234 myApp
> gdbserver: error while loading shared libraries: libthread_db.so.1: cannot open
> shared object file: No such file or directory
> 
> My target's glibc doesn't have a libthread_db and I'm not really sure what this
> even is vs libthread.

There's one in your cross development environment or gdbserver wouldn't
have even built.

You have to use the same libraries in your cross environment and on
your target if you want things to work...

> I don't know if the gdbserver that the snapgear-3.1.1 distro is building is
> correct or not.  When I use it I get the 'Reply contains invalid hex digit 59'
> error and I'm still not understanding if this is pointing to a problem with
> gdbserver or the gdb host.

Are you using it with the arm-linux-gdb you built above?  In your first
message you were using your host GDB.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]