summaryrefslogtreecommitdiff
path: root/package/gdb-microblaze/src
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-12 22:40:46 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-12 22:40:59 +0200
commitd0ac419702c94bf2d2eda50b008613bac8149745 (patch)
treec5c4631cd19aca23abf9b76abf1ecf4d50ee6f93 /package/gdb-microblaze/src
parent9dcf0c59a384703891da3a65ce3df4742b5e7b4f (diff)
gdb: decouple toolchain and package, add special package for microblaze, looks cleaner to me
Diffstat (limited to 'package/gdb-microblaze/src')
-rw-r--r--package/gdb-microblaze/src/gdb/debugreg.h48
-rw-r--r--package/gdb-microblaze/src/gdb/sgidefs.h30
2 files changed, 78 insertions, 0 deletions
diff --git a/package/gdb-microblaze/src/gdb/debugreg.h b/package/gdb-microblaze/src/gdb/debugreg.h
new file mode 100644
index 000000000..e4883c804
--- /dev/null
+++ b/package/gdb-microblaze/src/gdb/debugreg.h
@@ -0,0 +1,48 @@
+#ifndef SYS_DEBUGREG_H
+#define SYS_DEBUGREG_H
+
+#include <stdint.h>
+
+#define DR_FIRSTADDR 0
+#define DR_LASTADDR 3
+
+#define DR_STATUS 6
+#define DR_CONTROL 7
+
+#define DR_TRAP0 (0x1)
+#define DR_TRAP1 (0x2)
+#define DR_TRAP2 (0x4)
+#define DR_TRAP3 (0x8)
+
+#define DR_STEP (0x4000)
+#define DR_SWITCH (0x8000)
+
+#define DR_CONTROL_SHIFT 16
+#define DR_CONTROL_SIZE 4
+
+#define DR_RW_EXECUTE (0x0)
+#define DR_RW_WRITE (0x1)
+#define DR_RW_READ (0x3)
+
+#define DR_LEN_1 (0x0)
+#define DR_LEN_2 (0x4)
+#define DR_LEN_4 (0xC)
+#define DR_LEN_8 (0x8)
+
+#define DR_LOCAL_ENABLE_SHIFT 0
+#define DR_GLOBAL_ENABLE_SHIFT 1
+#define DR_ENABLE_SIZE 2
+
+#define DR_LOCAL_ENABLE_MASK (0x55)
+#define DR_GLOBAL_ENABLE_MASK (0xAA)
+
+
+#if SIZE_MAX > 4294967295
+# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL)
+#else
+# define DR_CONTROL_RESERVED (0x00FC00U)
+#endif
+#define DR_LOCAL_SLOWDOWN (0x100)
+#define DR_GLOBAL_SLOWDOWN (0x200)
+
+#endif
diff --git a/package/gdb-microblaze/src/gdb/sgidefs.h b/package/gdb-microblaze/src/gdb/sgidefs.h
new file mode 100644
index 000000000..a6d250ab7
--- /dev/null
+++ b/package/gdb-microblaze/src/gdb/sgidefs.h
@@ -0,0 +1,30 @@
+#ifndef _SGIDEFS_H
+#define _SGIDEFS_H
+
+/* MIPS ABI crap that GLIBC puts into /include
+by default, and GDB depends on it happily. */
+
+#define _MIPS_ISA_MIPS1 1
+#define _MIPS_ISA_MIPS2 2
+#define _MIPS_ISA_MIPS3 3
+#define _MIPS_ISA_MIPS4 4
+#define _MIPS_ISA_MIPS5 5
+#define _MIPS_ISA_MIPS32 6
+#define _MIPS_ISA_MIPS64 7
+
+#ifndef _ABIO32
+#define _ABIO32 1
+#endif
+#define _MIPS_SIM_ABI32 _ABIO32
+
+#ifndef _ABIN32
+#define _ABIN32 2
+#endif
+#define _MIPS_SIM_NABI32 _ABIN32
+
+#ifndef _ABI64
+#define _ABI64 3
+#endif
+#define _MIPS_SIM_ABI64 _ABI64
+
+#endif