Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: thorpej@wasabisystems.com, gdb-patches@sources.redhat.com
Subject: [PATCH/RFA] Modernize NetBSD/m68k
Date: Sat, 01 May 2004 17:29:00 -0000	[thread overview]
Message-ID: <200405011729.i41HTd8w000681@elgar.kettenis.dyndns.org> (raw)

Hi Jason,

I've just added support for OpenBSD/m68k to GDB.  Since the
NetBSD/m68k code hadn't been updated for a while I didn't re-use any
of the old code.  However, the new code was written with sharing the
code between OpenBSD and NetBSD in mind, so used the neutral names
m68kbsd-nat.c and m68kbsd-tdep.c for the new code.  Attached you find
a patch that modernizes the NetBSD/m68k by using that new code.  I've
axed the signal trampoline recognition code; it would only recognize
on-stack signal trampolines and would therefore be useless for NetBSD
2.0.  The old stuff didn't compile anyway on NetBSD/mac68k 1.6.2.  The
new stuff adds cross-debug support and support for ELF.

Do you have any objections if I check this in, and make some further
imporvements towards properly supporting signal trampolines?

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* m68knbsd-nat.c: Remove file.
	* m68knbsd-tdep.c: Remove file.
	* Makefile.in: (m68knbsd-nat.o, m68knbsd-tdep.o): Remove
	dependencies.
	* configure.host: Add m68k-*-netbsdelf*.
	* configure.tgt (m68k-*-netbsd*): Set gdb_target to nbsd.
	* config/m68k/nbsdaout.mh (NATDEPFILES): Add m68kbsd-nat.o,
	solib.o and solib-sunos.o.  Remove m68knbsd-nat.o, corelow.o.
	(XM_FILE): Remove.
	* config/m68k/nbsdelf.mh: New file.
	* config/m68k/nbsd.mt: New file.
	* config/m68k/nbsdaout.mt: Remove file.
	* config/m68k/tm-nbsd.h: Don't include <sys/param.h>,
	<machine/vmparam.h> and "m68k/tm-m68k.h".  Include "solib.h".
	(BPT_VECTOR, STACK_END_ADDR): Remove defines.
	(DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Likewise.
	(use_struct_convention): Remove prototype.
	(USE_STRUCT_CONVENTION): Remove define.
	* config/m68k/xm-nbsd.h: Remove file.

Index: configure.host
===================================================================
RCS file: /cvs/src/src/gdb/configure.host,v
retrieving revision 1.77
diff -u -p -r1.77 configure.host
--- configure.host 30 Apr 2004 23:28:51 -0000 1.77
+++ configure.host 1 May 2004 17:18:48 -0000
@@ -84,6 +84,7 @@ ia64-*-aix*)		gdb_host=aix ;;
 ia64-*-linux*)		gdb_host=linux ;;
 
 m68*-*-linux*)		gdb_host=linux ;;
+m68*-*-netbsdelf*)	gdb_host=nbsdelf ;;
 m68*-*-netbsd*)		gdb_host=nbsdaout ;;
 m68*-*-openbsd*)	gdb_host=obsd ;;
 
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.141
diff -u -p -r1.141 configure.tgt
--- configure.tgt 30 Apr 2004 23:28:51 -0000 1.141
+++ configure.tgt 1 May 2004 17:18:48 -0000
@@ -113,7 +113,7 @@ m68*-*-elf*)		gdb_target=monitor ;;
 m68*-*-linux*)		gdb_target=linux
 			build_gdbserver=yes
 			;;
-m68*-*-netbsd*)		gdb_target=nbsdaout ;;
+m68*-*-netbsd*)		gdb_target=nbsd ;;
 m68*-*-openbsd*)	gdb_target=obsd ;;
 m68*-*-os68k*)		gdb_target=os68k ;;
 m68*-*-uclinux*)	gdb_target=monitor ;;
Index: config/m68k/nbsd.mt
===================================================================
RCS file: config/m68k/nbsd.mt
diff -N config/m68k/nbsd.mt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/m68k/nbsd.mt 1 May 2004 17:18:48 -0000
@@ -0,0 +1,3 @@
+# Target: NetBSD/m68k
+TDEPFILES= m68k-tdep.o m68kbsd-tdep.o corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
Index: config/m68k/nbsdaout.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/nbsdaout.mh,v
retrieving revision 1.1
diff -u -p -r1.1 nbsdaout.mh
--- config/m68k/nbsdaout.mh 22 May 2002 03:59:54 -0000 1.1
+++ config/m68k/nbsdaout.mh 1 May 2004 17:18:48 -0000
@@ -1,5 +1,4 @@
-# Host: Motorola m68k running NetBSD
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o m68knbsd-nat.o \
+# Host: NetBSD/m68k a.out
+NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o \
 	solib.o solib-sunos.o
-XM_FILE= xm-nbsd.h
 NAT_FILE= nm-nbsdaout.h
Index: config/m68k/nbsdelf.mh
===================================================================
RCS file: config/m68k/nbsdelf.mh
diff -N config/m68k/nbsdelf.mh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/m68k/nbsdelf.mh 1 May 2004 17:18:48 -0000
@@ -0,0 +1,3 @@
+# Host: NetBSD/m68k ELF
+NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o
+NAT_FILE= nm-nbsd.h
Index: config/m68k/tm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-nbsd.h,v
retrieving revision 1.8
diff -u -p -r1.8 tm-nbsd.h
--- config/m68k/tm-nbsd.h 1 May 2004 13:14:20 -0000 1.8
+++ config/m68k/tm-nbsd.h 1 May 2004 17:18:48 -0000
@@ -1,4 +1,4 @@
-/* Macro definitions for m68k running under NetBSD.
+/* Target-dependent definitions for NetBSD/m68k.
 
    Copyright 1994, 1996, 2001, 2004 Free Software Foundation, Inc.
 
@@ -22,28 +22,6 @@
 #ifndef TM_NBSD_H
 #define TM_NBSD_H
 
-#include <sys/param.h>
-#include <machine/vmparam.h>
+#include "solib.h"
 
-/* Define BPT_VECTOR if it is different than the default.
-   This is the vector number used by traps to indicate a breakpoint. */
-#define BPT_VECTOR		0xf
-
-/* Address of end of stack space.  */
-#define STACK_END_ADDR USRSTACK
-
-/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR.  */
-#define DEPRECATED_IN_SIGTRAMP(PC,FUNC_NAME) \
-((PC) >= (STACK_END_ADDR - 32) && (PC) < (STACK_END_ADDR))
-
-#include "m68k/tm-m68k.h"
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
-  (name && !strcmp(name, "_DYNAMIC"))
-
-extern use_struct_convention_fn m68knbsd_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
-        m68knbsd_use_struct_convention(gcc_p, type)
-
-#endif /* TM_NBSD_H */
+#endif /* tm-nbsd.h */


             reply	other threads:[~2004-05-01 17:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-01 17:29 Mark Kettenis [this message]
2004-05-04 13:22 ` Jason Thorpe
2004-05-04 23:47   ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405011729.i41HTd8w000681@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=thorpej@wasabisystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox