]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Only treat colons in the switch name as important when looking for a
authorTom Hughes <tom@compton.nu>
Sun, 18 Jul 2004 08:05:44 +0000 (08:05 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 18 Jul 2004 08:05:44 +0000 (08:05 +0000)
toolname to check - colons in the switch value are now ignored.

CCMAIL: 85416-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2503

coregrind/vg_main.c

index e2a15e4836b7be97b96487e1b1344e2274be6a0f..a8a09b5cf2f2dca37393b6d6ad93748155373458 100644 (file)
@@ -1689,11 +1689,14 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname )
    for (i = 1; i < VG_(vg_argc); i++) {
 
       Char* arg = VG_(vg_argv)[i];
+      Char* colon = arg;
 
-      // XXX: allow colons in options, for Josef
+      /* Look for a colon in the switch name */
+      while (*colon && *colon != ':' && *colon != '=')
+         colon++;
 
       /* Look for matching "--toolname:foo" */
-      if (VG_(strstr)(arg, ":")) {
+      if (*colon == ':') {
          if (VG_CLO_STREQN(2,            arg,                "--") && 
              VG_CLO_STREQN(toolname_len, arg+2,              toolname) &&
              VG_CLO_STREQN(1,            arg+2+toolname_len, ":"))