Mercurial > repos > blastem
comparison debug.h @ 2665:54ac5fe14cf9
Allow calling functions directly as if they were commands
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Mar 2025 21:45:53 -0800 |
parents | d74d3998482c |
children | 7e86ec94c899 |
comparison
equal
deleted
inserted
replaced
2664:36ae207af490 | 2665:54ac5fe14cf9 |
---|---|
109 typedef struct { | 109 typedef struct { |
110 parsed_command *commands; | 110 parsed_command *commands; |
111 int num_commands; | 111 int num_commands; |
112 } command_block; | 112 } command_block; |
113 | 113 |
114 typedef debug_val (*debug_native_func)(debug_val *args, int num_args); | |
115 typedef struct { | |
116 union { | |
117 debug_native_func native; | |
118 command_block block; | |
119 } impl; | |
120 char **arg_names; | |
121 int max_args; | |
122 int min_args; | |
123 uint8_t is_native; | |
124 } debug_func; | |
125 | |
114 struct parsed_command { | 126 struct parsed_command { |
115 command_def *def; | 127 command_def *def; |
128 uint32_t func; | |
116 char *format; | 129 char *format; |
117 char *raw; | 130 char *raw; |
118 command_arg *args; | 131 command_arg *args; |
119 int num_args; | 132 int num_args; |
120 command_block block; | 133 command_block block; |
151 debug_array_append append; | 164 debug_array_append append; |
152 void *base; | 165 void *base; |
153 uint32_t size; | 166 uint32_t size; |
154 uint32_t storage; | 167 uint32_t storage; |
155 }; | 168 }; |
156 | |
157 typedef debug_val (*debug_native_func)(debug_val *args, int num_args); | |
158 typedef struct { | |
159 union { | |
160 debug_native_func native; | |
161 command_block block; | |
162 } impl; | |
163 char **arg_names; | |
164 int max_args; | |
165 int min_args; | |
166 uint8_t is_native; | |
167 } debug_func; | |
168 | 169 |
169 typedef struct { | 170 typedef struct { |
170 char *buffer; | 171 char *buffer; |
171 uint32_t size; | 172 uint32_t size; |
172 uint32_t storage; | 173 uint32_t storage; |