978 |
"Linux CPU emulator (compiled for %s emulation)\n" |
"Linux CPU emulator (compiled for %s emulation)\n" |
979 |
"\n" |
"\n" |
980 |
"-h print this help\n" |
"-h print this help\n" |
981 |
"-g wait gdb connection to port %d\n" |
"-g port wait gdb connection to port\n" |
982 |
"-L path set the elf interpreter prefix (default=%s)\n" |
"-L path set the elf interpreter prefix (default=%s)\n" |
983 |
"-s size set the stack size in bytes (default=%ld)\n" |
"-s size set the stack size in bytes (default=%ld)\n" |
984 |
"\n" |
"\n" |
989 |
"-d options activate log (logfile=%s)\n" |
"-d options activate log (logfile=%s)\n" |
990 |
"-p pagesize set the host page size to 'pagesize'\n", |
"-p pagesize set the host page size to 'pagesize'\n", |
991 |
TARGET_ARCH, |
TARGET_ARCH, |
|
DEFAULT_GDBSTUB_PORT, |
|
992 |
interp_prefix, |
interp_prefix, |
993 |
x86_stack_size, |
x86_stack_size, |
994 |
DEBUG_LOGFILE); |
DEBUG_LOGFILE); |
1012 |
CPUState *env; |
CPUState *env; |
1013 |
int optind; |
int optind; |
1014 |
const char *r; |
const char *r; |
1015 |
int use_gdbstub = 0; |
int gdbstub_port = 0; |
1016 |
|
|
1017 |
if (argc <= 1) |
if (argc <= 1) |
1018 |
usage(); |
usage(); |
1067 |
exit(1); |
exit(1); |
1068 |
} |
} |
1069 |
} else if (!strcmp(r, "g")) { |
} else if (!strcmp(r, "g")) { |
1070 |
use_gdbstub = 1; |
gdbstub_port = atoi(argv[optind++]); |
1071 |
} else |
} else |
1072 |
#ifdef USE_CODE_COPY |
#ifdef USE_CODE_COPY |
1073 |
if (!strcmp(r, "no-code-copy")) { |
if (!strcmp(r, "no-code-copy")) { |
1246 |
#error unsupported target CPU |
#error unsupported target CPU |
1247 |
#endif |
#endif |
1248 |
|
|
1249 |
if (use_gdbstub) { |
if (gdbstub_port) { |
1250 |
gdbserver_start (DEFAULT_GDBSTUB_PORT); |
gdbserver_start (gdbstub_port); |
1251 |
gdb_handlesig(env, 0); |
gdb_handlesig(env, 0); |
1252 |
} |
} |
1253 |
cpu_loop(env); |
cpu_loop(env); |