diff options
author | Dmitry Voronetskiy <davoronetskiy@gmail.com> | 2021-06-13 21:08:38 +0300 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-07-13 08:13:19 -0700 |
commit | 080ac33542d7ee042710f05c023fe5e3a70b9ebf (patch) | |
tree | 0928a840e802b0ddda13f84009f90717c5fbfd9e /target | |
parent | 708f50199b59476ec4b45ebcdf171550086d6292 (diff) | |
download | qemu-080ac33542d7ee042710f05c023fe5e3a70b9ebf.zip qemu-080ac33542d7ee042710f05c023fe5e3a70b9ebf.tar.gz qemu-080ac33542d7ee042710f05c023fe5e3a70b9ebf.tar.bz2 |
target/i386: Tidy hw_breakpoint_remove
Since cpu_breakpoint and cpu_watchpoint are in a union,
the code should access only one of them.
Signed-off-by: Dmitry Voronetskiy <davoronetskiy@gmail.com>
Message-Id: <20210613180838.21349-1-davoronetskiy@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/tcg/sysemu/bpt_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/i386/tcg/sysemu/bpt_helper.c b/target/i386/tcg/sysemu/bpt_helper.c index 624f90b..4d96a48 100644 --- a/target/i386/tcg/sysemu/bpt_helper.c +++ b/target/i386/tcg/sysemu/bpt_helper.c @@ -109,9 +109,9 @@ static void hw_breakpoint_remove(CPUX86State *env, int index) case DR7_TYPE_DATA_WR: case DR7_TYPE_DATA_RW: - if (env->cpu_breakpoint[index]) { + if (env->cpu_watchpoint[index]) { cpu_watchpoint_remove_by_ref(cs, env->cpu_watchpoint[index]); - env->cpu_breakpoint[index] = NULL; + env->cpu_watchpoint[index] = NULL; } break; |