gdb.pretty_printers is not a map any more but a list containing lookup
functions for pretty printers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62619
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
def to_string(self):
return '"' + self.val['m_impl']['_M_dataplus']['_M_p'].string() + '"'
-gdb.pretty_printers['^wxString$'] = wxStringPrinter
+ def display_hint(self):
+ return 'string'
+
+def wxLookupFunction(val):
+ if val.type.tag == 'wxString':
+ return wxStringPrinter(val)
+ return None
+
+gdb.pretty_printers.append(wxLookupFunction)