OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_DEBUG_DEBUG_H_ | 5 #ifndef V8_DEBUG_DEBUG_H_ |
6 #define V8_DEBUG_DEBUG_H_ | 6 #define V8_DEBUG_DEBUG_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 return is_active() && !debug_context().is_null() && break_id() != 0 && | 487 return is_active() && !debug_context().is_null() && break_id() != 0 && |
488 break_id() == id; | 488 break_id() == id; |
489 } | 489 } |
490 | 490 |
491 // Flags and states. | 491 // Flags and states. |
492 DebugScope* debugger_entry() { | 492 DebugScope* debugger_entry() { |
493 return reinterpret_cast<DebugScope*>( | 493 return reinterpret_cast<DebugScope*>( |
494 base::NoBarrier_Load(&thread_local_.current_debug_scope_)); | 494 base::NoBarrier_Load(&thread_local_.current_debug_scope_)); |
495 } | 495 } |
496 inline Handle<Context> debug_context() { return debug_context_; } | 496 inline Handle<Context> debug_context() { return debug_context_; } |
| 497 inline Handle<Object> debug_utils() { |
| 498 AssertDebugContext(); |
| 499 return isolate_->natives_utils_object(); |
| 500 } |
| 501 |
497 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } | 502 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } |
498 bool live_edit_enabled() const { | 503 bool live_edit_enabled() const { |
499 return FLAG_enable_liveedit && live_edit_enabled_ ; | 504 return FLAG_enable_liveedit && live_edit_enabled_ ; |
500 } | 505 } |
501 | 506 |
502 inline bool is_active() const { return is_active_; } | 507 inline bool is_active() const { return is_active_; } |
503 inline bool is_loaded() const { return !debug_context_.is_null(); } | 508 inline bool is_loaded() const { return !debug_context_.is_null(); } |
504 inline bool in_debug_scope() const { | 509 inline bool in_debug_scope() const { |
505 return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_); | 510 return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_); |
506 } | 511 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 Handle<Script> script); | 585 Handle<Script> script); |
581 void ProcessDebugEvent(v8::DebugEvent event, | 586 void ProcessDebugEvent(v8::DebugEvent event, |
582 Handle<JSObject> event_data, | 587 Handle<JSObject> event_data, |
583 bool auto_continue); | 588 bool auto_continue); |
584 void NotifyMessageHandler(v8::DebugEvent event, | 589 void NotifyMessageHandler(v8::DebugEvent event, |
585 Handle<JSObject> exec_state, | 590 Handle<JSObject> exec_state, |
586 Handle<JSObject> event_data, | 591 Handle<JSObject> event_data, |
587 bool auto_continue); | 592 bool auto_continue); |
588 void InvokeMessageHandler(MessageImpl message); | 593 void InvokeMessageHandler(MessageImpl message); |
589 | 594 |
590 static bool CompileDebuggerScript(Isolate* isolate, int index); | |
591 void ClearOneShot(); | 595 void ClearOneShot(); |
592 void ActivateStepIn(StackFrame* frame); | 596 void ActivateStepIn(StackFrame* frame); |
593 void ClearStepIn(); | 597 void ClearStepIn(); |
594 void ActivateStepOut(StackFrame* frame); | 598 void ActivateStepOut(StackFrame* frame); |
595 void ClearStepNext(); | 599 void ClearStepNext(); |
596 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); | 600 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); |
597 Handle<Object> CheckBreakPoints(Handle<Object> break_point); | 601 Handle<Object> CheckBreakPoints(Handle<Object> break_point); |
598 bool CheckBreakPoint(Handle<Object> break_point_object); | 602 bool CheckBreakPoint(Handle<Object> break_point_object); |
599 | 603 |
600 inline void AssertDebugContext() { | 604 inline void AssertDebugContext() { |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 int call_argc = -1); | 790 int call_argc = -1); |
787 | 791 |
788 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); | 792 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); |
789 static void ClearDebugBreakSlot(Address pc); | 793 static void ClearDebugBreakSlot(Address pc); |
790 }; | 794 }; |
791 | 795 |
792 | 796 |
793 } } // namespace v8::internal | 797 } } // namespace v8::internal |
794 | 798 |
795 #endif // V8_DEBUG_DEBUG_H_ | 799 #endif // V8_DEBUG_DEBUG_H_ |
OLD | NEW |