| 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 Code::Handle(ResolveCompileInstanceCallTarget(receiver, ic_data)); | 1578 Code::Handle(ResolveCompileInstanceCallTarget(receiver, ic_data)); |
| 1579 if (!target_code.IsNull()) { | 1579 if (!target_code.IsNull()) { |
| 1580 Function& callee = Function::Handle(target_code.function()); | 1580 Function& callee = Function::Handle(target_code.function()); |
| 1581 if (IsDebuggable(callee)) { | 1581 if (IsDebuggable(callee)) { |
| 1582 func_to_instrument = callee.raw(); | 1582 func_to_instrument = callee.raw(); |
| 1583 } | 1583 } |
| 1584 } | 1584 } |
| 1585 } else if (bpt->breakpoint_kind_ == PcDescriptors::kFuncCall) { | 1585 } else if (bpt->breakpoint_kind_ == PcDescriptors::kFuncCall) { |
| 1586 func_to_instrument = bpt->function(); | 1586 func_to_instrument = bpt->function(); |
| 1587 const Code& code = Code::Handle(func_to_instrument.CurrentCode()); | 1587 const Code& code = Code::Handle(func_to_instrument.CurrentCode()); |
| 1588 const Function& callee = | 1588 ASSERT(!code.is_optimized()); |
| 1589 Function::Handle(code.GetStaticCallTargetFunctionAt(bpt->pc_)); | 1589 const Function& callee = Function::Handle( |
| 1590 CodePatcher::GetUnoptimizedStaticCallTargetAt(bpt->pc_, code)); |
| 1590 ASSERT(!callee.IsNull()); | 1591 ASSERT(!callee.IsNull()); |
| 1591 if (IsDebuggable(callee)) { | 1592 if (IsDebuggable(callee)) { |
| 1592 func_to_instrument = callee.raw(); | 1593 func_to_instrument = callee.raw(); |
| 1593 } | 1594 } |
| 1594 } else if (bpt->breakpoint_kind_ == PcDescriptors::kClosureCall) { | 1595 } else if (bpt->breakpoint_kind_ == PcDescriptors::kClosureCall) { |
| 1595 func_to_instrument = bpt->function(); | 1596 func_to_instrument = bpt->function(); |
| 1596 const Code& code = Code::Handle(func_to_instrument.CurrentCode()); | 1597 const Code& code = Code::Handle(func_to_instrument.CurrentCode()); |
| 1597 ArgumentsDescriptor args_desc(Array::Handle( | 1598 ArgumentsDescriptor args_desc(Array::Handle( |
| 1598 CodePatcher::GetClosureArgDescAt(bpt->pc_, code))); | 1599 CodePatcher::GetClosureArgDescAt(bpt->pc_, code))); |
| 1599 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); | 1600 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 } | 1835 } |
| 1835 | 1836 |
| 1836 | 1837 |
| 1837 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1838 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1838 ASSERT(bpt->next() == NULL); | 1839 ASSERT(bpt->next() == NULL); |
| 1839 bpt->set_next(code_breakpoints_); | 1840 bpt->set_next(code_breakpoints_); |
| 1840 code_breakpoints_ = bpt; | 1841 code_breakpoints_ = bpt; |
| 1841 } | 1842 } |
| 1842 | 1843 |
| 1843 } // namespace dart | 1844 } // namespace dart |
| OLD | NEW |