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

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

Powered by Google App Engine
This is Rietveld 408576698