Skip to content

Commit 9690917

Browse files
committed
Auto merge of #57647 - cuviper:gdb-version, r=tromey
[rust-gdb] relax the GDB version regex The pretty-printer script is checking `gdb.VERSION` to see if it's at least 8.1 for some features. With `re.match`, it will only find the version at the beginning of that string, but in Fedora the string is something like "Fedora 8.2-5.fc29". Using `re.search` instead will find the first location that matches anywhere, so it will find my 8.2.
2 parents ad30e9a + 9430423 commit 9690917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/etc/gdb_rust_pretty_printing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# This fix went in 8.1, so check for that.
1717
# See https://github.com/rust-lang/rust/issues/56730
1818
gdb_81 = False
19-
_match = re.match('([0-9]+)\\.([0-9]+)', gdb.VERSION)
19+
_match = re.search('([0-9]+)\\.([0-9]+)', gdb.VERSION)
2020
if _match:
2121
if int(_match.group(1)) > 8 or (int(_match.group(1)) == 8 and int(_match.group(2)) >= 1):
2222
gdb_81 = True

0 commit comments

Comments
 (0)