]> git.proxmox.com Git - mirror_qemu.git/blobdiff - linux-user/exit.c
target/arm: Don't corrupt high half of PMOVSR when cycle counter overflows
[mirror_qemu.git] / linux-user / exit.c
index 14e94e28faf867a0d3c16c0080d2dd2b3e0bea31..fa6ef0b9b44c79503a4d7e0c438f131338d5b6e0 100644 (file)
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "exec/gdbstub.h"
 #include "qemu.h"
+#include "user-internals.h"
+#ifdef CONFIG_GPROF
+#include <sys/gmon.h>
+#endif
 
 #ifdef CONFIG_GCOV
 extern void __gcov_dump(void);
@@ -25,11 +30,12 @@ extern void __gcov_dump(void);
 
 void preexit_cleanup(CPUArchState *env, int code)
 {
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
         _mcleanup();
 #endif
 #ifdef CONFIG_GCOV
         __gcov_dump();
 #endif
-        gdb_exit(env, code);
+        gdb_exit(code);
+        qemu_plugin_user_exit();
 }