OSDN Git Service

2002-06-17 Elena Zannoni <ezannoni@redhat.com>
authorezannoni <ezannoni>
Mon, 17 Jun 2002 19:58:39 +0000 (19:58 +0000)
committerezannoni <ezannoni>
Mon, 17 Jun 2002 19:58:39 +0000 (19:58 +0000)
* psim.c (psim_options): Don't choke when gdb invokes us with
the --architecture option, just ignore it.

sim/ppc/ChangeLog
sim/ppc/psim.c

index 3138c94..6ced05b 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-17  Elena Zannoni  <ezannoni@redhat.com>
+
+       * psim.c (psim_options): Don't choke when gdb invokes us with
+       the --architecture option, just ignore it.
+
 2002-06-16  Andrew Cagney  <ac131313@redhat.com>
 
        * configure: Regenerated to track ../common/aclocal.m4 changes.
index 81e54b0..76bb452 100644 (file)
@@ -220,7 +220,7 @@ psim_usage(int verbose)
 }
 
 /* Test "string" for containing a string of digits that form a number
-between "min" and "max".  The return value is the number of "err". */
+between "min" and "max".  The return value is the number or "err". */
 static
 int is_num( char *string, int min, int max, int err)
 {
@@ -316,7 +316,6 @@ psim_options(device *root,
        break;
       case 'o':
        param = find_arg("Missing <dev-spec> option for -o\n", &argp, argv);
-#ifdef WITH_OPTION_MPC860C0
        if (memcmp(param, "mpc860c0", 8) == 0)
         {
           if (param[8] == '\0')
@@ -328,7 +327,6 @@ psim_options(device *root,
           else error("Invalid mpc860c0 option for -o\n");
         }
        else
-#endif // WITH_OPTION_MPC860C0
           current = tree_parse(current, "%s", param);
        break;
       case 'r':
@@ -343,6 +341,19 @@ psim_options(device *root,
        else
          tree_parse(root, "/openprom/trace/%s 1", param);
        break;
+      case '-':
+       /* it's a long option of the form --optionname=optionvalue.
+          Such options can be passed through if we are invoked by
+          gdb.  */
+       if (strstr(argv[argp], "architecture") != NULL) {
+          /* we must consume the argument here, so that we get out
+             of the loop.  */
+         p = argv[argp] + strlen(argv[argp]) - 1;
+         printf_filtered("Warning - architecture parameter ignored\n");
+        }
+       else
+         error("Unrecognized option");
+       break;
       }
       p += 1;
     }
@@ -354,9 +365,10 @@ psim_options(device *root,
               NULL, 0,
               device_ioctl_set_trace);
 
-#ifdef WITH_OPTION_MPC860C0
-  semantic_init(root);
-#endif // WITH_OPTION_MPC860C0
+  {
+    void semantic_init(device* root);
+    semantic_init(root);
+  }
 
   /* return where the options end */
   return argv + argp;