From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: "H . J . Lu" Cc: GDB Subject: Re: How to configure a cross gdb to debug natively Date: Fri, 13 Jul 2001 14:28:00 -0000 Message-id: <20010713142850.A6263@nevyn.them.org> References: <20010713132346.A28020@lucon.org> <20010713134806.A28554@lucon.org> <20010713140826.A19730@nevyn.them.org> <20010713141222.A29050@lucon.org> X-SW-Source: 2001-07/msg00148.html 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 . -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer