diff options
| author | Yuichiro MASUI <[email protected]> | 2013-03-27 18:02:48 +0900 |
|---|---|---|
| committer | Yuichiro MASUI <[email protected]> | 2013-03-27 18:21:04 +0900 |
| commit | f3ebb89392163afba18f0f05634255adaf527294 (patch) | |
| tree | 81de5eb967d20d17ba67cdbdfa1aa2cff4b21cde /tools | |
| parent | f1e6a4a3b564ac07f0b283af05bc2d7be5a31414 (diff) | |
| download | mruby-f3ebb89392163afba18f0f05634255adaf527294.tar.gz mruby-f3ebb89392163afba18f0f05634255adaf527294.zip | |
Added debug infomation section into .mrb file
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mrbc/mrbc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index 6535d5636..e217ef30f 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -21,6 +21,7 @@ struct _args { char *ext; mrb_bool check_syntax : 1; mrb_bool verbose : 1; + mrb_bool debug_info : 1; }; static void @@ -31,6 +32,7 @@ usage(const char *name) "-c check syntax only", "-o<outfile> place the output into <outfile>", "-v print version number, then trun on verbose mode", + "-g produce debugging information", "-B<symbol> binary <symbol> output in C language format", "--verbose run at verbose mode", "--version print the version", @@ -107,6 +109,9 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args) mrb_show_version(mrb); args->verbose = 1; break; + case 'g': + args->debug_info = 1; + break; case '-': if (strcmp((*argv) + 2, "version") == 0) { mrb_show_version(mrb); @@ -209,10 +214,10 @@ main(int argc, char **argv) return EXIT_SUCCESS; } if (args.initname) { - n = mrb_dump_irep_cfunc(mrb, n, args.wfp, args.initname); + n = mrb_dump_irep_cfunc(mrb, n, args.debug_info, args.wfp, args.initname); } else { - n = mrb_dump_irep_binary(mrb, n, args.wfp); + n = mrb_dump_irep_binary(mrb, n, args.debug_info, args.wfp); } cleanup(mrb, &args); |
