Author: Sterling Augustine Date: 2021-06-08T16:11:06-07:00 New Revision: 1539c543dbe5edb9d6809aa8ad60b32dba5888d7
URL: https://github.com/llvm/llvm-project/commit/1539c543dbe5edb9d6809aa8ad60b32dba5888d7 DIFF: https://github.com/llvm/llvm-project/commit/1539c543dbe5edb9d6809aa8ad60b32dba5888d7.diff LOG: Don't fail the shared_ptr test if libc++ has insufficient debug info. Don't fail the shared_ptr test if libc++ has insufficient debug info. This addresses https://bugs.llvm.org/show_bug.cgi?id=48937 Differential Revision: https://reviews.llvm.org/D100610 (cherry picked from commit 0e8378032597bcaccb948de88e965ad75bfaeb7b) Added: Modified: libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py Removed: ################################################################################ diff --git a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py index b9d00371418e8..4621e63883434 100644 --- a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py +++ b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py @@ -37,6 +37,23 @@ def invoke(self, arg, from_tty): compare_frame = gdb.newest_frame().older() testcase_frame = compare_frame.older() test_loc = testcase_frame.find_sal() + + expectation_val = compare_frame.read_var("expectation") + check_literal = expectation_val.string(encoding="utf-8") + + # Heuristic to determine if libc++ itself has debug + # info. If it doesn't, then anything normally homed there + # won't be found, and the printer will error. We don't + # want to fail the test in this case--the printer itself + # is probably fine, or at least we can't tell. + if check_literal.startswith("std::shared_ptr"): + shared_ptr = compare_frame.read_var("value") + if not "__shared_owners_" in shared_ptr.type.fields(): + print("IGNORED (no debug info in libc++): " + + test_loc.symtab.filename + ":" + + str(test_loc.line)) + return + # Use interactive commands in the correct context to get the pretty # printed version _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
