Fix std::fpos pretty printer on musl
authorColin Cross <ccross@android.com>
Thu, 15 Sep 2022 21:58:24 +0000 (21:58 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Thu, 15 Sep 2022 21:58:24 +0000 (21:58 +0000)
commit13c6828bedeb815ee7748f82ca36073dbd55a9db
tree8e8489b4f6994dcd5be8b962f28725160deec26e
parent0baec207ea28457dabcd310c2545b7eee047c685
Fix std::fpos pretty printer on musl

The mbstate_t field in std::fpos is an opaque type provied by libc,
and musl's implementation does not match the one used by glibc.
Change StdFposPrinter to verify its assumptions about the layout
of mbstate_t, and leave out the state printing if it doesn't match.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D132983
libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
libcxx/utils/gdb/libcxx/printers.py