Reuse RelocInfo's IsPatchedDebugBreakSlotSequence() implementation.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 10 Jun 2014 09:16:29 +0000 (09:16 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 10 Jun 2014 09:16:29 +0000 (09:16 +0000)
RelocInfo::IsPatchedDebugBreakSlotSequence() already does this assembly
check, so just reuse it in BreakLocationIterator::IsDebugBreakAtSlot(),
like the other debug ports do.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/321743002

Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x64/debug-x64.cc

index bdb9e51..4703e42 100644 (file)
@@ -48,7 +48,7 @@ bool Debug::IsDebugBreakAtReturn(v8::internal::RelocInfo* rinfo) {
 bool BreakLocationIterator::IsDebugBreakAtSlot() {
   ASSERT(IsDebugBreakSlot());
   // Check whether the debug break slot instructions have been patched.
-  return !Assembler::IsNop(rinfo()->pc());
+  return rinfo()->IsPatchedDebugBreakSlotSequence();
 }