Preserve execution memory for debug instance (#1072)
During debugging, the debug client may request to malloc a memory space to evaluate the user expressions. If we malloc memory from the linear memory, it may fail when the thread is in stop status. We preserve a buffer during creating debug instance, and use a simple bump pointer allocator to serve lldb's memory request.
This commit is contained in:
@ -155,6 +155,15 @@
|
||||
#define WASM_ENABLE_DEBUG_INTERP 0
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_DEBUG_INTERP != 0
|
||||
#ifndef DEBUG_EXECUTION_MEMORY_SIZE
|
||||
/* 0x85000 is the size required by lldb, if this is changed to a smaller value,
|
||||
* then the debugger will not be able to evaluate user expressions, other
|
||||
* functionality such as breakpoint and stepping are not influenced by this */
|
||||
#define DEBUG_EXECUTION_MEMORY_SIZE 0x85000
|
||||
#endif
|
||||
#endif /* end of WASM_ENABLE_DEBUG_INTERP != 0 */
|
||||
|
||||
#ifndef WASM_ENABLE_DEBUG_AOT
|
||||
#define WASM_ENABLE_DEBUG_AOT 0
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user