summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/src/powerpc/mcp750
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/librdbg/src/powerpc/mcp750')
-rw-r--r--c/src/librdbg/src/powerpc/mcp750/Makefile.in114
-rw-r--r--c/src/librdbg/src/powerpc/mcp750/remdeb_f.x76
2 files changed, 190 insertions, 0 deletions
diff --git a/c/src/librdbg/src/powerpc/mcp750/Makefile.in b/c/src/librdbg/src/powerpc/mcp750/Makefile.in
new file mode 100644
index 0000000000..3ede15a1b7
--- /dev/null
+++ b/c/src/librdbg/src/powerpc/mcp750/Makefile.in
@@ -0,0 +1,114 @@
+#
+# $Id$
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ../../..
+subdir = librdbg/powerpc/mcp750
+
+RTEMS_ROOT = @RTEMS_ROOT@
+PROJECT_ROOT = @PROJECT_ROOT@
+
+VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..
+
+LIBNAME = librdbg.a
+LIB = ${ARCH}/${LIBNAME}
+
+# C and C++ source names, if any, go here -- minus the .c or .cc
+C_PIECES = rdbg servcon servbkpt servrpc excep excep_f \
+ servtgt servtsp servutil _servtgt rdbg_f \
+ ptrace
+C_FILES = $(C_PIECES:%=%.c)
+C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
+
+# Asm source names, if any, go here -- minus the .s
+S_PIECES = rdbg_cpu_asm
+S_FILES = $(ASM_PIECES:%=%.S)
+S_O_FILES = $(ASM_PIECES:%=${ARCH}/%.o)
+
+# Generated C source names, if any, go here -- minus the .c
+GEN_C_PIECES= remdeb_xdr remdeb_svc
+GEN_C_FILES = $(GEN_C_PIECES:%=%.c)
+GEN_C_O_FILES = $(GEN_C_PIECES:%=${ARCH}/%.o)
+
+# H source names, if any, go here -- minus the .h
+H_PIECES = remdeb
+H_FILES = $(H_PIECES:%=%.h)
+
+# X source names
+X_FILES = remdeb.x remdeb_f.x
+
+SRCS= $(C_FILES) $(S_FILES) $(GEN_C_FILES) $(H_FILES)
+OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES)
+
+RPCGEN = @RPCGEN@
+AWK = @AWK@
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/lib.cfg
+
+INSTALL_CHANGE = @INSTALL_CHANGE@
+mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
+
+INSTALLDIRS = $(PROJECT_INCLUDE)/rdbg
+
+$(INSTALLDIRS):
+ @$(mkinstalldirs) $(INSTALLDIRS)
+
+#
+# Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+#
+# Enable traces in RDBG
+#
+#CFLAGS += -DDDEBUG
+#
+CFLAGS +=
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(GEN_C_FILES)
+CLOBBER_ADDITIONS +=
+
+FRONTEND = \"$(RTEMS_CPU)/@RTEMS_BSP@/remdeb_f.x\"
+
+all: ${ARCH} $(LIB)
+ @$(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib
+
+$(LIB): $(SRCS) ${OBJS}
+ $(make-library)
+
+remdeb.h: $(X_FILES)
+ @rm -f $@
+ ( pwd=`pwd`; cd $(srcdir)/../..; \
+ $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \
+ -o $$pwd/$@ remdeb.x )
+ @$(INSTALL_CHANGE) -m 755 $@ $(PROJECT_INCLUDE)/rdbg
+
+remdeb_xdr.c: $(X_FILES)
+ @rm -f $@
+ ( pwd=`pwd`; cd $(srcdir)/../..; \
+ $(RPCGEN) -c -DFRONTEND=$(FRONTEND) \
+ -o $$pwd/$@ remdeb.x )
+
+remdeb_svc.c: $(X_FILES)
+ @rm -f $@ tmpSvc.c
+ ( pwd=`pwd`; cd $(srcdir)/../..; \
+ $(RPCGEN) -s udp -DFRONTEND=$(FRONTEND) \
+ -o $$pwd/tmpSvc.c remdeb.x )
+ $(AWK) -f $(srcdir)/../../awk.svc THEPROG="remdeb.h" tmpSvc.c >$@
+ @rm -f tmpSvc.c
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/c/src/librdbg/src/powerpc/mcp750/remdeb_f.x b/c/src/librdbg/src/powerpc/mcp750/remdeb_f.x
new file mode 100644
index 0000000000..10cf8dd540
--- /dev/null
+++ b/c/src/librdbg/src/powerpc/mcp750/remdeb_f.x
@@ -0,0 +1,76 @@
+/*
+ **************************************************************************
+ *
+ * Component = rdblib
+ * Synopsis = remdeb_f.x
+ *
+ **************************************************************************
+ * $Id$
+ **************************************************************************
+ */
+
+struct xdr_regs
+{
+ unsigned int tabreg[40];
+};
+
+#ifdef RPC_HDR
+
+%/* now define register macros to apply to xdr_regs struct */
+%
+%#define R_PC 0
+%#define R_MSR 1
+%#define R_EXCEPNB 2
+%#define R_R0 3
+%#define R_R1 (R_R0 + 1)
+%#define R_R2 (R_R0 + 2)
+%#define R_R3 (R_R0 + 3)
+%#define R_R4 (R_R0 + 4)
+%#define R_R5 (R_R0 + 5)
+%#define R_R6 (R_R0 + 6)
+%#define R_R7 (R_R0 + 7)
+%#define R_R8 (R_R0 + 8)
+%#define R_R9 (R_R0 + 9)
+%#define R_R10 (R_R0 + 10)
+%#define R_R11 (R_R0 + 11)
+%#define R_R12 (R_R0 + 12)
+%#define R_R13 (R_R0 + 13)
+%#define R_R14 (R_R0 + 14)
+%#define R_R15 (R_R0 + 15)
+%#define R_R16 (R_R0 + 16)
+%#define R_R17 (R_R0 + 17)
+%#define R_R18 (R_R0 + 18)
+%#define R_R19 (R_R0 + 19)
+%#define R_R20 (R_R0 + 20)
+%#define R_R21 (R_R0 + 21)
+%#define R_R22 (R_R0 + 22)
+%#define R_R23 (R_R0 + 23)
+%#define R_R24 (R_R0 + 24)
+%#define R_R25 (R_R0 + 25)
+%#define R_R26 (R_R0 + 26)
+%#define R_R27 (R_R0 + 27)
+%#define R_R28 (R_R0 + 28)
+%#define R_R29 (R_R0 + 29)
+%#define R_R30 (R_R0 + 30)
+%#define R_R31 (R_R0 + 31)
+%#define R_CR 35
+%#define R_CTR 36
+%#define R_XER 37
+%#define R_LR 38
+%#define R_MQ 39
+%
+%#include <libcpu/raw_exception.h>
+%
+%#define REG_PC tabreg[R_PC] /* PC register offset */
+%#define REG_SP tabreg[R_R1] /* SP register offset */
+%#define REG_FP tabreg[R_R1] /* SP register offset (no FP on PPC) */
+%#define BREAK_SIZE 4 /* Breakpoint occupies 4 bytes */
+%#define BREAK_ADJ 0 /* Nothing to subtract from address after bp */
+%#define IS_BREAK(l) ((l) == 0x7d8d6808)
+%#define SET_BREAK(l) (0x7d8d6808)
+%#define ORG_BREAK(c,p) (p)
+%#define IS_STEP(regs) (regs.tabreg[R_EXCEPNB] == ASM_TRACE_VECTOR) /* Was step and not break */
+%#define TARGET_PROC_TYPE 3
+
+#endif
+