[debugserver] Correctly pass argv[0] to execl
The execl function takes both the executable and argv[0].
GitOrigin-RevId: 71811048c0061c2ecf9aa6ce14c41f3f6ecf8aa9
diff --git a/tools/debugserver/source/DNB.cpp b/tools/debugserver/source/DNB.cpp
index a69fc33..7048bec 100644
--- a/tools/debugserver/source/DNB.cpp
+++ b/tools/debugserver/source/DNB.cpp
@@ -468,8 +468,9 @@
snprintf(fdstr, sizeof(fdstr), "--fd=%d", communication_fd);
snprintf(pidstr, sizeof(pidstr), "--attach=%d", attach_pid);
- execl(translated_debugserver, "--native-regs", "--setsid", fdstr,
- "--handoff-attach-from-native", pidstr, (char *)0);
+ execl(translated_debugserver, translated_debugserver, "--native-regs",
+ "--setsid", fdstr, "--handoff-attach-from-native", pidstr,
+ (char *)0);
DNBLogThreadedIf(LOG_PROCESS, "Failed to launch debugserver for "
"translated process: ", errno, strerror(errno));
__builtin_trap();