mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
720ace24ae
This had been pulled in from hw/core/cpu.h, but that will be removed. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230310195252.210956-6-richard.henderson@linaro.org> [AJB: also syscall-trace.h] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-16-alex.bennee@linaro.org> Reviewed-by: Emilio Cota <cota@braap.org>
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
/*
|
|
* exit support for qemu
|
|
*
|
|
* Copyright (c) 2018 Alex Bennée <alex.bennee@linaro.org>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#include "qemu/osdep.h"
|
|
#include "accel/tcg/perf.h"
|
|
#include "gdbstub/syscalls.h"
|
|
#include "qemu.h"
|
|
#include "user-internals.h"
|
|
#include "qemu/plugin.h"
|
|
#ifdef CONFIG_GPROF
|
|
#include <sys/gmon.h>
|
|
#endif
|
|
|
|
#ifdef CONFIG_GCOV
|
|
extern void __gcov_dump(void);
|
|
#endif
|
|
|
|
void preexit_cleanup(CPUArchState *env, int code)
|
|
{
|
|
#ifdef CONFIG_GPROF
|
|
_mcleanup();
|
|
#endif
|
|
#ifdef CONFIG_GCOV
|
|
__gcov_dump();
|
|
#endif
|
|
gdb_exit(code);
|
|
qemu_plugin_user_exit();
|
|
perf_exit();
|
|
}
|