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_H_ | 5 #ifndef V8_DEBUG_H_ |
6 #define V8_DEBUG_H_ | 6 #define V8_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" |
11 #include "src/base/atomicops.h" | 11 #include "src/base/atomicops.h" |
12 #include "src/base/platform/platform.h" | 12 #include "src/base/platform/platform.h" |
13 #include "src/execution.h" | 13 #include "src/execution.h" |
14 #include "src/factory.h" | 14 #include "src/factory.h" |
15 #include "src/flags.h" | 15 #include "src/flags.h" |
16 #include "src/frames-inl.h" | 16 #include "src/frames-inl.h" |
17 #include "src/hashmap.h" | 17 #include "src/hashmap.h" |
18 #include "src/liveedit.h" | 18 #include "src/liveedit.h" |
| 19 #include "src/runtime/runtime.h" |
19 #include "src/string-stream.h" | 20 #include "src/string-stream.h" |
20 #include "src/v8threads.h" | 21 #include "src/v8threads.h" |
21 | 22 |
22 #include "include/v8-debug.h" | 23 #include "include/v8-debug.h" |
23 | 24 |
24 namespace v8 { | 25 namespace v8 { |
25 namespace internal { | 26 namespace internal { |
26 | 27 |
27 | 28 |
28 // Forward declarations. | 29 // Forward declarations. |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 friend class LiveEdit; | 699 friend class LiveEdit; |
699 friend class SuppressDebug; | 700 friend class SuppressDebug; |
700 | 701 |
701 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc | 702 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc |
702 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc | 703 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc |
703 | 704 |
704 DISALLOW_COPY_AND_ASSIGN(Debug); | 705 DISALLOW_COPY_AND_ASSIGN(Debug); |
705 }; | 706 }; |
706 | 707 |
707 | 708 |
708 DECLARE_RUNTIME_FUNCTION(Debug_Break); | |
709 | |
710 | |
711 // This scope is used to load and enter the debug context and create a new | 709 // This scope is used to load and enter the debug context and create a new |
712 // break state. Leaving the scope will restore the previous state. | 710 // break state. Leaving the scope will restore the previous state. |
713 // On failure to load, FailedToEnter returns true. | 711 // On failure to load, FailedToEnter returns true. |
714 class DebugScope BASE_EMBEDDED { | 712 class DebugScope BASE_EMBEDDED { |
715 public: | 713 public: |
716 explicit DebugScope(Debug* debug); | 714 explicit DebugScope(Debug* debug); |
717 ~DebugScope(); | 715 ~DebugScope(); |
718 | 716 |
719 // Check whether loading was successful. | 717 // Check whether loading was successful. |
720 inline bool failed() { return failed_; } | 718 inline bool failed() { return failed_; } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 int call_argc = -1); | 795 int call_argc = -1); |
798 | 796 |
799 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); | 797 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); |
800 static void ClearDebugBreakSlot(Address pc); | 798 static void ClearDebugBreakSlot(Address pc); |
801 }; | 799 }; |
802 | 800 |
803 | 801 |
804 } } // namespace v8::internal | 802 } } // namespace v8::internal |
805 | 803 |
806 #endif // V8_DEBUG_H_ | 804 #endif // V8_DEBUG_H_ |
OLD | NEW |