Permalink
Browse files

Fix gdb pretty printers after rename of the coordinate types

  • Loading branch information...
1 parent 40fb56c commit a00e40e151198d221f5f4c2faac11bda6badcc78 @mawww committed Oct 4, 2016
Showing with 15 additions and 4 deletions.
  1. +15 −4 gdb/kakoune.py
View
@@ -48,8 +48,8 @@ def to_string(self):
self.val['column'])
-class ByteCoordAndTarget:
- """Print a ByteCoordAndTarget"""
+class BufferCoordAndTarget:
+ """Print a BufferCoordAndTarget"""
def __init__(self, val):
self.val = val
@@ -150,6 +150,16 @@ def to_string(self):
return self.val["m_value"]
+class ColumnCount:
+ """Print a ColumnCount"""
+
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ return self.val["m_value"]
+
+
class ByteCount:
"""Print a ByteCount"""
@@ -188,8 +198,8 @@ def to_string(self):
def build_pretty_printer():
pp = gdb.printing.RegexpCollectionPrettyPrinter("kakoune")
pp.add_printer('ArrayView', '^Kakoune::(Const)?ArrayView<.*>$', ArrayView)
- pp.add_printer('LineAndColumn', '^Kakoune::(Byte|Char)Coord$', LineAndColumn)
- pp.add_printer('ByteCoordAndTarget', '^Kakoune::ByteCoordAndTarget$', ByteCoordAndTarget)
+ pp.add_printer('LineAndColumn', '^Kakoune::(Buffer|Display)Coord$', LineAndColumn)
+ pp.add_printer('BufferCoordAndTarget', '^Kakoune::BufferCoordAndTarget$', BufferCoordAndTarget)
pp.add_printer('BufferIterator', '^Kakoune::BufferIterator$', BufferIterator)
pp.add_printer('String', '^Kakoune::String$', String)
pp.add_printer('StringView', '^Kakoune::(StringView|SharedString)$', StringView)
@@ -199,6 +209,7 @@ def build_pretty_printer():
pp.add_printer('Option', '^Kakoune::Option$', Option)
pp.add_printer('LineCount', '^Kakoune::LineCount$', LineCount)
pp.add_printer('CharCount', '^Kakoune::CharCount$', CharCount)
+ pp.add_printer('ColumnCount', '^Kakoune::ColumnCount$', ColumnCount)
pp.add_printer('ByteCount', '^Kakoune::ByteCount$', ByteCount)
pp.add_printer('Color', '^Kakoune::Color$', Color)
return pp

0 comments on commit a00e40e

Please sign in to comment.