zturner added inline comments.
================
Comment at:
lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp:82
-bool RegisterContextWindows::ClearHardwareBreakpoint(uint32_t hw_idx) {
- return false;
-}
+ if (!size || size > 8 || size & (size - 1))
+ return false;
----------------
amccarth wrote:
> Clever! It took me a minute or two to figure out what the point of that was
> checking. Perhaps a comment to explain?
Isn't this equivalent to:
```
switch (size)
{
case 1:
case 2:
case 4:
case 8:
break;
default:
return false;
}
```
? That definitely seems much clearer.
I'm also pretty sure that on x86 you can't add a 64-bit watch, So you'd have to
do something different depending on the target bitness if you want this to be
correct for x86.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67168/new/
https://reviews.llvm.org/D67168
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits