From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31886 invoked by alias); 13 Sep 2012 18:45:47 -0000 Received: (qmail 31878 invoked by uid 22791); 13 Sep 2012 18:45:46 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Sep 2012 18:45:28 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8DIjS2p012406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Sep 2012 14:45:28 -0400 Received: from host2.jankratochvil.net (ovpn-113-58.phx2.redhat.com [10.3.113.58]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8DIjK3T019291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 13 Sep 2012 14:45:26 -0400 Date: Thu, 13 Sep 2012 18:45:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: gdb-patches@sourceware.org Subject: Re: bitpos expansion patches summary Message-ID: <20120913184519.GA7305@host2.jankratochvil.net> References: <20120805005350.150e5b74@spoyarek> <20120902181515.GA9913@host2.jankratochvil.net> <20120907162158.0aee8e85@spoyarek> <20120911190421.GA26399@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <20120911190421.GA26399@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00252.txt.bz2 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 423 On Tue, 11 Sep 2012 21:04:21 +0200, Jan Kratochvil wrote: > Also I have found several missed expansions only by hand, one needs to do full > re-run of splint on the patched sources. As the patched sources change line > numbers a bit it already means some sort of rebase. Attaching some script for remapping the old->new line numbers in a .report file, I use it locally to play with it without any real results yet. Jan --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename=diffmap Content-length: 1146 #! /usr/bin/perl use strict; use warnings; die "$0 'git diff -U999999 old..new|' new.report\n" if @ARGV!=1; my %h; { local *DIFF; open DIFF,$ARGV[0] or die $ARGV[0]; my($from,$fromline,$to,$toline); local $_; while () { chomp; next if /^diff /; next if /^index /; next if /^new file mode /; next if /^deleted file mode /; if (m{^--- a/(\S+)$}) { $from=$1; $fromline=0; next; } if (m{^\Q+++\E b/(\S+)$}) { $to=$1; $toline=0; next; } next if /^@@ -[10](?:,\d+)? [+][10](?:,\d+)? @@(?:)$/; if (/^ /) { $fromline++; $toline++; } elsif (/^-/) { $fromline++; } elsif (/^[+]/) { $toline++; } else { die; } $h{$from}{$fromline}=[$to,$toline]; } close DIFF or die $ARGV[0]; } { local $_; while () { s{[(]([^():\s]+):(\d+)[)]}{ my($basename,$line)=($1,$2); my $filename="gdb/$basename"; my $r=$h{$filename}{$line}; if ($r) { die "$filename->".$r->[0] if $r->[0] ne $filename; $line=$r->[1]; } "($basename:$line)"; }e; print; } } --ibTvN161/egqYuK8--