| 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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 ASSERT(!IsPaused()); // No recursive pausing. | 2511 ASSERT(!IsPaused()); // No recursive pausing. |
| 2512 ASSERT(obj_cache_ == NULL); | 2512 ASSERT(obj_cache_ == NULL); |
| 2513 | 2513 |
| 2514 pause_event_ = event; | 2514 pause_event_ = event; |
| 2515 pause_event_->UpdateTimestamp(); | 2515 pause_event_->UpdateTimestamp(); |
| 2516 obj_cache_ = new RemoteObjectCache(64); | 2516 obj_cache_ = new RemoteObjectCache(64); |
| 2517 | 2517 |
| 2518 // We are about to invoke the debuggers event handler. Disable interrupts | 2518 // We are about to invoke the debuggers event handler. Disable interrupts |
| 2519 // for this thread while waiting for debug commands over the service protocol. | 2519 // for this thread while waiting for debug commands over the service protocol. |
| 2520 { | 2520 { |
| 2521 DisableThreadInterruptsScope dtis(Thread::Current()); | 2521 Thread* thread = Thread::Current(); |
| 2522 DisableThreadInterruptsScope dtis(thread); |
| 2523 TimelineDurationScope tds(thread, |
| 2524 isolate_->GetDebuggerStream(), |
| 2525 "Debugger Pause"); |
| 2522 InvokeEventHandler(event); | 2526 InvokeEventHandler(event); |
| 2523 } | 2527 } |
| 2524 | 2528 |
| 2525 pause_event_ = NULL; | 2529 pause_event_ = NULL; |
| 2526 obj_cache_ = NULL; // Zone allocated | 2530 obj_cache_ = NULL; // Zone allocated |
| 2527 } | 2531 } |
| 2528 | 2532 |
| 2529 | 2533 |
| 2530 void Debugger::EnterSingleStepMode() { | 2534 void Debugger::EnterSingleStepMode() { |
| 2531 stepping_fp_ = 0; | 2535 stepping_fp_ = 0; |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 } | 3254 } |
| 3251 | 3255 |
| 3252 | 3256 |
| 3253 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3257 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3254 ASSERT(bpt->next() == NULL); | 3258 ASSERT(bpt->next() == NULL); |
| 3255 bpt->set_next(code_breakpoints_); | 3259 bpt->set_next(code_breakpoints_); |
| 3256 code_breakpoints_ = bpt; | 3260 code_breakpoints_ = bpt; |
| 3257 } | 3261 } |
| 3258 | 3262 |
| 3259 } // namespace dart | 3263 } // namespace dart |
| OLD | NEW |