X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FTool%2Fmemcheck.pm;h=c72882e7e892c05e580a7d45d3dee18213505029;hb=9314897b9f4c46057ac5147c0fb4c8fc6dd466a9;hp=c1ec7e1093029883c87689e22a942e48842b8f62;hpb=5e79efb82cb666170d0433e927acb2048031ce34;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Tool/memcheck.pm b/lib/Test/Valgrind/Tool/memcheck.pm index c1ec7e1..c72882e 100644 --- a/lib/Test/Valgrind/Tool/memcheck.pm +++ b/lib/Test/Valgrind/Tool/memcheck.pm @@ -9,19 +9,19 @@ Test::Valgrind::Tool::memcheck - Run an analysis through the memcheck tool. =head1 VERSION -Version 1.10 +Version 1.12 =cut -our $VERSION = '1.10'; +our $VERSION = '1.12'; =head1 DESCRIPTION -This tool parses the XML output of a C run with L. +This class contains the information required by the session for running the C tool. =cut -use base qw/Test::Valgrind::Tool/; +use base qw; =head1 METHODS @@ -75,7 +75,7 @@ sub suppressions_tag { 'memcheck-' . $_[1]->version } =head2 C -This tool uses a C parser in analysis mode, and a C parser in suppressions mode. +This tool uses a L parser in analysis mode, and a L parser in suppressions mode. =cut @@ -94,7 +94,7 @@ sub parser_class { =head2 C -This tool emits C object reports in analysis mode. +This tool emits C object reports in analysis mode, and C object reports in suppressions mode. =cut @@ -130,8 +130,6 @@ sub args { L, L. -L. - =head1 AUTHOR Vincent Pit, C<< >>, L. @@ -151,7 +149,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -161,11 +159,11 @@ This program is free software; you can redistribute it and/or modify it under th package Test::Valgrind::Tool::memcheck::Report; -use base qw/Test::Valgrind::Report/; +use base qw; -our $VERSION = '1.10'; +our $VERSION = '1.12'; -my @kinds = qw/ +my @kinds = qw< InvalidFree MismatchedFree InvalidRead @@ -181,7 +179,7 @@ my @kinds = qw/ Leak_IndirectlyLost Leak_PossiblyLost Leak_StillReachable -/; +>; push @kinds, __PACKAGE__->SUPER::kinds(); my %kinds_hashed = map { $_ => 1 } @kinds; @@ -218,9 +216,9 @@ sub dump { my ($ip, $obj, $fn, $dir, $file, $line) = map { (defined) ? $_ : '?' } @$_; my $frame; if ($fn eq '?' and $obj eq '?') { - $ip =~ s/^0x//g; - $ip = hex $ip; - $frame = sprintf "0x%0${pad}X", $ip; + $ip =~ s/^0x//gi; + my $l = length $ip; + $frame = '0x' . ($l < $pad ? ('0' x ($pad - $l)) : '') . uc($ip); } else { $frame = sprintf '%s (%s) [%s:%s]', $fn, $obj, $file, $line; }