1*cd71c089SLaurent Vivier /* 2*cd71c089SLaurent Vivier * qemu user cpu loop 3*cd71c089SLaurent Vivier * 4*cd71c089SLaurent Vivier * Copyright (c) 2003-2008 Fabrice Bellard 5*cd71c089SLaurent Vivier * 6*cd71c089SLaurent Vivier * This program is free software; you can redistribute it and/or modify 7*cd71c089SLaurent Vivier * it under the terms of the GNU General Public License as published by 8*cd71c089SLaurent Vivier * the Free Software Foundation; either version 2 of the License, or 9*cd71c089SLaurent Vivier * (at your option) any later version. 10*cd71c089SLaurent Vivier * 11*cd71c089SLaurent Vivier * This program is distributed in the hope that it will be useful, 12*cd71c089SLaurent Vivier * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*cd71c089SLaurent Vivier * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*cd71c089SLaurent Vivier * GNU General Public License for more details. 15*cd71c089SLaurent Vivier * 16*cd71c089SLaurent Vivier * You should have received a copy of the GNU General Public License 17*cd71c089SLaurent Vivier * along with this program; if not, see <http://www.gnu.org/licenses/>. 18*cd71c089SLaurent Vivier */ 19*cd71c089SLaurent Vivier 20*cd71c089SLaurent Vivier #ifndef CPU_LOOP_COMMON_H 21*cd71c089SLaurent Vivier #define CPU_LOOP_COMMON_H 22*cd71c089SLaurent Vivier 23*cd71c089SLaurent Vivier #include "exec/log.h" 24*cd71c089SLaurent Vivier 25*cd71c089SLaurent Vivier #define EXCP_DUMP(env, fmt, ...) \ 26*cd71c089SLaurent Vivier do { \ 27*cd71c089SLaurent Vivier CPUState *cs = ENV_GET_CPU(env); \ 28*cd71c089SLaurent Vivier fprintf(stderr, fmt , ## __VA_ARGS__); \ 29*cd71c089SLaurent Vivier cpu_dump_state(cs, stderr, fprintf, 0); \ 30*cd71c089SLaurent Vivier if (qemu_log_separate()) { \ 31*cd71c089SLaurent Vivier qemu_log(fmt, ## __VA_ARGS__); \ 32*cd71c089SLaurent Vivier log_cpu_state(cs, 0); \ 33*cd71c089SLaurent Vivier } \ 34*cd71c089SLaurent Vivier } while (0) 35*cd71c089SLaurent Vivier 36*cd71c089SLaurent Vivier void target_cpu_copy_regs(CPUArchState *env, struct target_pt_regs *regs); 37*cd71c089SLaurent Vivier #endif 38