Make sure to only match Vec<std::array> types.

This commit is contained in:
King_DuckZ 2017-07-23 14:18:03 +01:00
parent f4715ec87f
commit b7616a4fcf
1 changed files with 3 additions and 3 deletions

View File

@ -19,8 +19,8 @@ import gdb.printing
#This pretty-printer has been written for vectorwrapper + std::array.
#You will have to customize it if your wrapped type is different.
class VectorWrapperPrinter(object):
"Print values in a VectorWrapper"
class VectorWrapperStdArrPrinter(object):
"Print values in a VectorWrapper<std::array>"
class _iterator(object):
def __init__(self, start, size):
@ -63,7 +63,7 @@ class VectorWrapperPrinter(object):
def build_pretty_printer():
pp = gdb.printing.RegexpCollectionPrettyPrinter(__name__)
#add your namespace before 'vwr' if you're using a custom one
pp.add_printer('vwr', '^vwr::Vec<.+$', VectorWrapperPrinter)
pp.add_printer('vwr', '^vwr::Vec<std::array.+$', VectorWrapperStdArrPrinter)
return pp
gdb.printing.register_pretty_printer(