| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 | 454 |
| 455 // Stepping handling. | 455 // Stepping handling. |
| 456 void PrepareStep(StepAction step_action); | 456 void PrepareStep(StepAction step_action); |
| 457 void PrepareStepIn(Handle<JSFunction> function); | 457 void PrepareStepIn(Handle<JSFunction> function); |
| 458 void PrepareStepInSuspendedGenerator(); | 458 void PrepareStepInSuspendedGenerator(); |
| 459 void PrepareStepOnThrow(); | 459 void PrepareStepOnThrow(); |
| 460 void ClearStepping(); | 460 void ClearStepping(); |
| 461 void ClearStepOut(); | 461 void ClearStepOut(); |
| 462 | 462 |
| 463 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); | 463 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); |
| 464 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, |
| 465 int end_position, std::vector<int>& positions); |
| 464 | 466 |
| 465 void RecordAsyncFunction(Handle<JSGeneratorObject> generator_object); | 467 void RecordAsyncFunction(Handle<JSGeneratorObject> generator_object); |
| 466 | 468 |
| 467 // Returns whether the operation succeeded. Compilation can only be triggered | 469 // Returns whether the operation succeeded. Compilation can only be triggered |
| 468 // if a valid closure is passed as the second argument, otherwise the shared | 470 // if a valid closure is passed as the second argument, otherwise the shared |
| 469 // function needs to be compiled already. | 471 // function needs to be compiled already. |
| 470 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, | 472 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
| 471 Handle<JSFunction> function); | 473 Handle<JSFunction> function); |
| 472 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); | 474 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); |
| 473 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 475 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 bool auto_continue); | 612 bool auto_continue); |
| 611 void NotifyMessageHandler(v8::DebugEvent event, | 613 void NotifyMessageHandler(v8::DebugEvent event, |
| 612 Handle<JSObject> exec_state, | 614 Handle<JSObject> exec_state, |
| 613 Handle<JSObject> event_data, | 615 Handle<JSObject> event_data, |
| 614 bool auto_continue); | 616 bool auto_continue); |
| 615 void InvokeMessageHandler(MessageImpl message); | 617 void InvokeMessageHandler(MessageImpl message); |
| 616 | 618 |
| 617 // Find the closest source position for a break point for a given position. | 619 // Find the closest source position for a break point for a given position. |
| 618 int FindBreakablePosition(Handle<DebugInfo> debug_info, int source_position, | 620 int FindBreakablePosition(Handle<DebugInfo> debug_info, int source_position, |
| 619 BreakPositionAlignment alignment); | 621 BreakPositionAlignment alignment); |
| 622 void FindBreakablePositions(Handle<DebugInfo> debug_info, int start_offset, |
| 623 int end_offset, BreakPositionAlignment alignment, |
| 624 std::vector<int>& offsets); |
| 620 // Instrument code to break at break points. | 625 // Instrument code to break at break points. |
| 621 void ApplyBreakPoints(Handle<DebugInfo> debug_info); | 626 void ApplyBreakPoints(Handle<DebugInfo> debug_info); |
| 622 // Clear code from instrumentation. | 627 // Clear code from instrumentation. |
| 623 void ClearBreakPoints(Handle<DebugInfo> debug_info); | 628 void ClearBreakPoints(Handle<DebugInfo> debug_info); |
| 624 // Clear all code from instrumentation. | 629 // Clear all code from instrumentation. |
| 625 void ClearAllBreakPoints(); | 630 void ClearAllBreakPoints(); |
| 626 // Instrument a function with one-shots. | 631 // Instrument a function with one-shots. |
| 627 void FloodWithOneShot(Handle<JSFunction> function, | 632 void FloodWithOneShot(Handle<JSFunction> function, |
| 628 BreakLocatorType type = ALL_BREAK_LOCATIONS); | 633 BreakLocatorType type = ALL_BREAK_LOCATIONS); |
| 629 // Clear all one-shot instrumentations, but restore break points. | 634 // Clear all one-shot instrumentations, but restore break points. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 Handle<Code> code); | 829 Handle<Code> code); |
| 825 static bool DebugBreakSlotIsPatched(Address pc); | 830 static bool DebugBreakSlotIsPatched(Address pc); |
| 826 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 831 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 827 }; | 832 }; |
| 828 | 833 |
| 829 | 834 |
| 830 } // namespace internal | 835 } // namespace internal |
| 831 } // namespace v8 | 836 } // namespace v8 |
| 832 | 837 |
| 833 #endif // V8_DEBUG_DEBUG_H_ | 838 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |