Multiple client source sending feature. (#1957)

Whit this enhancement the debugger can able handle more than one source file across the new source wait mode.
This feature can be used by the python client with the --client-source [paths] switch.
The client will store every source path, when the debugger send a signal about the waiting status, then the client will send one file from the list.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
This commit is contained in:
Imre Kiss
2017-08-21 09:19:36 +02:00
committed by László Langó
parent 2888a6f488
commit 3b1d578050
14 changed files with 197 additions and 42 deletions
+19 -5
View File
@@ -723,14 +723,28 @@ main (int argc,
{
is_repl_mode = false;
#ifdef JERRY_DEBUGGER
jerry_value_t wait_and_run_value;
jerry_value_t run_result;
jerry_debugger_wait_and_run_type_t receive_status;
if (jerry_debugger_wait_and_run_client_source (&wait_and_run_value) == JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED)
do
{
ret_value = jerry_create_error (JERRY_ERROR_COMMON, (jerry_char_t *) "Connection aborted before source arrived.");
}
receive_status = jerry_debugger_wait_and_run_client_source (&run_result);
if (receive_status == JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED)
{
ret_value = jerry_create_error (JERRY_ERROR_COMMON,
(jerry_char_t *) "Connection aborted before source arrived.");
}
if (receive_status == JERRY_DEBUGGER_SOURCE_END)
{
jerry_port_log (JERRY_LOG_LEVEL_DEBUG, "No more client source.\n");
}
jerry_release_value (run_result);
}
while (receive_status == JERRY_DEBUGGER_SOURCE_RECEIVED);
jerry_release_value (wait_and_run_value);
#endif /* JERRY_DEBUGGER */
}