| 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 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 void Debugger::Initialize(Isolate* isolate) { | 2233 void Debugger::Initialize(Isolate* isolate) { |
| 2234 if (initialized_) { | 2234 if (initialized_) { |
| 2235 return; | 2235 return; |
| 2236 } | 2236 } |
| 2237 isolate_ = isolate; | 2237 isolate_ = isolate; |
| 2238 // Use the isolate's control port as the isolate_id for debugging. | 2238 // Use the isolate's control port as the isolate_id for debugging. |
| 2239 // This port will be used as a unique ID to represet the isolate in the | 2239 // This port will be used as a unique ID to represet the isolate in the |
| 2240 // debugger wire protocol messages. | 2240 // debugger wire protocol messages. |
| 2241 isolate_id_ = isolate->main_port(); | 2241 isolate_id_ = isolate->main_port(); |
| 2242 initialized_ = true; | 2242 initialized_ = true; |
| 2243 } |
| 2243 | 2244 |
| 2245 |
| 2246 void Debugger::NotifyIsolateCreated() { |
| 2244 // Signal isolate creation event. | 2247 // Signal isolate creation event. |
| 2245 SignalIsolateEvent(DebuggerEvent::kIsolateCreated); | 2248 SignalIsolateEvent(DebuggerEvent::kIsolateCreated); |
| 2246 } | 2249 } |
| 2247 | 2250 |
| 2248 | 2251 |
| 2249 // Return innermost closure contained in 'function' that contains | 2252 // Return innermost closure contained in 'function' that contains |
| 2250 // the given token position. | 2253 // the given token position. |
| 2251 RawFunction* Debugger::FindInnermostClosure(const Function& function, | 2254 RawFunction* Debugger::FindInnermostClosure(const Function& function, |
| 2252 intptr_t token_pos) { | 2255 intptr_t token_pos) { |
| 2253 const Class& owner = Class::Handle(isolate_, function.Owner()); | 2256 const Class& owner = Class::Handle(isolate_, function.Owner()); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 } | 2489 } |
| 2487 | 2490 |
| 2488 | 2491 |
| 2489 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2492 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 2490 ASSERT(bpt->next() == NULL); | 2493 ASSERT(bpt->next() == NULL); |
| 2491 bpt->set_next(code_breakpoints_); | 2494 bpt->set_next(code_breakpoints_); |
| 2492 code_breakpoints_ = bpt; | 2495 code_breakpoints_ = bpt; |
| 2493 } | 2496 } |
| 2494 | 2497 |
| 2495 } // namespace dart | 2498 } // namespace dart |
| OLD | NEW |