File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 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> {
909909 // This particular form is documented in the GNU coding standards:
910910 // https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion
911911
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(' ');
913914 let version_string = splits.next().unwrap();
914915
915916 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() {
3939 7012000: "GNU gdb (GDB) 7.12",
4040 7012000: "GNU gdb (GDB) 7.12.20161027-git",
4141 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]",
4245 }
4346}
4447
You can’t perform that action at this time.
0 commit comments