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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 class BreakLocation { | 64 class BreakLocation { |
65 public: | 65 public: |
66 // Find the break point at the supplied address, or the closest one before | 66 // Find the break point at the supplied address, or the closest one before |
67 // the address. | 67 // the address. |
68 static BreakLocation FromCodeOffset(Handle<DebugInfo> debug_info, int offset); | 68 static BreakLocation FromCodeOffset(Handle<DebugInfo> debug_info, int offset); |
69 | 69 |
70 static BreakLocation FromFrame(Handle<DebugInfo> debug_info, | 70 static BreakLocation FromFrame(Handle<DebugInfo> debug_info, |
71 JavaScriptFrame* frame); | 71 JavaScriptFrame* frame); |
72 | 72 |
73 static void FromCodeOffsetSameStatement(Handle<DebugInfo> debug_info, | |
74 int offset, | |
75 List<BreakLocation>* result_out); | |
76 | |
77 static void AllForStatementPosition(Handle<DebugInfo> debug_info, | 73 static void AllForStatementPosition(Handle<DebugInfo> debug_info, |
78 int statement_position, | 74 int statement_position, |
79 List<BreakLocation>* result_out); | 75 List<BreakLocation>* result_out); |
80 | 76 |
81 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, int position, | 77 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, int position, |
82 BreakPositionAlignment alignment); | 78 BreakPositionAlignment alignment); |
83 | 79 |
84 bool IsDebugBreak() const; | 80 bool IsDebugBreak() const; |
85 | 81 |
86 inline bool IsReturn() const { return type_ == DEBUG_BREAK_SLOT_AT_RETURN; } | 82 inline bool IsReturn() const { return type_ == DEBUG_BREAK_SLOT_AT_RETURN; } |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 bool IsBreakOnException(ExceptionBreakType type); | 449 bool IsBreakOnException(ExceptionBreakType type); |
454 | 450 |
455 // Stepping handling. | 451 // Stepping handling. |
456 void PrepareStep(StepAction step_action); | 452 void PrepareStep(StepAction step_action); |
457 void PrepareStepIn(Handle<JSFunction> function); | 453 void PrepareStepIn(Handle<JSFunction> function); |
458 void PrepareStepOnThrow(); | 454 void PrepareStepOnThrow(); |
459 void ClearStepping(); | 455 void ClearStepping(); |
460 void ClearStepOut(); | 456 void ClearStepOut(); |
461 void EnableStepIn(); | 457 void EnableStepIn(); |
462 | 458 |
463 void GetStepinPositions(JavaScriptFrame* frame, StackFrame::Id frame_id, | |
464 List<int>* results_out); | |
465 | |
466 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); | 459 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); |
467 | 460 |
468 // Returns whether the operation succeeded. Compilation can only be triggered | 461 // Returns whether the operation succeeded. Compilation can only be triggered |
469 // if a valid closure is passed as the second argument, otherwise the shared | 462 // if a valid closure is passed as the second argument, otherwise the shared |
470 // function needs to be compiled already. | 463 // function needs to be compiled already. |
471 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, | 464 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
472 Handle<JSFunction> function); | 465 Handle<JSFunction> function); |
473 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); | 466 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); |
474 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 467 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
475 | 468 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 Handle<Code> code); | 787 Handle<Code> code); |
795 static bool DebugBreakSlotIsPatched(Address pc); | 788 static bool DebugBreakSlotIsPatched(Address pc); |
796 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 789 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
797 }; | 790 }; |
798 | 791 |
799 | 792 |
800 } // namespace internal | 793 } // namespace internal |
801 } // namespace v8 | 794 } // namespace v8 |
802 | 795 |
803 #endif // V8_DEBUG_DEBUG_H_ | 796 #endif // V8_DEBUG_DEBUG_H_ |
OLD | NEW |