This revision was automatically updated to reflect the committed changes. Closed by commit rGd00eaa082b7c: [lldb] Adjust TestExec code to be closer to real world code (authored by teemperor).
Changed prior to commit: https://reviews.llvm.org/D75241?vs=246911&id=260303#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75241/new/ https://reviews.llvm.org/D75241 Files: lldb/test/API/functionalities/exec/main.cpp Index: lldb/test/API/functionalities/exec/main.cpp =================================================================== --- lldb/test/API/functionalities/exec/main.cpp +++ lldb/test/API/functionalities/exec/main.cpp @@ -12,7 +12,8 @@ std::string directory_name(::dirname(buf)); std::string other_program = directory_name + "/secondprog"; - execve(other_program.c_str(), const_cast<char *const *>(argv), nullptr); + argv[0] = other_program.c_str(); + execv(argv[0], const_cast<char *const *>(argv)); perror("execve"); abort(); }
Index: lldb/test/API/functionalities/exec/main.cpp =================================================================== --- lldb/test/API/functionalities/exec/main.cpp +++ lldb/test/API/functionalities/exec/main.cpp @@ -12,7 +12,8 @@ std::string directory_name(::dirname(buf)); std::string other_program = directory_name + "/secondprog"; - execve(other_program.c_str(), const_cast<char *const *>(argv), nullptr); + argv[0] = other_program.c_str(); + execv(argv[0], const_cast<char *const *>(argv)); perror("execve"); abort(); }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits