| 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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 | 1623 |
| 1624 void Debugger::SignalExceptionThrown(const Instance& exc) { | 1624 void Debugger::SignalExceptionThrown(const Instance& exc) { |
| 1625 // We ignore this exception event when the VM is executing code invoked | 1625 // We ignore this exception event when the VM is executing code invoked |
| 1626 // by the debugger to evaluate variables values, when we see a nested | 1626 // by the debugger to evaluate variables values, when we see a nested |
| 1627 // breakpoint or exception event, or if the debugger is not | 1627 // breakpoint or exception event, or if the debugger is not |
| 1628 // interested in exception events. | 1628 // interested in exception events. |
| 1629 if (ignore_breakpoints_ || | 1629 if (ignore_breakpoints_ || |
| 1630 IsPaused() || | 1630 IsPaused() || |
| 1631 (!HasDebugEventHandler()) || | |
| 1632 (exc_pause_info_ == kNoPauseOnExceptions)) { | 1631 (exc_pause_info_ == kNoPauseOnExceptions)) { |
| 1633 return; | 1632 return; |
| 1634 } | 1633 } |
| 1635 DebuggerStackTrace* stack_trace = CollectStackTrace(); | 1634 DebuggerStackTrace* stack_trace = CollectStackTrace(); |
| 1636 if (!ShouldPauseOnException(stack_trace, exc)) { | 1635 if (!ShouldPauseOnException(stack_trace, exc)) { |
| 1637 return; | 1636 return; |
| 1638 } | 1637 } |
| 1639 DebuggerEvent event(isolate_, DebuggerEvent::kExceptionThrown); | 1638 DebuggerEvent event(isolate_, DebuggerEvent::kExceptionThrown); |
| 1640 event.set_exception(&exc); | 1639 event.set_exception(&exc); |
| 1641 ASSERT(stack_trace->Length() > 0); | 1640 ASSERT(stack_trace->Length() > 0); |
| (...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 } | 3253 } |
| 3255 | 3254 |
| 3256 | 3255 |
| 3257 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3256 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3258 ASSERT(bpt->next() == NULL); | 3257 ASSERT(bpt->next() == NULL); |
| 3259 bpt->set_next(code_breakpoints_); | 3258 bpt->set_next(code_breakpoints_); |
| 3260 code_breakpoints_ = bpt; | 3259 code_breakpoints_ = bpt; |
| 3261 } | 3260 } |
| 3262 | 3261 |
| 3263 } // namespace dart | 3262 } // namespace dart |
| OLD | NEW |