Move jerry_debugger_send_output to public API

The function jerry_debugger_send_output wasn't placed correctly in the public API.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla
2017-09-06 12:31:03 +02:00
committed by yichoi
parent 01dd2f0b2a
commit 7ccbe97b79
4 changed files with 22 additions and 21 deletions
+21
View File
@@ -203,3 +203,24 @@ jerry_debugger_wait_and_run_client_source (jerry_value_t *return_value) /**< [ou
return JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED;
#endif /* JERRY_DEBUGGER */
} /* jerry_debugger_wait_and_run_client_source */
/**
* Send the output of the program to the debugger client.
* Currently only sends print output.
*/
#ifdef JERRY_DEBUGGER
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 */
#endif /* JERRY_DEBUGGER */