Patch for arm-linux gdbserver
William A. Gatliff
Fri Feb 1 12:03:00 GMT 2002
Got it! Well, it *builds* anyway. My arm-linux target is so messed
up right now, it'll be a few hours before I can run it.
See previous posts on building ncurses and bfd, and configuring gdb
for --host=arm-linux... Here's where I hacked next.
After configuring gdb, edit <builddir>/gdbserver/Makefile:
I changed BFD_CFLAGS to this:
BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) \
Because that's where my bfd.h is. Next, I added this to INCLUDE_CFLAGS:
because that's where I put my target-specific toolchain, in particular
my configured linux kernel headers (including all the symlinks).
Then I created a bogus include/sys dir and reg.h:
mkdir -p /home/bgat/H-arm-cerfpod-linux-gnu/arm-linux/include/sys
I couldn't figure out the right way to unset the #define in
low-linux.c, so I figured why not...
Finally, I added -static to GLOBAL_CFLAGS.
$ CC=arm-linux-gcc make
$ file gdbserver
gdbserver: ELF 32-bit LSB executable, ARM, version 1, statically linked, not stripped
But does the resulting executable *work*? I'll know in a bit.
> Basically, this is because we abuse gdb's configure quite badly. I
> recommend that you build a small curses library or grab one from an
> m68k disribution or what-have-you, and ignore the problem for now.
> I'll see about fixing this a little down the road.
Yea, we're doing a number on it here. :^)
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to email@example.com
More information about the crossgcc