Mercurial > repos > blastem
comparison debug.h @ 2395:ebca8ab02701
Basic string support in debugger language
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 13 Dec 2023 20:09:18 -0800 |
parents | 5f4917b9ecfa |
children | bf4f1a8d1d48 |
comparison
equal
deleted
inserted
replaced
2394:340299a76db7 | 2395:ebca8ab02701 |
---|---|
21 TOKEN_OPER, | 21 TOKEN_OPER, |
22 TOKEN_SIZE, | 22 TOKEN_SIZE, |
23 TOKEN_LBRACKET, | 23 TOKEN_LBRACKET, |
24 TOKEN_RBRACKET, | 24 TOKEN_RBRACKET, |
25 TOKEN_LPAREN, | 25 TOKEN_LPAREN, |
26 TOKEN_RPAREN | 26 TOKEN_RPAREN, |
27 TOKEN_STRING | |
27 } token_type; | 28 } token_type; |
28 | 29 |
29 typedef struct { | 30 typedef struct { |
30 token_type type; | 31 token_type type; |
31 union { | 32 union { |
160 char **arg_names; | 161 char **arg_names; |
161 int max_args; | 162 int max_args; |
162 int min_args; | 163 int min_args; |
163 uint8_t is_native; | 164 uint8_t is_native; |
164 } debug_func; | 165 } debug_func; |
166 | |
167 typedef struct { | |
168 char *buffer; | |
169 uint32_t size; | |
170 uint32_t storage; | |
171 } debug_string; | |
165 | 172 |
166 typedef struct debug_var debug_var; | 173 typedef struct debug_var debug_var; |
167 typedef debug_val (*debug_var_get)(debug_var *var); | 174 typedef debug_val (*debug_var_get)(debug_var *var); |
168 typedef void (*debug_var_set)(debug_var *var, debug_val val); | 175 typedef void (*debug_var_set)(debug_var *var, debug_val val); |
169 | 176 |