| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2549 isolate_->set_single_step(true); | 2549 isolate_->set_single_step(true); |
| 2550 // Find topmost caller that is debuggable. | 2550 // Find topmost caller that is debuggable. |
| 2551 for (intptr_t i = 1; i < stack_trace->Length(); i++) { | 2551 for (intptr_t i = 1; i < stack_trace->Length(); i++) { |
| 2552 ActivationFrame* frame = stack_trace->FrameAt(i); | 2552 ActivationFrame* frame = stack_trace->FrameAt(i); |
| 2553 if (frame->IsDebuggable()) { | 2553 if (frame->IsDebuggable()) { |
| 2554 stepping_fp_ = frame->fp(); | 2554 stepping_fp_ = frame->fp(); |
| 2555 break; | 2555 break; |
| 2556 } | 2556 } |
| 2557 } | 2557 } |
| 2558 } | 2558 } |
| 2559 if (!isolate_->single_step()) { | |
| 2560 // We are no longer single stepping, make sure that the ThreadInterrupter | |
| 2561 // is awake. | |
| 2562 ThreadInterrupter::WakeUp(); | |
| 2563 } | |
| 2564 } | 2559 } |
| 2565 | 2560 |
| 2566 | 2561 |
| 2567 // static | 2562 // static |
| 2568 bool Debugger::IsDebuggable(const Function& func) { | 2563 bool Debugger::IsDebuggable(const Function& func) { |
| 2569 if (!func.is_debuggable()) { | 2564 if (!func.is_debuggable()) { |
| 2570 return false; | 2565 return false; |
| 2571 } | 2566 } |
| 2572 if (ServiceIsolate::IsRunning()) { | 2567 if (ServiceIsolate::IsRunning()) { |
| 2573 return true; | 2568 return true; |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 } | 3245 } |
| 3251 | 3246 |
| 3252 | 3247 |
| 3253 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3248 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3254 ASSERT(bpt->next() == NULL); | 3249 ASSERT(bpt->next() == NULL); |
| 3255 bpt->set_next(code_breakpoints_); | 3250 bpt->set_next(code_breakpoints_); |
| 3256 code_breakpoints_ = bpt; | 3251 code_breakpoints_ = bpt; |
| 3257 } | 3252 } |
| 3258 | 3253 |
| 3259 } // namespace dart | 3254 } // namespace dart |
| OLD | NEW |