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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 debug_info_->abstract_code()->GetCode()->instruction_start()); | 171 debug_info_->abstract_code()->GetCode()->instruction_start()); |
172 } | 172 } |
173 | 173 |
174 private: | 174 private: |
175 int GetModeMask(BreakLocatorType type); | 175 int GetModeMask(BreakLocatorType type); |
176 RelocInfo::Mode rmode() { return reloc_iterator_.rinfo()->rmode(); } | 176 RelocInfo::Mode rmode() { return reloc_iterator_.rinfo()->rmode(); } |
177 RelocInfo* rinfo() { return reloc_iterator_.rinfo(); } | 177 RelocInfo* rinfo() { return reloc_iterator_.rinfo(); } |
178 | 178 |
179 RelocIterator reloc_iterator_; | 179 RelocIterator reloc_iterator_; |
180 SourcePositionTableIterator source_position_iterator_; | 180 SourcePositionTableIterator source_position_iterator_; |
181 int start_position_; | |
182 DISALLOW_COPY_AND_ASSIGN(CodeIterator); | 181 DISALLOW_COPY_AND_ASSIGN(CodeIterator); |
183 }; | 182 }; |
184 | 183 |
185 class BytecodeArrayIterator : public Iterator { | 184 class BytecodeArrayIterator : public Iterator { |
186 public: | 185 public: |
187 BytecodeArrayIterator(Handle<DebugInfo> debug_info, BreakLocatorType type); | 186 BytecodeArrayIterator(Handle<DebugInfo> debug_info, BreakLocatorType type); |
188 ~BytecodeArrayIterator() override {} | 187 ~BytecodeArrayIterator() override {} |
189 | 188 |
190 BreakLocation GetBreakLocation() override; | 189 BreakLocation GetBreakLocation() override; |
191 bool Done() const override { return source_position_iterator_.done(); } | 190 bool Done() const override { return source_position_iterator_.done(); } |
192 void Next() override; | 191 void Next() override; |
193 | 192 |
194 int code_offset() override { | 193 int code_offset() override { |
195 return source_position_iterator_.code_offset(); | 194 return source_position_iterator_.code_offset(); |
196 } | 195 } |
197 | 196 |
198 private: | 197 private: |
199 DebugBreakType GetDebugBreakType(); | 198 DebugBreakType GetDebugBreakType(); |
200 | 199 |
201 SourcePositionTableIterator source_position_iterator_; | 200 SourcePositionTableIterator source_position_iterator_; |
202 BreakLocatorType break_locator_type_; | 201 BreakLocatorType break_locator_type_; |
203 int start_position_; | |
204 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayIterator); | 202 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayIterator); |
205 }; | 203 }; |
206 | 204 |
207 static Iterator* GetIterator(Handle<DebugInfo> debug_info, | 205 static Iterator* GetIterator(Handle<DebugInfo> debug_info, |
208 BreakLocatorType type = ALL_BREAK_LOCATIONS); | 206 BreakLocatorType type = ALL_BREAK_LOCATIONS); |
209 | 207 |
210 private: | 208 private: |
211 friend class Debug; | 209 friend class Debug; |
212 | 210 |
213 static int BreakIndexFromCodeOffset(Handle<DebugInfo> debug_info, int offset); | 211 static int BreakIndexFromCodeOffset(Handle<DebugInfo> debug_info, int offset); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 Handle<Code> code); | 811 Handle<Code> code); |
814 static bool DebugBreakSlotIsPatched(Address pc); | 812 static bool DebugBreakSlotIsPatched(Address pc); |
815 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 813 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
816 }; | 814 }; |
817 | 815 |
818 | 816 |
819 } // namespace internal | 817 } // namespace internal |
820 } // namespace v8 | 818 } // namespace v8 |
821 | 819 |
822 #endif // V8_DEBUG_DEBUG_H_ | 820 #endif // V8_DEBUG_DEBUG_H_ |
OLD | NEW |