Implement wasm-c-api frame/trap APIs for interpreter mode (#660)
And enable to cache compiled AOT file buffer for wasm-c-api JIT mode Avoid checks that rely on undefined C behavior Fix issues of wasm-c-api sample trap and callback_chain Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -150,6 +150,15 @@ typedef struct WASMExportMemInstance {
|
||||
} WASMExportMemInstance;
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_DUMP_CALL_STACK != 0
|
||||
struct WASMFrame {
|
||||
void *instance;
|
||||
uint32 module_offset;
|
||||
uint32 func_index;
|
||||
uint32 func_offset;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct WASMModuleInstance {
|
||||
/* Module instance type, for module instance loaded from
|
||||
WASM bytecode binary, this field is Wasm_Module_Bytecode;
|
||||
@ -209,6 +218,10 @@ struct WASMModuleInstance {
|
||||
/* The exception buffer of wasm interpreter for current thread. */
|
||||
char cur_exception[128];
|
||||
|
||||
#if WASM_ENABLE_DUMP_CALL_STACK != 0
|
||||
Vector *frames;
|
||||
#endif
|
||||
|
||||
/* The custom data that can be set/get by
|
||||
* wasm_set_custom_data/wasm_get_custom_data */
|
||||
void *custom_data;
|
||||
|
||||
Reference in New Issue
Block a user