Merge tag 'v9.1.0'
[qemu/ar7.git] / target / i386 / tcg / bpt_helper.c
blobbc34ac27fea7e8fe616a8f3258e935e85c7b3ab2
1 /*
2 * i386 breakpoint helpers
4 * Copyright (c) 2003 Fabrice Bellard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 #include "qemu/osdep.h"
21 #include "cpu.h"
22 #include "exec/helper-proto.h"
23 #include "helper-tcg.h"
25 G_NORETURN void helper_single_step(CPUX86State *env)
27 #ifndef CONFIG_USER_ONLY
28 check_hw_breakpoints(env, true);
29 env->dr[6] |= DR6_BS;
30 #endif
31 raise_exception(env, EXCP01_DB);
34 void helper_rechecking_single_step(CPUX86State *env)
36 if ((env->eflags & TF_MASK) != 0) {
37 helper_single_step(env);