| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 422 |
| 423 Address suspended_generator_address() { | 423 Address suspended_generator_address() { |
| 424 return reinterpret_cast<Address>(&thread_local_.suspended_generator_); | 424 return reinterpret_cast<Address>(&thread_local_.suspended_generator_); |
| 425 } | 425 } |
| 426 | 426 |
| 427 Address restart_fp_address() { | 427 Address restart_fp_address() { |
| 428 return reinterpret_cast<Address>(&thread_local_.restart_fp_); | 428 return reinterpret_cast<Address>(&thread_local_.restart_fp_); |
| 429 } | 429 } |
| 430 | 430 |
| 431 StepAction last_step_action() { return thread_local_.last_step_action_; } | 431 StepAction last_step_action() { return thread_local_.last_step_action_; } |
| 432 bool step_into_function_call_requested() { |
| 433 return thread_local_.step_into_function_call_requested_; |
| 434 } |
| 432 | 435 |
| 433 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; } | 436 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; } |
| 434 | 437 |
| 435 private: | 438 private: |
| 436 explicit Debug(Isolate* isolate); | 439 explicit Debug(Isolate* isolate); |
| 437 ~Debug() { DCHECK_NULL(debug_delegate_); } | 440 ~Debug() { DCHECK_NULL(debug_delegate_); } |
| 438 | 441 |
| 439 void UpdateState(); | 442 void UpdateState(); |
| 440 void UpdateHookOnFunctionCall(); | 443 void UpdateHookOnFunctionCall(); |
| 441 void RemoveDebugDelegate(); | 444 void RemoveDebugDelegate(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 // Find the closest source position for a break point for a given position. | 486 // Find the closest source position for a break point for a given position. |
| 484 int FindBreakablePosition(Handle<DebugInfo> debug_info, int source_position, | 487 int FindBreakablePosition(Handle<DebugInfo> debug_info, int source_position, |
| 485 BreakPositionAlignment alignment); | 488 BreakPositionAlignment alignment); |
| 486 // Instrument code to break at break points. | 489 // Instrument code to break at break points. |
| 487 void ApplyBreakPoints(Handle<DebugInfo> debug_info); | 490 void ApplyBreakPoints(Handle<DebugInfo> debug_info); |
| 488 // Clear code from instrumentation. | 491 // Clear code from instrumentation. |
| 489 void ClearBreakPoints(Handle<DebugInfo> debug_info); | 492 void ClearBreakPoints(Handle<DebugInfo> debug_info); |
| 490 // Clear all code from instrumentation. | 493 // Clear all code from instrumentation. |
| 491 void ClearAllBreakPoints(); | 494 void ClearAllBreakPoints(); |
| 492 // Instrument a function with one-shots. | 495 // Instrument a function with one-shots. |
| 493 void FloodWithOneShot(Handle<SharedFunctionInfo> function); | 496 void FloodWithOneShot(Handle<SharedFunctionInfo> function, |
| 497 bool returns_only = false); |
| 494 // Clear all one-shot instrumentations, but restore break points. | 498 // Clear all one-shot instrumentations, but restore break points. |
| 495 void ClearOneShot(); | 499 void ClearOneShot(); |
| 496 | 500 |
| 497 bool IsFrameBlackboxed(JavaScriptFrame* frame); | 501 bool IsFrameBlackboxed(JavaScriptFrame* frame); |
| 498 | 502 |
| 499 void ActivateStepOut(StackFrame* frame); | 503 void ActivateStepOut(StackFrame* frame); |
| 500 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); | 504 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); |
| 501 MaybeHandle<FixedArray> CheckBreakPoints(Handle<DebugInfo> debug_info, | 505 MaybeHandle<FixedArray> CheckBreakPoints(Handle<DebugInfo> debug_info, |
| 502 BreakLocation* location, | 506 BreakLocation* location, |
| 503 bool* has_break_points = nullptr); | 507 bool* has_break_points = nullptr); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 | 562 |
| 559 // Current break id. | 563 // Current break id. |
| 560 int break_id_; | 564 int break_id_; |
| 561 | 565 |
| 562 // Frame id for the frame of the current break. | 566 // Frame id for the frame of the current break. |
| 563 StackFrame::Id break_frame_id_; | 567 StackFrame::Id break_frame_id_; |
| 564 | 568 |
| 565 // Step action for last step performed. | 569 // Step action for last step performed. |
| 566 StepAction last_step_action_; | 570 StepAction last_step_action_; |
| 567 | 571 |
| 572 // If set then this function will be ignored in PrepareStepIn call. |
| 573 Object* ignore_step_into_function_; |
| 574 |
| 575 // If set then next stepping break will be ignored. |
| 576 bool ignore_next_stepping_break_; |
| 577 |
| 578 // If set then PrepapreStepIn will be called for each function call. |
| 579 bool step_into_function_call_requested_; |
| 580 |
| 568 // Source statement position from last step next action. | 581 // Source statement position from last step next action. |
| 569 int last_statement_position_; | 582 int last_statement_position_; |
| 570 | 583 |
| 571 // Frame pointer from last step next or step frame action. | 584 // Frame pointer from last step next or step frame action. |
| 572 int last_frame_count_; | 585 int last_frame_count_; |
| 573 | 586 |
| 574 // Frame pointer of the target frame we want to arrive at. | 587 // Frame pointer of the target frame we want to arrive at. |
| 575 int target_frame_count_; | 588 int target_frame_count_; |
| 576 | 589 |
| 577 // Value of the accumulator at the point of entering the debugger. | 590 // Value of the accumulator at the point of entering the debugger. |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 Handle<Code> code); | 812 Handle<Code> code); |
| 800 static bool DebugBreakSlotIsPatched(Address pc); | 813 static bool DebugBreakSlotIsPatched(Address pc); |
| 801 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 814 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 802 }; | 815 }; |
| 803 | 816 |
| 804 | 817 |
| 805 } // namespace internal | 818 } // namespace internal |
| 806 } // namespace v8 | 819 } // namespace v8 |
| 807 | 820 |
| 808 #endif // V8_DEBUG_DEBUG_H_ | 821 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |