From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: GDB Subject: Re: How to configure a cross gdb to debug natively Date: Fri, 13 Jul 2001 14:52:00 -0000 Message-id: <20010713145255.A7036@nevyn.them.org> References: <20010713132346.A28020@lucon.org> <20010713134806.A28554@lucon.org> <20010713140826.A19730@nevyn.them.org> <20010713141222.A29050@lucon.org> <20010713142850.A6263@nevyn.them.org> <20010713144557.A29571@lucon.org> X-SW-Source: 2001-07/msg00151.html On Fri, Jul 13, 2001 at 02:45:57PM -0700, H . J . Lu wrote: > Does the change have any negative impact? I think you're violating least surprise. You want a native debugger. Configure for a native debugger. A cross debugger should never try to run binaries on the local machine, even if it happens they will run; it requires a remote target, and does not include entire chunks of code. That's a good thing. > > 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}". I think you should trust the target triplets in a case like this. If it says they're different, assume that they really are different. I suspect that this will do the wrong thing with, for instance, 32-bit and 64-bit AIX. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer