
Am 25. April 2023 01:08:19 MESZ schrieb Simon Glass sjg@chromium.org:
The Linux register format is not used in Windows, so disable this feature.
Signed-off-by: Simon Glass sjg@chromium.org
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 5e66304e2b9d..c8b83f923ddb 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -285,7 +285,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(__linux)
In the commit message you only mention Linux and Windows. How about BSD and other POSIX?
pc = context->uc_mcontext.gregs[REG_RIP]; #elif defined(__aarch64__)
__aarch64__ does not imply Linux. There are Windows and other POSIX (BSD, macOS) systems running on ARM.
__riscv, armhf may also occur on different POSIX systems.
Best regards
Heinrich
pc = context->uc_mcontext.pc;