[lldb-dev] Rust language support question
Pavel Labath via lldb-dev
lldb-dev at lists.llvm.org
Tue Jan 30 03:18:13 PST 2018
On 29 January 2018 at 18:39, Tom Tromey <ttromey at mozilla.com> wrote:
>>>>>> "Pavel" == Pavel Labath <labath at google.com> writes:
> Pavel> To these very insightful emails from Greg and Jim, I'd just like to
> Pavel> add one request. Please consider the testing strategy of the code you
> Pavel> write early on. One of the problems that we have with these language
> Pavel> plugins (and why we now have a separate thread considering removal of
> Pavel> some of them) is that after the plugin has landed and some time has
> Pavel> elapsed with no activity on it, we have no idea if it is even still
> Pavel> functional without any tests.
> So far I've added code in packages/Python/lldbsuite/test to support Rust
> and then I have a simple Rust program that exercises the various
> features of the plugin.
> The Rust toolchain is very easy to install, so I don't think testing
> this in the future should be too difficult.
Yes, but it still adds another manual step to the setup process, which
means most developers will not do it. It also exposes us to a
non-determinism coming from different versions of the rust compiler
people will have.
What happened with go is that the developer who contributed the go
support disappeared after a while. Then a couple of months later, go
version on my machine got updated, and some go tests started failing.
Maintaining go support is not my job, but I would still love to make
sure that my (unrelated) changes don't regress go debugging
functionality. However, I'm not going to go and add support for a new
go compiler just so I can run the existing tests, so I disabled the go
tests on my end (which was quite tricky as all google machines
For comparison, there's a thread on llvm-dev right now about checking
in integer set library into llvm repo, and the main argument seems to
be that it will make tests more deterministic.
> I am not sure of the details yet, but for expression parsing, I would
> like to get the external helper into "rustup" (the Rust toolchain
> manager) as well.
> Pavel> (maybe via llvm/DWARFYAML)
> What is a good resource for learning about this?
I don't know anything other than source code.
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp is a good place
to see it in action. Right now there doesn't seem to be an executable
which exposes this functionality to play with (it's just a library),
but I'm sure we could add one if it proves useful.
More information about the lldb-dev