| 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" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 inline bool IsDebugBreakSlot() const { return type_ >= DEBUG_BREAK_SLOT; } | 82 inline bool IsDebugBreakSlot() const { return type_ >= DEBUG_BREAK_SLOT; } |
| 83 inline bool IsDebuggerStatement() const { | 83 inline bool IsDebuggerStatement() const { |
| 84 return type_ == DEBUGGER_STATEMENT; | 84 return type_ == DEBUGGER_STATEMENT; |
| 85 } | 85 } |
| 86 | 86 |
| 87 bool HasBreakPoint(Handle<DebugInfo> debug_info) const; | 87 bool HasBreakPoint(Handle<DebugInfo> debug_info) const; |
| 88 | 88 |
| 89 inline int position() const { return position_; } | 89 inline int position() const { return position_; } |
| 90 | 90 |
| 91 debug::BreakLocationType type() const; |
| 92 |
| 91 private: | 93 private: |
| 92 BreakLocation(Handle<AbstractCode> abstract_code, DebugBreakType type, | 94 BreakLocation(Handle<AbstractCode> abstract_code, DebugBreakType type, |
| 93 int code_offset, int position) | 95 int code_offset, int position) |
| 94 : abstract_code_(abstract_code), | 96 : abstract_code_(abstract_code), |
| 95 code_offset_(code_offset), | 97 code_offset_(code_offset), |
| 96 type_(type), | 98 type_(type), |
| 97 position_(position) { | 99 position_(position) { |
| 98 DCHECK_NE(NOT_DEBUG_BREAK, type_); | 100 DCHECK_NE(NOT_DEBUG_BREAK, type_); |
| 99 } | 101 } |
| 100 | 102 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 void PrepareStep(StepAction step_action); | 308 void PrepareStep(StepAction step_action); |
| 307 void PrepareStepIn(Handle<JSFunction> function); | 309 void PrepareStepIn(Handle<JSFunction> function); |
| 308 void PrepareStepInSuspendedGenerator(); | 310 void PrepareStepInSuspendedGenerator(); |
| 309 void PrepareStepOnThrow(); | 311 void PrepareStepOnThrow(); |
| 310 void ClearStepping(); | 312 void ClearStepping(); |
| 311 void ClearStepOut(); | 313 void ClearStepOut(); |
| 312 | 314 |
| 313 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); | 315 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); |
| 314 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, | 316 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, |
| 315 int end_position, bool restrict_to_function, | 317 int end_position, bool restrict_to_function, |
| 316 std::set<int>* positions); | 318 std::vector<BreakLocation>* locations); |
| 317 | 319 |
| 318 void RecordGenerator(Handle<JSGeneratorObject> generator_object); | 320 void RecordGenerator(Handle<JSGeneratorObject> generator_object); |
| 319 | 321 |
| 320 void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise, | 322 void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise, |
| 321 Handle<Object> parent); | 323 Handle<Object> parent); |
| 322 | 324 |
| 323 int NextAsyncTaskId(Handle<JSObject> promise); | 325 int NextAsyncTaskId(Handle<JSObject> promise); |
| 324 | 326 |
| 325 bool IsBlackboxed(Handle<SharedFunctionInfo> shared); | 327 bool IsBlackboxed(Handle<SharedFunctionInfo> shared); |
| 326 | 328 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 Handle<Code> code); | 791 Handle<Code> code); |
| 790 static bool DebugBreakSlotIsPatched(Address pc); | 792 static bool DebugBreakSlotIsPatched(Address pc); |
| 791 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 793 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 792 }; | 794 }; |
| 793 | 795 |
| 794 | 796 |
| 795 } // namespace internal | 797 } // namespace internal |
| 796 } // namespace v8 | 798 } // namespace v8 |
| 797 | 799 |
| 798 #endif // V8_DEBUG_DEBUG_H_ | 800 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |