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