| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 void ClearStepOut(); | 459 void ClearStepOut(); |
| 460 | 460 |
| 461 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); | 461 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); |
| 462 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, | 462 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, |
| 463 int end_position, std::set<int>* positions); | 463 int end_position, std::set<int>* positions); |
| 464 | 464 |
| 465 void RecordGenerator(Handle<JSGeneratorObject> generator_object); | 465 void RecordGenerator(Handle<JSGeneratorObject> generator_object); |
| 466 | 466 |
| 467 int NextAsyncTaskId(Handle<JSObject> promise); | 467 int NextAsyncTaskId(Handle<JSObject> promise); |
| 468 | 468 |
| 469 void OnNewSharedFunctionInfo(Handle<SharedFunctionInfo> shared); |
| 470 |
| 471 void SetIsBlackboxedCallback(debug::IsBlackboxedCallback callback, |
| 472 void* data); |
| 473 |
| 469 void SetDebugEventListener(debug::DebugEventListener* listener); | 474 void SetDebugEventListener(debug::DebugEventListener* listener); |
| 470 | 475 |
| 471 // Returns whether the operation succeeded. Compilation can only be triggered | 476 // Returns whether the operation succeeded. Compilation can only be triggered |
| 472 // if a valid closure is passed as the second argument, otherwise the shared | 477 // if a valid closure is passed as the second argument, otherwise the shared |
| 473 // function needs to be compiled already. | 478 // function needs to be compiled already. |
| 474 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, | 479 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
| 475 Handle<JSFunction> function); | 480 Handle<JSFunction> function); |
| 476 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); | 481 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); |
| 477 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 482 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
| 478 | 483 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 | 677 |
| 673 // Global handles. | 678 // Global handles. |
| 674 Handle<Context> debug_context_; | 679 Handle<Context> debug_context_; |
| 675 Handle<Object> event_listener_; | 680 Handle<Object> event_listener_; |
| 676 Handle<Object> event_listener_data_; | 681 Handle<Object> event_listener_data_; |
| 677 | 682 |
| 678 v8::Debug::MessageHandler message_handler_; | 683 v8::Debug::MessageHandler message_handler_; |
| 679 | 684 |
| 680 debug::DebugEventListener* debug_event_listener_ = nullptr; | 685 debug::DebugEventListener* debug_event_listener_ = nullptr; |
| 681 | 686 |
| 687 debug::IsBlackboxedCallback is_blackboxed_callback_ = nullptr; |
| 688 void* is_blackboxed_callback_data_ = nullptr; |
| 689 |
| 682 static const int kQueueInitialSize = 4; | 690 static const int kQueueInitialSize = 4; |
| 683 base::Semaphore command_received_; // Signaled for each command received. | 691 base::Semaphore command_received_; // Signaled for each command received. |
| 684 LockingCommandMessageQueue command_queue_; | 692 LockingCommandMessageQueue command_queue_; |
| 685 | 693 |
| 686 // Debugger is active, i.e. there is a debug event listener attached. | 694 // Debugger is active, i.e. there is a debug event listener attached. |
| 687 bool is_active_; | 695 bool is_active_; |
| 688 // Debugger needs to be notified on every new function call. | 696 // Debugger needs to be notified on every new function call. |
| 689 // Used for stepping and read-only checks | 697 // Used for stepping and read-only checks |
| 690 bool hook_on_function_call_; | 698 bool hook_on_function_call_; |
| 691 // Suppress debug events. | 699 // Suppress debug events. |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 Handle<Code> code); | 890 Handle<Code> code); |
| 883 static bool DebugBreakSlotIsPatched(Address pc); | 891 static bool DebugBreakSlotIsPatched(Address pc); |
| 884 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 892 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 885 }; | 893 }; |
| 886 | 894 |
| 887 | 895 |
| 888 } // namespace internal | 896 } // namespace internal |
| 889 } // namespace v8 | 897 } // namespace v8 |
| 890 | 898 |
| 891 #endif // V8_DEBUG_DEBUG_H_ | 899 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |