| 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 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 } | 1652 } |
| 1653 } else { | 1653 } else { |
| 1654 ASSERT((resume_action_ == kContinue) || (resume_action_ == kSingleStep)); | 1654 ASSERT((resume_action_ == kContinue) || (resume_action_ == kSingleStep)); |
| 1655 // Nothing to do here. Any potential instrumentation will be removed | 1655 // Nothing to do here. Any potential instrumentation will be removed |
| 1656 // below. Single stepping is handled by the single step callback. | 1656 // below. Single stepping is handled by the single step callback. |
| 1657 } | 1657 } |
| 1658 | 1658 |
| 1659 if (func_to_instrument.IsNull() || | 1659 if (func_to_instrument.IsNull() || |
| 1660 (func_to_instrument.raw() != bpt->function())) { | 1660 (func_to_instrument.raw() != bpt->function())) { |
| 1661 RemoveInternalBreakpoints(); // *bpt is now invalid. | 1661 RemoveInternalBreakpoints(); // *bpt is now invalid. |
| 1662 if (!func_to_instrument.IsNull()) { | 1662 } |
| 1663 InstrumentForStepping(func_to_instrument); | 1663 if (!func_to_instrument.IsNull()) { |
| 1664 } | 1664 InstrumentForStepping(func_to_instrument); |
| 1665 } | 1665 } |
| 1666 } | 1666 } |
| 1667 | 1667 |
| 1668 | 1668 |
| 1669 void Debugger::Initialize(Isolate* isolate) { | 1669 void Debugger::Initialize(Isolate* isolate) { |
| 1670 if (initialized_) { | 1670 if (initialized_) { |
| 1671 return; | 1671 return; |
| 1672 } | 1672 } |
| 1673 isolate_ = isolate; | 1673 isolate_ = isolate; |
| 1674 // Create a port here, we don't expect to receive any messages on this port. | 1674 // Create a port here, we don't expect to receive any messages on this port. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 } | 1855 } |
| 1856 | 1856 |
| 1857 | 1857 |
| 1858 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1858 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1859 ASSERT(bpt->next() == NULL); | 1859 ASSERT(bpt->next() == NULL); |
| 1860 bpt->set_next(code_breakpoints_); | 1860 bpt->set_next(code_breakpoints_); |
| 1861 code_breakpoints_ = bpt; | 1861 code_breakpoints_ = bpt; |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 } // namespace dart | 1864 } // namespace dart |
| OLD | NEW |