From: Olaf D. <Olaf@Dabrunz.com> - 2008-03-09 20:41:51
|
> ------------------------------------------------------------------------ > r79 | p-kirsch | 2007-12-18 14:25:18 +0000 (Tue, 18 Dec 2007) | 2 lines > Changed paths: > M /trunk/fctrace/src/extract_calls.pl > > - extendend a pattern with more space, to fix wrong pattern matching > > ------------------------------------------------------------------------ > Index: extract_calls.pl > =================================================================== > --- extract_calls.pl (revision 78) > +++ extract_calls.pl (revision 79) > @@ -474,7 +474,7 @@ > > push @functionmap, "$function_address:$function_name"; > push @addresses_and_offsets, "$function_address"; > - #print "0%$function_address%$function_name\n"; > + # print "0%$function_address%$function_name\n"; Changed spaces to a tab. Will be reverted to spaces in a later change. > # `echo '0%$function[0]' > /proc/fct_nasse_erde`; # transfer to fctrace kernel-module > > next; > @@ -503,8 +503,12 @@ > } > > # get address of call instruction, then calculate the offset > - $line =~ /^(\S+):/; > + # this caused a error, due to matching $line =~ /^(\S+):/; > + $line =~ /^[ ](\S+):/; > + # print "DEBUG: line >>$line<< \n"; > $call_instr_address = $1; > + > + # print "DEBUG: matched on line: \$1 >>$call_instr_address<< \n"; > $call_instr_offset = sprintf("%lx", hex($1) - hex($function_address)); > > if ($called_function ne "" and $called_function eq $function_name) { Has been changed later to /(\S+):/. The reason for the change seems to be that the address *may* be preceded by whitespace. A later change will give a more meaningful comment and convert tabs to spaces. Regards, -- Olaf Dabrunz (Olaf <at> dabrunz.com) |