From a83497e0b0e4df3885eb1851bcdabef05972181b Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 9 Jul 2021 13:18:16 -0700 Subject: [PATCH] [doc] Add LLDB tips and tricks --- docs/examples-debugging.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/examples-debugging.md b/docs/examples-debugging.md index c8b4733d5d..78a6c9bda0 100644 --- a/docs/examples-debugging.md +++ b/docs/examples-debugging.md @@ -22,3 +22,17 @@ Wasmtime: ```sh gdb --args wasmtime run -g foo.wasm ``` + +If you run into trouble, the following discussions might help: + +- On MacOS with LLDB you may need to run: `settings set + plugin.jit-loader.gdb.enable on` + ([#1953](https://github.com/bytecodealliance/wasmtime/issues/1953)) +- With LLDB, call `__vmctx.set()` to set the current context before calling any + dereference operators + ([#1482](https://github.com/bytecodealliance/wasmtime/issues/1482)): + ```sh + (lldb) p __vmctx->set() + (lldb) p *foo + ``` +