diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2021-02-15 18:38:21 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2021-02-15 18:42:21 -0800 |
commit | 71811048c0061c2ecf9aa6ce14c41f3f6ecf8aa9 (patch) | |
tree | d9b0ffdadf472de4bdba1babec6154b9fb57e705 | |
parent | 4946f37d842fe7bca1b4a30962e7b6acdd7a4a9d (diff) | |
download | llvm-71811048c0061c2ecf9aa6ce14c41f3f6ecf8aa9.zip llvm-71811048c0061c2ecf9aa6ce14c41f3f6ecf8aa9.tar.gz llvm-71811048c0061c2ecf9aa6ce14c41f3f6ecf8aa9.tar.bz2 |
[debugserver] Correctly pass argv[0] to execl
The execl function takes both the executable and argv[0].
-rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index a69fc33f..7048bec 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -468,8 +468,9 @@ nub_process_t DNBProcessAttach(nub_process_t attach_pid, 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(); |