File tree 2 files changed +5
-1
lines changed
src/tools/compiletest/src
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -909,7 +909,8 @@ fn extract_gdb_version(full_version_line: &str) -> Option<u32> {
909
909
// This particular form is documented in the GNU coding standards:
910
910
// https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion
911
911
912
- let mut splits = full_version_line. rsplit ( ' ' ) ;
912
+ let unbracketed_part = full_version_line. split ( '[' ) . next ( ) . unwrap ( ) ;
913
+ let mut splits = unbracketed_part. trim_end ( ) . rsplit ( ' ' ) ;
913
914
let version_string = splits. next ( ) . unwrap ( ) ;
914
915
915
916
let mut splits = version_string. split ( '.' ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ fn test_extract_gdb_version() {
39
39
7012000 : "GNU gdb (GDB) 7.12" ,
40
40
7012000 : "GNU gdb (GDB) 7.12.20161027-git" ,
41
41
7012050 : "GNU gdb (GDB) 7.12.50.20161027-git" ,
42
+
43
+ 9002000 : "GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2" ,
44
+ 10001000 : "GNU gdb (GDB) 10.1 [GDB v10.1 for FreeBSD]" ,
42
45
}
43
46
}
44
47
You can’t perform that action at this time.
0 commit comments