How to configure a cross gdb to debug natively

Daniel Jacobowitz dmj+@andrew.cmu.edu
Fri Jul 13 14:52:00 GMT 2001


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
> > <sys/procfs.h>.
> 
> 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



More information about the Gdb mailing list