
Hi Simon,
On Sun, Apr 30, 2023 at 9:30 AM Simon Glass sjg@chromium.org wrote:
The Linux register format used on Linux (and perhaps other OSes) is not used on Windows, so disable this feature.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2:
- Update commit message to mention other OSes
- Check for __MSYS__ instead of __linux
arch/sandbox/cpu/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index e76568ebdd32..522fe8a6f2b1 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -288,7 +288,7 @@ static void os_signal_handler(int sig, siginfo_t *info, void *con) ucontext_t __maybe_unused *context = con; unsigned long pc;
-#if defined(__x86_64__) +#if defined(__x86_64__) && !defined(__MSYS__)
I think we need to comment out all places in os.c that use signal handlers, e.g.: sigatcion() does not exist on Windows.
Or we consider rewriting signal related codes in a portable way, e.g.: Windows only has signal() API.
pc = context->uc_mcontext.gregs[REG_RIP];
#elif defined(__aarch64__) pc = context->uc_mcontext.pc; --
Regards, Bin