[PATCH 0/2] Add pretty-printer base class and new methods

Tom Tromey tromey@adacore.com
Mon Sep 11 17:28:24 GMT 2023


This adds a pretty-printer base class, to make it possible for gdb to
extend the pretty-printer API over time.

Then, a couple of new methods are added and the no-op array printer is
changed to use these, rather than the current approach of adding an
attribute and hoping it works ok.

Regression tested on x86-64 Fedora 36.

---
Tom Tromey (2):
      Introduce gdb.ValuePrinter
      Add two new pretty-printer methods

 gdb/NEWS                                      |  5 ++
 gdb/doc/python.texi                           | 68 ++++++++++++++++++++-------
 gdb/python/lib/gdb/dap/varref.py              | 22 ++++++---
 gdb/python/lib/gdb/printer/bound_registers.py |  9 ++--
 gdb/python/lib/gdb/printing.py                | 49 ++++++++++---------
 gdb/python/py-prettyprint.c                   | 65 +++++++++++++++++++++++++
 6 files changed, 168 insertions(+), 50 deletions(-)
---
base-commit: 14432bde076fdee66e6163993eadf592742935da
change-id: 20230911-pp-v2-9efa40abcc4e

Best regards,
-- 
Tom Tromey <tromey@adacore.com>



More information about the Gdb-patches mailing list