[PATCH 2/6] [WineDbg]: properly guard against setting a watchpoint against a variable stored in a register

Eric Pouech eric.pouech at orange.fr
Mon Apr 12 14:18:12 CDT 2010




A+
---

 programs/winedbg/break.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/programs/winedbg/break.c b/programs/winedbg/break.c
index cab65fb..90bf10a 100644
--- a/programs/winedbg/break.c
+++ b/programs/winedbg/break.c
@@ -373,6 +373,11 @@ static void break_add_watch(const struct dbg_lvalue* lvalue, BOOL is_write)
     int         num;
     DWORD64     l = 4;
 
+    if (lvalue->cookie == DLV_HOST)
+    {
+        dbg_printf("Cannot set a watch point on register or register-based variable\n");
+        return;
+    }
     num = init_xpoint((is_write) ? be_xpoint_watch_write : be_xpoint_watch_read,
                       &lvalue->addr);
     if (num == -1) return;






More information about the wine-patches mailing list