[PATCH] 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

Dmitry Voronetskiy posted 1 patch 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210613180838.21349-1-davoronetskiy@gmail.com
Test checkpatch passed
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/sysemu/bpt_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] 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
Posted by Dmitry Voronetskiy 2 years, 10 months ago
Signed-off-by: Dmitry Voronetskiy <davoronetskiy@gmail.com>
---
 target/i386/tcg/sysemu/bpt_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/tcg/sysemu/bpt_helper.c b/target/i386/tcg/sysemu/bpt_helper.c
index 9bdf7e170b..de284dbdcb 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;
 
-- 
2.25.1


Re: [PATCH] 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
Posted by Richard Henderson 2 years, 9 months ago
On 6/13/21 11:08 AM, Dmitry Voronetskiy wrote:
> Signed-off-by: Dmitry Voronetskiy<davoronetskiy@gmail.com>
> ---
>   target/i386/tcg/sysemu/bpt_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

I've got a small queue of other i386 tcg stuff, so I'll include this.


r~