[PATCH v4 03/44] gdbserver: allow configuring for a heterogeneous target

Markus Metzger <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
From: Tankut Baris Aktemur <[email protected]>

gdbserver's configure.srv requires host and target systems to be the
same.  This prevents building gdbserver for when a target other than
the native CPU is to be debugged, e.g.  a heterogeneous system with an
Intel GPU where we want to debug the GPU.

Allow for such a combination by special-casing the Intel GPU target to
preserve the existing behavior for other cases.
---
 gdbserver/configure.srv | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv
index 7bdd92e3f82..69611db4698 100644
--- a/gdbserver/configure.srv
+++ b/gdbserver/configure.srv
@@ -30,11 +30,18 @@ srv_linux_obj="linux-low.o nat/linux-osdata.o nat/linux-procfs.o nat/linux-ptrac
 
 # Input is taken from the "${host}" and "${target}" variables.
 
-# GDBserver can only debug native programs.
+# GDBserver can only debug native programs.  An exception to this is a
+# heterogeneous system, e.g.  an Intel GPU.
 if test "${target}" = "${host}"; then
     gdbserver_host=${host}
 else
-    gdbserver_host=
+    case "${target}" in
+	intelgt*)	gdbserver_host=${target}
+			;;
+
+	*)		gdbserver_host=
+			;;
+    esac
 fi
 
 case "${gdbserver_host}" in
-- 
2.43.0

________________________________________
Intel Deutschland GmbH 

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany 

Tel: +49 (89) 99143-0 

www.intel.de 

Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman

Chairperson of the Supervisory Board: Sonja Pierer

Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.