| 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" |
| 11 #include "vm/compiler.h" | 11 #include "vm/compiler.h" |
| 12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/deopt_instructions.h" | 13 #include "vm/deopt_instructions.h" |
| 14 #include "vm/flags.h" | 14 #include "vm/flags.h" |
| 15 #include "vm/globals.h" | 15 #include "vm/globals.h" |
| 16 #include "vm/longjump.h" | 16 #include "vm/longjump.h" |
| 17 #include "vm/json_stream.h" | 17 #include "vm/json_stream.h" |
| 18 #include "vm/message_handler.h" | 18 #include "vm/message_handler.h" |
| 19 #include "vm/object.h" | 19 #include "vm/object.h" |
| 20 #include "vm/object_store.h" | 20 #include "vm/object_store.h" |
| 21 #include "vm/os.h" | 21 #include "vm/os.h" |
| 22 #include "vm/port.h" | 22 #include "vm/port.h" |
| 23 #include "vm/service_event.h" | 23 #include "vm/service_event.h" |
| 24 #include "vm/service_isolate.h" | 24 #include "vm/service_isolate.h" |
| 25 #include "vm/service.h" | 25 #include "vm/service.h" |
| 26 #include "vm/stack_frame.h" | 26 #include "vm/stack_frame.h" |
| 27 #include "vm/stub_code.h" | 27 #include "vm/stub_code.h" |
| 28 #include "vm/symbols.h" | 28 #include "vm/symbols.h" |
| 29 #include "vm/thread_interrupter.h" | 29 #include "vm/thread_interrupter.h" |
| 30 #include "vm/timeline.h" |
| 30 #include "vm/token_position.h" | 31 #include "vm/token_position.h" |
| 31 #include "vm/visitor.h" | 32 #include "vm/visitor.h" |
| 32 | 33 |
| 33 | 34 |
| 34 namespace dart { | 35 namespace dart { |
| 35 | 36 |
| 36 DEFINE_FLAG(bool, show_invisible_frames, false, | 37 DEFINE_FLAG(bool, show_invisible_frames, false, |
| 37 "Show invisible frames in debugger stack traces"); | 38 "Show invisible frames in debugger stack traces"); |
| 38 DEFINE_FLAG(bool, trace_debugger_stacktrace, false, | 39 DEFINE_FLAG(bool, trace_debugger_stacktrace, false, |
| 39 "Trace debugger stacktrace collection"); | 40 "Trace debugger stacktrace collection"); |
| (...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2551 pause_event_ = event; | 2552 pause_event_ = event; |
| 2552 pause_event_->UpdateTimestamp(); | 2553 pause_event_->UpdateTimestamp(); |
| 2553 obj_cache_ = new RemoteObjectCache(64); | 2554 obj_cache_ = new RemoteObjectCache(64); |
| 2554 | 2555 |
| 2555 // We are about to invoke the debuggers event handler. Disable interrupts | 2556 // We are about to invoke the debuggers event handler. Disable interrupts |
| 2556 // for this thread while waiting for debug commands over the service protocol. | 2557 // for this thread while waiting for debug commands over the service protocol. |
| 2557 { | 2558 { |
| 2558 Thread* thread = Thread::Current(); | 2559 Thread* thread = Thread::Current(); |
| 2559 DisableThreadInterruptsScope dtis(thread); | 2560 DisableThreadInterruptsScope dtis(thread); |
| 2560 TimelineDurationScope tds(thread, | 2561 TimelineDurationScope tds(thread, |
| 2561 isolate_->GetDebuggerStream(), | 2562 Timeline::GetDebuggerStream(), |
| 2562 "Debugger Pause"); | 2563 "Debugger Pause"); |
| 2563 InvokeEventHandler(event); | 2564 InvokeEventHandler(event); |
| 2564 } | 2565 } |
| 2565 | 2566 |
| 2566 pause_event_ = NULL; | 2567 pause_event_ = NULL; |
| 2567 obj_cache_ = NULL; // Zone allocated | 2568 obj_cache_ = NULL; // Zone allocated |
| 2568 } | 2569 } |
| 2569 | 2570 |
| 2570 | 2571 |
| 2571 void Debugger::EnterSingleStepMode() { | 2572 void Debugger::EnterSingleStepMode() { |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3344 | 3345 |
| 3345 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3346 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3346 ASSERT(bpt->next() == NULL); | 3347 ASSERT(bpt->next() == NULL); |
| 3347 bpt->set_next(code_breakpoints_); | 3348 bpt->set_next(code_breakpoints_); |
| 3348 code_breakpoints_ = bpt; | 3349 code_breakpoints_ = bpt; |
| 3349 } | 3350 } |
| 3350 | 3351 |
| 3351 #endif // !PRODUCT | 3352 #endif // !PRODUCT |
| 3352 | 3353 |
| 3353 } // namespace dart | 3354 } // namespace dart |
| OLD | NEW |