/[qemu]/qemu/linux-user/main.c
ViewVC logotype

Diff of /qemu/linux-user/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70 by bellard, Sun Jul 24 18:44:56 2005 UTC revision 1.71 by bellard, Sun Oct 30 21:01:05 2005 UTC
# Line 978  void usage(void) Line 978  void usage(void)
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"
# Line 989  void usage(void) Line 989  void usage(void)
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);
# Line 1013  int main(int argc, char **argv) Line 1012  int main(int argc, char **argv)
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();
# Line 1068  int main(int argc, char **argv) Line 1067  int main(int argc, char **argv)
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")) {
# Line 1247  int main(int argc, char **argv) Line 1246  int main(int argc, char **argv)
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);

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26