From a6050125a700d677b786f9db0a475af9975e9fc4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 25 Aug 2022 14:52:56 -0300 Subject: findclasslist.pl: print the line number of where the occurrence came MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Makes debugging easier. Pick-to: 6.4 Change-Id: Ic6547f8247454b47baa8fffd170ea7f7d84b990f Reviewed-by: Alexey Edelev Reviewed-by: Jörg Bornemann --- mkspecs/features/data/unix/findclasslist.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl index 59ce4ab2c5..14043de846 100644 --- a/mkspecs/features/data/unix/findclasslist.pl +++ b/mkspecs/features/data/unix/findclasslist.pl @@ -22,8 +22,8 @@ while () { } # Replace this line with the class list + my $fname = $1; open HDR, "<$1" or die("Could not open header $1: $!"); - my $comment = " /* $1 */"; while (my $line = ) { if ($line =~ /\bELFVERSION:(\S+)\b/) { last if $1 eq "stop"; @@ -39,8 +39,8 @@ while () { my $sym = ($1 =~ s/:$//r); # remove trailing : my @sym = split /::/, $sym; @sym = map { sprintf "%d%s", length $_, $_; } @sym; - printf " *%s*;\n", join("", @sym); - $comment = 0; + $sym = sprintf " *%s*;", join("", @sym); + printf "%-55s # %s:%d\n", $sym, $fname, $.; } close HDR; } -- cgit v1.2.3