+sub crashLocation($)
+{
+ my ($base) = @_;
+
+ return unless isCygwin();
+
+ my $crashLogFile = File::Spec->catfile($testResultsDirectory, "$base-$crashLogTag.txt");
+
+ # We're looking for the following text:
+ #
+ # FOLLOWUP_IP:
+ # module!function+offset [file:line]
+ #
+ # The second contains the function that crashed (or the function that ended up jumping to a bad
+ # address, as in the case of a null function pointer).
+
+ open LOG, "<", $crashLogFile or return;
+ while (my $line = <LOG>) {
+ last if $line =~ /^FOLLOWUP_IP:/;
+ }
+ my $desiredLine = <LOG>;
+ close LOG;
+
+ return unless $desiredLine;
+
+ # Just take everything up to the first space (which is where the file/line information should
+ # start).
+ $desiredLine =~ /^(\S+)/;
+ return $1;
+}
+