/usr/lib/radare/bin/dwarf-lines is in radare-common 1:1.5.2-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/perl
#
# author: pancake<youterm.com>
#
$file=shift;
die "Usage: rsc dwarf-lines (file) >> file.rdb\n" unless ($file);
$|=1;
my @lines=split(/\n/,`dwarfdump -l $file`);
for my $line (@lines) {
next unless($line=~/^\//);
$line=~/(.*):/; my $file=$1;
$line=~/\[\ *(\d*),/; my $cline=$1;
$line=~/0x([a-f0-9]*)/; my $addr="0x$1";
#print "$file\t$cline\n";
chomp(my $code=`nl $file 2>/dev/null | grep -e ' $cline' |head -n 1`);
$code=~s/@//g;
$code=~s/>//g;
$code=~s/|//g;
print "CC $code @ $addr\n" if ($code);
}
|