From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32708 invoked by alias); 1 Feb 2002 20:02:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32560 invoked from network); 1 Feb 2002 20:02:30 -0000 Received: from unknown (HELO saturn.billgatliff.com) (209.251.101.200) by sources.redhat.com with SMTP; 1 Feb 2002 20:02:30 -0000 Received: by saturn.billgatliff.com (Postfix, from userid 500) id 308A91418BE; Fri, 1 Feb 2002 14:02:27 -0600 (CST) Date: Fri, 01 Feb 2002 12:02:00 -0000 From: "William A. Gatliff" To: crossgcc@sources.redhat.com, gdb@sources.redhat.com Subject: Re: Patch for arm-linux gdbserver Message-ID: <20020201140227.A6958@saturn.billgatliff.com> Reply-To: bgat@billgatliff.com 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020201142955.A32707@nevyn.them.org>; from drow@mvista.com on Fri, Feb 01, 2002 at 02:29:55PM -0500 X-SW-Source: 2002-02/txt/msg00044.txt.bz2 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 /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