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

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

Issue 1494143002: Revert of [debugger] do not predict step in target for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditstep
Patch Set: 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 BreakPositionAlignment position_aligment); 457 BreakPositionAlignment position_aligment);
458 458
459 // Check whether a global object is the debug global object. 459 // Check whether a global object is the debug global object.
460 bool IsDebugGlobal(JSGlobalObject* global); 460 bool IsDebugGlobal(JSGlobalObject* global);
461 461
462 // Check whether this frame is just about to return. 462 // Check whether this frame is just about to return.
463 bool IsBreakAtReturn(JavaScriptFrame* frame); 463 bool IsBreakAtReturn(JavaScriptFrame* frame);
464 464
465 // Support for LiveEdit 465 // Support for LiveEdit
466 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id, 466 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
467 LiveEdit::FrameDropMode mode); 467 LiveEdit::FrameDropMode mode,
468 Object** restarter_frame_function_pointer);
468 469
469 // Threading support. 470 // Threading support.
470 char* ArchiveDebug(char* to); 471 char* ArchiveDebug(char* to);
471 char* RestoreDebug(char* from); 472 char* RestoreDebug(char* from);
472 static int ArchiveSpacePerThread(); 473 static int ArchiveSpacePerThread();
473 void FreeThreadResources() { } 474 void FreeThreadResources() { }
474 475
475 // Record function from which eval was called. 476 // Record function from which eval was called.
476 static void RecordEvalCaller(Handle<Script> script); 477 static void RecordEvalCaller(Handle<Script> script);
477 478
(...skipping 26 matching lines...) Expand all
504 505
505 // Support for embedding into generated code. 506 // Support for embedding into generated code.
506 Address is_active_address() { 507 Address is_active_address() {
507 return reinterpret_cast<Address>(&is_active_); 508 return reinterpret_cast<Address>(&is_active_);
508 } 509 }
509 510
510 Address after_break_target_address() { 511 Address after_break_target_address() {
511 return reinterpret_cast<Address>(&after_break_target_); 512 return reinterpret_cast<Address>(&after_break_target_);
512 } 513 }
513 514
515 Address restarter_frame_function_pointer_address() {
516 Object*** address = &thread_local_.restarter_frame_function_pointer_;
517 return reinterpret_cast<Address>(address);
518 }
519
514 Address step_in_enabled_address() { 520 Address step_in_enabled_address() {
515 return reinterpret_cast<Address>(&thread_local_.step_in_enabled_); 521 return reinterpret_cast<Address>(&thread_local_.step_in_enabled_);
516 } 522 }
517 523
518 StepAction last_step_action() { return thread_local_.last_step_action_; } 524 StepAction last_step_action() { return thread_local_.last_step_action_; }
519 525
520 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; } 526 DebugFeatureTracker* feature_tracker() { return &feature_tracker_; }
521 527
522 private: 528 private:
523 explicit Debug(Isolate* isolate); 529 explicit Debug(Isolate* isolate);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 Address step_out_fp_; 658 Address step_out_fp_;
653 659
654 // Whether functions are flooded on entry for step-in and step-frame. 660 // Whether functions are flooded on entry for step-in and step-frame.
655 // If we stepped out to the embedder, disable flooding to spill stepping 661 // If we stepped out to the embedder, disable flooding to spill stepping
656 // to the next call that the embedder makes. 662 // to the next call that the embedder makes.
657 bool step_in_enabled_; 663 bool step_in_enabled_;
658 664
659 // Stores the way how LiveEdit has patched the stack. It is used when 665 // Stores the way how LiveEdit has patched the stack. It is used when
660 // debugger returns control back to user script. 666 // debugger returns control back to user script.
661 LiveEdit::FrameDropMode frame_drop_mode_; 667 LiveEdit::FrameDropMode frame_drop_mode_;
668
669 // When restarter frame is on stack, stores the address
670 // of the pointer to function being restarted. Otherwise (most of the time)
671 // stores NULL. This pointer is used with 'step in' implementation.
672 Object** restarter_frame_function_pointer_;
662 }; 673 };
663 674
664 // Storage location for registers when handling debug break calls 675 // Storage location for registers when handling debug break calls
665 ThreadLocal thread_local_; 676 ThreadLocal thread_local_;
666 677
667 Isolate* isolate_; 678 Isolate* isolate_;
668 679
669 friend class Isolate; 680 friend class Isolate;
670 friend class DebugScope; 681 friend class DebugScope;
671 friend class DisableBreak; 682 friend class DisableBreak;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 class DebugCodegen : public AllStatic { 759 class DebugCodegen : public AllStatic {
749 public: 760 public:
750 enum DebugBreakCallHelperMode { 761 enum DebugBreakCallHelperMode {
751 SAVE_RESULT_REGISTER, 762 SAVE_RESULT_REGISTER,
752 IGNORE_RESULT_REGISTER 763 IGNORE_RESULT_REGISTER
753 }; 764 };
754 765
755 static void GenerateDebugBreakStub(MacroAssembler* masm, 766 static void GenerateDebugBreakStub(MacroAssembler* masm,
756 DebugBreakCallHelperMode mode); 767 DebugBreakCallHelperMode mode);
757 768
769 static void GeneratePlainReturnLiveEdit(MacroAssembler* masm);
770
758 // FrameDropper is a code replacement for a JavaScript frame with possibly 771 // FrameDropper is a code replacement for a JavaScript frame with possibly
759 // several frames above. 772 // several frames above.
760 // There is no calling conventions here, because it never actually gets 773 // There is no calling conventions here, because it never actually gets
761 // called, it only gets returned to. 774 // called, it only gets returned to.
762 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); 775 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm);
763 776
764 777
765 static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, 778 static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
766 int call_argc = -1); 779 int call_argc = -1);
767 780
768 static void PatchDebugBreakSlot(Isolate* isolate, Address pc, 781 static void PatchDebugBreakSlot(Isolate* isolate, Address pc,
769 Handle<Code> code); 782 Handle<Code> code);
770 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); 783 static void ClearDebugBreakSlot(Isolate* isolate, Address pc);
771 }; 784 };
772 785
773 786
774 } // namespace internal 787 } // namespace internal
775 } // namespace v8 788 } // namespace v8
776 789
777 #endif // V8_DEBUG_DEBUG_H_ 790 #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