Skip to content

Commit ebfa6ca

Browse files
pccvar-const
authored andcommitted
libcxx: In gdb test detect execute_mi with feature check instead of version check.
The existing version check can lead to test failures on some distribution packages of gdb where not all components of the version number are integers, such as Fedora where gdb.VERSION can be something like "15.2-4.fc41". Fix it by replacing the version check with a feature check. Reviewers: philnik777 Reviewed By: philnik777 Pull Request: llvm#132291
1 parent 190937a commit ebfa6ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
# we exit.
3131
has_run_tests = False
3232

33-
has_execute_mi = tuple(map(int, gdb.VERSION.split("."))) >= (14, 2)
33+
has_execute_mi = getattr(gdb, "execute_mi", None) is not None
34+
3435

3536
class CheckResult(gdb.Command):
3637
def __init__(self):

0 commit comments

Comments
 (0)