aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/lib/rust-support.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/rust-support.exp b/gdb/testsuite/lib/rust-support.exp
index 6b3da2a..971a4a6 100644
--- a/gdb/testsuite/lib/rust-support.exp
+++ b/gdb/testsuite/lib/rust-support.exp
@@ -86,8 +86,9 @@ gdb_caching_proc rust_llvm_version {} {
verbose "could not find rustc"
} else {
set output [lindex [remote_exec host "$rustc --version --verbose"] 1]
+ set output [regsub -all "\r\n" $output "\n"]
foreach line [split $output \n] {
- if {[regexp "LLVM version: (.+)\$" $output ignore version]} {
+ if {[regexp "LLVM version: (.+)\$" $line ignore version]} {
return $version
}
}