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

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

Issue 1321543004: [futex] Allow debugger to break in the middle of a futexWait Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: feedback Created 5 years, 3 months 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 | « no previous file | src/debug/debug.cc » ('j') | test/cctest/test-debug.cc » ('J')
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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 LockingCommandMessageQueue command_queue_; 590 LockingCommandMessageQueue command_queue_;
591 591
592 bool is_active_; 592 bool is_active_;
593 bool is_suppressed_; 593 bool is_suppressed_;
594 bool live_edit_enabled_; 594 bool live_edit_enabled_;
595 bool has_break_points_; 595 bool has_break_points_;
596 bool break_disabled_; 596 bool break_disabled_;
597 bool in_debug_event_listener_; 597 bool in_debug_event_listener_;
598 bool break_on_exception_; 598 bool break_on_exception_;
599 bool break_on_uncaught_exception_; 599 bool break_on_uncaught_exception_;
600 bool break_in_nondebuggable_;
600 601
601 DebugInfoListNode* debug_info_list_; // List of active debug info objects. 602 DebugInfoListNode* debug_info_list_; // List of active debug info objects.
602 603
603 // Storage location for jump when exiting debug break calls. 604 // Storage location for jump when exiting debug break calls.
604 // Note that this address is not GC safe. It should be computed immediately 605 // Note that this address is not GC safe. It should be computed immediately
605 // before returning to the DebugBreakCallHelper. 606 // before returning to the DebugBreakCallHelper.
606 Address after_break_target_; 607 Address after_break_target_;
607 608
608 // Per-thread data. 609 // Per-thread data.
609 class ThreadLocal { 610 class ThreadLocal {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // Storage location for registers when handling debug break calls 656 // Storage location for registers when handling debug break calls
656 ThreadLocal thread_local_; 657 ThreadLocal thread_local_;
657 658
658 Isolate* isolate_; 659 Isolate* isolate_;
659 660
660 friend class Isolate; 661 friend class Isolate;
661 friend class DebugScope; 662 friend class DebugScope;
662 friend class DisableBreak; 663 friend class DisableBreak;
663 friend class LiveEdit; 664 friend class LiveEdit;
664 friend class SuppressDebug; 665 friend class SuppressDebug;
666 friend class EnableBreakInNonDebuggable;
665 667
666 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc 668 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc
667 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc 669 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc
668 670
669 DISALLOW_COPY_AND_ASSIGN(Debug); 671 DISALLOW_COPY_AND_ASSIGN(Debug);
670 }; 672 };
671 673
672 674
673 // This scope is used to load and enter the debug context and create a new 675 // This scope is used to load and enter the debug context and create a new
674 // break state. Leaving the scope will restore the previous state. 676 // break state. Leaving the scope will restore the previous state.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 } 715 }
714 716
715 private: 717 private:
716 Debug* debug_; 718 Debug* debug_;
717 bool previous_break_disabled_; 719 bool previous_break_disabled_;
718 bool previous_in_debug_event_listener_; 720 bool previous_in_debug_event_listener_;
719 DISALLOW_COPY_AND_ASSIGN(DisableBreak); 721 DISALLOW_COPY_AND_ASSIGN(DisableBreak);
720 }; 722 };
721 723
722 724
725 // Stack allocated class for enabling breaking in a normally non-debuggable
726 // function (e.g. a builtin).
727 class EnableBreakInNonDebuggable BASE_EMBEDDED {
728 public:
729 explicit EnableBreakInNonDebuggable(Debug* debug, bool enable)
730 : debug_(debug), previous_(debug->break_in_nondebuggable_) {
731 debug_->break_in_nondebuggable_ = enable;
732 }
733 ~EnableBreakInNonDebuggable() { debug_->break_in_nondebuggable_ = previous_; }
734
735 private:
736 Debug* debug_;
737 bool previous_;
738 DISALLOW_COPY_AND_ASSIGN(EnableBreakInNonDebuggable);
739 };
740
741
723 class SuppressDebug BASE_EMBEDDED { 742 class SuppressDebug BASE_EMBEDDED {
724 public: 743 public:
725 explicit SuppressDebug(Debug* debug) 744 explicit SuppressDebug(Debug* debug)
726 : debug_(debug), old_state_(debug->is_suppressed_) { 745 : debug_(debug), old_state_(debug->is_suppressed_) {
727 debug_->is_suppressed_ = true; 746 debug_->is_suppressed_ = true;
728 } 747 }
729 ~SuppressDebug() { debug_->is_suppressed_ = old_state_; } 748 ~SuppressDebug() { debug_->is_suppressed_ = old_state_; }
730 749
731 private: 750 private:
732 Debug* debug_; 751 Debug* debug_;
(...skipping 26 matching lines...) Expand all
759 int call_argc = -1); 778 int call_argc = -1);
760 779
761 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); 780 static void PatchDebugBreakSlot(Address pc, Handle<Code> code);
762 static void ClearDebugBreakSlot(Address pc); 781 static void ClearDebugBreakSlot(Address pc);
763 }; 782 };
764 783
765 784
766 } } // namespace v8::internal 785 } } // namespace v8::internal
767 786
768 #endif // V8_DEBUG_DEBUG_H_ 787 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug.cc » ('j') | test/cctest/test-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698