File 4361-erts-Fix-cerl-to-include-xargs-when-starting-gdb-lld.patch of Package erlang

From a142b725fb36817cd2c34944672916038b8d8ae5 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Thu, 31 Mar 2022 16:26:37 +0200
Subject: [PATCH] erts: Fix cerl to include xargs when starting gdb/lldb

---
 erts/etc/unix/cerl.src | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index e3f42b54e2..10edb3debc 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -433,7 +433,7 @@ elif [ "x$GDB" = "xgdb" ]; then
     case "x$core" in
 	x)
 	    # Get emu args to use from erlexec...
-	    beam_args=`$EXEC -emu_args_exit ${1+"$@"}`
+	    beam_args=`$EXEC -emu_args_exit $xargs ${1+"$@"}`
 	    gdbcmd="--args $EMU_NAME $beam_args"
 	    ;;
 	x/*)
@@ -453,7 +453,7 @@ elif [ "x$GDB" = "xgdb" ]; then
 elif [ "x$GDB" = "xlldb" ]; then
     case "x$core" in
         x)
-            beam_args=`$EXEC -emu_args_exit ${1+"$@"}`
+            beam_args=`$EXEC -emu_args_exit $xargs ${1+"$@"}`
             lldbcmd="-- $beam_args"
             ;;
         *)
@@ -472,7 +472,7 @@ elif [ "x$GDB" = "xegdb" ]; then
     case "x$core" in
 	x)
 	    # Get emu args to use from erlexec...
-	    beam_args=`$EXEC -emu_args_exit ${1+"$@"} | tr '\n' ' '`
+	    beam_args=`$EXEC -emu_args_exit $xargs ${1+"$@"} | tr '\n' ' '`
 	    gdbcmd="(insert-string \"set args $beam_args\") \
                     (comint-send-input)"
 	    ;;
-- 
2.34.1

openSUSE Build Service is sponsored by