Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 70141294608ea78195a017928b59ddffd42a3283..8c4f335fac6a802695147db66302dd2edc5d29e1 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -2359,7 +2359,7 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) { |
// Continue just after the slot. |
thread_local_.after_break_target_ = addr + Assembler::kDebugBreakSlotLength; |
- } else if (IsDebugBreak(Assembler::target_address_at(addr))) { |
+ } else if (IsDebugBreak(Assembler::target_address_at(addr, *code))) { |
// We now know that there is still a debug break call at the target address, |
// so the break point is still there and the original code will hold the |
// address to jump to in order to complete the call which is replaced by a |
@@ -2370,13 +2370,15 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) { |
// Install jump to the call address in the original code. This will be the |
// call which was overwritten by the call to DebugBreakXXX. |
- thread_local_.after_break_target_ = Assembler::target_address_at(addr); |
+ thread_local_.after_break_target_ = |
+ Assembler::target_address_at(addr, *original_code); |
} else { |
// There is no longer a break point present. Don't try to look in the |
// original code as the running code will have the right address. This takes |
// care of the case where the last break point is removed from the function |
// and therefore no "original code" is available. |
- thread_local_.after_break_target_ = Assembler::target_address_at(addr); |
+ thread_local_.after_break_target_ = |
+ Assembler::target_address_at(addr, *code); |
} |
} |