ProDBG
ProDBG copied to clipboard
Figure out how to deal with LLDB on Linux
I would like us to use LLDB for native debugging on Linux. This would map very nicely to the Mac LLDB plugin and the code should be identical.
Things to figure out:
- Should we use the system LLDB (default with the distro, may be old)
- Build a custom version of LLDB and ship with it (may result in linker dependency issues on Linux)
Mac will use a prebuilt one which is likely the best thing if it can work or can we make it optional somehow?
Should we fork https://github.com/endoli/lldb-sys.rs in order to have local headers to point it to? (as long with the local libs needed)
Also needs to fork https://github.com/endoli/lldb.rs in that case so it uses the lldb-sys fork as well.
Current state:
Cloned both lldb-sys
and lldb
and managed to compile them on ubuntu 16.04 64-bit.
Started a test project using lldb
and managed to run a copy of ls
, get its PID and terminate debugger.
This is still very new to me, things to understand:
Can lldb-sys
be built without checking out whole llvm + clang + lldb
source? Process of building lldb-sys
is pretty annoying. Why is llvm + clang + lldb
source needed at all?
I've build lldb-sys
using latest version of llvm
(4.0) and package installed in Ubuntu is stable 3.8. Will it work like this or versions should be the same?
Also needs to fork https://github.com/endoli/lldb.rs in that case so it uses the lldb-sys fork as well.
Cargo allows overriding dependencies. If we need to change dependency, we can override it and do not need to fork package itself. However, lldb.rs
contains some OSX-specific build.rs
that needs to be changed.
I'm happy to get a patch for the build.rs
stuff in lldb.rs
... I just don't currently have a decent Linux environment to experiment in.