* host_makefile_frag and cross debugging
@ 2005-06-24 11:46 Andrew STUBBS
2005-06-24 14:09 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Andrew STUBBS @ 2005-06-24 11:46 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: host_makefile_frag and cross debugging
2005-06-24 11:46 host_makefile_frag and cross debugging Andrew STUBBS
@ 2005-06-24 14:09 ` Daniel Jacobowitz
2005-06-24 14:33 ` Andrew STUBBS
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2005-06-24 14:09 UTC (permalink / raw)
To: Andrew STUBBS; +Cc: gdb
On Fri, Jun 24, 2005 at 12:44:46PM +0100, Andrew STUBBS wrote:
> 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?
Host fragments are for native debugger support routines now - only.
> 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?
You're missing the fact that xm-mingw32.h comes from your local
patches, not from the FSF tree. CVS gdb has absolutely no xm files
left - even after Mark has added most of a MinGW host support.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: host_makefile_frag and cross debugging
2005-06-24 14:09 ` Daniel Jacobowitz
@ 2005-06-24 14:33 ` Andrew STUBBS
2005-06-24 14:37 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Andrew STUBBS @ 2005-06-24 14:33 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
On Fri, 24 Jun 2005 15:09:17 +0100, Daniel Jacobowitz <drow@false.org>
wrote:
> Host fragments are for native debugger support routines now - only.
So what's the official way of making host configurations these days then?
>> What am I missing?
>
> You're missing the fact that xm-mingw32.h comes from your local
> patches, not from the FSF tree. CVS gdb has absolutely no xm files
> left - even after Mark has added most of a MinGW host support.
That may be true - I haven't checked - but GDB 6.3 still had two:
$ find . -name 'xm-*.h'
./gdb/config/i386/xm-cygwin.h
./gdb/config/i386/xm-go32.h
and these do exactly the sort of things I need done. The MinGW patches
have merely followed the pattern.
I don't deny that I may need to do it a different way, but somehow I need
to make the adjustments required by Windows, even though the debugger is
targeted at SH. Any pointers would be great.
Thanks
Andrew Stubbs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: host_makefile_frag and cross debugging
2005-06-24 14:33 ` Andrew STUBBS
@ 2005-06-24 14:37 ` Daniel Jacobowitz
2005-06-24 14:52 ` Andrew STUBBS
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2005-06-24 14:37 UTC (permalink / raw)
To: Andrew STUBBS; +Cc: gdb
On Fri, Jun 24, 2005 at 03:31:48PM +0100, Andrew STUBBS wrote:
> On Fri, 24 Jun 2005 15:09:17 +0100, Daniel Jacobowitz <drow@false.org>
> wrote:
> >Host fragments are for native debugger support routines now - only.
>
> So what's the official way of making host configurations these days then?
Autoconf mostly. The xm files are gone; do the test elsewhere. Check
what CVS does for path separators. Eli fixed these not long ago.
> >>What am I missing?
> >
> >You're missing the fact that xm-mingw32.h comes from your local
> >patches, not from the FSF tree. CVS gdb has absolutely no xm files
> >left - even after Mark has added most of a MinGW host support.
>
> That may be true - I haven't checked - but GDB 6.3 still had two:
>
> $ find . -name 'xm-*.h'
> ./gdb/config/i386/xm-cygwin.h
> ./gdb/config/i386/xm-go32.h
>
> and these do exactly the sort of things I need done. The MinGW patches
> have merely followed the pattern.
But they already didn't work for cross debuggers, because we were
mostly through the process of removing them.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: host_makefile_frag and cross debugging
2005-06-24 14:37 ` Daniel Jacobowitz
@ 2005-06-24 14:52 ` Andrew STUBBS
2005-06-24 18:56 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrew STUBBS @ 2005-06-24 14:52 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
On Fri, 24 Jun 2005 15:36:59 +0100, Daniel Jacobowitz <drow@false.org>
wrote:
>> So what's the official way of making host configurations these days
>> then?
>
> Autoconf mostly. The xm files are gone; do the test elsewhere. Check
> what CVS does for path separators. Eli fixed these not long ago.
Ah, I've found it. There's a preprocessor test in defs.h. Way too simple
for any autoconf project surely :-)
That probably explains why I can't find any 'machanism' to do it!
Thanks a lot.
Andrew Stubbs4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: host_makefile_frag and cross debugging
2005-06-24 14:52 ` Andrew STUBBS
@ 2005-06-24 18:56 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2005-06-24 18:56 UTC (permalink / raw)
To: Andrew STUBBS; +Cc: gdb
> Cc: gdb@sources.redhat.com
> Date: Fri, 24 Jun 2005 15:49:18 +0100
> From: Andrew STUBBS <andrew.stubbs@st.com>
>
> > Autoconf mostly. The xm files are gone; do the test elsewhere. Check
> > what CVS does for path separators. Eli fixed these not long ago.
>
> Ah, I've found it. There's a preprocessor test in defs.h. Way too simple
> for any autoconf project surely :-)
It didn't seem to me justified to use The Great Guns of Autoconf to
make a test whose results are known in advance: we know precisely
which platforms use `;' as path separator, and the list of those
platforms is not likely to change any time soon.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-24 18:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24 11:46 host_makefile_frag and cross debugging Andrew STUBBS
2005-06-24 14:09 ` Daniel Jacobowitz
2005-06-24 14:33 ` Andrew STUBBS
2005-06-24 14:37 ` Daniel Jacobowitz
2005-06-24 14:52 ` Andrew STUBBS
2005-06-24 18:56 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox