[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
Tue Feb 4 13:09:57 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:
> 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.
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