Send output to debugger client (#1955)

Sending the output to the debugger client, at the moment only the JS side prints are sent over.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla
2017-08-30 16:01:06 +02:00
committed by László Langó
parent e897858c64
commit 733f0ceea0
17 changed files with 172 additions and 7 deletions
+18
View File
@@ -814,6 +814,24 @@ jerry_debugger_send_parse_function (uint32_t line, /**< line */
return jerry_debugger_send (sizeof (jerry_debugger_send_parse_function_t));
} /* jerry_debugger_send_parse_function */
/**
* Send the output of the program to the debugger client.
* Currently only sends print output.
*/
void
jerry_debugger_send_output (jerry_char_t buffer[], /**< buffer */
jerry_size_t str_size, /**< string size */
uint8_t type) /**< type of output */
{
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
{
jerry_debugger_send_string (JERRY_DEBUGGER_OUTPUT_RESULT,
type,
(const uint8_t *) buffer,
sizeof (uint8_t) * str_size);
}
} /* jerry_debugger_send_output */
/**
* Send memory statistics to the debugger client.
*/