]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Handle xwhat nodes of protocol v4
authorVincent Pit <vince@profvince.com>
Sat, 19 Sep 2009 23:28:34 +0000 (01:28 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 19 Sep 2009 23:35:28 +0000 (01:35 +0200)
lib/Test/Valgrind/Parser/XML/Twig.pm

index 878ef4de6afe1594bf46b5338c0d0293d4435071..318e2dbb7ae20799027e9337e3abc6aec7ae62c4 100644 (file)
@@ -82,7 +82,14 @@ sub handle_error {
 
  my $data;
 
- $data->{what}  = $node->kid('what')->text;
+ my ($what, $xwhat);
+ if ($twig->protocol_version >= 4) {
+  $xwhat = $node->first_child('xwhat');
+  $what  = $xwhat->kid('text')->text if defined $xwhat;
+ }
+ $what = $node->kid('what')->text unless defined $what;
+ $data->{what} = $what;
+
  $data->{stack} = [ map $_->listify_frame,
                                        $node->kid('stack')->children('frame') ];