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]
Other format: [Raw text]

host_makefile_frag and cross debugging


Hi,

I am trying to build a MinGW hosted, sh-elf targeted debugger. I have been doing this with various versions of GDB for years, but have just started upgrading to GDB 6.3. Previously I was using GDB 5.3. I am using the MinGW patches from sourceforge.

The problem is that, although a native debugger works properly, a cross debugger does not use the correct path separator. It uses the UNIX ':' instead of the windows ';'. Obviously this causes havoc with drive names.

I have traced the problem to the gdb/configure.in:

  frags=
   if test "${target}" = "${host}"; then
     host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
     if test ! -f ${host_makefile_frag}; then
       AC_MSG_ERROR("*** Gdb does not support native target ${host}")
     fi
     frags="$frags $host_makefile_frag"
   else
     host_makefile_frag=/dev/null
   fi

Why does it test if host and target are the same? Surely the whole point of having separate files is that you can mix and match?

The old 5.3 gdb/configure.in just had:

   frags=
   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh

which worked perfectly for me.

I find that this was done in CVS configure.in version 1.175 in which the following comment was actually removed:

     # When building a native debuger the .mh file containing things	 	
     # like NATDEPFILES is needed.  Cross debuggers don't need .mh	 	
     # since it no longer contains anything useful.

Apparently, in this case it does contain something useful - it configures the xm-mingw32.h file which configures the correct separator.

What am I missing?

Thanks

Andrew Stubbs


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