LLDB producing 'A packet returned error 8' when I run my program

Viewed 1439

I've been trying to locate where a segmentation fault is in a program using LLDB. I've been going to the Ubuntu shell on repl.it and compiling my code using clang++-7 -pthread -std=c++17 -o main main.cpp -g and the program compiles succesfully. Next, I run lldb main and everything's fine but as soon as I type run I get error: process launch failed: 'A' packet returned an error: 8. I've checked the docs and looked up the error but I can't seem to find anything. Thanks for any sort of help!

The full log:

~/Project$ clang++-7 -pthread -std=c++17 -o main main.cpp -g
~/Project$ lldb main
(lldb) target create "main"
Current executable set to 'main' (x86_64).
(lldb) run
error: process launch failed: 'A' packet returned an error: 8

In case you need the code it's on this Github: https://github.com/KingsleyDockerill/Wirth

1 Answers

For those using Docker, as mentioned here, they need to add --cap-add=SYS_PTRACE --security-opt seccomp=unconfined to their docker run command in order to use lldb.

See also this older answer.

Related