address comments

This commit is contained in:
Georgii Rylov
2025-02-27 14:32:17 +00:00
parent 99cb6ec27e
commit fc3077b74d
8 changed files with 45 additions and 31 deletions

View File

@ -1742,8 +1742,9 @@ wasm_runtime_destroy_exec_env(WASMExecEnv *exec_env)
#if WAMR_ENABLE_COPY_CALLSTACK != 0
uint32
wasm_copy_callstack(const wasm_exec_env_t exec_env, wasm_frame_ptr_t buffer,
const uint32 length, const uint32 skip_n)
wasm_copy_callstack(const wasm_exec_env_t exec_env, wasm_frame_t *buffer,
const uint32 length, const uint32 skip_n, char *error_buf,
uint32_t error_buf_size)
{
/*
* Note for devs: please refrain from such modifications inside of
@ -1760,13 +1761,15 @@ wasm_copy_callstack(const wasm_exec_env_t exec_env, wasm_frame_ptr_t buffer,
#if WASM_ENABLE_INTERP != 0
if (module_inst->module_type == Wasm_Module_Bytecode) {
return wasm_interp_copy_callstack(exec_env, buffer, length, skip_n);
return wasm_interp_copy_callstack(exec_env, buffer, length, skip_n,
error_buf, error_buf_size);
}
#endif
#if WASM_ENABLE_AOT != 0
if (module_inst->module_type == Wasm_Module_AoT) {
return aot_copy_callstack(exec_env, buffer, length, skip_n);
return aot_copy_callstack(exec_env, buffer, length, skip_n, error_buf,
error_buf_size);
}
#endif
#endif

View File

@ -639,14 +639,11 @@ wasm_runtime_create_exec_env(WASMModuleInstanceCommon *module_inst,
WASM_RUNTIME_API_EXTERN void
wasm_runtime_destroy_exec_env(WASMExecEnv *exec_env);
#ifndef WAMR_ENABLE_COPY_CALLSTACK
#define WAMR_ENABLE_COPY_CALLSTACK 0
#endif
#if WAMR_ENABLE_COPY_CALLSTACK != 0
WASM_RUNTIME_API_EXTERN uint32_t
wasm_copy_callstack(const wasm_exec_env_t exec_env, wasm_frame_ptr_t buffer,
const uint32 length, const uint32 skip_n);
wasm_copy_callstack(const wasm_exec_env_t exec_env, wasm_frame_t *buffer,
const uint32 length, const uint32 skip_n, char *error_buf,
uint32 error_buf_size);
#endif // WAMR_ENABLE_COPY_CALLSTACK
/* See wasm_export.h for description */