winedbg: Properly guard against setting a watchpoint against a variable stored in a register.

This commit is contained in:
Eric Pouech 2010-04-12 21:18:12 +02:00 committed by Alexandre Julliard
parent a1986b20e7
commit e9a31f2770
1 changed files with 5 additions and 0 deletions

View File

@ -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;