This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Patch for arm-linux gdbserver
- From: "William A. Gatliff" <bgat at billgatliff dot com>
- To: crossgcc at sources dot redhat dot com, gdb at sources dot redhat dot com
- Date: Fri, 1 Feb 2002 14:02:27 -0600
- Subject: Re: Patch for arm-linux gdbserver
- References: <20020131113611.A2242@saturn.billgatliff.com> <4.1.20020131181535.00b40f00@mhsun1.maidenhead.arm.com> <20020131153627.A3137@saturn.billgatliff.com> <20020131181024.A4883@nevyn.them.org> <200201312321.g0VNLKV11957@hyper.wm.sps.mot.com> <20020201103605.B14977@nevyn.them.org> <200202011833.g11IXoZ15188@hyper.wm.sps.mot.com> <20020201142955.A32707@nevyn.them.org>
- Reply-to: bgat at billgatliff dot com
Guys:
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) \
-I/home/bgat/H-arm-cerfpod-linux-gnu/include
Because that's where my bfd.h is. Next, I added this to INCLUDE_CFLAGS:
-I /home/bgat/H-arm-cerfpod-linux-gnu/arm-linux/include
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
touch /home/bgat/H-arm-cerfpod-linux-gnu/arm-linux/include/sys/reg.h
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.
Then it's:
$ 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. :^)
b.g.
--
Bill Gatliff
bgat@billgatliff.com