| 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 "platform/address_sanitizer.h" | 9 #include "platform/address_sanitizer.h" |
| 10 | 10 |
| (...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 delete bpt; | 1584 delete bpt; |
| 1585 } | 1585 } |
| 1586 if (NeedsIsolateEvents()) { | 1586 if (NeedsIsolateEvents()) { |
| 1587 ServiceEvent event(isolate_, ServiceEvent::kIsolateExit); | 1587 ServiceEvent event(isolate_, ServiceEvent::kIsolateExit); |
| 1588 InvokeEventHandler(&event); | 1588 InvokeEventHandler(&event); |
| 1589 } | 1589 } |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 | 1592 |
| 1593 void Debugger::OnIsolateRunnable() { | 1593 void Debugger::OnIsolateRunnable() { |
| 1594 if (!FLAG_async_debugger_stepping) { | |
| 1595 // We don't have async debugger stepping enabled. | |
| 1596 return; | |
| 1597 } | |
| 1598 Thread::EnterIsolate(isolate_); | |
| 1599 Thread* thread = Thread::Current(); | |
| 1600 ASSERT(thread != NULL); | |
| 1601 { | |
| 1602 StackZone zone(thread); | |
| 1603 HandleScope handle_scope(thread); | |
| 1604 | |
| 1605 const Library& async_lib = | |
| 1606 Library::Handle(zone.GetZone(), Library::AsyncLibrary()); | |
| 1607 // Grab the _AsyncStarStreamController class. | |
| 1608 const Class& controller_class = Class::Handle( | |
| 1609 zone.GetZone(), async_lib.LookupClassAllowPrivate( | |
| 1610 Symbols::_AsyncStarStreamController())); | |
| 1611 const Array& functions = | |
| 1612 Array::Handle(zone.GetZone(), controller_class.functions()); | |
| 1613 Function& function = Function::Handle(zone.GetZone()); | |
| 1614 // Mark all functions as not debuggable or inlinable. | |
| 1615 for (intptr_t i = 0; i < functions.Length(); i++) { | |
| 1616 function ^= functions.At(i); | |
| 1617 if (function.IsNull()) { | |
| 1618 break; | |
| 1619 } | |
| 1620 function.set_is_debuggable(false); | |
| 1621 function.set_is_inlinable(false); | |
| 1622 } | |
| 1623 } | |
| 1624 Thread::ExitIsolate(); | |
| 1625 } | 1594 } |
| 1626 | 1595 |
| 1627 | 1596 |
| 1628 static RawFunction* ResolveLibraryFunction(const Library& library, | 1597 static RawFunction* ResolveLibraryFunction(const Library& library, |
| 1629 const String& fname) { | 1598 const String& fname) { |
| 1630 ASSERT(!library.IsNull()); | 1599 ASSERT(!library.IsNull()); |
| 1631 const Object& object = Object::Handle(library.ResolveName(fname)); | 1600 const Object& object = Object::Handle(library.ResolveName(fname)); |
| 1632 if (!object.IsNull() && object.IsFunction()) { | 1601 if (!object.IsNull() && object.IsFunction()) { |
| 1633 return Function::Cast(object).raw(); | 1602 return Function::Cast(object).raw(); |
| 1634 } | 1603 } |
| (...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4184 | 4153 |
| 4185 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 4154 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 4186 ASSERT(bpt->next() == NULL); | 4155 ASSERT(bpt->next() == NULL); |
| 4187 bpt->set_next(code_breakpoints_); | 4156 bpt->set_next(code_breakpoints_); |
| 4188 code_breakpoints_ = bpt; | 4157 code_breakpoints_ = bpt; |
| 4189 } | 4158 } |
| 4190 | 4159 |
| 4191 #endif // !PRODUCT | 4160 #endif // !PRODUCT |
| 4192 | 4161 |
| 4193 } // namespace dart | 4162 } // namespace dart |
| OLD | NEW |