mirror of
https://github.com/mawww/kakoune.git
synced 2025-04-11 21:18:46 +02:00
Make sourcing gdb/kakoune.py automatically add the pretty printers
If pretty printers are not enabled, we can now just `source gdb/kakoune.py` from gdb.
This commit is contained in:
parent
c971c42002
commit
011283e4d2
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,5 @@
|
|||
import gdb.printing
|
||||
|
||||
|
||||
class ArrayIterator:
|
||||
def __init__(self, data, count):
|
||||
self.data = data
|
||||
|
@ -226,3 +225,7 @@ def build_pretty_printer():
|
|||
pp.add_printer('Color', '^Kakoune::Color$', Color)
|
||||
pp.add_printer('Regex', '^Kakoune::Regex$', Regex)
|
||||
return pp
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Adding kakoune pretty printers")
|
||||
gdb.printing.register_pretty_printer(gdb.current_objfile(), build_pretty_printer())
|
||||
|
|
Loading…
Add table
Reference in a new issue