From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: GDB Subject: Re: How to configure a cross gdb to debug natively Date: Fri, 13 Jul 2001 14:45:00 -0000 Message-id: <20010713144557.A29571@lucon.org> References: <20010713132346.A28020@lucon.org> <20010713134806.A28554@lucon.org> <20010713140826.A19730@nevyn.them.org> <20010713141222.A29050@lucon.org> <20010713142850.A6263@nevyn.them.org> X-SW-Source: 2001-07/msg00150.html On Fri, Jul 13, 2001 at 02:28:50PM -0700, Daniel Jacobowitz wrote: > > > > 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. Does the change have any negative impact? > > > > 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 Yes. > tree for different targets essentially if you do that. It may work in That is something I tried to avoid. > 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 > . And? My patch checks "${target_os}" = "${host_os}" and "${gdb_target_cpu}" = "${gdb_host_cpu}". H.J.