diff options
| author | bors <bors@rust-lang.org> | 2019-01-22 16:14:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-22 16:14:42 +0000 |
| commit | 96909179d9ec80db286605876ce67659dd16fd4b (patch) | |
| tree | 9f5ba74870a2aaac4a42bf65ae1320b277411a81 /src/etc | |
| parent | ad30e9a6814b5d29dfbdcd85ecde48afcc94389b (diff) | |
| parent | 9430423cab6909792fb1b3a850f1c3c8974a5111 (diff) | |
| download | rust-96909179d9ec80db286605876ce67659dd16fd4b.tar.gz rust-96909179d9ec80db286605876ce67659dd16fd4b.zip | |
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.
Diffstat (limited to 'src/etc')
| -rwxr-xr-x | src/etc/gdb_rust_pretty_printing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index 08ae289d603..b9413563fd9 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -16,7 +16,7 @@ rust_enabled = 'set language rust' in gdb.execute('complete set language ru', to # This fix went in 8.1, so check for that. # See https://github.com/rust-lang/rust/issues/56730 gdb_81 = False -_match = re.match('([0-9]+)\\.([0-9]+)', gdb.VERSION) +_match = re.search('([0-9]+)\\.([0-9]+)', gdb.VERSION) if _match: if int(_match.group(1)) > 8 or (int(_match.group(1)) == 8 and int(_match.group(2)) >= 1): gdb_81 = True |
