[PATCH] D72589: Add GDB pretty printers for llvm::ilist, llvm::simple_ilist, and llvm::ilist_node.
Christian Sigg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 12:04:51 PST 2020
csigg marked 2 inline comments as done.
csigg added inline comments.
================
Comment at: debuginfo-tests/llvm-prettyprinters/gdb/prettyprinters.cpp:38
+}();
+auto SimpleIlist = [&]() {
+ llvm::simple_ilist<IlistNode, SimpleIlistTag> Result;
----------------
dblaikie wrote:
> (looks like this capture should be removed, according to the lint check)
Indeed, don't need to capture globals.
================
Comment at: llvm/utils/gdb-scripts/prettyprinters.py:370-373
+ except gdb.error:
+ # Fall back to base node that doesn't contain sentinel flag.
+ self.prev = val['Prev'].cast(pointer_type)
+ self.sentinel = None
----------------
dblaikie wrote:
> Under what conditions does this fallback occur? Are those conditions tested?
I changed it to inspect the template parameter, instead of blindly trying both.
It's not possible to check the 'Prev' code path without rebuilding LLVM with different #defines.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72589/new/
https://reviews.llvm.org/D72589
More information about the llvm-commits
mailing list