Support dynamic aot debug (#3788)
Enable dynamic aot debug feature which debugs the aot file and is able to set the break point and do single step. Refer to the README for the detailed steps. Signed-off-by: zhangliangyu3 <zhangliangyu3@xiaomi.com>
This commit is contained in:
@ -49,6 +49,12 @@ else()
|
||||
add_definitions(-DWASM_ENABLE_WORD_ALIGN_READ=0)
|
||||
endif()
|
||||
|
||||
if(CONFIG_INTERPRETERS_WAMR_DYNAMIC_AOT_DEBUG)
|
||||
add_definitions(-DWASM_ENABLE_DYNAMIC_AOT_DEBUG=1)
|
||||
else()
|
||||
add_definitions(-DWASM_ENABLE_DYNAMIC_AOT_DEBUG=0)
|
||||
endif()
|
||||
|
||||
if(CONFIG_INTERPRETERS_WAMR_STACK_GUARD_SIZE)
|
||||
add_definitions(-DWASM_STACK_GUARD_SIZE=0)
|
||||
else()
|
||||
|
||||
@ -148,6 +148,12 @@ else
|
||||
CFLAGS += -DWASM_ENABLE_WORD_ALIGN_READ=0
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INTERPRETERS_WAMR_DYNAMIC_AOT_DEBUG),y)
|
||||
CFLAGS += -DWASM_ENABLE_DYNAMIC_AOT_DEBUG=1
|
||||
else
|
||||
CFLAGS += -DWASM_ENABLE_DYNAMIC_AOT_DEBUG=0
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INTERPRETERS_WAMR_MEM_DUAL_BUS_MIRROR),y)
|
||||
CFLAGS += -DWASM_MEM_DUAL_BUS_MIRROR=1
|
||||
else
|
||||
|
||||
@ -928,6 +928,15 @@ main(int argc, char *argv[])
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_DYNAMIC_AOT_DEBUG != 0
|
||||
if (!wasm_runtime_set_module_name(wasm_module, wasm_file, error_buf,
|
||||
sizeof(error_buf))) {
|
||||
printf("set aot module name failed in dynamic aot debug mode, %s\n",
|
||||
error_buf);
|
||||
goto fail3;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_LIBC_WASI != 0
|
||||
libc_wasi_init(wasm_module, argc, argv, &wasi_parse_ctx);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user