mem: Clean up Request initialisation
[gem5.git] / util / tracediff
index 5f980ea5cf68ef643b1d8248256ca9c702687032..5c77d9caff036d88e0cc5b19293aa653c7a16d3b 100755 (executable)
@@ -87,8 +87,11 @@ if (@ARGV < 1) {
 
 foreach $arg (@ARGV) {
     $a1 = $a2 = '';
-    @subargs = split('#', $arg, -1);
+    @subargs = split('#', $arg);
     foreach $subarg (@subargs) {
+        if ($subarg eq '') {
+            next;
+        }
         @pair = split('\|', $subarg, -1); # -1 enables null trailing fields
         if (@pair == 1) {
             $a1 .= $subarg;
@@ -97,7 +100,7 @@ foreach $arg (@ARGV) {
             $a1 .= $pair[0];
             $a2 .= $pair[1];
         } else {
-            print 'Parse error: too many |s in ', $arg, '\n';
+            print 'Parse error: too many |s in ', $arg, "\n";
             exit(1);
         }
     }
@@ -121,11 +124,11 @@ $sim2 = shift @cmd2;
 $args1 = join(' ', @cmd1);
 $args2 = join(' ', @cmd2);
 
-# Common mistake: if you don't set any traceflags this often isn't
+# Common mistake: if you don't set any debugflags this often isn't
 # doing what you want.
-if ($args1 !~ /--trace-flags/) {
+if ($args1 !~ /--debug-flags/) {
     print "****\n";
-    print "**** WARNING: no trace flags set... you may not be diffing much!\n";
+    print "**** WARNING: no debug flags set... you may not be diffing much!\n";
     print "****\n";
 }