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_); |
} |