This is the mail archive of the gdb@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: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
> <sys/procfs.h>.

And? My patch checks "${target_os}" = "${host_os}" and
"${gdb_target_cpu}" = "${gdb_host_cpu}".


H.J.


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