[PATCH] D73546: Add a few GDB pretty printers for MLIR.

Christian Sigg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 11:22:16 PST 2020


csigg added a comment.

GDB has a python API to customize how values are printed. See here <https://interrupt.memfault.com/blog/automate-debugging-with-gdb-python-api> for an introduction. The API documentation is here <https://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html#Python-API>.

You can load the script from within gdb with `source path/to/prettyprinters.py` or put that command into ~/.gdbinit.

The current pretty printers are quite simple, they primarily forward to the interesting member or base class for MLIR types that are mere wrappers.

LLVM already provides <http://llvm.org/docs/ProgrammersManual.html#debugging> pretty printers for some of it's common types.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73546/new/

https://reviews.llvm.org/D73546





More information about the llvm-commits mailing list