Skip to contentSkip to conversation

target/i386/tcg/sysemu/bpt_helper.c: typo since cpu_breakpoint and cpu_watchpoint are in a union, the code should access only one of them

PATCH In review Dmitry Voronetskiy 2 participants 2 messages Jun 13, 2021 – Jul 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/i386/tcg/sysemu/bpt_helper.c: typo since cpu_breakpoint and cpu_watchpoint are in a union, the code should access only one of them

---
 target/i386/tcg/sysemu/bpt_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/i386/tcg/sysemu/bpt_helper.c +2 -2
index 9bdf7e170b..de284dbdcb 100644
@@ -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;
 
Signature · 1 line
2.25.1