[PATCH] D73609: Change to individual pretty printer classes, remove generic `make_printer`.
Christian Sigg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 9 11:38:05 PST 2020
csigg marked an inline comment as done.
csigg added inline comments.
================
Comment at: llvm/utils/gdb-scripts/prettyprinters.py:322-325
try:
enum_type = gdb.lookup_type(info_name + '::MaskAndShiftConstants')
except gdb.error:
return (None, None)
----------------
dblaikie wrote:
> csigg wrote:
> > dblaikie wrote:
> > > I think I asked this elsewhere, but not sure there was an answer (apologies if I forgot - might be worth a comment) - what is this error case for? Are there types in LLVM that don't provide this expected nested type?
> > >
> > > Might be nice if it could be removed & then wouldn't need the factory layer of indirection for PointerIntPair and PointerUnion below.
> > GDB gets confused about template arguments of 'std::_u::pair' (not sure I remember the exact name), and the lookup_type may fail.
> >
> > Unfortunately GDB spews the console when a printer factory throws an exception, so it's better to catch it and handle it.
> >
> > I will add a comment.
> Where does std::pair come into this? The 4th template argument to PointerIntPair is the PointerLikeTypeTraits, right?
It's zero-based, so it's the `PointerIntPairInfo`, and if `PointerTy` is a `std::pair<...>*` gdb fails to look up the type.
Something like that. Is it important enough to dig up the details?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73609/new/
https://reviews.llvm.org/D73609
More information about the llvm-commits
mailing list