| 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 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1379 } | 1379 } |
| 1380 } | 1380 } |
| 1381 } else if (resume_action_ == kStepInto) { | 1381 } else if (resume_action_ == kStepInto) { |
| 1382 // If the call target is not debuggable, we treat StepInto like | 1382 // If the call target is not debuggable, we treat StepInto like |
| 1383 // a StepOver, that is we instrument the current function. | 1383 // a StepOver, that is we instrument the current function. |
| 1384 if (bpt->breakpoint_kind_ == PcDescriptors::kIcCall) { | 1384 if (bpt->breakpoint_kind_ == PcDescriptors::kIcCall) { |
| 1385 func_to_instrument = bpt->function(); | 1385 func_to_instrument = bpt->function(); |
| 1386 ICData& ic_data = ICData::Handle(); | 1386 ICData& ic_data = ICData::Handle(); |
| 1387 Array& descriptor = Array::Handle(); | 1387 Array& descriptor = Array::Handle(); |
| 1388 CodePatcher::GetInstanceCallAt(bpt->pc_, &ic_data, &descriptor); | 1388 CodePatcher::GetInstanceCallAt(bpt->pc_, &ic_data, &descriptor); |
| 1389 ArgumentsDescriptor arg_descriptor(descriptor.raw()); | 1389 ArgumentsDescriptor arg_descriptor(descriptor); |
| 1390 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); | 1390 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); |
| 1391 intptr_t num_args = arg_descriptor.Count(); | 1391 intptr_t num_args = arg_descriptor.Count(); |
| 1392 Instance& receiver = | 1392 Instance& receiver = |
| 1393 Instance::Handle(top_frame->GetInstanceCallReceiver(num_args)); | 1393 Instance::Handle(top_frame->GetInstanceCallReceiver(num_args)); |
| 1394 Code& code = | 1394 Code& code = |
| 1395 Code::Handle(ResolveCompileInstanceCallTarget(receiver, | 1395 Code::Handle(ResolveCompileInstanceCallTarget(receiver, |
| 1396 ic_data, | 1396 ic_data, |
| 1397 arg_descriptor)); | 1397 arg_descriptor)); |
| 1398 if (!code.IsNull()) { | 1398 if (!code.IsNull()) { |
| 1399 Function& callee = Function::Handle(code.function()); | 1399 Function& callee = Function::Handle(code.function()); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 | 1619 |
| 1620 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1620 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1621 ASSERT(bpt->next() == NULL); | 1621 ASSERT(bpt->next() == NULL); |
| 1622 bpt->set_next(code_breakpoints_); | 1622 bpt->set_next(code_breakpoints_); |
| 1623 code_breakpoints_ = bpt; | 1623 code_breakpoints_ = bpt; |
| 1624 } | 1624 } |
| 1625 | 1625 |
| 1626 } // namespace dart | 1626 } // namespace dart |
| OLD | NEW |