Don't write to inferior_ptid in remote.c
[deliverable/binutils-gdb.git] / sim / rl78 / main.c
index 4b4bacf5d04efdbd21f7d6e5afe5b5bc7ca8eb38..b2cc1ef94ae7af1406a49442d71014b12411e7e9 100644 (file)
@@ -1,7 +1,6 @@
 /* main.c --- main function for stand-alone RL78 simulator.
 
 /* main.c --- main function for stand-alone RL78 simulator.
 
-   Copyright (C) 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2011-2020 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of the GNU simulators.
    Contributed by Red Hat, Inc.
 
    This file is part of the GNU simulators.
@@ -69,7 +68,7 @@ main (int argc, char **argv)
 
   xmalloc_set_program_name (argv[0]);
 
 
   xmalloc_set_program_name (argv[0]);
 
-  while ((o = getopt (argc, argv, "tvdr:D:")) != -1)
+  while ((o = getopt (argc, argv, "tvdr:D:M:")) != -1)
     {
       switch (o)
        {
     {
       switch (o)
        {
@@ -88,6 +87,27 @@ main (int argc, char **argv)
        case 'D':
          dump_counts_filename = optarg;
          break;
        case 'D':
          dump_counts_filename = optarg;
          break;
+       case 'M':
+         if (strcmp (optarg, "g10") == 0)
+           {
+             rl78_g10_mode = 1;
+             g13_multiply = 0;
+             g14_multiply = 0;
+             mem_set_mirror (0, 0xf8000, 4096);
+           }
+         if (strcmp (optarg, "g13") == 0)
+           {
+             rl78_g10_mode = 0;
+             g13_multiply = 1;
+             g14_multiply = 0;
+           }
+         if (strcmp (optarg, "g14") == 0)
+           {
+             rl78_g10_mode = 0;
+             g13_multiply = 0;
+             g14_multiply = 1;
+           }
+         break;
        case '?':
          {
            fprintf (stderr,
        case '?':
          {
            fprintf (stderr,
@@ -97,6 +117,7 @@ main (int argc, char **argv)
                     "\t-t\t\t- trace.\n"
                     "\t-d\t\t- disassemble.\n"
                     "\t-r <bytes>\t- ram size.\n"
                     "\t-t\t\t- trace.\n"
                     "\t-d\t\t- disassemble.\n"
                     "\t-r <bytes>\t- ram size.\n"
+                    "\t-M <mcu>\t- mcu type, default none, allowed: g10,g13,g14\n"
                     "\t-D <filename>\t- dump cycle count histogram\n");
            exit (1);
          }
                     "\t-D <filename>\t- dump cycle count histogram\n");
            exit (1);
          }
This page took 0.029089 seconds and 4 git commands to generate.