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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // the address. | 68 // the address. |
69 static BreakLocation FromCodeOffset(Handle<DebugInfo> debug_info, int offset); | 69 static BreakLocation FromCodeOffset(Handle<DebugInfo> debug_info, int offset); |
70 | 70 |
71 static BreakLocation FromFrame(Handle<DebugInfo> debug_info, | 71 static BreakLocation FromFrame(Handle<DebugInfo> debug_info, |
72 JavaScriptFrame* frame); | 72 JavaScriptFrame* frame); |
73 | 73 |
74 static void AllForStatementPosition(Handle<DebugInfo> debug_info, | 74 static void AllForStatementPosition(Handle<DebugInfo> debug_info, |
75 int statement_position, | 75 int statement_position, |
76 List<BreakLocation>* result_out); | 76 List<BreakLocation>* result_out); |
77 | 77 |
| 78 // Find break location (for a break point) from source positon. |
78 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, int position, | 79 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, int position, |
79 BreakPositionAlignment alignment); | 80 BreakPositionAlignment alignment); |
80 | 81 |
81 bool IsDebugBreak() const; | 82 bool IsDebugBreak() const; |
82 | 83 |
83 inline bool IsReturn() const { return type_ == DEBUG_BREAK_SLOT_AT_RETURN; } | 84 inline bool IsReturn() const { return type_ == DEBUG_BREAK_SLOT_AT_RETURN; } |
84 inline bool IsCall() const { return type_ == DEBUG_BREAK_SLOT_AT_CALL; } | 85 inline bool IsCall() const { return type_ == DEBUG_BREAK_SLOT_AT_CALL; } |
85 inline bool IsTailCall() const { | 86 inline bool IsTailCall() const { |
86 return type_ == DEBUG_BREAK_SLOT_AT_TAIL_CALL; | 87 return type_ == DEBUG_BREAK_SLOT_AT_TAIL_CALL; |
87 } | 88 } |
88 inline bool IsDebugBreakSlot() const { return type_ >= DEBUG_BREAK_SLOT; } | 89 inline bool IsDebugBreakSlot() const { return type_ >= DEBUG_BREAK_SLOT; } |
89 inline bool IsDebuggerStatement() const { | 90 inline bool IsDebuggerStatement() const { |
90 return type_ == DEBUGGER_STATEMENT; | 91 return type_ == DEBUGGER_STATEMENT; |
91 } | 92 } |
92 inline bool HasBreakPoint() const { | 93 |
93 return debug_info_->HasBreakPoint(code_offset_); | 94 bool HasBreakPoint() const; |
94 } | |
95 | 95 |
96 Handle<Object> BreakPointObjects() const; | 96 Handle<Object> BreakPointObjects() const; |
97 | 97 |
98 void SetBreakPoint(Handle<Object> break_point_object); | 98 void SetBreakPoint(Handle<Object> break_point_object); |
99 void ClearBreakPoint(Handle<Object> break_point_object); | 99 void ClearBreakPoint(Handle<Object> break_point_object); |
100 | 100 |
101 void SetOneShot(); | 101 void SetOneShot(); |
102 void ClearOneShot(); | 102 void ClearOneShot(); |
103 | 103 |
104 inline int position() const { return position_; } | 104 inline int position() const { return position_; } |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 Handle<Code> code); | 811 Handle<Code> code); |
812 static bool DebugBreakSlotIsPatched(Address pc); | 812 static bool DebugBreakSlotIsPatched(Address pc); |
813 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 813 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
814 }; | 814 }; |
815 | 815 |
816 | 816 |
817 } // namespace internal | 817 } // namespace internal |
818 } // namespace v8 | 818 } // namespace v8 |
819 | 819 |
820 #endif // V8_DEBUG_DEBUG_H_ | 820 #endif // V8_DEBUG_DEBUG_H_ |
OLD | NEW |