|
From: <sv...@va...> - 2005-09-25 19:53:17
|
Author: njn
Date: 2005-09-25 20:53:15 +0100 (Sun, 25 Sep 2005)
New Revision: 4772
Log:
Make -I<name> work.
Modified:
branches/ASPACEM/cachegrind/cg_annotate.in
Modified: branches/ASPACEM/cachegrind/cg_annotate.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/cachegrind/cg_annotate.in 2005-09-25 19:34:13 UTC (r=
ev 4771)
+++ branches/ASPACEM/cachegrind/cg_annotate.in 2005-09-25 19:53:15 UTC (r=
ev 4772)
@@ -155,7 +155,7 @@
that helped reach the event count threshold [n=
o]
--context=3DN print N lines of context before and after
annotated lines [8]
- -I --include=3D<dir> add <dir> to list of directories to search f=
or=20
+ -I<d> --include=3D<d> add <d> to list of directories to search for=
=20
source files
=20
Cachegrind is Copyright (C) 2002-2005 Nicholas Nethercote.
@@ -207,9 +207,10 @@
($1 >=3D 0 && $1 <=3D 100) or die($usage);
=20
# --auto=3Dyes|no
- } elsif ($arg =3D~ /^--auto=3D(yes|no)$/) {
- $auto_annotate =3D 1 if ($1 eq "yes");
- $auto_annotate =3D 0 if ($1 eq "no");
+ } elsif ($arg =3D~ /^--auto=3Dyes$/) {
+ $auto_annotate =3D 1;
+ } elsif ($arg =3D~ /^--auto=3Dno$/) {
+ $auto_annotate =3D 0;
=20
# --context=3DN
} elsif ($arg =3D~ /^--context=3D([\d\.]+)$/) {
@@ -218,8 +219,12 @@
die($usage);
}
=20
- # --include=3DA,B,C
- } elsif ($arg =3D~ /^(-I|--include)=3D(.*)$/) {
+ # We don't handle "-I name" -- there can be no space.
+ } elsif ($arg =3D~ /^-I$/) {
+ die("Sorry, no space is allowed after a -I flag\n");
+ =20
+ # --include=3DA,B,C. Allow -I=3Dname for backwards compatib=
ility.
+ } elsif ($arg =3D~ /^(-I=3D|-I|--include=3D)(.*)$/) {
my $inc =3D $2;
$inc =3D~ s|/$||; # trim trailing '/'
push(@include_dirs, "$inc/");
|