Hi there ^^
I recently dove deeper into rust debugging with VS Code and the LLDB Plugin. It would be great if we could use rust expressions. Sadly I can only use C and python expressions to some extent. While digging around I found this open RFC: Ship a custom LLDB with Rust support · Issue #48168 · rust-lang/rust · GitHub
The RFC leads me to the assumption there must be a LLDB binary with rust capabilities somewhere. I don't know if the LLDB binary shipped with the VS Code extension is a copy of the before mentioned LLDB binary.
Do you know where or how I can obtain a LLDB binary bundled with the rust plugin?
I also found Miri.
Could Miri be used inside a debugger to evaluate Rust expressions?
Background: Currently I write a parser with the goal of writing a parser generator. I like programming languages and tinkering around with parsers. My knowledge on this topic is superficial. Maybe it is too early for me to get my hands on something like this. Yet it has been time consuming and fun at the same time. So I consider this to be fine as it is.
The parser returns ranges of the input &str. I would like to watch the expression
&context.input[start..end] while debugging. This python expression does the trick:
/py "".join([chr(c) for c in $context.input[$start:$end]])
It is rather long, uneasy to handle and was sort of hard to come up with, because I have very little experience with python.
Do you know of a C expression I could use instead?
/nat context.input delivers the whole &str. I couldn't find a way to get a slice with C though.
Or is there even a debugger in which I can use Rust expressions out there?
Happy coding everyone