Reworking jerry_debugger_send_string method

From now on, jerry_debugger_send_string can send a subtype of the string, making it more simple to send over strings with special parameters, therefore seperating different types of messages are simpler.
Enumerations for various subtypes can be made, while there's only need to have 2 entries for the header type.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla
2017-08-07 10:33:50 +02:00
committed by yichoi
parent ad608e30dc
commit a48f24f8da
7 changed files with 60 additions and 24 deletions
+5 -1
View File
@@ -2194,6 +2194,7 @@ parser_parse_function (parser_context_t *context_p, /**< context */
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
{
jerry_debugger_send_string (JERRY_DEBUGGER_FUNCTION_NAME,
JERRY_DEBUGGER_NO_SUBTYPE,
context_p->lit_object.literal_p->u.char_p,
context_p->lit_object.literal_p->prop.length);
}
@@ -2489,7 +2490,10 @@ parser_parse_script (const uint8_t *source_p, /**< source code */
#ifdef JERRY_DEBUGGER
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
{
jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE, source_p, size);
jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE,
JERRY_DEBUGGER_NO_SUBTYPE,
source_p,
size);
}
#endif /* JERRY_DEBUGGER */