Stream: wasmtime

Topic: wasmtime : debugging


view this post on Zulip Steve Williams (May 12 2023 at 09:08):

hey guys. so we got our own lldb front end (lldbg) that's working nicely, but it'd be great to have web assembly debugging directly in code::blocks. they only have gdb debug interface support at the moment as far as I can tell, not lldb.

so, the question is : does wasmtime debug interface interoperability work with gdb as well as lldb ?

(alternative being upgrade code::blocks to support lldb but that's a bigger job)

view this post on Zulip Steve Williams (May 12 2023 at 09:09):

found this : https://forums.codeblocks.org/index.php?topic=24877.0

dont know if that work's progressed.

Anyone done any LLDB work?

view this post on Zulip Steve Williams (May 12 2023 at 09:11):

apologies. gpt-4 says this is possible.

is there lldb support in codeblocks for debugging please

Generating answers for you…

Yes, Code::Blocks supports LLDB for debugging.

You can use the LLDB debugger in Code::Blocks by following these steps:

Go to the “Settings” menu and select “Debugger”.
Select “LLDB Debugger” from the drop-down menu.
Click on the “OK” button to save your changes.
After that, you can use LLDB for debugging your code in Code::Blocks.

view this post on Zulip Steve Williams (May 12 2023 at 09:12):

cool, if it works - will try later.

view this post on Zulip bjorn3 (May 12 2023 at 09:23):

LLDB supports the GDB jit interface according to https://www.llvm.org/docs/DebuggingJITedCode.html It isn't clear to me from that page if it is something that is enabled by default or needs to be explicitly enabled though.

view this post on Zulip bjorn3 (May 12 2023 at 09:24):

Also be aware of https://github.com/bytecodealliance/wasmtime/issues/3999

Test Case preinitialized.mov ( couldn't upload .wasm file so I'd changed extension to .mov, it is actually .wasm file) Steps to Reproduce RUST_BACKTRACE=1 gdb --args wasmtime run -g preinitialized....

view this post on Zulip Steve Williams (May 12 2023 at 09:41):

so wasmtime emits gdb compatible debug & lldb can be used bcoz its gdb compatible ?

ie. we have no specific dependency on lldb & simply use it by preference ?

thanks. this is good news as reconfiguring debugger in code blocks looks to be a pain.

view this post on Zulip Steve Williams (May 12 2023 at 09:42):

the other issue, with our current toolchain (llvm 16.0.1), I dont have any currently open issues, including the debugger, though to be fair, it hasn't been tested much yet.


Last updated: Dec 23 2024 at 13:07 UTC