[PATCH v2 19/30] sandbox: Drop signal handling for MSYS2

Simon Glass sjg at chromium.org
Sun Apr 30 03:29:52 CEST 2023


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 at 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__)
 	pc = context->uc_mcontext.gregs[REG_RIP];
 #elif defined(__aarch64__)
 	pc = context->uc_mcontext.pc;
-- 
2.40.1.495.gc816e09b53d-goog



More information about the U-Boot mailing list