| 67 | return '{{tag = {}, from = {}, to = {}}}'.format(self.mask[tg] if tg in self.mask else tg, fr, to) |
| 68 | |
| 69 | def build_pretty_printer(): |
| 70 | pp = gdb.printing.RegexpCollectionPrettyPrinter('OSRM') |
| 71 | pp.add_printer('TurnInstruction', '::TurnInstruction$', TurnInstructionPrinter) |
| 72 | pp.add_printer('Coordinate', '::Coordinate$', CoordinatePrinter) |
| 73 | pp.add_printer('TurnLaneData', '::TurnLaneData$', TurnLaneDataPrinter) |
| 74 | return pp |
| 75 | |
| 76 | ## unregister OSRM pretty printer before (re)loading |
| 77 | gdb.pretty_printers = [x for x in gdb.pretty_printers if not isinstance(x, gdb.printing.RegexpCollectionPrettyPrinter) or x.name != 'OSRM'] |