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

Unified Diff: src/debug.h

Issue 42173: Added automatic debug break for processing debugger commands (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.h
===================================================================
--- src/debug.h (revision 1507)
+++ src/debug.h (working copy)
@@ -418,20 +418,22 @@
static Handle<Object> MakeCompileEvent(Handle<Script> script,
bool before,
bool* caught_exception);
- static void OnDebugBreak(Handle<Object> break_points_hit);
+ static void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue);
static void OnException(Handle<Object> exception, bool uncaught);
static void OnBeforeCompile(Handle<Script> script);
static void OnAfterCompile(Handle<Script> script,
Handle<JSFunction> fun);
static void OnNewFunction(Handle<JSFunction> fun);
static void ProcessDebugEvent(v8::DebugEvent event,
- Handle<Object> event_data);
+ Handle<Object> event_data,
+ bool auto_continue);
static void SetEventListener(Handle<Object> callback, Handle<Object> data);
static void SetMessageHandler(v8::DebugMessageHandler handler, void* data);
static void SetHostDispatchHandler(v8::DebugHostDispatchHandler handler,
void* data);
static void SendMessage(Vector<uint16_t> message);
static void ProcessCommand(Vector<const uint16_t> command);
+ static bool HasCommands();
static void ProcessHostDispatch(void* dispatch);
static void UpdateActiveDebugger();
static Handle<Object> Call(Handle<JSFunction> fun,
@@ -528,7 +530,8 @@
// when host_running_ is false.
void DebugEvent(v8::DebugEvent,
Handle<Object> exec_state,
- Handle<Object> event_data);
+ Handle<Object> event_data,
+ bool auto_continue);
// Puts event on the output queue. Called by V8.
// This is where V8 hands off
// processing of the event to the DebugMessageThread thread,
@@ -546,6 +549,9 @@
// Main function of DebugMessageThread thread.
void Run();
+ // Check whether there are commands in the queue.
+ bool HasCommands() { return !command_queue_.IsEmpty(); }
+
bool host_running_; // Is the debugging host running or stopped?
Semaphore* command_received_; // Non-zero when command queue is non-empty.
Semaphore* message_received_; // Exactly equal to message queue length.
@@ -616,6 +622,12 @@
Debug::set_preemption_pending(false);
}
+ // If there are commands in the queue when leaving the debugger request that
+ // these commands are processed.
+ if (prev_ == NULL && Debugger::HasCommands()) {
+ StackGuard::DebugCommand();
+ }
+
// Leaving this debugger entry.
Debug::set_debugger_entry(prev_);
}
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698