tools/summarise_rvct_errors.pl
author William Roberts <williamr@symbian.org>
Tue, 06 Apr 2010 21:24:03 +0100
changeset 4 c0296ad2454d
parent 3 5578c2bec847
child 6 2618a0f10e3e
permissions -rw-r--r--
Extend the summarise_rvct4_errors.pl script so that it picks up linker errors Also make it possible to scan the raptor Makefile.xxxx.log with this tool, for checking builds
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;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    66
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
    67
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
    68
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
    69
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
my $line;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    71
while ($line = <>)
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    72
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    73
	# </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
    74
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    75
	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
    76
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    77
		$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
    78
		$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
    79
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
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
    82
	# ... &#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
    83
	
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    84
	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
    85
		{
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    86
		$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
    87
		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
    88
		}
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    89
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    90
	# 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
    91
  
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
    92
  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
    93
  	{
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
  	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
    95
  	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
    96
		$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
    97
		$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
    98
		$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
    99
  	$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
   100
  	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
   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: 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
   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: 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
   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 $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
   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???\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
   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
3
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   115
	# &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
   116
	
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
   117
	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
   118
		{
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
   119
		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
   120
		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
   121
		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
   122
		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
   123
		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
   124
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   125
		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
   126
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   127
			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
   128
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   129
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   130
		$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
   131
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   132
		$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
   133
		$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
   134
		$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
   135
		$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
   136
		$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
   137
		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
   138
		$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
   139
		$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
   140
		$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
   141
		
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   142
		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
   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_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
   145
			$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
   146
			$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
   147
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   148
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   149
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   150
			$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
   151
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   152
		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
   153
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   154
		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
   155
		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
   156
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   157
			$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
   158
			$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
   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
			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
   163
				{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   164
				$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
   165
				$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
   166
				}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   167
			}
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
		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
   170
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   171
			# 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
   172
			next;
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
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   175
		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
   176
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   177
			$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
   178
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   179
		else
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
			$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
   182
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   183
		$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
   184
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   185
		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
   186
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   187
			$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
   188
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   189
		else
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
			$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
   192
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   193
				
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   194
		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
   195
		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
   196
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   197
			$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
   198
			$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
   199
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   200
		else
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   201
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   202
			$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
   203
			$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
   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
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   207
		}
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
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   210
# 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
   211
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
   212
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
   213
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   214
	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
   215
	my %uniq;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   216
	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
   217
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   218
		$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
   219
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   220
	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
   221
	$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
   222
	$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
   223
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   224
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   225
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
   226
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
   227
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   228
	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
   229
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   230
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   231
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
   232
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
   233
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   234
	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
   235
	if ($verbose)
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 "\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
   238
		}
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
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   241
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
   242
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
   243
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   244
	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
   245
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   246
		next;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   247
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   248
	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
   249
	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
   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
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
   253
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
   254
my @currentfiles;
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   255
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
   256
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   257
	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
   258
	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
   259
	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
   260
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   261
		$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
   262
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   263
	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
   264
		{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   265
		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
   266
			{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   267
			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
   268
			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
   269
			print "\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   270
			}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   271
		$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
   272
		@currentfiles = ();
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   273
		}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   274
	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
   275
	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
   276
	}
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   277
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
   278
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
   279
print "\n";
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   280
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\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
   282
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
   283
	{
5578c2bec847 Update gcce summary tool to note the affected packages, and update summary text
William Roberts <williamr@symbian.org>
parents:
diff changeset
   284
	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
   285
	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
   286
	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
   287
	print "\n";
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
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
   290
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
   291
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
   292
	{
c0296ad2454d Extend the summarise_rvct4_errors.pl script so that it picks up linker errors
William Roberts <williamr@symbian.org>
parents: 3
diff changeset
   293
	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
   294
	}