Copy read only API behind a flag instead of using user defined callback

This commit is contained in:
Georgii Rylov :slightly_smiling_face
2025-02-24 17:22:05 +00:00
parent 267379c2e8
commit 32338bb7d6
9 changed files with 143 additions and 89 deletions

View File

@ -8,6 +8,7 @@
#include "bh_platform.h"
#include "bh_common.h"
#include "platform_common.h"
#include "wasm_exec_env.h"
#include "wasm_native.h"
#include "../include/wasm_export.h"
@ -464,19 +465,6 @@ typedef struct WASMRegisteredModule {
typedef package_type_t PackageType;
typedef wasm_section_t WASMSection, AOTSection;
typedef struct wasm_frame_t {
/* wasm_instance_t */
void *instance;
uint32 module_offset;
uint32 func_index;
uint32 func_offset;
const char *func_name_wp;
uint32 *sp;
uint8 *frame_ref;
uint32 *lp;
} WASMCApiFrame;
#if WASM_ENABLE_JIT != 0
typedef struct LLVMJITOptions {
uint32 opt_level;
@ -652,10 +640,11 @@ wasm_runtime_create_exec_env(WASMModuleInstanceCommon *module_inst,
WASM_RUNTIME_API_EXTERN void
wasm_runtime_destroy_exec_env(WASMExecEnv *exec_env);
WASM_RUNTIME_API_EXTERN void
wasm_iterate_callstack(const wasm_exec_env_t exec_env,
const wasm_frame_callback frame_handler,
void *user_data);
#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);
#endif // WAMR_ENABLE_COPY_CALLSTACK
/* See wasm_export.h for description */
WASM_RUNTIME_API_EXTERN WASMModuleInstanceCommon *