Skip to content

Commit

Permalink
target/i386: Tidy hw_breakpoint_remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Voronetskiy authored and rth7680 committed Jul 13, 2021
1 parent 708f501 commit 080ac33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target/i386/tcg/sysemu/bpt_helper.c
Expand Up @@ -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;

Expand Down

0 comments on commit 080ac33

Please sign in to comment.