This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to configure a cross gdb to debug natively


On Fri, Jul 13, 2001 at 02:08:26PM -0700, Daniel Jacobowitz wrote:
> On Fri, Jul 13, 2001 at 01:48:06PM -0700, H . J . Lu wrote:
> > On Fri, Jul 13, 2001 at 01:23:46PM -0700, H . J . Lu wrote:
> > > I'd like to configure gdb inside a tree with binutils, gcc and gdb
> > > on Linux/i686 with
> > > 
> > > # ../configure --target=i386-linux ....
> > > 
> > > I do that on purpose so that gcc and binutils won't use any files
> > > on the host machine. But gdb refuses to debug natively on Linux/i686
> > > since it is configured as a cross gdb, However, Linux/i686 is
> > > compatible with i386-linux, how can I convince gdb to debug natively?
> > > 
> > 
> > This patch seems to do the trick for me.
> > 
> > 
> > H.J.
> > ----
> > 2001-07-13  H.J. Lu  (hjl@gnu.org)
> > 
> > 	* configure.in: Check "${target_os}" = "${host_os}" and
> > 	"${gdb_target_cpu}" = "${gdb_host_cpu}" for native files
> > 	instead of "${target}" = "${host}".
> > 	* configure: Regenerated.
> 
> 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.

> 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.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]