]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/dwarf-debug-notes/stabs-filter.pl
ld64-95.8.4.tar.gz
[apple/ld64.git] / unit-tests / test-cases / dwarf-debug-notes / stabs-filter.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use Cwd;
5
6 my $dir = getcwd;
7 #my $xxx = $ARGV[1];
8
9 while(<>)
10 {
11 # get stabs lines that match "NNNNNNN - xxx"
12 if(m/^([0-9a-f]+) - ([0-9a-f]+) (.*?)$/)
13 {
14 # replace any occurances of cwd path with $CWD
15 my $line = $3;
16 if($line =~ m/(.*?)$dir(.*?)$/)
17 {
18 $line = $1 . "CWD" . $2;
19 }
20
21 printf "$line\n";
22 }
23 }
24
25