emaste wrote:

I think this change is a little unfortunate, as cross-debugging a FreeBSD 
kernel core from a Linux, Mac, or Windows host is a valuable use case. I also 
arranged the funding to implement this originally.

That said, I had the following comments (in an email thread) at the time this 
was being developed:

>  How would we do the integration with lldb -- include the library with lldb's 
> source, or have lldb (optionally) depend on libfbsdvmcore? IMO the latter is 
> a lot more effort (if we want FreeBSD vmcore debugging to be widely 
> available) and provides an inferior end result (because it will likely end up 
> being enabled only on FreeBSD builds anyway).

> My only worry about this is that we'll depend on it being packaged and 
> available on the systems where people build LLDB, and I doubt we're going to 
> be able to expect that to happen on arbitrary Linux distros. I'd really like 
> it if LLDB  on Debian (say) "just works" for debugging FreeBSD vmcores.

> Good question about license & importing; I cannot find anything in LLDB that 
> has a Copyright or SPDX tag that is not Apache 2.0, but in all of llvm there 
> are a few files that have non-Apache licenses (e.g. MIT). Perhaps the best 
> path forward is to proceed with the base system/portable approach only, have 
> LLDB use the library if available, and later on pursue either packaging for 
> Linux distros or importing into LLDB directly.

I think libfbsdvmcore was a useful exercise, but the practical experience is 
that the approach hasn't really worked out -- the library is not being 
maintained, and is not available on other operating systems.

I still really want LLDB to be able to cross-debug FreeBSD kernels, but I'm 
fine with any one of the following approaches:

1. Fork https://github.com/Moritz-Systems/libfbsdvmcore (e.g. to 
github.com/freebsd)
  - update it with libkvm changes that happened after its creation
  - work on making it available for Linux distros
2. Add libfbsdvmcore to LLDB and update it with libkvm changes
3. Reimplement libfbsdvmcore's functionality directly in C++ in LLDB
4. Change FreeBSD to directly generate ELF format kernel cores or have tooling 
outside of LLDB to do the conversion
5. Remove support from LLDB for now (this PR), and re-add it later on via one 
of the above techniques


https://github.com/llvm/llvm-project/pull/181283
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to