Mercurial > hg > Members > anatofuz > nqp-cbc-tools
annotate logs2.pl @ 18:25be3bb0adf0 default tip
add debug tool (dump_op_to_gdbco.pl)
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 16 Jan 2019 16:50:10 +0900 |
parents | ee60403fc119 |
children |
rev | line source |
---|---|
3 | 1 use strict; |
2 use warnings; | |
3 | |
8 | 4 use FindBin; |
5 use lib "$FindBin::Bin/lib"; | |
7
b9a157e11952
print opcode function
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
5
diff
changeset
|
6 use OPCODE2Function; |
b9a157e11952
print opcode function
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
5
diff
changeset
|
7 |
5 | 8 my $originlog = shift or die "use originlog cbclog"; |
9 my $cbclog = shift or die "use originlog cbclog"; | |
3 | 10 |
11 open my $ofh, '<', $originlog; | |
12 open my $cfh, '<', $cbclog; | |
13 | |
11 | 14 print "$originlog :$cbclog \n"; |
5 | 15 |
3 | 16 while (1){ |
17 my $orig_line; | |
18 do { | |
19 $orig_line = <$ofh>; | |
20 } while (!($orig_line =~ /\$\d+ \= (\d+)/)); | |
21 | |
22 $orig_line = $1; | |
23 | |
24 my $c_line; | |
25 | |
26 do { | |
27 $c_line = <$cfh>; | |
28 } while (!($c_line !~ /\$\d+ \= (\d+)/)); | |
29 | |
30 $c_line = $1; | |
31 | |
32 if ($c_line != $orig_line){ | |
33 print "*"; | |
34 print "$orig_line : $c_line\n"; | |
7
b9a157e11952
print opcode function
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
5
diff
changeset
|
35 print OPCODE2Function->codes($orig_line) ,":", OPCODE2Function->codes($c_line) ,"\n"; |
3 | 36 exit 0; |
37 } | |
7
b9a157e11952
print opcode function
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
5
diff
changeset
|
38 |
9 | 39 print "$orig_line : $c_line : ", OPCODE2Function->codes($orig_line) ,"\n"; |
3 | 40 } |