Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: src/debug/debug.h

Issue 1491743005: [debugger] do not predict step in target for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditstep
Patch Set: do not prepare stepping if we are not in the debugger Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/arm64/debug-arm64.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 BreakPositionAlignment position_aligment); 448 BreakPositionAlignment position_aligment);
449 449
450 // Check whether a global object is the debug global object. 450 // Check whether a global object is the debug global object.
451 bool IsDebugGlobal(JSGlobalObject* global); 451 bool IsDebugGlobal(JSGlobalObject* global);
452 452
453 // Check whether this frame is just about to return. 453 // Check whether this frame is just about to return.
454 bool IsBreakAtReturn(JavaScriptFrame* frame); 454 bool IsBreakAtReturn(JavaScriptFrame* frame);
455 455
456 // Support for LiveEdit 456 // Support for LiveEdit
457 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id, 457 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
458 LiveEdit::FrameDropMode mode, 458 LiveEdit::FrameDropMode mode);
459 Object** restarter_frame_function_pointer);
460 459
461 // Threading support. 460 // Threading support.
462 char* ArchiveDebug(char* to); 461 char* ArchiveDebug(char* to);
463 char* RestoreDebug(char* from); 462 char* RestoreDebug(char* from);
464 static int ArchiveSpacePerThread(); 463 static int ArchiveSpacePerThread();
465 void FreeThreadResources() { } 464 void FreeThreadResources() { }
466 465
467 // Record function from which eval was called. 466 // Record function from which eval was called.
468 static void RecordEvalCaller(Handle<Script> script); 467 static void RecordEvalCaller(Handle<Script> script);
469 468
(...skipping 26 matching lines...) Expand all
496 495
497 // Support for embedding into generated code. 496 // Support for embedding into generated code.
498 Address is_active_address() { 497 Address is_active_address() {
499 return reinterpret_cast<Address>(&is_active_); 498 return reinterpret_cast<Address>(&is_active_);
500 } 499 }
501 500
502 Address after_break_target_address() { 501 Address after_break_target_address() {
503 return reinterpret_cast<Address>(&after_break_target_); 502 return reinterpret_cast<Address>(&after_break_target_);
504 } 503 }
505 504
506 Address restarter_frame_function_pointer_address() {
507 Object*** address = &thread_local_.restarter_frame_function_pointer_;
508 return reinterpret_cast<Address>(address);
509 }
510
511 Address step_in_enabled_address() { 505 Address step_in_enabled_address() {
512 return reinterpret_cast<Address>(&thread_local_.step_in_enabled_); 506 return reinterpret_cast<Address>(&thread_local_.step_in_enabled_);
513 } 507 }
514 508
515 StepAction last_step_action() { return thread_local_.last_step_action_; } 509 StepAction last_step_action() { return thread_local_.last_step_action_; }
516 510
517 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; } 511 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; }
518 512
519 private: 513 private:
520 explicit Debug(Isolate* isolate); 514 explicit Debug(Isolate* isolate);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 Address step_out_fp_; 643 Address step_out_fp_;
650 644
651 // Whether functions are flooded on entry for step-in and step-frame. 645 // Whether functions are flooded on entry for step-in and step-frame.
652 // If we stepped out to the embedder, disable flooding to spill stepping 646 // If we stepped out to the embedder, disable flooding to spill stepping
653 // to the next call that the embedder makes. 647 // to the next call that the embedder makes.
654 bool step_in_enabled_; 648 bool step_in_enabled_;
655 649
656 // Stores the way how LiveEdit has patched the stack. It is used when 650 // Stores the way how LiveEdit has patched the stack. It is used when
657 // debugger returns control back to user script. 651 // debugger returns control back to user script.
658 LiveEdit::FrameDropMode frame_drop_mode_; 652 LiveEdit::FrameDropMode frame_drop_mode_;
659
660 // When restarter frame is on stack, stores the address
661 // of the pointer to function being restarted. Otherwise (most of the time)
662 // stores NULL. This pointer is used with 'step in' implementation.
663 Object** restarter_frame_function_pointer_;
664 }; 653 };
665 654
666 // Storage location for registers when handling debug break calls 655 // Storage location for registers when handling debug break calls
667 ThreadLocal thread_local_; 656 ThreadLocal thread_local_;
668 657
669 Isolate* isolate_; 658 Isolate* isolate_;
670 659
671 friend class Isolate; 660 friend class Isolate;
672 friend class DebugScope; 661 friend class DebugScope;
673 friend class DisableBreak; 662 friend class DisableBreak;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 class DebugCodegen : public AllStatic { 739 class DebugCodegen : public AllStatic {
751 public: 740 public:
752 enum DebugBreakCallHelperMode { 741 enum DebugBreakCallHelperMode {
753 SAVE_RESULT_REGISTER, 742 SAVE_RESULT_REGISTER,
754 IGNORE_RESULT_REGISTER 743 IGNORE_RESULT_REGISTER
755 }; 744 };
756 745
757 static void GenerateDebugBreakStub(MacroAssembler* masm, 746 static void GenerateDebugBreakStub(MacroAssembler* masm,
758 DebugBreakCallHelperMode mode); 747 DebugBreakCallHelperMode mode);
759 748
760 static void GeneratePlainReturnLiveEdit(MacroAssembler* masm);
761
762 // FrameDropper is a code replacement for a JavaScript frame with possibly 749 // FrameDropper is a code replacement for a JavaScript frame with possibly
763 // several frames above. 750 // several frames above.
764 // There is no calling conventions here, because it never actually gets 751 // There is no calling conventions here, because it never actually gets
765 // called, it only gets returned to. 752 // called, it only gets returned to.
766 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); 753 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm);
767 754
768 755
769 static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode); 756 static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode);
770 757
771 static void PatchDebugBreakSlot(Isolate* isolate, Address pc, 758 static void PatchDebugBreakSlot(Isolate* isolate, Address pc,
772 Handle<Code> code); 759 Handle<Code> code);
773 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); 760 static void ClearDebugBreakSlot(Isolate* isolate, Address pc);
774 }; 761 };
775 762
776 763
777 } // namespace internal 764 } // namespace internal
778 } // namespace v8 765 } // namespace v8
779 766
780 #endif // V8_DEBUG_DEBUG_H_ 767 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « src/debug/arm64/debug-arm64.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698