Cope with new addr2line outputs for DWARF4

Copes with ? for line number (converts to 0).
Copes with (discriminator <num>) suffixes to file/linenum (removes).

Change-Id: I96207165e4852c71d3512157864f12d101cdf44a
This commit is contained in:
Adam McNeeney 2014-08-22 10:01:24 +01:00 committed by Aliaksey Kandratsenka
parent b08d760958
commit bbf346a856
1 changed files with 6 additions and 0 deletions

View File

@ -4768,6 +4768,12 @@ sub MapToSymbols {
$filelinenum =~ s|\\|/|g; # turn windows-style paths into unix-style paths
# Remove discriminator markers as this comes after the line number and
# confuses the rest of this script.
$filelinenum =~ s/ \(discriminator \d+\)$//;
# Convert unknown line numbers into line 0.
$filelinenum =~ s/:\?$/:0/;
my $pcstr = $pclist->[$count];
my $function = ShortFunctionName($fullfunction);
my $nms = $nm_symbols->{$pcstr};