From ff050b75cabcb2e4df847a8a2ccc72b4e9d9c338 Mon Sep 17 00:00:00 2001 From: grisenti Date: Tue, 12 Sep 2023 22:49:56 +0200 Subject: [PATCH] DEVTOOLS: Add pretty printing support for Common::MultiMap --- devtools/gdb_pretty_printers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/devtools/gdb_pretty_printers.py b/devtools/gdb_pretty_printers.py index 61b26bd616b..852e593d950 100644 --- a/devtools/gdb_pretty_printers.py +++ b/devtools/gdb_pretty_printers.py @@ -73,8 +73,8 @@ class RBTreeIterator: parent = self.current_node.dereference()["parent"] return value -class StableMapPrinter: - "Prints Common::StableMap" +class RBTreeMapPrinter: + "Prints Common::StableMap and Common::MultiMap" class _iterator: def __init__(self, rb_tree): @@ -152,7 +152,8 @@ def build_pretty_printer(): pp.add_printer('String', '^Common::String$', StringPrinter) pp.add_printer('U32String', '^Common::U32String$', StringPrinter) pp.add_printer('Array', '^Common::Array<.*>$', ArrayPrinter) - pp.add_printer('StableMap', '^Common::StableMap<.*>$', StableMapPrinter) + pp.add_printer('StableMap', '^Common::StableMap<.*>$', RBTreeMapPrinter) + pp.add_printer('MultiMap', '^Common::MultiMap<.*>$', RBTreeMapPrinter) pp.add_printer('List', '^Common::List<.*>$', ListPrinter) return pp