Add context reset to the debugger.

- The context reset request message can be sent anytime from a client.
- After the message received the engine will call the cleanup and init
  when in the source waiting mode (which means the currently processed file will be executed).
- After the reinitialization is done, the engine will wait
  for a new client connection(rest of the work is the client's responsibility).

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
This commit is contained in:
Imre Kiss
2017-09-08 09:52:09 +02:00
committed by yichoi
parent 04bccea6a6
commit 77ccdcc585
7 changed files with 83 additions and 29 deletions
+7 -6
View File
@@ -82,12 +82,13 @@ var JERRY_DEBUGGER_STOP = 5;
var JERRY_DEBUGGER_CLIENT_SOURCE = 6;
var JERRY_DEBUGGER_CLIENT_SOURCE_PART = 7;
var JERRY_DEBUGGER_NO_MORE_SOURCES = 8;
var JERRY_DEBUGGER_CONTINUE = 9;
var JERRY_DEBUGGER_STEP = 10;
var JERRY_DEBUGGER_NEXT = 11;
var JERRY_DEBUGGER_GET_BACKTRACE = 12;
var JERRY_DEBUGGER_EVAL = 13;
var JERRY_DEBUGGER_EVAL_PART = 14;
var JERRY_DEBUGGER_CONTEXT_RESET = 9;
var JERRY_DEBUGGER_CONTINUE = 10;
var JERRY_DEBUGGER_STEP = 11;
var JERRY_DEBUGGER_NEXT = 12;
var JERRY_DEBUGGER_GET_BACKTRACE = 13;
var JERRY_DEBUGGER_EVAL = 14;
var JERRY_DEBUGGER_EVAL_PART = 15;
var textBox = document.getElementById("log");
var commandBox = document.getElementById("command");
+7 -6
View File
@@ -73,12 +73,13 @@ JERRY_DEBUGGER_STOP = 5
JERRY_DEBUGGER_CLIENT_SOURCE = 6
JERRY_DEBUGGER_CLIENT_SOURCE_PART = 7
JERRY_DEBUGGER_NO_MORE_SOURCES = 8
JERRY_DEBUGGER_CONTINUE = 9
JERRY_DEBUGGER_STEP = 10
JERRY_DEBUGGER_NEXT = 11
JERRY_DEBUGGER_GET_BACKTRACE = 12
JERRY_DEBUGGER_EVAL = 13
JERRY_DEBUGGER_EVAL_PART = 14
JERRY_DEBUGGER_CONTEXT_RESET = 9
JERRY_DEBUGGER_CONTINUE = 10
JERRY_DEBUGGER_STEP = 11
JERRY_DEBUGGER_NEXT = 12
JERRY_DEBUGGER_GET_BACKTRACE = 13
JERRY_DEBUGGER_EVAL = 14
JERRY_DEBUGGER_EVAL_PART = 15
MAX_BUFFER_SIZE = 128
WEBSOCKET_BINARY_FRAME = 2