github-actions[bot] commented on Issue #1723:
Subscribe to Label Action
cc @peterhuene
<details>
This issue or pull request has been labeled: "wasmtime:api"Thus the following users have been cc'd because of the following labels:
- peterhuene: wasmtime:api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
yurydelendik commented on Issue #1723:
Run example/server as
RUST_LOG="gdb_remote_protocol=trace,wasmtime_cli=trace" cargo run -- tests/all/debug/testsuite/fib-wasm.wasm --gdb-server --opt-level 0 --invoke fib 5
Connect using LLDB (version as in https://reviews.llvm.org/D78801):
(lldb) wasm 22334 Process 1 stopped * thread #1, stop reason = signal SIGTRAP frame #0: 0x200000022 module-2.wasm -> 0x200000022: call 0 0x200000024: end (lldb) b 0x1000000af Breakpoint 1: where = module-1.wasm`fib + 109 at fib-wasm.c:11:9, address = 0x1000000af (lldb) c Process 1 resuming Process 1 stopped * thread #1, stop reason = breakpoint 1.1 frame #0: 0x1000000af module-1.wasm`fib(n=0) at fib-wasm.c:11:9 8 int fib(int n) { 9 int t, a = 0, b = 1; 10 for (int i = 0; i < n; i++) { -> 11 t = a; 12 a = b; 13 b += t; 14 } (lldb) s ...
abrown commented on Issue #1723:
cc: @jlb6740
jlb6740 commented on Issue #1723:
@abrown Thanks. I've actually used debugging support before based on a gist from @yurydelendik (https://gist.github.com/yurydelendik/4103d782dfc62634bc9f4de98de20835). How does this PR relate to that existing support which allowed breaking and stepping in jitted code with lldb?
yurydelendik commented on Issue #1723:
How does this PR relate to that existing support which allowed breaking and stepping in jitted code with lldb?
@jlb6740 that is different in terms of now you don't need to transform the DWARF since debuggers have to understand WebAssembly target (see referred above LLVM's patch). In this case, the VM has to provide direct access to wasm-level locals, memory, stack.
yurydelendik commented on Issue #1723:
rebased LLVM D78801 at https://github.com/yurydelendik/llvm-project/tree/D78801
Last updated: Dec 23 2024 at 12:05 UTC