From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26196 invoked by alias); 8 Jun 2012 15:27:57 -0000 Received: (qmail 26183 invoked by uid 22791); 8 Jun 2012 15:27:56 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Fri, 08 Jun 2012 15:27:42 +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 q58FRfCQ002372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 8 Jun 2012 11:27:42 -0400 Received: from host2.jankratochvil.net (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q58FRZvt022382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 8 Jun 2012 11:27:38 -0400 Date: Fri, 08 Jun 2012 15:27:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH v3] Expand bitpos and type.length to LONGEST and ULONGEST Message-ID: <20120608152735.GA26491@host2.jankratochvil.net> References: <20120515200454.GA11338@host2.jankratochvil.net> <20120523192245.0f785e69@spoyarek> <20120523174610.GA23405@host2.jankratochvil.net> <20120524070634.4e346d9d@spoyarek> <20120524150105.GA8232@host2.jankratochvil.net> <20120531234422.3ea35cde@spoyarek> <20120605222651.GA25480@host2.jankratochvil.net> <20120606235335.7fa94030@spoyarek> <20120606213420.GA9219@host2.jankratochvil.net> <20120608141636.GA24175@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <20120608141636.GA24175@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-06/txt/msg00234.txt.bz2 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 911 On Fri, 08 Jun 2012 16:16:36 +0200, Jan Kratochvil wrote: > Wrote the attached script and the "diff" has now "just" 7375 lines. This > seems to be reviewable. Fixed there some whitespacing issues, therefore: rm -rf splint/;mkdir -p splint/bits;touch splint/bits/confname.h;for i in `cat files`;do mkdir -p splint/`dirname $i`;splint +posixlib +gnuextensions -Isplint -exportlocal -DTUI -I. -Icommon -I../include -I../bfd -I../libdecnumber -I../opcodes -I.. -I/usr/include/python2.7 $i &>splint/$i.out;done appropriately mv splint splint-clean and mv splint splint-bitpos find splint-clean/ -type f|sort|xargs cat|perl -lpe 's/^(\s*)(\S*?\.[ch]:\d+:\d+):/$1LOC $2\n/' >splint-clean.out find splint-bitpos/ -type f|sort|xargs cat|perl -lpe 's/^(\s*)(\S*?\.[ch]:\d+:\d+):/$1LOC $2\n/' >splint-bitpos.out locdiff splint-clean.out splint-bitpos.out http://people.redhat.com/jkratoch/locdiff.out Regards, Jan --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=locdiff Content-length: 1023 #! /usr/bin/perl use strict; use warnings; @ARGV==2 or die; sub readfile($) { my($fname)=@_; local *F; open F,$fname or die $fname; my $F=do { local $/; ; }; defined $F or die $fname; close F or die $fname; return $F; } sub writefile($$) { my($fname,$content)=@_; local *F; open F,">$fname" or die $fname; print F $content or die $fname; close F or die $fname; } sub strip($$$) { my($dst,$src,$locref)=@_; my $f=readfile $src; $f=~s{^(\s*)LOC (.*)$}{push @$locref,$2;"$1LOC";}egm; writefile $dst,$f; } my $t="/tmp/locdiff.$$"; my($a,$b)=("$t.a","$t.b"); my(@a,@b); strip $a,$ARGV[0],\@a; strip $b,$ARGV[1],\@b; my $f=readfile "diff -U-1 $a $b||true|"; die if 2!=unlink "$a","$b"; $f=~s{^([-+ ])(\s*)LOC$}{ my $l; if ($1 eq "-") { $l=shift @a; } elsif ($1 eq "+") { $l=shift @b; } else { die if $1 ne " "; $l=shift @a; my $r=shift @b; $l="$r ($l)" if $l ne $r; } "$1$2LOC $l"; }egm; 1 while $f=~s{^ LOC .*\n(?: .*?\n)*?(.LOC )}{$1}gm; print $f; --2oS5YaxWCcQjTEyO--