diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-27 08:34:12 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-27 08:34:12 -0700 |
| commit | e265d7c7efe51bc425e39c7fa208a6f421bba199 (patch) | |
| tree | 33aa820f50d73ad456d516d1cf4f1281faad63c1 /tools | |
| parent | 82991049beb1514dc2dcebe335444593e56ab49a (diff) | |
| parent | f3ebb89392163afba18f0f05634255adaf527294 (diff) | |
| download | mruby-e265d7c7efe51bc425e39c7fa208a6f421bba199.tar.gz mruby-e265d7c7efe51bc425e39c7fa208a6f421bba199.zip | |
Merge pull request #1082 from masuidrive/add_debug_info
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 0aa54a468..e74d4bb80 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); |
