25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: main.c,v 1.238 2005/06/25 13:25:33 debug Exp $ |
* $Id: main.c,v 1.243 2005/08/07 17:42:02 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
217 |
"with -E.)\n"); |
"with -E.)\n"); |
218 |
|
|
219 |
printf("\nOther options:\n"); |
printf("\nOther options:\n"); |
220 |
|
printf(" -A disable alignment checks in some cases (for higher" |
221 |
|
" speed)\n"); |
222 |
#ifdef BINTRANS |
#ifdef BINTRANS |
223 |
printf(" -B disable dynamic binary translation. (translation" |
printf(" -B disable dynamic binary translation. (translation" |
224 |
" is turned on\n by default, if the host " |
" is turned on\n by default, if the host " |
340 |
int msopts = 0; /* Machine-specific options used */ |
int msopts = 0; /* Machine-specific options used */ |
341 |
struct machine *m = emul_add_machine(emul, "default"); |
struct machine *m = emul_add_machine(emul, "default"); |
342 |
|
|
343 |
while ((ch = getopt(argc, argv, "BC:Dd:E:e:HhI:iJj:KM:m:" |
while ((ch = getopt(argc, argv, "ABC:Dd:E:e:HhI:iJj:KM:m:" |
344 |
"Nn:Oo:p:QqRrSsTtUu:VvW:XxY:y:Z:z:")) != -1) { |
"Nn:Oo:p:QqRrSsTtUu:VvW:XxY:y:Z:z:")) != -1) { |
345 |
switch (ch) { |
switch (ch) { |
346 |
|
case 'A': |
347 |
|
m->dyntrans_alignment_check = 0; |
348 |
|
msopts = 1; |
349 |
|
break; |
350 |
case 'B': |
case 'B': |
351 |
m->bintrans_enable = 0; |
m->bintrans_enable = 0; |
352 |
msopts = 1; |
msopts = 1; |
553 |
} |
} |
554 |
} |
} |
555 |
|
|
556 |
if (type != NULL) { |
if (type != NULL || subtype != NULL) { |
557 |
|
if (type == NULL) |
558 |
|
type = ""; |
559 |
if (subtype == NULL) |
if (subtype == NULL) |
560 |
subtype = ""; |
subtype = ""; |
561 |
res = machine_name_to_type(type, subtype, |
res = machine_name_to_type(type, subtype, |
578 |
} |
} |
579 |
|
|
580 |
|
|
581 |
/* -i, -r, -t are pretty verbose: */ |
/* -i and -r are pretty verbose: */ |
582 |
|
|
583 |
if (m->instruction_trace && !verbose) { |
if (m->instruction_trace && !verbose) { |
584 |
fprintf(stderr, "Implicitly %sturning on -v, because" |
fprintf(stderr, "Implicitly %sturning on -v, because" |
594 |
quiet_mode = 0; |
quiet_mode = 0; |
595 |
} |
} |
596 |
|
|
|
if (m->show_trace_tree && !verbose) { |
|
|
fprintf(stderr, "Implicitly %sturning on -v, because" |
|
|
" of -t\n", quiet_mode? "turning off -q and " : ""); |
|
|
verbose = 1; |
|
|
quiet_mode = 0; |
|
|
} |
|
|
|
|
597 |
if ((m->instruction_trace || m->register_dump || m->show_trace_tree) |
if ((m->instruction_trace || m->register_dump || m->show_trace_tree) |
598 |
&& m->bintrans_enable) { |
&& m->bintrans_enable) { |
599 |
fprintf(stderr, "Implicitly turning off bintrans.\n"); |
fprintf(stderr, "Implicitly turning off bintrans.\n"); |
651 |
/* TODO: Print a warning about this? */ |
/* TODO: Print a warning about this? */ |
652 |
} |
} |
653 |
|
|
654 |
if (m->n_breakpoints > 0 && m->bintrans_enable) { |
if (m->n_breakpoints > 0 && |
655 |
fprintf(stderr, "Breakpoints and dynamic translation " |
m->bintrans_enable && m->arch == ARCH_MIPS) { |
656 |
|
fprintf(stderr, "Breakpoints and MIPS binary translation " |
657 |
"don't work too well together right now.\n"); |
"don't work too well together right now.\n"); |
658 |
exit(1); |
exit(1); |
659 |
} |
} |
795 |
|
|
796 |
if (n_emuls == 0) { |
if (n_emuls == 0) { |
797 |
fprintf(stderr, "No emulations defined. Maybe you forgot to " |
fprintf(stderr, "No emulations defined. Maybe you forgot to " |
798 |
"use -E xx (and -e yy), to specify\nthe machine type)." |
"use -E xx and/or -e yy, to specify\nthe machine type." |
799 |
" For example:\n\n %s -E dec -e 3max -d disk.img\n\n" |
" For example:\n\n %s -e 3max -d disk.img\n\n" |
800 |
"to boot an emulated DECstation 5000/200 with a disk " |
"to boot an emulated DECstation 5000/200 with a disk " |
801 |
"image.\n", progname); |
"image.\n", progname); |
802 |
exit(1); |
exit(1); |