From 061da546b983eb767bad15e67af1174fb0bcf31c Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 3 Aug 2020 14:33:06 +0000 Subject: Import LLVM 10.0.0 release including clang, lld and lldb. ok hackroom tested by plenty --- .../lldbsuite/test/functionalities/exec/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp') diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp new file mode 100644 index 00000000000..bec470fd13e --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp @@ -0,0 +1,18 @@ +#define _POSIX_C_SOURCE 200809L + +#include +#include +#include +#include +#include +#include + +int main(int argc, char const **argv) { + char *buf = strdup(argv[0]); // Set breakpoint 1 here + std::string directory_name(::dirname(buf)); + + std::string other_program = directory_name + "/secondprog"; + execve(other_program.c_str(), const_cast(argv), nullptr); + perror("execve"); + abort(); +} -- cgit v1.2.3-59-g8ed1b