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

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: enable debugging scope Created 5 years, 4 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') | src/debug/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 44ea4fcd0a7731a07110c1c0c04ba12d8a09bcf1..1fe39747b4e934ae56885c61e58119cc24419d3f 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -598,6 +598,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.
@@ -663,6 +664,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
@@ -721,6 +723,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') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698