Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] i386-netbsd* configury cleanup
@ 2002-09-02 10:24 Jason R Thorpe
  2002-09-02 14:44 ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: Jason R Thorpe @ 2002-09-02 10:24 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

The i386-netbsd and i386-netbsdelf targets are now equivalent, as far
as configury is concerned.  The following merges them.

BTW, someone is going to have to step up and fix the i386-openbsd*
target, since the NetBSD code no longer really works for it (and this
is likely to be even more true in the not-distant future, when all of
the NetBSD thread code gets merged in to GDB).

Committed to trunk:

	* configure.tgt (i[3456]86-*-netbsdelf*): Merge with...
	(i[3456]86-*-netbsd*): ...this.  Set gdb_target to nbsd.
	(i[3456]86-*-openbsd*): Make this a separate entry.  Add a
	comment noting that this needs its own target configuration.
	* config/i386/nbsd.mt: New file.
	* config/i386/nbsdaout.mt: Remove.
	* config/i386/nbsdelf.mt: Ditto.
	* config/i386/tm-nbsdaout.h: Ditto.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

[-- Attachment #2: i386nbsd-cfg-patch --]
[-- Type: text/plain, Size: 3798 bytes --]

Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.84
diff -c -r1.84 configure.tgt
*** configure.tgt	22 Aug 2002 21:52:44 -0000	1.84
--- configure.tgt	2 Sep 2002 16:44:13 -0000
***************
*** 92,100 ****
  # OBSOLETE i[3456]86-*-aix*)	gdb_target=i386aix ;;
  i[3456]86-*-bsd*)	gdb_target=i386bsd ;;
  i[3456]86-*-freebsd*)	gdb_target=fbsd ;;
! i[3456]86-*-netbsdelf*)	gdb_target=nbsdelf ;;
! i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
! 			gdb_target=nbsdaout ;;
  # OBSOLETE i[3456]86-*-os9k)	gdb_target=i386os9k ;;
  i[3456]86-*-go32*)	gdb_target=i386aout ;;
  i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
--- 95,102 ----
  # OBSOLETE i[3456]86-*-aix*)	gdb_target=i386aix ;;
  i[3456]86-*-bsd*)	gdb_target=i386bsd ;;
  i[3456]86-*-freebsd*)	gdb_target=fbsd ;;
! i[3456]86-*-netbsd*)	gdb_target=nbsd ;;
! i[3456]86-*-openbsd*)	gdb_target=nbsd ;;	# FIXME: needs its own target
  # OBSOLETE i[3456]86-*-os9k)	gdb_target=i386os9k ;;
  i[3456]86-*-go32*)	gdb_target=i386aout ;;
  i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
Index: config/i386/nbsd.mt
===================================================================
RCS file: config/i386/nbsd.mt
diff -N config/i386/nbsd.mt
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- config/i386/nbsd.mt	2 Sep 2002 16:44:17 -0000
***************
*** 0 ****
--- 1,4 ----
+ # Target: Intel 386 running NetBSD
+ TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o \
+ 	nbsd-tdep.o
+ TM_FILE= tm-nbsd.h
Index: config/i386/nbsdaout.mt
===================================================================
RCS file: config/i386/nbsdaout.mt
diff -N config/i386/nbsdaout.mt
*** config/i386/nbsdaout.mt	1 Sep 2002 23:24:19 -0000	1.2
--- /dev/null	1 Jan 1970 00:00:00 -0000
***************
*** 1,4 ****
- # Target: Intel 386 running NetBSD
- TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o \
- 	nbsd-tdep.o
- TM_FILE= tm-nbsdaout.h
--- 0 ----
Index: config/i386/nbsdelf.mt
===================================================================
RCS file: config/i386/nbsdelf.mt
diff -N config/i386/nbsdelf.mt
*** config/i386/nbsdelf.mt	1 Sep 2002 23:24:19 -0000	1.10
--- /dev/null	1 Jan 1970 00:00:00 -0000
***************
*** 1,4 ****
- # Target: Intel 386 running NetBSD
- TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o \
- 	nbsd-tdep.o
- TM_FILE= tm-nbsd.h
--- 0 ----
Index: config/i386/tm-nbsdaout.h
===================================================================
RCS file: config/i386/tm-nbsdaout.h
diff -N config/i386/tm-nbsdaout.h
*** config/i386/tm-nbsdaout.h	30 Jun 2002 14:43:24 -0000	1.3
--- /dev/null	1 Jan 1970 00:00:00 -0000
***************
*** 1,26 ****
- /* Macro definitions for i386 running under NetBSD.
-    Copyright 2000, 2002 Free Software Foundation, Inc.
- 
-    This file is part of GDB.
- 
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
- 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330,
-    Boston, MA 02111-1307, USA.  */
- 
- #ifndef TM_NBSDAOUT_H
- #define TM_NBSDAOUT_H
- 
- #include "i386/tm-nbsd.h"
- 
- #endif /* TM_NBSDAOUT_H */
--- 0 ----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i386-netbsd* configury cleanup
  2002-09-02 10:24 [PATCH] i386-netbsd* configury cleanup Jason R Thorpe
@ 2002-09-02 14:44 ` Mark Kettenis
  2002-09-02 15:31   ` Jason R Thorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2002-09-02 14:44 UTC (permalink / raw)
  To: Jason R Thorpe; +Cc: gdb-patches

Jason R Thorpe <thorpej@wasabisystems.com> writes:

> --5vjQsMS/9MbKYGLq
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> The i386-netbsd and i386-netbsdelf targets are now equivalent, as far
> as configury is concerned.  The following merges them.
> 
> BTW, someone is going to have to step up and fix the i386-openbsd*
> target, since the NetBSD code no longer really works for it (and this
> is likely to be even more true in the not-distant future, when all of
> the NetBSD thread code gets merged in to GDB).

There's a slight problem here: it seems to be impossible to
distinguish an OpenBSD binary from a NetBSD a.out binary.  That was
the main reason why I made i386-*-opensbd* identical to i386-netbsd.
As long as you keep the support for older NetBSD's this should work
fine.  Unfortunately...

Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i386-netbsd* configury cleanup
  2002-09-02 14:44 ` Mark Kettenis
@ 2002-09-02 15:31   ` Jason R Thorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Jason R Thorpe @ 2002-09-02 15:31 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Mon, Sep 02, 2002 at 11:44:40PM +0200, Mark Kettenis wrote:

 > There's a slight problem here: it seems to be impossible to
 > distinguish an OpenBSD binary from a NetBSD a.out binary.  That was
 > the main reason why I made i386-*-opensbd* identical to i386-netbsd.
 > As long as you keep the support for older NetBSD's this should work
 > fine.  Unfortunately...

Basically nothing that is done for i386-netbsdelf is pertinent to
i386-openbsd and I as the NetBSD target maintainer don't want to be
stuck in the position of having to worry about a breaking support for
a system, which *happens* to be based on an ancient version of NetBSD,
which I don't use.

In the signal trampoline example, suppose OpenBSD changed the VM layout
such that the singal trampoline start/end was different from NetBSD's.
If you can't distinguish the NetBSD and OpenBSD a.out binaries, then you're
stuck anyway.

What really has to happen is for there to be new OSABI numbers assigned
for OpenBSD, the default OSABI to be set based on the configured target,
and for the OpenBSD configs to not depend on NetBSD-specific code.

Sure, OpenBSD has made the bad decision of sticking with an inflexible
object format like a.out (no ABI ID tags), and made the bad decision
years ago to not change their a.out magic number (it's not like those
OpenBSD a.out binaries will run on NetBSD, even though they appear to
be NetBSD binaries).  However, I don't think it's particularly fair to
ask me to deal with the consequences of those bad decisions.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-02 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-02 10:24 [PATCH] i386-netbsd* configury cleanup Jason R Thorpe
2002-09-02 14:44 ` Mark Kettenis
2002-09-02 15:31   ` Jason R Thorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox