From a994fec4f8f7a886be61cfb3023c354cd2483b9d Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Sat, 9 Dec 2017 05:57:25 +0900 Subject: gdb: Add OpenRISC or1k and or1knd target support This patch prepares the current GDB port of the OpenRISC processor from https://github.com/openrisc/binutils-gdb for upstream merging. Testing has been done with a cgen sim provided in a separate patch. This has been tested with 2 toolchains. GCC [1] 5.4.0 from the OpenRISC project with Newlib [2] and GCC 5.4.0 with Musl [3] 1.1.4. It supports or1knd (no delay slot target). The default target is or1k (with delay slot). You can change the target arch with: (gdb) set architecture or1knd The target architecture is assumed to be or1knd [1] https://github.com/openrisc/or1k-gcc [2] https://github.com/openrisc/newlib [3] https://github.com/openrisc/musl-cross gdb/doc/ChangeLog: 2017-12-12 Stafford Horne Stefan Wallentowitz Franck Jullien Jeremy Bennett * gdb.texinfo: Add OpenRISC documentation. gdb/ChangeLog: 2017-12-12 Stafford Horne Stefan Wallentowitz Stefan Kristiansson Franck Jullien Jeremy Bennett * configure.tgt: Add targets for or1k and or1knd. * or1k-tdep.c: New file. * or1k-tdep.h: New file. * features/Makefile: Add or1k.xml to build. * features/or1k.xml: New file. * features/or1k-core.xml: New file. * features/or1k.c: Generated. --- gdb/configure.tgt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/configure.tgt') diff --git a/gdb/configure.tgt b/gdb/configure.tgt index f720154..fb8014a 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -463,6 +463,12 @@ nios2*-*-*) gdb_target_obs="nios2-tdep.o" ;; +or1k-*-* | or1knd-*-*) + # Target: OpenCores OpenRISC 1000 32-bit implementation bare metal + gdb_target_obs="or1k-tdep.o" + gdb_sim=../sim/or1k/libsim.a + ;; + powerpc*-*-freebsd*) # Target: FreeBSD/powerpc gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \ -- cgit v1.1