tools/summarise_rvct_errors.pl
author William Roberts <williamr@symbian.org>
Wed, 14 Apr 2010 09:46:27 +0100
changeset 6 2618a0f10e3e
parent 4 c0296ad2454d
child 11 3dcb71781467
permissions -rw-r--r--
Collate the RVCT "cannot open source input file" errors to list the missing files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
#! perl
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
# Copyright (c) 2010 Symbian Foundation Ltd
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
#
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
# Initial Contributors:
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
# Symbian Foundation Ltd - initial contribution.
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
# 
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
# Contributors:
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
#
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
# Description:
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
# Perl script to summarise GCC logs
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
use strict;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
use Getopt::Long;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
sub Usage($)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
  {
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
  my ($msg) = @_;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
  
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
  print "$msg\n\n" if ($msg ne "");
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
  
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
	print <<'EOF';
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
summarise_gcc_errors.pl - simple script for analysing gcc error logs
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
	
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
This script will read a collection of GCC output logs and summarise
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
the error messages in various useful ways.
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
Options:
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    33
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
-warnings      process warnings as well as errors
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    35
-verbose       list the files associated with each error
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    36
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
EOF
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
  exit (1);  
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    39
  }
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    41
my $warnings = 0;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    42
my $verbose = 0;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
# Analyse the rest of command-line parameters
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    45
if (!GetOptions(
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    46
    "w|warnings" => \$warnings,
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    47
    "v|verbose" => \$verbose,
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
    ))
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
  {
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
  Usage("Invalid argument");
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
  }
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
my $current_package = ""; 
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
my %files;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
my %errors_by_file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56
my %error_count_by_file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    57
my %errors;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    58
my %message_ids;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    59
my %files_by_message_id;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    60
my %messages_by_id;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    61
my %unique_message_counts;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    62
my %all_message_counts;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    63
my $next_message_id = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    64
my %packages_by_file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    65
my %package_count_by_file;
6
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    66
my %missing_files;
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    67
4
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    68
my $linktarget = "";
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    69
my %visibility_problems;
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    71
my $line;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    72
while ($line = <>)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    73
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    74
	# </pre>os/usb, usb_CompilerCompatibility.005, SF_builds/usb/builds/CompilerCompatibility/usb_CompilerCompatibility.005/html/os_usb_failures.html
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    75
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    76
	if ($line =~/\/html\/([^\/]+)_failures.html/)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    77
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    78
		$current_package = $1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    79
		$current_package =~ s/_/\//;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    82
6
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    83
	# Error: #5: cannot open source input file "lbs/epos_cposprivacynotifier.h":
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    84
	
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    85
	if ($line =~ /cannot open source input file (\"|&quot;)(.*)(\"|&quot)/)
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    86
		{
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    87
		my $missing_file = $2;
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    88
		my $count = $missing_files{$missing_file};
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    89
		$count = 0 if (!defined $count);
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    90
		$missing_files{$missing_file} = $count + 1;
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    91
		
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    92
		# and fall through to the rest of the processing...
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
    93
		}
4
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    94
	# ... &#39;--soname=glxgridviewplugin{000a0000}[20000a03].dll&x39; ...
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    95
	
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    96
	if ($line =~ /--soname=(\S+)(.000a0000.)?(\S+)[&']/)
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    97
		{
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    98
		$linktarget = $1.$3;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    99
		next;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   100
		}
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   101
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   102
	# Error: L6410W: Symbol CGlxGridViewPluginBase::AddCommandHandlersL() with non STV_DEFAULT visibility STV_HIDDEN should be resolved statically, cannot use definition in glxgridviewpluginbase{000a0000}.dso.
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   103
  
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   104
  if ($line =~ /Error: L6410W: Symbol (.*) with .*, cannot use definition in (\S+)./)
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   105
  	{
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   106
  	my $symbol = $1;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   107
  	my $dll = $2;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   108
		$symbol =~ s/&amp;/&/g;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   109
		$symbol =~ s/&gt;/>/g;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   110
		$symbol =~ s/&lt;/</g;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   111
  	$visibility_problems{"$current_package\t$dll:\t$symbol\timpacts $linktarget"} = 1;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   112
  	next;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   113
		}
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   114
	# Error: L6218E: Undefined symbol RHTTPTransaction::Session() const (referred from caldavutils.o).
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   115
	
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   116
	if ($line =~ /Error: L6218E: Undefined symbol (.*) \(referred from (\S+)\)/)
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   117
		{
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   118
		my $symbol = $1;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   119
		my $impacted = $2;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   120
		$symbol =~ s/&amp;/&/g;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   121
		$symbol =~ s/&gt;/>/g;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   122
		$symbol =~ s/&lt;/</g;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   123
  	$visibility_problems{"$current_package\t???\t$symbol\timpacts $linktarget, $impacted"} = 1;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   124
		next;		
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   125
		}
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   126
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   127
	# &quot;J:/sf/app/commonemail/emailservices/emailclientapi/src/emailmailbox.cpp&quot;, line 49: Warning:  #830-D: function &quot;CBase::operator new(TUint, TLeave)&quot; has no corresponding operator delete (to be called if an exception is thrown during initialization of an allocated object)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   128
	
4
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   129
	if ($line =~ /^("|&quot;)(...*)("|&quot;), line (\d+): ([^:]+):\s+([^:]+): (.*)$/)
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   130
		{
4
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   131
		my $filename = $2;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   132
		my $lineno = $4;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   133
		my $messagetype = $5;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   134
		my $message_id = $6;
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   135
		my $message = $7;
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   136
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   137
		if ($messagetype eq "Warning" && !$warnings)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   138
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   139
			next;		# ignore warnings
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   140
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   141
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   142
		$filename =~ s/^.://;		# remove drive letter
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   143
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   144
		$message =~ s/&quot;/\"/g;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   145
		$message =~ s/&amp;/&/g;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   146
		$message =~ s/&gt;/>/g;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   147
		$message =~ s/&lt;/</g;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   148
		$message =~ s/&#39;/'/g;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   149
		my $generic_message = "$messagetype: $message_id: $message";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   150
		$generic_message =~ s/'offsetof'/"offsetof"/;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   151
		$generic_message =~ s/'([^a-zA-Z])'/"\1"/g;	# don't catch ';' in next substitution
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   152
		$generic_message =~ s/\"[^\"]+\"/XX/g;	# suppress quoted bits of the actual instance
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   153
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   154
		if (!defined $message_ids{$generic_message})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   155
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   156
			$message_ids{$generic_message} = $message_id;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   157
			$messages_by_id{$message_id} = $generic_message;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   158
			$all_message_counts{$message_id} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   159
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   160
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   161
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   162
			$all_message_counts{$message_id} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   163
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   164
		my $instance = sprintf("%s:%d: %s-#%d", $filename, $lineno, $messagetype, $message_id);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   165
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   166
		my $packages = $packages_by_file{$filename};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   167
		if (!defined $packages)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   168
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   169
			$packages_by_file{$filename} = "\t$current_package\t";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   170
			$package_count_by_file{$filename} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   171
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   172
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   173
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   174
			if (index($packages,"\t$current_package\t") < 0)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   175
				{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   176
				$packages_by_file{$filename} .= "\t$current_package\t";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   177
				$package_count_by_file{$filename} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   178
				}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   179
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   180
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   181
		if (defined $files{$instance})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   182
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   183
			# already seen this one
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   184
			next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   185
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   186
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   187
		if (!defined $unique_message_counts{$message_id})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   188
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   189
			$unique_message_counts{$message_id} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   190
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   191
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   192
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   193
			$unique_message_counts{$message_id} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   194
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   195
		$files{$instance} = $message;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   196
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   197
		if (!defined $files_by_message_id{$message_id})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   198
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   199
			$files_by_message_id{$message_id} = $filename;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   200
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   201
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   202
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   203
			$files_by_message_id{$message_id} .= "\n$filename";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   204
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   205
				
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   206
		my $error = sprintf "%-5d: %s: %s: %s", $lineno, $messagetype, $message_id, $message;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   207
		if (!defined $errors_by_file{$filename})
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   208
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   209
			$errors_by_file{$filename} = $error;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   210
			$error_count_by_file{$filename} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   211
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   212
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   213
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   214
			$errors_by_file{$filename} .= "\n$error";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   215
			$error_count_by_file{$filename} += 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   216
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   217
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   218
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   219
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   220
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   221
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   222
# clean up the file lists
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   223
my %filecount_by_message_id;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   224
foreach my $id (keys %files_by_message_id)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   225
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   226
	my @longlist = split /\n/, $files_by_message_id{$id};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   227
	my %uniq;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   228
	foreach my $file (@longlist)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   229
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   230
		$uniq{$file} = 1;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   231
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   232
	my $uniqlist = join( "\n\t", sort keys %uniq);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   233
	$files_by_message_id{$id} = $uniqlist;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   234
	$filecount_by_message_id{$id} = scalar keys %uniq;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   235
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   236
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   237
print "\n\n====Occurrences of messages (distinct, all)\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   238
foreach my $id ( sort {$unique_message_counts{$b} <=> $unique_message_counts{$a}} keys %unique_message_counts)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   239
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   240
	printf "%-6d\t%-6d\t%s\n", $unique_message_counts{$id}, $all_message_counts{$id}, $messages_by_id{$id};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   241
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   242
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   243
print "\n\n====Files affected per message\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   244
foreach my $id ( sort {$filecount_by_message_id{$b} <=> $filecount_by_message_id{$a}} keys %filecount_by_message_id)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   245
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   246
	printf "%-6d\t%s\n", $filecount_by_message_id{$id}, $messages_by_id{$id};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   247
	if ($verbose)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   248
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   249
		print "\t", $files_by_message_id{$id};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   250
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   251
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   252
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   253
print "\n\n====Packages impacted (if > 1)\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   254
foreach my $file ( sort {$package_count_by_file{$b} <=> $package_count_by_file{$a}} keys %package_count_by_file)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   255
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   256
	if ($package_count_by_file{$file} < 2)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   257
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   258
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   259
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   260
	my ($empty,@packages) = split /\t+/, $packages_by_file{$file};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   261
	printf "%-6d\t%s\n\t(%s)\n",$package_count_by_file{$file}, $file, join(", ", @packages);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   262
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   263
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   264
print "\n\n====Affected files by package\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   265
my $current_package = "";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   266
my @currentfiles;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   267
foreach my $file (sort keys %error_count_by_file)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   268
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   269
	my ($root, $sf, $layer, $packagename, @rest) = split /[\/\\]/, $file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   270
	my $package = "$sf/$layer/$packagename";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   271
	if ($layer eq "include")
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   272
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   273
		$package = "$sf/$layer";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   274
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   275
	if ($package ne $current_package)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   276
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   277
		if ($current_package ne "")
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   278
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   279
			printf "%-6d\t%s\n", scalar @currentfiles, $current_package;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   280
			print join("\n",@currentfiles);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   281
			print "\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   282
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   283
		$current_package = $package;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   284
		@currentfiles = ();
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   285
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   286
	my $filedetails = sprintf "\t%-6d\t%s", $error_count_by_file{$file}, $file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   287
	push @currentfiles, $filedetails;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   288
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   289
printf "%-6d\t%s\n", scalar @currentfiles, $current_package;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   290
print join("\n",@currentfiles);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   291
print "\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   292
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   293
print "\n\n====Messages by file\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   294
foreach my $file ( sort keys %error_count_by_file)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   295
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   296
	my @details = split "\n", $errors_by_file{$file};
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   297
	printf "%-6d\t%s\n\t", $error_count_by_file{$file}, $file;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   298
	print join("\n\t", @details);
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   299
	print "\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   300
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   301
4
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   302
print "\n\n====Visibility problems\n";
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   303
foreach my $problem ( sort keys %visibility_problems)
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   304
	{
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   305
	print "$problem\n";
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   306
	}
6
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
   307
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
   308
print "\n\n====Missing files\n";
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
   309
foreach my $file ( sort {$missing_files{$b} <=> $missing_files{$a}} keys %missing_files)
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
   310
	{
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
   311
	printf "%-6d\t%s\n",$missing_files{$file}, $file;
2618a0f10e3e Collate the RVCT "cannot open source input file" errors to list the missing files
William Roberts <williamr@symbian.org>
parents: 4
diff changeset
   312
	}