This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: `gdbserver' in cross compiled builds


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=<build-machine>

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.
>  
> 
> 
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]