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