GOVYANSONG opened issue #4802:
#include <stdio.h>
int main(void)
{
puts("Hello");
return 0;
}built with wasi sdk v16.5: /opt/wasi-sdk/dist/wasi-sdk-16.5ga0a342ac182c/bin/clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-sdk/dist/wasi-sysroot -g -O0 -v -o hello.wasm hello.c
wasmtime version: wasmtime-cli 0.40.0
lldb version: lldb version 10.0.0
linux wsl2: 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxrun: wasmtime -g hello.wasm
exception thrown:
0: rust_begin_unwind
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/result.rs:1805:5
3: wasmtime_jit::debug::create_gdbjit_image
4: wasmtime_jit::instantiate::CompiledModule::from_artifacts
5: wasmtime::module::Module::from_parts
6: wasmtime::module::Module::from_binary
7: wasmtime::module::Module::from_file
8: wasmtime_cli::commands::run::RunCommand::load_module
9: wasmtime_cli::commands::run::RunCommand::execute
10: wasmtime::main
bjorn3 commented on issue #4802:
Please see https://github.com/bytecodealliance/wasmtime/issues/4669#issuecomment-1210997950 In any case can you upload the wasm file itself. That will help with reproducing it in the future if someone wants to work on fixing this bug.
GOVYANSONG commented on issue #4802:
Please rename the .txt file to original hello.wasm.
GOVYANSONG commented on issue #4802:
I drew inspiration from wasi example of wasmtime project itself. although lldb -- wasmtime run -g xyz.wasm throws nasty panic, the programmatical approach seemed to work fine e.g. set debug info to true. basically, adopted the wasi example and added config to set debug info = true. lldb ./wasi, set breakpoint for method name main (c wrapper) and _start (default wasi export). while in lldb debug session, run , gui, source code view is available.
GOVYANSONG closed issue #4802:
#include <stdio.h>
int main(void)
{
puts("Hello");
return 0;
}built with wasi sdk v16.5: /opt/wasi-sdk/dist/wasi-sdk-16.5ga0a342ac182c/bin/clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-sdk/dist/wasi-sysroot -g -O0 -v -o hello.wasm hello.c
wasmtime version: wasmtime-cli 0.40.0
lldb version: lldb version 10.0.0
linux wsl2: 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxrun: wasmtime -g hello.wasm
exception thrown:
0: rust_begin_unwind
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/result.rs:1805:5
3: wasmtime_jit::debug::create_gdbjit_image
4: wasmtime_jit::instantiate::CompiledModule::from_artifacts
5: wasmtime::module::Module::from_parts
6: wasmtime::module::Module::from_binary
7: wasmtime::module::Module::from_file
8: wasmtime_cli::commands::run::RunCommand::load_module
9: wasmtime_cli::commands::run::RunCommand::execute
10: wasmtime::main
Last updated: Nov 22 2024 at 16:03 UTC