| Index: src/debug.cc
|
| diff --git a/src/debug.cc b/src/debug.cc
|
| index b63e99dbd5247ca2ba048641b3162ee5811440ba..9cc4d74939d3b62ffa11d06d1161dd2d2a34935d 100644
|
| --- a/src/debug.cc
|
| +++ b/src/debug.cc
|
| @@ -69,7 +69,8 @@ BreakLocation::Iterator::Iterator(Handle<DebugInfo> debug_info,
|
| ~RelocInfo::ModeMask(RelocInfo::CODE_AGE_SEQUENCE)),
|
| break_index_(-1),
|
| position_(1),
|
| - statement_position_(1) {
|
| + statement_position_(1),
|
| + has_immediate_position_(false) {
|
| Next();
|
| }
|
|
|
| @@ -99,6 +100,8 @@ void BreakLocation::Iterator::Next() {
|
| debug_info_->shared()->start_position());
|
| DCHECK(position_ >= 0);
|
| DCHECK(statement_position_ >= 0);
|
| + has_immediate_position_ = true;
|
| + continue;
|
| }
|
|
|
| // Check for break at return.
|
| @@ -112,7 +115,7 @@ void BreakLocation::Iterator::Next() {
|
| }
|
| statement_position_ = position_;
|
| break_index_++;
|
| - return;
|
| + break;
|
| }
|
|
|
| if (RelocInfo::IsCodeTarget(rmode())) {
|
| @@ -124,24 +127,26 @@ void BreakLocation::Iterator::Next() {
|
|
|
| if (RelocInfo::IsConstructCall(rmode()) || code->is_call_stub()) {
|
| break_index_++;
|
| - return;
|
| + break;
|
| }
|
|
|
| // Skip below if we only want locations for calls and returns.
|
| if (type_ == CALLS_AND_RETURNS) continue;
|
|
|
| - if ((code->is_inline_cache_stub() && !code->is_binary_op_stub() &&
|
| + // Only break at an inline cache if it has an immediate position attached.
|
| + if (has_immediate_position_ &&
|
| + (code->is_inline_cache_stub() && !code->is_binary_op_stub() &&
|
| !code->is_compare_ic_stub() && !code->is_to_boolean_ic_stub())) {
|
| break_index_++;
|
| - return;
|
| + break;
|
| }
|
| if (code->kind() == Code::STUB) {
|
| if (RelocInfo::IsDebuggerStatement(rmode())) {
|
| break_index_++;
|
| - return;
|
| + break;
|
| } else if (CodeStub::GetMajorKey(code) == CodeStub::CallFunction) {
|
| break_index_++;
|
| - return;
|
| + break;
|
| }
|
| }
|
| }
|
| @@ -149,9 +154,10 @@ void BreakLocation::Iterator::Next() {
|
| if (RelocInfo::IsDebugBreakSlot(rmode()) && type_ != CALLS_AND_RETURNS) {
|
| // There is always a possible break point at a debug break slot.
|
| break_index_++;
|
| - return;
|
| + break;
|
| }
|
| }
|
| + has_immediate_position_ = false;
|
| }
|
|
|
|
|
|
|