Fix inserting pending breakpoints. (#2163)

Before this patch the JS execution is started right after the parsing
is completed. The problem is that some parts of the JS code is executed
before the debugger had any chance to insert pending breakpoints due
to network latency. This patch adds a delay after parsing when at least
one pendding breakpoint is available.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-01-23 10:47:47 +01:00
committed by GitHub
parent 40d05cdca2
commit 1c64c1aeb7
11 changed files with 271 additions and 147 deletions
+3 -3
View File
@@ -116,11 +116,11 @@ typedef struct
vm_frame_ctx_t *debugger_stop_context; /**< stop only if the current context is equal to this context */
jmem_cpointer_t debugger_byte_code_free_head; /**< head of byte code free linked list */
jmem_cpointer_t debugger_byte_code_free_tail; /**< tail of byte code free linked list */
uint8_t debugger_flags; /**< debugger flags */
uint8_t debugger_message_delay; /**< call receive message when reaches zero */
uint32_t debugger_flags; /**< debugger flags */
uint16_t debugger_receive_buffer_offset; /**< receive buffer offset */
int debugger_connection; /**< holds the file descriptor of the socket communication */
uint16_t debugger_port; /**< debugger socket communication port */
uint8_t debugger_message_delay; /**< call receive message when reaches zero */
int debugger_connection; /**< holds the file descriptor of the socket communication */
#endif /* JERRY_DEBUGGER */
#ifdef JMEM_STATS