Unified · Split
| @@ -258,11 +258,13 @@ void print_banner(const exec_options &options) · 257 unmodified lines | ||
| 258 | 258 | void print_help() |
| 259 | 259 | { |
| 260 | 260 | std::cout |
| 261 | − << "Usage: disvm-exec [-d[e|m|x]*] [-l[s|S|t|T|e|g|m]*] [-t <num>] [-q] [-h] <entry module> <args>*\n" | |
| 261 | + << "Usage: disvm-exec [-d[e|m|x]*] [-l[s|S|t|T|e|g|m]*] [-gD] [-t <num>] [-q] [-h] <entry module> <args>*\n" | |
| 262 | 262 | " d - Enable debugger\n" |
| 263 | 263 | " e - Break on entry\n" |
| 264 | 264 | " m - Break on module load\n" |
| 265 | 265 | " x - Break on exception (first chance)\n" |
| 266 | + " g - Garbage collector options\n" | |
| 267 | + " D - Disable\n" | |
| 266 | 268 | " l - Enable logging in a component\n" |
| 267 | 269 | " s - Scheduler\n" |
| 268 | 270 | " S - Stack\n" |
| @@ -274,7 +276,7 @@ void print_help() · 5 unmodified lines | ||
| 274 | 276 | " m - Memory allocations (noisy)\n" |
| 275 | 277 | " q - Suppress banner and configuration\n" |
| 276 | 278 | " t - Specify the number of system threads to use (0 < x <= 4)\n" |
| 277 | − " h - Print help (alternative: '?')\n"; | |
| 279 | + " h - Print this help (alternative: '?')\n"; | |
| 278 | 280 | } |
| 279 | 281 | |
| 280 | 282 | void log_callback(const component_trace_t origin, const log_level_t level, const char *msg_fmt, std::va_list args) |
| @@ -335,6 +337,13 @@ void process_arg(char* arg, std::function<char *()> next, exec_options &options) · 54 unmodified lines | ||
| 335 | 337 | } |
| 336 | 338 | break; |
| 337 | 339 | |
| 340 | + case 'g': | |
| 341 | + if (arg_len <= 2 || arg[2] != 'D') | |
| 342 | + throw arg_exception_t{ "Invalid garbage collector option" }; | |
| 343 | + | |
| 344 | + options.vm_config.create_gc = disvm::runtime::create_no_op_gc; | |
| 345 | + break; | |
| 346 | + | |
| 338 | 347 | case 't': |
| 339 | 348 | { |
| 340 | 349 | auto sys_threads_str = next(); |