| 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" |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 // if a valid closure is passed as the second argument, otherwise the shared | 494 // if a valid closure is passed as the second argument, otherwise the shared |
| 495 // function needs to be compiled already. | 495 // function needs to be compiled already. |
| 496 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, | 496 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
| 497 Handle<JSFunction> function); | 497 Handle<JSFunction> function); |
| 498 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 498 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
| 499 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared); | 499 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared); |
| 500 | 500 |
| 501 // This function is used in FunctionNameUsing* tests. | 501 // This function is used in FunctionNameUsing* tests. |
| 502 Handle<Object> FindSharedFunctionInfoInScript(Handle<Script> script, | 502 Handle<Object> FindSharedFunctionInfoInScript(Handle<Script> script, |
| 503 int position); | 503 int position); |
| 504 bool CollectSharedFunctionInfoInScript(Handle<Script> script); |
| 505 void ClearSharedFunctionInfoInScript(); |
| 504 | 506 |
| 505 // Returns true if the current stub call is patched to call the debugger. | 507 // Returns true if the current stub call is patched to call the debugger. |
| 506 static bool IsDebugBreak(Address addr); | 508 static bool IsDebugBreak(Address addr); |
| 507 | 509 |
| 508 static Handle<Object> GetSourceBreakLocations( | 510 static Handle<Object> GetSourceBreakLocations( |
| 509 Handle<SharedFunctionInfo> shared, | 511 Handle<SharedFunctionInfo> shared, |
| 510 BreakPositionAlignment position_aligment); | 512 BreakPositionAlignment position_aligment); |
| 511 | 513 |
| 512 // Check whether a global object is the debug global object. | 514 // Check whether a global object is the debug global object. |
| 513 bool IsDebugGlobal(GlobalObject* global); | 515 bool IsDebugGlobal(GlobalObject* global); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 bool is_suppressed_; | 674 bool is_suppressed_; |
| 673 bool live_edit_enabled_; | 675 bool live_edit_enabled_; |
| 674 bool has_break_points_; | 676 bool has_break_points_; |
| 675 bool break_disabled_; | 677 bool break_disabled_; |
| 676 bool in_debug_event_listener_; | 678 bool in_debug_event_listener_; |
| 677 bool break_on_exception_; | 679 bool break_on_exception_; |
| 678 bool break_on_uncaught_exception_; | 680 bool break_on_uncaught_exception_; |
| 679 | 681 |
| 680 ScriptCache* script_cache_; // Cache of all scripts in the heap. | 682 ScriptCache* script_cache_; // Cache of all scripts in the heap. |
| 681 DebugInfoListNode* debug_info_list_; // List of active debug info objects. | 683 DebugInfoListNode* debug_info_list_; // List of active debug info objects. |
| 684 List<Handle<SharedFunctionInfo> > shared_info_list_; |
| 682 | 685 |
| 683 // Storage location for jump when exiting debug break calls. | 686 // Storage location for jump when exiting debug break calls. |
| 684 // Note that this address is not GC safe. It should be computed immediately | 687 // Note that this address is not GC safe. It should be computed immediately |
| 685 // before returning to the DebugBreakCallHelper. | 688 // before returning to the DebugBreakCallHelper. |
| 686 Address after_break_target_; | 689 Address after_break_target_; |
| 687 | 690 |
| 688 // Per-thread data. | 691 // Per-thread data. |
| 689 class ThreadLocal { | 692 class ThreadLocal { |
| 690 public: | 693 public: |
| 691 // Top debugger entry. | 694 // Top debugger entry. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 // several frames above. | 842 // several frames above. |
| 840 // There is no calling conventions here, because it never actually gets | 843 // There is no calling conventions here, because it never actually gets |
| 841 // called, it only gets returned to. | 844 // called, it only gets returned to. |
| 842 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 845 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
| 843 }; | 846 }; |
| 844 | 847 |
| 845 | 848 |
| 846 } } // namespace v8::internal | 849 } } // namespace v8::internal |
| 847 | 850 |
| 848 #endif // V8_DEBUG_H_ | 851 #endif // V8_DEBUG_H_ |
| OLD | NEW |