Update gdb pretty printing support for latest gdb version.
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
This commit is contained in:
@@ -18,4 +18,12 @@ class wxStringPrinter:
|
||||
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)
|
||||
|
Reference in New Issue
Block a user