summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/src/i386/any
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-12-03 23:54:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-12-03 23:54:14 +0000
commit4721cf1ecb949b37c98b6fce79163541711de2e5 (patch)
treea89f2bef604b2ddf22b262fe6115d9f75c952781 /c/src/librdbg/src/i386/any
parentRemoved spaces. (diff)
downloadrtems-4721cf1ecb949b37c98b6fce79163541711de2e5.tar.bz2
Patch from Emmanuel Raguet <raguet@crf.canon.fr> to add remote debug server
and RPC support to RTEMS. Thanks. :) Email follows: Hello, For Xmas, here is the Remote Debugger on RTEMS ! Here are 2 patches for the Remote Debugger on RTEMS for pc386 from Linux host : - one for RTEMS it self, - one for GDB-4.17. 1/ RTEMS patch -------------- This patch adds 2 libraries : - a simplified SUN RPC library - the Remote Debugger library The configuration command is the following : ../rtems4/configure --target=i386-rtemself --enable-rtemsbsp=pc386 --enable-rdbg The SUN RPC library is built only if networking is set. The RDBG library is built if networking and enable-rdbg are set. The function used to initialize the debugger is : rtems_rdbg_initialize (); A special function has been created to force a task to be in a "debug" state : enterRdbg(). The use of this function is not mandatory. 2/ GDB-4.17 patch ----------------- This patch create a new RTEMS target for GDB-4.17. The configuration command is the following : ./configure --enable-shared --target=i386RTEMS To connect to a target, use : target rtems [your_site_address] Then, attach the target using : attach 1 And... Debug ;) You can obtain the original GDB-4.17 on ftp://ftp.debian.org/debian/dists/stable/main/source/devel/gdb_4.17.orig.tar.gz This has been tested from a Debian 2.0.1 linux host.
Diffstat (limited to 'c/src/librdbg/src/i386/any')
-rw-r--r--c/src/librdbg/src/i386/any/remdeb_f.x58
1 files changed, 58 insertions, 0 deletions
diff --git a/c/src/librdbg/src/i386/any/remdeb_f.x b/c/src/librdbg/src/i386/any/remdeb_f.x
new file mode 100644
index 0000000000..0ff52d1307
--- /dev/null
+++ b/c/src/librdbg/src/i386/any/remdeb_f.x
@@ -0,0 +1,58 @@
+/*
+ **************************************************************************
+ *
+ * Component = rdblib
+ *
+ * Synopsis = remdeb_f.x
+ *
+ *
+ **************************************************************************
+ */
+
+struct xdr_regs
+{
+ unsigned int tabreg[19];
+};
+
+#ifdef RPC_HDR
+
+%/* now define register macros to apply to xdr_reg struct */
+%
+%#define GS 0
+%#define FS 1
+%#define ES 2
+%#define DS 3
+%#define EDI 4
+%#define ESI 5
+%#define EBP 6
+%#define ESP 7
+%#define EBX 8
+%#define EDX 9
+%#define ECX 10
+%#define EAX 11
+%#define TRAPNO 12
+%#define ERR 13
+%#define EIP 14
+%#define CS 15
+%#define EFL 16
+%#define UESP 17
+%#define SS 18
+%
+%#define REG_PC tabreg[EIP] /* PC (eip) register offset */
+%#define REG_SP tabreg[UESP] /* SP (uesp) register offset */
+%#define REG_FP tabreg[EBP] /* FP (ebp) register offset */
+
+%/* now define the BREAKPOINT mask technique to a long word */
+%#define SET_BREAK(l) ((l&0xFFFFFF00) | 0xCC)
+%#define IS_BREAK(l) (((l) & 0xFF) == 0xCC)
+%#define ORG_BREAK(c,p) (((c) & 0xFFFFFF00) | ((p) & 0xFF))
+%#define IS_STEP(regs) (regs.tabreg[TRAPNO] == 1) /* was step and not break */
+%#define BREAK_ADJ 1 /* must subtract one from address after bp */
+%#define BREAK_SIZE 1 /* Breakpoint occupies one byte */
+
+%#define TARGET_PROC_TYPE 0
+
+#endif
+
+
+