This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How to configure a cross gdb to debug natively
On Fri, Jul 13, 2001 at 02:12:22PM -0700, H . J . Lu wrote:
> > I don't think this is generally appropriate. For one thing, it further
> > breaks the consistency of cross-compiling. If I have ${host} !=
> > ${target} then I am definitely building a cross debugger and that's
>
> I thought the only difference between the native debugger and the
> cross debugger was you couldn't debug natibely with the cross
> debugger, but you could use the native debugger to debug in a
> cross environment.
The difference is that all code in NATDEPFILES is not included in a
cross debugger, yes. That can substantially change the way that GDB
works. If you configure for a cross debugger, you should expect to get
a cross debugger out.
> > what I expect to get out. Why not build your tools --host=i386-linux
> > instead?
>
> As I said, gdb is the part of my tool source tree. I don't want to
> use --host=i386-linux so that gcc and bintils won't use any header
> files and libraries on the host machine.
Build host-x-host instead?
../src/configure --build=i686-unknown-linux-gnu --host=i386-linux \
--target=i386-linux
Ought to give you a native debugger and compilers and not reference
host files. Or do you mean that you want to build cross compilers and
a native debugger at the same time? You're configuring parts of the
tree for different targets essentially if you do that. It may work in
this case, but I doubt it's always supposed to work, and a hack to try
to support it seems like a bad idea. Note that GDB is going to want
host header files if you build it as native - things like
<sys/procfs.h>.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer