gdbserver: Add RISC-V/Linux support
[deliverable/binutils-gdb.git] / gdbserver / configure.srv
index 2e83cbdc07fec2595007d6b5d54808433c6e5315..ecdd63a310afa032dbfc56a570871567e4f51a42 100644 (file)
@@ -33,9 +33,16 @@ ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-vsx32l-
 # these files over and over again.
 srv_linux_obj="linux-low.o nat/linux-osdata.o nat/linux-procfs.o nat/linux-ptrace.o nat/linux-waitpid.o nat/linux-personality.o nat/linux-namespaces.o fork-child.o nat/fork-inferior.o"
 
-# Input is taken from the "${host}" variable.
+# Input is taken from the "${host}" and "${target}" variables.
 
-case "${host}" in
+# GDBserver can only debug native programs.
+if test "${target}" = "${host}"; then
+    gdbserver_host=${host}
+else
+    gdbserver_host=
+fi
+
+case "${gdbserver_host}" in
   aarch64*-*-linux*)   srv_tgtobj="linux-aarch64-low.o"
                        srv_tgtobj="$srv_tgtobj nat/aarch64-linux-hw-point.o"
                        srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
@@ -271,6 +278,13 @@ case "${host}" in
                        srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu.xml"
                        srv_lynxos=yes
                        ;;
+  riscv*-*-linux*)     srv_tgtobj="arch/riscv.o nat/riscv-linux-tdesc.o"
+                       srv_tgtobj="${srv_tgtobj} linux-riscv-low.o"
+                       srv_tgtobj="${srv_tgtobj} ${srv_linux_obj}"
+                       srv_linux_regsets=yes
+                       srv_linux_usrregs=yes
+                       srv_linux_thread_db=yes
+                       ;;
   s390*-*-linux*)      srv_regobj="s390-linux32.o"
                        srv_regobj="${srv_regobj} s390-linux32v1.o"
                        srv_regobj="${srv_regobj} s390-linux32v2.o"
This page took 0.024547 seconds and 4 git commands to generate.