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/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/base/atomicops.h" | 10 #include "src/base/atomicops.h" |
11 #include "src/base/hashmap.h" | 11 #include "src/base/hashmap.h" |
12 #include "src/base/platform/platform.h" | 12 #include "src/base/platform/platform.h" |
13 #include "src/debug/debug-interface.h" | 13 #include "src/debug/debug-interface.h" |
14 #include "src/debug/interface-types.h" | 14 #include "src/debug/interface-types.h" |
15 #include "src/execution.h" | 15 #include "src/execution.h" |
16 #include "src/factory.h" | 16 #include "src/factory.h" |
17 #include "src/flags.h" | 17 #include "src/flags.h" |
18 #include "src/frames.h" | 18 #include "src/frames.h" |
19 #include "src/globals.h" | 19 #include "src/globals.h" |
| 20 #include "src/objects/debug-objects.h" |
20 #include "src/runtime/runtime.h" | 21 #include "src/runtime/runtime.h" |
21 #include "src/source-position-table.h" | 22 #include "src/source-position-table.h" |
22 #include "src/string-stream.h" | 23 #include "src/string-stream.h" |
23 #include "src/v8threads.h" | 24 #include "src/v8threads.h" |
24 | 25 |
25 #include "include/v8-debug.h" | 26 #include "include/v8-debug.h" |
26 | 27 |
27 namespace v8 { | 28 namespace v8 { |
28 namespace internal { | 29 namespace internal { |
29 | 30 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 BreakLocation GetBreakLocation() override; | 171 BreakLocation GetBreakLocation() override; |
171 bool Done() const override { return reloc_iterator_.done(); } | 172 bool Done() const override { return reloc_iterator_.done(); } |
172 void Next() override; | 173 void Next() override; |
173 | 174 |
174 bool IsDebugBreak() override; | 175 bool IsDebugBreak() override; |
175 void ClearDebugBreak() override; | 176 void ClearDebugBreak() override; |
176 void SetDebugBreak() override; | 177 void SetDebugBreak() override; |
177 | 178 |
178 void SkipToPosition(int position, BreakPositionAlignment alignment); | 179 void SkipToPosition(int position, BreakPositionAlignment alignment); |
179 | 180 |
180 int code_offset() override { | 181 int code_offset() override; |
181 return static_cast<int>(rinfo()->pc() - | |
182 debug_info_->DebugCode()->instruction_start()); | |
183 } | |
184 | 182 |
185 private: | 183 private: |
186 int GetModeMask(); | 184 int GetModeMask(); |
187 DebugBreakType GetDebugBreakType(); | 185 DebugBreakType GetDebugBreakType(); |
188 | 186 |
189 RelocInfo::Mode rmode() { return reloc_iterator_.rinfo()->rmode(); } | 187 RelocInfo::Mode rmode() { return reloc_iterator_.rinfo()->rmode(); } |
190 RelocInfo* rinfo() { return reloc_iterator_.rinfo(); } | 188 RelocInfo* rinfo() { return reloc_iterator_.rinfo(); } |
191 | 189 |
192 RelocIterator reloc_iterator_; | 190 RelocIterator reloc_iterator_; |
193 SourcePositionTableIterator source_position_iterator_; | 191 SourcePositionTableIterator source_position_iterator_; |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 Handle<Code> code); | 804 Handle<Code> code); |
807 static bool DebugBreakSlotIsPatched(Address pc); | 805 static bool DebugBreakSlotIsPatched(Address pc); |
808 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 806 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
809 }; | 807 }; |
810 | 808 |
811 | 809 |
812 } // namespace internal | 810 } // namespace internal |
813 } // namespace v8 | 811 } // namespace v8 |
814 | 812 |
815 #endif // V8_DEBUG_DEBUG_H_ | 813 #endif // V8_DEBUG_DEBUG_H_ |
OLD | NEW |