--- trunk/src/main.c 2007/10/08 16:18:11 6 +++ trunk/src/main.c 2007/10/08 16:18:27 10 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: main.c,v 1.236 2005/05/25 06:40:18 debug Exp $ + * $Id: main.c,v 1.238 2005/06/25 13:25:33 debug Exp $ */ #include @@ -218,8 +218,9 @@ printf("\nOther options:\n"); #ifdef BINTRANS - printf(" -B disable dynamic binary translation completely\n"); - printf(" -b use the OLD binary translation subsystem\n"); + printf(" -B disable dynamic binary translation. (translation" + " is turned on\n by default, if the host " + "supports it)\n"); #endif printf(" -C x try to emulate a specific CPU. (Use -H to get a " "list of types.)\n"); @@ -337,17 +338,13 @@ int msopts = 0; /* Machine-specific options used */ struct machine *m = emul_add_machine(emul, "default"); - while ((ch = getopt(argc, argv, "BbC:Dd:E:e:HhI:iJj:KM:m:" + while ((ch = getopt(argc, argv, "BC:Dd:E:e:HhI:iJj:KM:m:" "Nn:Oo:p:QqRrSsTtUu:VvW:XxY:y:Z:z:")) != -1) { switch (ch) { case 'B': m->bintrans_enable = 0; msopts = 1; break; - case 'b': - m->old_bintrans_enable = 1; - msopts = 1; - break; case 'C': m->cpu_name = strdup(optarg); msopts = 1; @@ -544,8 +541,8 @@ msopts = 1; break; default: - fprintf(stderr, "Invalid option.\n"); - usage(0); + fprintf(stderr, "Run %s -h for help on command " + "line options.\n", progname); exit(1); } } @@ -566,17 +563,6 @@ extra_argv = argv; - if (!m->bintrans_enable && m->old_bintrans_enable) { - fprintf(stderr, "You cannot both select old bintrans and" - " disable bintrans at the same time.\n"); - exit(1); - } - - /* TODO: Remove this once there is a new bintrans system. */ - if (m->bintrans_enable && !m->old_bintrans_enable) { - m->bintrans_enable = 0; - } - if (m->machine_type == MACHINE_NONE && msopts) { fprintf(stderr, "Machine specific options used directly on " "the command line, but no machine\nemulation specified?\n"); @@ -607,6 +593,12 @@ quiet_mode = 0; } + if ((m->instruction_trace || m->register_dump || m->show_trace_tree) + && m->bintrans_enable) { + fprintf(stderr, "Implicitly turning off bintrans.\n"); + m->bintrans_enable = 0; + } + /* * Usually, an executable filename must be supplied.