asan-dg.exp (asan_symbolize): Prune BFD: prefixed error messages from addr2line_output.
authorJakub Jelinek <jakub@redhat.com>
Sat, 17 Nov 2012 13:03:39 +0000 (14:03 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 17 Nov 2012 13:03:39 +0000 (14:03 +0100)
* lib/asan-dg.exp (asan_symbolize): Prune BFD: prefixed error messages
from addr2line_output.  Increment idx if asking for more than one address
in one object.

From-SVN: r193586

gcc/testsuite/ChangeLog
gcc/testsuite/lib/asan-dg.exp

index 9cb21c78daa68a80e465db6aaae5d37c468c9190..f2958a673909dc0b2c1ae920c2c1a8e36962f933 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-17  Jakub Jelinek  <jakub@redhat.com>
+
+       * lib/asan-dg.exp (asan_symbolize): Prune BFD: prefixed error messages
+       from addr2line_output.  Increment idx if asking for more than one address
+       in one object.
+
 2012-11-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/55329
index f873fca23d97b258b6020d04c402fc1f52e56741..b58a91f50e3bdac79032faca1b44c379834b3cff 100644 (file)
@@ -127,7 +127,9 @@ proc asan_symbolize { output } {
            set args "-f -e $key $arr($key)"
            set status [remote_exec host "$addr2line_name" $args]
            if { [lindex $status 0] > 0 } continue
-           set addr2line_output [regexp -inline -all -line "^\[^\n\r]*" [lindex $status 1]]
+           regsub -all "\r\n" [lindex $status 1] "\n" addr2line_output
+           regsub -all "(^|\n|\r)BFD: \[^\n\r\]*" $addr2line_output "" addr2line_output
+           set addr2line_output [regexp -inline -all -line "^\[^\n\r]*" $addr2line_output]
            set idx 0
            foreach val $arr($key) {
                if { [expr $idx + 1] < [llength $addr2line_output] } {
@@ -137,6 +139,7 @@ proc asan_symbolize { output } {
                        set newkey "$key+$val"
                        set repl($newkey) "$fnname $fileline"
                    }
+                   set idx [expr $idx + 2]
                }
            }
        }