[libcxx-commits] [PATCH] D113244: Simplify the libcxx std::string_view gdb pretty printer
David Blaikie via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 30 13:05:56 PST 2021
dblaikie added a comment.
@saugustine - side question: Do we need the `hasattr(ptr, "lazy_string")` stuff? It seems like that's needed to support gdb versions that predate the "lazy_string" support, which is quite old at this point, I think? ( maybe https://bugzilla.redhat.com/show_bug.cgi?id=582052 points to lazy_string being added to GDB around 7.0.1? I don't have the original patch/release notes/changelog on hand/couldn't find it at a cursory googling)
Happy to remove that in a follow-up commit, if that's suitable.
@ldionne - any ideas what's failing in the CI? I'm not sure how to read/where to look for the root cause of these failures: https://reviews.llvm.org/B136591
================
Comment at: libcxx/utils/gdb/libcxx/printers.py:261
+ return ptr.lazy_string(length=size)
+ return data.string(length=size)
----------------
halyavin wrote:
> What is `data`? Should it be `ptr`?
Ah, indeed - thanks for the catch.
Separate conversation probably needs to be had about whether we need to support gdb's from 10 years ago that don't support lazy_string (I don't think we do).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113244/new/
https://reviews.llvm.org/D113244
More information about the libcxx-commits
mailing list