I used Clang to compile a large project to Linux X86_64 executable file my_out.
./my_out runs successfully.When I try to use lldb my_out to debug the execution of my_out.
It can success launch the program.
list works.
b main adds a breakpoint to the function main.
But when I try run I get an error:
error: execve failed: Permission denied
I have added +x to below files,
./my_out
./clang/host/linux-x86/clang-r487747c/bin/lldb-argdumper
./clang/host/linux-x86/clang-r487747c/bin/lldb
./clang/host/linux-x86/clang-r487747c/runtimes_ndk_cxx/x86_64/lldb-server
Am I missing something's +x permissions? Or anyone can give me some hint how to fix this issue?
Below is my machine info:
lldb -v
lldb version 17.0.2 (llvm-toolchain/out/llvm-project/lldb revision d9f89f4d16663d5012e5c09495f3b30ece3d2362)
clang revision d9f89f4d16663d5012e5c09495f3b30ece3d2362
llvm revision d9f89f4d16663d5012e5c09495f3b30ece3d2362
./clang -v
Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt2/my_name/Android_Code/15_Android/prebuilts/clang/host/linux-x86/clang-r487747c/bin/.
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
I re-install the latest llvm and lldb and use the latest lldb. It works now.
$ lldb -version
lldb version 21.0.0git