Skip to content

Commit

Permalink
DEVTOOLS: Add pretty printing support for Common::MultiMap
Browse files Browse the repository at this point in the history
  • Loading branch information
grisenti committed Sep 12, 2023
1 parent 16df5b0 commit ff050b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions devtools/gdb_pretty_printers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def __next__(self):
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):
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ff050b7

Please sign in to comment.