| Index: src/debug.cc
|
| diff --git a/src/debug.cc b/src/debug.cc
|
| index 187082f2184dc2d0b62063e126543eb64d116ab0..99c5ee6cc4bf6b04d8c2a929f9711fd0df749d39 100644
|
| --- a/src/debug.cc
|
| +++ b/src/debug.cc
|
| @@ -35,6 +35,7 @@
|
| #include "compilation-cache.h"
|
| #include "compiler.h"
|
| #include "debug.h"
|
| +#include "deoptimizer.h"
|
| #include "execution.h"
|
| #include "global-handles.h"
|
| #include "ic.h"
|
| @@ -166,7 +167,9 @@ void BreakLocationIterator::Next() {
|
| Address target = original_rinfo()->target_address();
|
| Code* code = Code::GetCodeFromTargetAddress(target);
|
| if ((code->is_inline_cache_stub() &&
|
| - code->kind() != Code::BINARY_OP_IC) ||
|
| + !code->is_binary_op_stub() &&
|
| + !code->is_type_recording_binary_op_stub() &&
|
| + !code->is_compare_ic_stub()) ||
|
| RelocInfo::IsConstructCall(rmode())) {
|
| break_point_++;
|
| return;
|
| @@ -1702,6 +1705,12 @@ bool Debug::EnsureDebugInfo(Handle<SharedFunctionInfo> shared) {
|
| // Ensure shared in compiled. Return false if this failed.
|
| if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) return false;
|
|
|
| + // If preparing for the first break point make sure to deoptimize all
|
| + // functions as debugging does not work with optimized code.
|
| + if (!has_break_points_) {
|
| + Deoptimizer::DeoptimizeAll();
|
| + }
|
| +
|
| // Create the debug info object.
|
| Handle<DebugInfo> debug_info = FACTORY->NewDebugInfo(shared);
|
|
|
|
|