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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/debug/debug.cc » ('j') | test/cctest/test-debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.h
diff --git a/src/debug/debug.h b/src/debug/debug.h
index b499eb0eb89db3dabfedbee1c4539586e3bd0c38..e325257547770655d1104feb213feb90f1ff7c6e 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -597,6 +597,7 @@ class Debug {
bool in_debug_event_listener_;
bool break_on_exception_;
bool break_on_uncaught_exception_;
+ bool break_in_nondebuggable_;
DebugInfoListNode* debug_info_list_; // List of active debug info objects.
@@ -662,6 +663,7 @@ class Debug {
friend class DisableBreak;
friend class LiveEdit;
friend class SuppressDebug;
+ friend class EnableBreakInNonDebuggable;
friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc
friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc
@@ -720,6 +722,23 @@ class DisableBreak BASE_EMBEDDED {
};
+// Stack allocated class for enabling breaking in a normally non-debuggable
+// function (e.g. a builtin).
+class EnableBreakInNonDebuggable BASE_EMBEDDED {
+ public:
+ explicit EnableBreakInNonDebuggable(Debug* debug, bool enable)
+ : debug_(debug), previous_(debug->break_in_nondebuggable_) {
+ debug_->break_in_nondebuggable_ = enable;
+ }
+ ~EnableBreakInNonDebuggable() { debug_->break_in_nondebuggable_ = previous_; }
+
+ private:
+ Debug* debug_;
+ bool previous_;
+ DISALLOW_COPY_AND_ASSIGN(EnableBreakInNonDebuggable);
+};
+
+
class SuppressDebug BASE_EMBEDDED {
public:
explicit SuppressDebug(Debug* debug)
« 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