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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 Array& descriptor = Array::Handle(); | 1402 Array& descriptor = Array::Handle(); |
1403 CodePatcher::GetInstanceCallAt(bpt->pc_, &ic_data, &descriptor); | 1403 CodePatcher::GetInstanceCallAt(bpt->pc_, &ic_data, &descriptor); |
1404 ArgumentsDescriptor arg_descriptor(descriptor); | 1404 ArgumentsDescriptor arg_descriptor(descriptor); |
1405 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); | 1405 ActivationFrame* top_frame = stack_trace->ActivationFrameAt(0); |
1406 intptr_t num_args = arg_descriptor.Count(); | 1406 intptr_t num_args = arg_descriptor.Count(); |
1407 Instance& receiver = | 1407 Instance& receiver = |
1408 Instance::Handle(top_frame->GetInstanceCallReceiver(num_args)); | 1408 Instance::Handle(top_frame->GetInstanceCallReceiver(num_args)); |
1409 Code& code = | 1409 Code& code = |
1410 Code::Handle(ResolveCompileInstanceCallTarget(receiver, | 1410 Code::Handle(ResolveCompileInstanceCallTarget(receiver, |
1411 ic_data, | 1411 ic_data, |
1412 arg_descriptor)); | 1412 descriptor)); |
1413 if (!code.IsNull()) { | 1413 if (!code.IsNull()) { |
1414 Function& callee = Function::Handle(code.function()); | 1414 Function& callee = Function::Handle(code.function()); |
1415 if (IsDebuggable(callee)) { | 1415 if (IsDebuggable(callee)) { |
1416 func_to_instrument = callee.raw(); | 1416 func_to_instrument = callee.raw(); |
1417 } | 1417 } |
1418 } | 1418 } |
1419 } else if (bpt->breakpoint_kind_ == PcDescriptors::kFuncCall) { | 1419 } else if (bpt->breakpoint_kind_ == PcDescriptors::kFuncCall) { |
1420 func_to_instrument = bpt->function(); | 1420 func_to_instrument = bpt->function(); |
1421 const Code& code = Code::Handle(func_to_instrument.CurrentCode()); | 1421 const Code& code = Code::Handle(func_to_instrument.CurrentCode()); |
1422 const Function& callee = | 1422 const Function& callee = |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 } | 1632 } |
1633 | 1633 |
1634 | 1634 |
1635 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1635 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
1636 ASSERT(bpt->next() == NULL); | 1636 ASSERT(bpt->next() == NULL); |
1637 bpt->set_next(code_breakpoints_); | 1637 bpt->set_next(code_breakpoints_); |
1638 code_breakpoints_ = bpt; | 1638 code_breakpoints_ = bpt; |
1639 } | 1639 } |
1640 | 1640 |
1641 } // namespace dart | 1641 } // namespace dart |
OLD | NEW |