summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/src/m68k/any
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-10-19 15:35:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-10-19 15:35:21 +0000
commitc92fb641f0a4ddb230b18871d9bfe886b48ab1b4 (patch)
tree48440b23a455ff7358579576422e1c309c579c00 /c/src/librdbg/src/m68k/any
parent2000-10-19 Antti P Miettinen <anmietti@trshp.ntc.nokia.com> (diff)
downloadrtems-c92fb641f0a4ddb230b18871d9bfe886b48ab1b4.tar.bz2
2000-10-19 Antti P Miettinen <anmietti@trshp.ntc.nokia.com>
* configure.in: Add m68k support. * include/rdbg/m68k, src/m68k, src/m68k/any: New subdirectory. * src/_servtgt.c: add status text to prinf upon task creation failure. * src/rdbg.c: reconnect rdbg exception handlers upon RPC calls. * src/m68k/Makefile.am, src/m68k/any/Makefile.am, src/m68k/any/remdeb_f.x, src/m68k/any/.cvsignore, src/m68k/any/remdeb.h, src/m68k/any/remdeb_xdr.c, src/m68k/any/remdeb_svc.c, src/m68k/excep_f.c, src/m68k/rdbg_cpu_asm.S, src/m68k/rdbg_f.c, src/m68k/.cvsignore: New files.
Diffstat (limited to 'c/src/librdbg/src/m68k/any')
-rw-r--r--c/src/librdbg/src/m68k/any/.cvsignore2
-rw-r--r--c/src/librdbg/src/m68k/any/Makefile.am91
-rw-r--r--c/src/librdbg/src/m68k/any/remdeb_f.x70
3 files changed, 163 insertions, 0 deletions
diff --git a/c/src/librdbg/src/m68k/any/.cvsignore b/c/src/librdbg/src/m68k/any/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/c/src/librdbg/src/m68k/any/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/c/src/librdbg/src/m68k/any/Makefile.am b/c/src/librdbg/src/m68k/any/Makefile.am
new file mode 100644
index 0000000000..a4b445c96f
--- /dev/null
+++ b/c/src/librdbg/src/m68k/any/Makefile.am
@@ -0,0 +1,91 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..
+
+LIBNAME = librdbg
+LIB = ${ARCH}/${LIBNAME}.a
+
+# C and C++ source names
+C_FILES = rdbg.c servcon.c servbkpt.c servrpc.c excep.c excep_f.c servtgt.c \
+ servtsp.c servutil.c _servtgt.c rdbg_f.c ptrace.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+# Asm source names
+S_FILES = rdbg_cpu_asm.S
+S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
+
+# Generated C source names
+GEN_C_FILES = remdeb_xdr.c remdeb_svc.c
+GEN_C_O_FILES = $(GEN_C_FILES:%.c=${ARCH}/%.o)
+
+# H source names
+H_FILES = remdeb.h
+
+# X source names
+X_FILES = remdeb.x remdeb_f.x
+
+OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../automake/compile.am
+include $(top_srcdir)/../../../automake/lib.am
+
+#
+# Add local stuff here using +=
+#
+
+MAINTAINERCLEANFILES += $(H_FILES) $(GEN_C_FILES)
+
+FRONTEND = \"$(RTEMS_CPU)/any/remdeb_f.x\"
+
+$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
+ $(INSTALL_DATA) $< $@
+
+$(LIB): ${OBJS}
+ $(make-library)
+
+$(srcdir)/remdeb.h: $(X_FILES)
+if RPCTOOLS
+ @rm -f $@
+ ( cd $(top_srcdir)/src; \
+ $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \
+ -o m68k/any/remdeb.h remdeb.x )
+endif
+$(srcdir)/remdeb_xdr.c: $(X_FILES)
+if RPCTOOLS
+ @rm -f $@
+ ( cd $(top_srcdir)/src; \
+ $(RPCGEN) -c -DFRONTEND=$(FRONTEND) \
+ -o m68k/any/remdeb_xdr.c remdeb.x )
+endif
+
+$(srcdir)/remdeb_svc.c: $(X_FILES)
+if RPCTOOLS
+ @rm -f $@ tmpSvc.c
+ ( cd $(top_srcdir)/src; \
+ $(RPCGEN) -m -DFRONTEND=$(FRONTEND) \
+ -o m68k/any/tmpSvc.c remdeb.x; \
+ $(AWK) -f ./awk.svc THEPROG="remdeb.h" m68k/any/tmpSvc.c \
+ > m68k/any/remdeb_svc.c; \
+ rm -f m68k/any/tmpSvc.c )
+endif
+
+$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h
+ $(INSTALL_DATA) $< $@
+
+$(PROJECT_INCLUDE)/rdbg:
+ @$(mkinstalldirs) $@
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg $(PROJECT_INCLUDE)/rdbg/remdeb.h
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
+
+all-local: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
+
+EXTRA_DIST = remdeb_f.x $(GEN_C_FILES)
+
+include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/librdbg/src/m68k/any/remdeb_f.x b/c/src/librdbg/src/m68k/any/remdeb_f.x
new file mode 100644
index 0000000000..a6c47327b1
--- /dev/null
+++ b/c/src/librdbg/src/m68k/any/remdeb_f.x
@@ -0,0 +1,70 @@
+/*
+ **************************************************************************
+ *
+ * Component = rdblib
+ *
+ * Synopsis = remdeb_f.x
+ *
+ *
+ * Copyright(C) 2000 Canon Research Center France SA.
+ *
+ * Developped by :
+ * Eric Valette, mail to : valette@crf.canon.fr
+ * Emmanuel Raguet, mail to : raguet@crf.canon.fr
+ *
+ * $Header$
+ *
+ **************************************************************************
+ */
+/* Basic, host-specific, and target-specific definitions for GDB.
+ Copyright (C) 1986, 1989, 1991, 1992, 1993, 1994, 1995
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+struct xdr_regs {
+ int r_dreg[8]; /* data registers */
+ int r_areg[8]; /* address registers */
+ int r_sr; /* status register (actually a short) */
+ int r_pc; /* program counter */
+ int r_vec; /* last vector */
+};
+
+#ifdef RPC_HDR
+
+%/* now define register macros to apply to xdr_reg struct */
+%
+
+%#define r_r0 r_dreg[0] /* r0 for portability */
+%#define r_sp r_areg[7] /* user stack pointer */
+%#define r_ps r_sr
+
+%#define REG_PC r_pc /* PC register offset */
+%#define REG_SP r_areg[7] /* SP register offset */
+%#define REG_FP r_areg[6] /* FP register offset */
+
+%/* now define the BREAKPOINT mask technique to a long word */
+%#define SET_BREAK(l) ((l&0x0000FFFF) | 0x4E4F0000) /* TRAP 15 */
+%#define IS_BREAK(l) (((l) & 0xFFFF0000) == 0x4E4F0000)
+%#define ORG_BREAK(c,p) (((c) & 0x0000FFFF) | ((p) & 0xFFFF0000))
+%#define IS_STEP(regs) ((regs).r_vec == 9)
+%#define BREAK_ADJ 0
+%#define BREAK_SIZE 2
+
+%#define TARGET_PROC_TYPE 2
+
+#endif