-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
None
-
Fully Compatible
-
Security 2019-12-16, Security 2019-12-30, Security 2019-01-13
Right now, we are able to spawn a gdbserver from inside code so we can debug with gdb using jstests or in other situations where running `gdb ./mongod` is not convenient/possible. This handy feature does not work on MacOS, since their gdb package does not contain gdbserver.
I propose adding the ability to do the same thing with LLDB's debugserver, which functions mostly the same way. This way, we can use this debugging functionality on MacOS.
I have gotten it to work on my Macbook, but theoretically this should be able to work fine on any other operating system that supports LLDB as well.
I have a PoC here, which would obviously need changes (like not having a hardcoded path) before it were committed to master
https://gist.github.com/super-cooper/6c3be5e6e06949ab4af32c31babe9f17