From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17723 invoked by alias); 23 Feb 2002 17:31:45 -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 17578 invoked from network); 23 Feb 2002 17:31:41 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 23 Feb 2002 17:31:41 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 2CCA93D31; Sat, 23 Feb 2002 12:31:35 -0500 (EST) Message-ID: <3C77D1F6.1020704@cygnus.com> Date: Sat, 23 Feb 2002 09:31:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Christoph Plattner Cc: gdb@sources.redhat.com Subject: Re: `gdbserver' in cross compiled builds References: <3C5B3201.2F2FB670@gmx.at> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00274.txt.bz2 Hello, The first problem is that GDB server is only configured when build ``native''. A native gdbserver needs to be linked against the hosts ptrace libraries. To do this using a cross compiler, you need to configure things do what is often refered to as a ``canadian cross'': --host=i386-linux-gnu \ --target=i386-linux-gnu \ --build= The second problem is bit rot between core-gdb and gdbserver. Core GDB is being changed in ways that are not compatible with gdbserver (a compromize). gdbserver was recently been overhauled (by Daniel J) to address this. Can I suggest downloading a current GDB (see http://sources.redhat.com/gdb/current/ ). Andrew > Hello GDB group ! > > I often try to build up cross tool chains for different platforms: > i386, PowerPC, Atmel AVR, HP PA-RISC, and SPARC soon. > > But I always have the problem with the standard GDB server (not > a stub in special environments). > > First of all a question: Why is the gdbserver not built up auto- > matically. If I build a native GDB, then I want to have a `gdbserver' > for my native system, for example I have the same core system, but > only small disk (CompactFlash, for example) and I want to use > `gdbserver' there. If I build a cross build, for example a PPC cross > setup from a intel machine, then I think it is also a clear way > to build a `gdb' running on a i386 and handling PPC code, and > a `gdbserver' running on the target (--host=$TARGET) and in the > best also install it to $prefix/$TARGET as `glibc' and others > do so. > > When I build up such a tool chain, I always have source and > object trees seperated. How can I configure and build a > `gdbserver' in such a tree setup. When I do the configuration > in the source tree under ./gdb/gdbserver (which I do not like > in the source tree ...), then the built cannot find generated > header files. I cannot run the `configure' from the object tree, > as there is no subdirectory under `./gdb' named `gdbserver'. > Doing a copy from the src/gdb-5.1.1/gdb/gdbserver to the > corresponding place into the object tree does not work also. > > How is this done correctly. I cannot find good information > on this topic in the internet. > > PLEASE: Send it directly to me, as I am not registered on the > GDB mailing list (perhaps I want to, if the problem stays longer ...) > > With friendly regards > Christoph P. > > > >