Fix aot debugger compilation error on windows (#3370)

Fix aot debugger compilation error on windows as reported in #3184.

And update the stack size configuration for product-mini zephyr sample
since the native stack overflow check was enhanced and the zephyr-sdk
was also upgraded.
This commit is contained in:
Wenyong Huang
2024-04-29 10:38:43 +08:00
committed by GitHub
parent 120b9659dd
commit e11eae93e2
5 changed files with 15 additions and 21 deletions

View File

@ -24,7 +24,6 @@
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdbool.h>
@ -56,6 +55,12 @@ typedef struct JITDescriptor {
JITCodeEntry *first_entry_;
} JITDescriptor;
#if defined(_WIN32) || defined(_WIN32_)
#define attribute_noinline __declspec(noinline)
#else
#define attribute_noinline __attribute__((noinline))
#endif
/* LLVM has already define this */
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
/**
@ -63,9 +68,11 @@ typedef struct JITDescriptor {
* To prevent GCC from inlining or removing it we place noinline attribute
* and inline assembler statement inside.
*/
void __attribute__((noinline)) __jit_debug_register_code();
void attribute_noinline
__jit_debug_register_code();
void __attribute__((noinline)) __jit_debug_register_code()
void attribute_noinline
__jit_debug_register_code()
{
int x;
*(char *)&x = '\0';