aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/debugger/debugger.h
diff options
context:
space:
mode:
Diffstat (limited to 'jerry-core/debugger/debugger.h')
-rw-r--r--jerry-core/debugger/debugger.h54
1 files changed, 51 insertions, 3 deletions
diff --git a/jerry-core/debugger/debugger.h b/jerry-core/debugger/debugger.h
index 5b1db984..11caadcd 100644
--- a/jerry-core/debugger/debugger.h
+++ b/jerry-core/debugger/debugger.h
@@ -26,7 +26,7 @@
/**
* JerryScript debugger protocol version.
*/
-#define JERRY_DEBUGGER_VERSION (6)
+#define JERRY_DEBUGGER_VERSION (7)
/**
* Frequency of calling jerry_debugger_receive() by the VM.
@@ -157,7 +157,9 @@ typedef enum
JERRY_DEBUGGER_WAIT_FOR_SOURCE = 25, /**< engine waiting for source code */
JERRY_DEBUGGER_OUTPUT_RESULT = 26, /**< output sent by the program to the debugger */
JERRY_DEBUGGER_OUTPUT_RESULT_END = 27, /**< last output result data */
-
+ JERRY_DEBUGGER_SCOPE_CHAIN = 28,
+ JERRY_DEBUGGER_SCOPE_VARIABLES = 29,
+ JERRY_DEBUGGER_SCOPE_VARIABLES_END = 30,
JERRY_DEBUGGER_MESSAGES_OUT_MAX_COUNT, /**< number of different type of output messages by the debugger */
/* Messages sent by the client to server. */
@@ -187,7 +189,8 @@ typedef enum
JERRY_DEBUGGER_GET_BACKTRACE = 16, /**< get backtrace */
JERRY_DEBUGGER_EVAL = 17, /**< first message of evaluating a string */
JERRY_DEBUGGER_EVAL_PART = 18, /**< next message of evaluating a string */
-
+ JERRY_DEBUGGER_GET_SCOPE_CHAIN = 19, /**< get the lex env names from the scope chain */
+ JERRY_DEBUGGER_GET_SCOPE_VARIABLES = 20,
JERRY_DEBUGGER_MESSAGES_IN_MAX_COUNT, /**< number of different type of input messages */
} jerry_debugger_header_type_t;
@@ -235,6 +238,33 @@ typedef enum
} jerry_debugger_output_subtype_t;
/**
+ * Types of scope chain.
+ *
+ */
+typedef enum
+{
+ JERRY_DEBUGGER_SCOPE_WITH = 1, /**< with */
+ JERRY_DEBUGGER_SCOPE_LOCAL = 2, /**< local */
+ JERRY_DEBUGGER_SCOPE_CLOSURE = 3, /**< closure */
+ JERRY_DEBUGGER_SCOPE_GLOBAL = 4, /**< global */
+ JERRY_DEBUGGER_SCOPE_CATCH = 5
+} jerry_debugger_scope_chain_type_t;
+
+
+typedef enum
+{
+ JERRY_DEBUGGER_VARIABLE_NONE = 1,
+ JERRY_DEBUGGER_VARIABLE_UNDEFINED = 2,
+ JERRY_DEBUGGER_VARIABLE_NULL = 3,
+ JERRY_DEBUGGER_VARIABLE_BOOLEAN = 4,
+ JERRY_DEBUGGER_VARIABLE_NUMBER = 5,
+ JERRY_DEBUGGER_VARIABLE_STRING = 6,
+ JERRY_DEBUGGER_VARIABLE_FUNCTION = 7,
+ JERRY_DEBUGGER_VARIABLE_ARRAY = 8,
+ JERRY_DEBUGGER_VARIABLE_OBJECT = 9
+} jerry_debugger_scope_variable_type_t;
+
+/**
* Byte data for evaluating expressions and receiving client source.
*/
typedef struct
@@ -370,6 +400,15 @@ typedef struct
} jerry_debugger_send_backtrace_t;
/**
+ * Outgoing message: scope chain information.
+ */
+typedef struct
+{
+ uint8_t type; /**< type of the message */
+ uint8_t chain_types[]; /**< scope chain types */
+} jerry_debugger_send_scope_chain_t;
+
+/**
* Outgoing message: number of total frames in backtrace.
*/
typedef struct
@@ -417,6 +456,15 @@ typedef struct
} jerry_debugger_receive_eval_first_t;
/**
+ * Incoming message: get scope variables
+*/
+typedef struct
+{
+ uint8_t type; /**< type of the message */
+ uint8_t chain_index[sizeof (uint32_t)]; /**< index element of the scope */
+} jerry_debugger_receive_get_scope_variables_t;
+
+/**
* Incoming message: first message of client source.
*/
typedef struct