]> git.saurik.com Git - apple/ld64.git/blame - unit-tests/test-cases/dwarf-debug-notes/stabs-filter.pl
ld64-127.2.tar.gz
[apple/ld64.git] / unit-tests / test-cases / dwarf-debug-notes / stabs-filter.pl
CommitLineData
d696c285
A
1#!/usr/bin/perl
2
3use strict;
4use Cwd;
5
6my $dir = getcwd;
7#my $xxx = $ARGV[1];
8
9while(<>)
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