| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 void ClearStepOut(); | 463 void ClearStepOut(); |
| 464 | 464 |
| 465 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); | 465 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); |
| 466 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, | 466 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, |
| 467 int end_position, std::set<int>* positions); | 467 int end_position, std::set<int>* positions); |
| 468 | 468 |
| 469 void RecordGenerator(Handle<JSGeneratorObject> generator_object); | 469 void RecordGenerator(Handle<JSGeneratorObject> generator_object); |
| 470 | 470 |
| 471 int NextAsyncTaskId(Handle<JSObject> promise); | 471 int NextAsyncTaskId(Handle<JSObject> promise); |
| 472 | 472 |
| 473 void SetAsyncTaskListener(debug::AsyncTaskListener listener, void* data); |
| 474 |
| 473 // Returns whether the operation succeeded. Compilation can only be triggered | 475 // Returns whether the operation succeeded. Compilation can only be triggered |
| 474 // if a valid closure is passed as the second argument, otherwise the shared | 476 // if a valid closure is passed as the second argument, otherwise the shared |
| 475 // function needs to be compiled already. | 477 // function needs to be compiled already. |
| 476 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, | 478 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
| 477 Handle<JSFunction> function); | 479 Handle<JSFunction> function); |
| 478 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); | 480 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); |
| 479 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 481 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
| 480 | 482 |
| 481 template <typename C> | 483 template <typename C> |
| 482 bool CompileToRevealInnerFunctions(C* compilable); | 484 bool CompileToRevealInnerFunctions(C* compilable); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 | 661 |
| 660 void PrintBreakLocation(); | 662 void PrintBreakLocation(); |
| 661 | 663 |
| 662 // Global handles. | 664 // Global handles. |
| 663 Handle<Context> debug_context_; | 665 Handle<Context> debug_context_; |
| 664 Handle<Object> event_listener_; | 666 Handle<Object> event_listener_; |
| 665 Handle<Object> event_listener_data_; | 667 Handle<Object> event_listener_data_; |
| 666 | 668 |
| 667 v8::Debug::MessageHandler message_handler_; | 669 v8::Debug::MessageHandler message_handler_; |
| 668 | 670 |
| 671 debug::AsyncTaskListener async_task_listener_ = nullptr; |
| 672 void* async_task_listener_data_ = nullptr; |
| 673 |
| 669 static const int kQueueInitialSize = 4; | 674 static const int kQueueInitialSize = 4; |
| 670 base::Semaphore command_received_; // Signaled for each command received. | 675 base::Semaphore command_received_; // Signaled for each command received. |
| 671 LockingCommandMessageQueue command_queue_; | 676 LockingCommandMessageQueue command_queue_; |
| 672 | 677 |
| 673 // Debugger is active, i.e. there is a debug event listener attached. | 678 // Debugger is active, i.e. there is a debug event listener attached. |
| 674 bool is_active_; | 679 bool is_active_; |
| 675 // Debugger needs to be notified on every new function call. | 680 // Debugger needs to be notified on every new function call. |
| 676 // Used for stepping and read-only checks | 681 // Used for stepping and read-only checks |
| 677 bool hook_on_function_call_; | 682 bool hook_on_function_call_; |
| 678 // Suppress debug events. | 683 // Suppress debug events. |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 Handle<Code> code); | 874 Handle<Code> code); |
| 870 static bool DebugBreakSlotIsPatched(Address pc); | 875 static bool DebugBreakSlotIsPatched(Address pc); |
| 871 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 876 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 872 }; | 877 }; |
| 873 | 878 |
| 874 | 879 |
| 875 } // namespace internal | 880 } // namespace internal |
| 876 } // namespace v8 | 881 } // namespace v8 |
| 877 | 882 |
| 878 #endif // V8_DEBUG_DEBUG_H_ | 883 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |