Stream: git-wasmtime

Topic: wasmtime / Issue #1723 Debugger helper for JIT code


view this post on Zulip Wasmtime GitHub notifications bot (May 18 2020 at 19:48):

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:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2020 at 19:52):

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
...

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2020 at 20:46):

abrown commented on Issue #1723:

cc: @jlb6740

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2020 at 22:33):

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?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2020 at 22:49):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2020 at 15:41):

yurydelendik commented on Issue #1723:

rebased LLVM D78801 at https://github.com/yurydelendik/llvm-project/tree/D78801


Last updated: Oct 23 2024 at 20:03 UTC