Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Commit

Permalink
Remove NYI warning for readonly hardware watchpoints
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Blame Revision:
  • Loading branch information
AndrewSB committed Feb 23, 2018
1 parent 2f219fa commit 3f8f9ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Sources/Core/HardwareBreakpointManager.cpp
Expand Up @@ -29,11 +29,9 @@ ErrorCode HardwareBreakpointManager::add(Address const &address, Type type,
return kErrorInvalidArgument;
}

if (mode == kModeRead) {
DS2LOG(Warning,
"read-only watchpoints are unsupported, setting as read-write");
mode = static_cast<Mode>(mode | kModeWrite);
}
// Readonly hardware watchpoints aren't natively implemented, so they
// are implemened in software instead. See #510
if (mode == kModeRead) mode = static_cast<Mode>(mode | kModeWrite);

return super::add(address, type, size, mode);
}
Expand Down
3 changes: 3 additions & 0 deletions Sources/Core/X86/HardwareBreakpointManager.cpp
Expand Up @@ -137,6 +137,9 @@ ErrorCode HardwareBreakpointManager::enableDebugCtrlReg(uint64_t &ctrlReg,
EnableBit(ctrlReg, infoIdx);
DisableBit(ctrlReg, infoIdx + 1);
break;
// Readonly watchpoints aren't implemented in hardware, so a
// read|write watchpoint is placed, and write halts are filtered
// out in software. See #510
case kModeRead:
case kModeRead | kModeWrite:
EnableBit(ctrlReg, infoIdx);
Expand Down

0 comments on commit 3f8f9ca

Please sign in to comment.