How to build gdb and gdbserver

David Korn dkorn@pixelpower.com
Fri Jun 22 03:53:00 GMT 2001


>-----Original Message-----
>From: Peter Barada [ mailto:pbarada@mail.wm.sps.mot.com ]
>Sent: 21 June 2001 16:13

>Can you send my your hacked up Makefile so I can build myself a
>gdbserver?

  I didn't bother with a makefile, there's only four modules to build and
link, and I hate plowing through all that bizarre autogibberish stuff in
gnu makefiles....

  Basically, I moved all the files from the gdbserver dir into a fresh
directory, then I dragged a full copy of the $srcdir/gdb/config tree into
the same place.

  After that I kept trying to build modules, dragging over copies of each 
.h file that it failed to find from $srcdir/gdb, $srcdir/include and
$builddir/gdb; there were only a few.  It's important to be sure that the
gdb source tree is configured for your target, not your host, at this point;
some of the .h files live in $builddir/gdb and are auto-generated with
constants that depend on the configuration.

  Then I just linked it from the command line once I'd got each of the
modules to build.  Note that I was writing my own custom low-*.c file in the
example below.

export CFLAGS=-I. -I./config
gcc ${CFLAGS} -c server.c 
gcc ${CFLAGS} -c utils.c
gcc ${CFLAGS} -c remote-utils.c
gcc ${CFLAGS} -c low-vxworks.c

gcc -o gdbserver server.o utils.o remote-utils.o low-vxworks.o

  I don't have the machine here in front of me ATM but I'll check up at
the weekend and send you another mail if there's anything significant I've
left out.  HTH.

       DaveK
-- 
we are not seats or eyeballs or end users or consumers.
we are human beings - and our reach exceeds your grasp.
                    deal with it.                      - cluetrain.org 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list