| 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1561 } else if (resume_action_ == kStepInto) { | 1561 } else if (resume_action_ == kStepInto) { |
| 1562 // If the call target is not debuggable, we treat StepInto like | 1562 // If the call target is not debuggable, we treat StepInto like |
| 1563 // a StepOver, that is we instrument the current function. | 1563 // a StepOver, that is we instrument the current function. |
| 1564 if (bpt->breakpoint_kind_ == PcDescriptors::kIcCall) { | 1564 if (bpt->breakpoint_kind_ == PcDescriptors::kIcCall) { |
| 1565 func_to_instrument = bpt->function(); | 1565 func_to_instrument = bpt->function(); |
| 1566 ICData& ic_data = ICData::Handle(); | 1566 ICData& ic_data = ICData::Handle(); |
| 1567 Array& descriptor = Array::Handle(); | 1567 Array& descriptor = Array::Handle(); |
| 1568 const Code& code = | 1568 const Code& code = |
| 1569 Code::Handle(Function::Handle(bpt->function_).unoptimized_code()); | 1569 Code::Handle(Function::Handle(bpt->function_).unoptimized_code()); |
| 1570 CodePatcher::GetInstanceCallAt(bpt->pc_, code, &ic_data, &descriptor); | 1570 CodePatcher::GetInstanceCallAt(bpt->pc_, code, &ic_data, &descriptor); |
| 1571 ArgumentsDescriptor arg_descriptor(descriptor); | 1571 ArgumentsDescriptor args_descriptor(descriptor); |
| 1572 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); | 1572 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); |
| 1573 intptr_t num_args = arg_descriptor.Count(); | 1573 intptr_t num_args = args_descriptor.Count(); |
| 1574 Instance& receiver = | 1574 Instance& receiver = |
| 1575 Instance::Handle(top_frame->GetInstanceCallReceiver(num_args)); | 1575 Instance::Handle(top_frame->GetInstanceCallReceiver(num_args)); |
| 1576 Code& target_code = | 1576 Code& target_code = |
| 1577 Code::Handle(ResolveCompileInstanceCallTarget(receiver, | 1577 Code::Handle(ResolveCompileInstanceCallTarget(receiver, |
| 1578 ic_data, | 1578 ic_data, |
| 1579 descriptor)); | 1579 descriptor)); |
| 1580 if (!target_code.IsNull()) { | 1580 if (!target_code.IsNull()) { |
| 1581 Function& callee = Function::Handle(target_code.function()); | 1581 Function& callee = Function::Handle(target_code.function()); |
| 1582 if (IsDebuggable(callee)) { | 1582 if (IsDebuggable(callee)) { |
| 1583 func_to_instrument = callee.raw(); | 1583 func_to_instrument = callee.raw(); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 | 1837 |
| 1838 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1838 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1839 ASSERT(bpt->next() == NULL); | 1839 ASSERT(bpt->next() == NULL); |
| 1840 bpt->set_next(code_breakpoints_); | 1840 bpt->set_next(code_breakpoints_); |
| 1841 code_breakpoints_ = bpt; | 1841 code_breakpoints_ = bpt; |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 } // namespace dart | 1844 } // namespace dart |
| OLD | NEW |