[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)
Xu Jun via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 5 03:33:15 PST 2024
xujuntwt95329 wrote:
> > On the other hand, as a managed language, I think most people won't need to read specific local/global of an instance, just like most of the JavaScript developer won't care about the value of a register in V8 during debugging, they just care about the value of their variables.
>
> I agree that the average developer will not have much use of the possibility of accessing Wasm locals and globals. I also understand that Wasm locals and global are a very specific, Wasm-only concept and that adding this concept in LLVM core is not pertinent. However for people working on the inner workings of Wasm (like me), it may be very useful. I'm not sure it belongs to this PR but implementing support for accessing Wasm locals/globals in the future (using perhaps a command like `language wasm`) seems an interesting thing to do to complete the debugging experience on Wasm with lldb.
>
> What I'm wondering is, does these potential added commands have an impact on this PR ? Or can we imagine commands that will send a specific, Wasm-only request to the debugging server to get the values of the variables without using the implementation of locals and globals of this PR ?
I agree that implementing support for accessing Wasm locals/globals would be a very interesting and exciting thing, and as a WebAssembly runtime developer, such features will be extremely useful to me (currently I need to debug the runtime itself to retrieve the internal data structures to find the value of locals/globals). But since there isn't an existing concepts in lldb to support these, we think it should be better to focus this PR on the source level debugging support to control the complexity, and leave the local/global support as further enhancement.
> What I'm wondering is, does these potential added commands have an impact on this PR ? Or can we imagine commands that will send a specific, Wasm-only request to the debugging server to get the values of the variables without using the implementation of locals and globals of this PR ?
I think a wasm-specific command which directly send message to debug server for getting local/global values would be a simple approach to support the nice features, maybe we can consider such solution in the future to improve the debugging experience.
https://github.com/llvm/llvm-project/pull/77949
More information about the lldb-commits
mailing list