Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build-scripts/config_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
endif ()
else ()
include(CheckCCompilerFlag)
Check_C_Compiler_Flag( -m32 M32_OK )
if (M32_OK)
Check_C_Compiler_Flag(-m32 M32_OK)
if (M32_OK OR WAMR_BUILD_TARGET STREQUAL "X86_32")
add_definitions (-m32)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
Expand Down
8 changes: 7 additions & 1 deletion doc/source_debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ There are three steps to enable debugging in embedders
...
*/
exec_env = wasm_runtime_create_exec_env(module_inst, stack_size);
uint32_t debug_port = wasm_runtime_start_debug_instance();
uint32_t debug_port = wasm_runtime_start_debug_instance(exec_env);
```

3. Enable source debugging features during building
Expand All @@ -137,3 +137,9 @@ There are three steps to enable debugging in embedders
> 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.

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

- If you are running `lldb` on non-linux platforms, please use `platform select remote-linux` command in lldb before connecting to the runtime:
```
(lldb) platform select remote-linux
(lldb) process connect -p wasm connect://127.0.0.1:1234
```