Files
qemu/linux-user/sparc/cpu_loop.h
Matt Turner f83f550549 linux-user/sparc: flush register windows before core dump
Without this, only the crash frame's window is spilled to the
stack; all deeper call frames remain in the register file and
are absent from the core's memory segments. Stack unwinding
fails past the first DWARF step because the callers' register
save areas contain stale/garbage data.

The real kernel calls flush_all_user_windows() at the top of
do_coredump(). Mirror that via a weak target_flush_windows()
hook called from dump_core_and_abort(), with the SPARC override
calling the existing flush_windows() in cpu_loop.c.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Helge Deller <deller@gmx.de>
2026-06-10 18:42:59 +02:00

8 lines
147 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef SPARC_CPU_LOOP_H
#define SPARC_CPU_LOOP_H
void flush_windows(CPUSPARCState *env);
#endif