How to build gdb and gdbserver

Peter Barada
Tue Jun 19 12:13:00 GMT 2001

Ok, new question.

I've used the script to build my powerpc-linux
toolchain, and I noticed that it doesn't generate a debugger. So I've

echo Building gdb.
gunzip -c ${TARDIR}/${GDBDISTO}.tar.gz | tar $TARFLAGS -
mkdir -p build-gdb ; cd build-gdb
../${GDBDISTO}/configure --target=$TARGET --prefix=${PREFIX} \
    2>&1 | tee configure.log
make all install

to the end of, and it now build a powerpc-linux-gdb
which I've used with kgdb and works fine.

Now that I've got my ppc kernel limping along, I'd like to create a
gdbserver which when run on the board would allow me to debug
applications using a serial port.
Unfortunately I'm not having any success getting a gdbserver
build from the gdb-5.0 sources. 

I first built it native:

pushd gdb/gdbserver

And that worked fine, creating:

file gdb/gdbserver/gdbserver
gdbserver: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), not stripped

So next I tried creating it using the configuration from

cd ..
mkdir ppc-gdb
cd ppc-gdb
../gdb-5.0/configure --target=powerpc-linux --prefix=/usr/local/wave/cross-linux-tools
pushd gdb/gdbserver

And noticed that when I executed the make in gdb/gdbserver, my
computer paused ofr a few moments and then returned without creating

So does anyone have any ideas how I can create gdbserver on an
i686-linux system *for* a powerpc-linux system?

Thanks in advance,

Peter Barada                         
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list