| 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 void SetDebugEventListener(debug::DebugEventListener* listener); | 470 bool IsBlackboxed(Handle<SharedFunctionInfo> shared); |
| 471 |
| 472 void SetDebugDelegate(debug::DebugDelegate* delegate); |
| 471 | 473 |
| 472 // Returns whether the operation succeeded. Compilation can only be triggered | 474 // Returns whether the operation succeeded. Compilation can only be triggered |
| 473 // if a valid closure is passed as the second argument, otherwise the shared | 475 // if a valid closure is passed as the second argument, otherwise the shared |
| 474 // function needs to be compiled already. | 476 // function needs to be compiled already. |
| 475 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, | 477 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
| 476 Handle<JSFunction> function); | 478 Handle<JSFunction> function); |
| 477 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); | 479 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); |
| 478 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 480 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
| 479 | 481 |
| 480 template <typename C> | 482 template <typename C> |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 673 |
| 672 void PrintBreakLocation(); | 674 void PrintBreakLocation(); |
| 673 | 675 |
| 674 // Global handles. | 676 // Global handles. |
| 675 Handle<Context> debug_context_; | 677 Handle<Context> debug_context_; |
| 676 Handle<Object> event_listener_; | 678 Handle<Object> event_listener_; |
| 677 Handle<Object> event_listener_data_; | 679 Handle<Object> event_listener_data_; |
| 678 | 680 |
| 679 v8::Debug::MessageHandler message_handler_; | 681 v8::Debug::MessageHandler message_handler_; |
| 680 | 682 |
| 681 debug::DebugEventListener* debug_event_listener_ = nullptr; | 683 debug::DebugDelegate* debug_delegate_ = nullptr; |
| 682 | 684 |
| 683 static const int kQueueInitialSize = 4; | 685 static const int kQueueInitialSize = 4; |
| 684 base::Semaphore command_received_; // Signaled for each command received. | 686 base::Semaphore command_received_; // Signaled for each command received. |
| 685 LockingCommandMessageQueue command_queue_; | 687 LockingCommandMessageQueue command_queue_; |
| 686 | 688 |
| 687 // Debugger is active, i.e. there is a debug event listener attached. | 689 // Debugger is active, i.e. there is a debug event listener attached. |
| 688 bool is_active_; | 690 bool is_active_; |
| 689 // Debugger needs to be notified on every new function call. | 691 // Debugger needs to be notified on every new function call. |
| 690 // Used for stepping and read-only checks | 692 // Used for stepping and read-only checks |
| 691 bool hook_on_function_call_; | 693 bool hook_on_function_call_; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 Handle<Code> code); | 885 Handle<Code> code); |
| 884 static bool DebugBreakSlotIsPatched(Address pc); | 886 static bool DebugBreakSlotIsPatched(Address pc); |
| 885 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 887 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 886 }; | 888 }; |
| 887 | 889 |
| 888 | 890 |
| 889 } // namespace internal | 891 } // namespace internal |
| 890 } // namespace v8 | 892 } // namespace v8 |
| 891 | 893 |
| 892 #endif // V8_DEBUG_DEBUG_H_ | 894 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |