* Re: `gdbserver' in cross compiled builds
[not found] <3C5B3201.2F2FB670@gmx.at>
@ 2002-02-23 9:31 ` Andrew Cagney
[not found] ` <3C780221.CF27FBDA@gmx.at>
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-02-23 9:31 UTC (permalink / raw)
To: Christoph Plattner; +Cc: gdb
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.
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: `gdbserver' in cross compiled builds
[not found] ` <3C780221.CF27FBDA@gmx.at>
@ 2002-02-23 13:26 ` Andrew Cagney
2002-02-24 3:26 ` Christoph Plattner
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-02-23 13:26 UTC (permalink / raw)
To: Christoph Plattner; +Cc: gdb
> Hello,
>
> thanks for you answer, but my questions aimed to another point.
>
> Why is the gdbserver not built automatically also in cross builds ?
Are you configuring with:
..../configure --target=powerpc-linux-gnu
or
..../configure --host=powerpc-linux-gnu --target=powerpc-linux-gnu
--build=i386-linux-gnu
the former configures to build a cross debugger. The latter configures
to build a debugger (and gdbserver) that will run on the target system.
The latter assumes that you have a powerpc-linux-gnu-gcc installed
somewhere while the former doesn't.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: `gdbserver' in cross compiled builds
2002-02-23 13:26 ` Andrew Cagney
@ 2002-02-24 3:26 ` Christoph Plattner
2002-02-24 8:37 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Plattner @ 2002-02-24 3:26 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
Yes, that's clear for me. It is the same for glibc.
With this point I have NO problems.
The problem is simple in the tree setup !
In my built (objects) tree, there is NO "gdbserver" subdirectory
created by configuring, in the gdb source tree, the configuration
cannot be done, because all generated files (configs, header files,
etc) are written to the build tree (OBJECT tree).
So my problems are not in the config parameters, but simple, where
(on which path) is called what ?
And if I do some hacks manually, PPC support (for example) cannot be
built. Why does the gdbserver directory work so bad ?
I hope I could give you the point of my problem (reread last email
also).
With friendly regards
Christoph Plattner
Olt EMAIL:
------------------
Hello,
thanks for you answer, but my questions aimed to another point.
Why is the gdbserver not built automatically also in cross builds ?
Why is gdbserver not configured in cross builds ?
How to do the correct way to build and configure concerning the
source tree and the build tree. For example
$HOME/src/gdb ... is the current gdb source
$HOME/build/gdb ... is the current build tree for gdb
cd $HOME/build/gdb
../../src/gdb/configure .............
where the parameters for configure sets up a cross build, for example
target is a powerpc architecture, host is i386-linux.
GDB can be build for that without problem.
But how to configure "gdbserver" now ?
There is no directory under the build tree.
To change to the source tree to do the setup is also wrong, as generated
header files, etc, cannot be found there.
What is the professional way here (not a hack or a workaround).
I hope you can help here.
With friendly regards
Christoph Plattner
Andrew Cagney wrote:
>
> > Hello,
> >
> > thanks for you answer, but my questions aimed to another point.
> >
> > Why is the gdbserver not built automatically also in cross builds ?
>
> Are you configuring with:
>
> ..../configure --target=powerpc-linux-gnu
>
> or
>
> ..../configure --host=powerpc-linux-gnu --target=powerpc-linux-gnu
> --build=i386-linux-gnu
>
> the former configures to build a cross debugger. The latter configures
> to build a debugger (and gdbserver) that will run on the target system.
> The latter assumes that you have a powerpc-linux-gnu-gcc installed
> somewhere while the former doesn't.
>
> Andrew
--
-------------------------------------------------------
private: christoph.plattner@gmx.at
company: christoph.plattner@alcatel.at
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: `gdbserver' in cross compiled builds
2002-02-24 3:26 ` Christoph Plattner
@ 2002-02-24 8:37 ` Daniel Jacobowitz
2002-02-24 10:21 ` Dan Kegel
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-02-24 8:37 UTC (permalink / raw)
To: Christoph Plattner; +Cc: Andrew Cagney, gdb
On Sun, Feb 24, 2002 at 12:26:20PM +0100, Christoph Plattner wrote:
> Yes, that's clear for me. It is the same for glibc.
> With this point I have NO problems.
>
> The problem is simple in the tree setup !
>
> In my built (objects) tree, there is NO "gdbserver" subdirectory
> created by configuring, in the gdb source tree, the configuration
> cannot be done, because all generated files (configs, header files,
> etc) are written to the build tree (OBJECT tree).
Andrew explained this to you at least twice.... if the build tree is
for a cross debugger, you CAN NOT build gdbserver in it.
> So my problems are not in the config parameters, but simple, where
> (on which path) is called what ?
> And if I do some hacks manually, PPC support (for example) cannot be
> built. Why does the gdbserver directory work so bad ?
Use current CVS instead. I've spent months fixing this.
In fact, if you get current CVS, you can:
mkdir obj
cd obj
../src/gdb/gdbserver/configure
make
And build only the server.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: `gdbserver' in cross compiled builds
2002-02-24 8:37 ` Daniel Jacobowitz
@ 2002-02-24 10:21 ` Dan Kegel
2002-02-24 10:25 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Dan Kegel @ 2002-02-24 10:21 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Christoph Plattner, Andrew Cagney, gdb
Daniel Jacobowitz wrote:
> > ... Why does the gdbserver directory work so bad ?
>
> Use current CVS instead. I've spent months fixing this.
>
> In fact, if you get current CVS, you can:
> mkdir obj
> cd obj
> ../src/gdb/gdbserver/configure
> make
>
> And build only the server.
Oooh, thanks. I'll have to try that.
What's the word on gdbserver and multithreaded programs?
Were those patches from Michal Korbal on track, or is
the right solution going forward something different?
Thanks,
Dan
http://www.kegel.com/linux/gdbserver.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: `gdbserver' in cross compiled builds
2002-02-24 10:21 ` Dan Kegel
@ 2002-02-24 10:25 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-02-24 10:25 UTC (permalink / raw)
To: Dan Kegel; +Cc: Christoph Plattner, Andrew Cagney, gdb
On Sun, Feb 24, 2002 at 10:29:33AM -0800, Dan Kegel wrote:
> Daniel Jacobowitz wrote:
> > > ... Why does the gdbserver directory work so bad ?
> >
> > Use current CVS instead. I've spent months fixing this.
> >
> > In fact, if you get current CVS, you can:
> > mkdir obj
> > cd obj
> > ../src/gdb/gdbserver/configure
> > make
> >
> > And build only the server.
>
> Oooh, thanks. I'll have to try that.
>
> What's the word on gdbserver and multithreaded programs?
> Were those patches from Michal Korbal on track, or is
> the right solution going forward something different?
A little bit different. I'm working on it now.
His patches were unfortunately based on a GDB module that's been
obsoleted; someone interested could probably hack them into a usable
state, but not into a good one.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-02-24 18:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3C5B3201.2F2FB670@gmx.at>
2002-02-23 9:31 ` `gdbserver' in cross compiled builds Andrew Cagney
[not found] ` <3C780221.CF27FBDA@gmx.at>
2002-02-23 13:26 ` Andrew Cagney
2002-02-24 3:26 ` Christoph Plattner
2002-02-24 8:37 ` Daniel Jacobowitz
2002-02-24 10:21 ` Dan Kegel
2002-02-24 10:25 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox