Title: [214945] trunk/Tools
Revision
214945
Author
[email protected]
Date
2017-04-05 07:28:57 -0700 (Wed, 05 Apr 2017)

Log Message

Add debug option to run-jsc script
https://bugs.webkit.org/show_bug.cgi?id=170503

Reviewed by Yusuke Suzuki.

Adds a new option to the run-jsc script so that when passed
"--debug" it will wrap the jsc call with an lldb invocation. If
someone wishes to use a different debugger they can set the
DEBUGGER environment variable. Additionally, run-jsc now exits
with the exit status of the jsc call.

* Scripts/run-jsc:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (214944 => 214945)


--- trunk/Tools/ChangeLog	2017-04-05 13:36:47 UTC (rev 214944)
+++ trunk/Tools/ChangeLog	2017-04-05 14:28:57 UTC (rev 214945)
@@ -1,3 +1,18 @@
+2017-04-05  Keith Miller  <[email protected]>
+
+        Add debug option to run-jsc script
+        https://bugs.webkit.org/show_bug.cgi?id=170503
+
+        Reviewed by Yusuke Suzuki.
+
+        Adds a new option to the run-jsc script so that when passed
+        "--debug" it will wrap the jsc call with an lldb invocation. If
+        someone wishes to use a different debugger they can set the
+        DEBUGGER environment variable. Additionally, run-jsc now exits
+        with the exit status of the jsc call.
+
+        * Scripts/run-jsc:
+
 2017-04-05  Andy Estes  <[email protected]>
 
         REGRESSION (r202472): Data Detection overwrites existing links in detected ranges

Modified: trunk/Tools/Scripts/run-jsc (214944 => 214945)


--- trunk/Tools/Scripts/run-jsc	2017-04-05 13:36:47 UTC (rev 214944)
+++ trunk/Tools/Scripts/run-jsc	2017-04-05 14:28:57 UTC (rev 214945)
@@ -37,22 +37,30 @@
 use webkitdirs;
 Getopt::Long::Configure("pass_through");
 
-my $usage = "Usage: run-jsc [--count run_count] shell_file [file2...]";
+my $usage = "Usage: run-jsc [--count run_count] [--debug] shell_file [file2...]";
 
 my $count = 1;
+my $debug = 0;
+
 GetOptions("count|c=i" => \$count);
+GetOptions("debug" => \$debug);
 
 setConfiguration();
 
-my $jsc = File::Spec->catfile(jscProductDir(), "jsc ") . "@ARGV";
+my $jsc;
+if ($debug) {
+    my $debugger = defined($ENV{"DEBUGGER"}) ? $ENV{"DEBUGGER"} : "lldb";
+    $jsc = $debugger . " " . File::Spec->catfile(jscProductDir(), "jsc -- ") . "@ARGV";
+} else {
+    $jsc = File::Spec->catfile(jscProductDir(), "jsc ") . "@ARGV";
+}
 
 my $dyld = jscProductDir();
 
 $ENV{"DYLD_FRAMEWORK_PATH"} = $dyld;
 print STDERR "Running $count time(s): DYLD_FRAMEWORK_PATH=$dyld $jsc\n";
+
 while ($count--) {
-    if (system("$jsc") != 0) {
-        last;
-    }
+    my $status = system("$jsc") >> 8;
+    exit $status if $status != 0;
 }
-
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to