Fix multiple debugger issues. (#1640)

- Wait for free byte code pointers during garbage collection.
- Detect incorrect free requests in the debugger server.
- Ignore byte code blocks loaded from snapshot.
- Use memmove instead of memcpy to avoid receive buffer corruption.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-03-06 11:13:25 +01:00
committed by GitHub
parent b996841a65
commit b5a91069fd
9 changed files with 110 additions and 62 deletions
+1
View File
@@ -88,6 +88,7 @@ typedef struct
uint8_t debugger_send_buffer[JERRY_DEBUGGER_MAX_BUFFER_SIZE]; /**< buffer for sending messages */
uint8_t debugger_receive_buffer[JERRY_DEBUGGER_MAX_BUFFER_SIZE]; /**< buffer for receiving messages */
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 */
int debugger_connection; /**< hold the file descriptor for socket communication */
uint8_t debugger_flags; /**< debugger flags */
vm_frame_ctx_t *debugger_stop_context; /**< stop only if the current context is equal to this context */