Skip to content

Commit a06ede0

Browse files
update source debugging document (#872)
1 parent a519368 commit a06ede0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/source_debugging.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ There are three steps to enable debugging in embedders
119119
...
120120
*/
121121
exec_env = wasm_runtime_create_exec_env(module_inst, stack_size);
122-
uint32_t debug_port = wasm_runtime_start_debug_instance();
122+
uint32_t debug_port = wasm_runtime_start_debug_instance(exec_env);
123123
```
124124

125125
3. Enable source debugging features during building
@@ -137,3 +137,9 @@ There are three steps to enable debugging in embedders
137137
> Note: This attention is about "wasm thread" rather than native threads. Executing wasm functions in several different native threads will **not** affect the normal behaviour of debugging feature.
138138
139139
- When using source debugging features, **don't** create multiple `wasm_instance` from the same `wasm_module`, because the debugger may change the bytecode (set/unset breakpoints) of the `wasm_module`. If you do need several instance from the same bytecode, you need to copy the bytecode to a new butter, then load a new `wasm_module`, and then instantiate the new wasm module to get the new instance.
140+
141+
- If you are running `lldb` on non-linux platforms, please use `platform select remote-linux` command in lldb before connecting to the runtime:
142+
```
143+
(lldb) platform select remote-linux
144+
(lldb) process connect -p wasm connect://127.0.0.1:1234
145+
```

0 commit comments

Comments
 (0)