]>
git.saurik.com Git - wxWidgets.git/blob - misc/gdb/print.py
1 ###############################################################################
2 # Name: misc/gdb/print.py
3 # Purpose: pretty-printers for wx data structures: this file is meant to
4 # be sourced from gdb using "source -p" (or, better, autoloaded
6 # Author: Vadim Zeitlin
9 # Copyright: (c) 2009 Vadim Zeitlin
10 # License: wxWindows licence
11 ###############################################################################
13 # shamelessly stolen from std::string example
14 class wxStringPrinter
:
15 def __init__(self
, val
):
19 return '"' + self
.val
['m_impl']['_M_dataplus']['_M_p'].string() + '"'
21 gdb
.pretty_printers
['^wxString$'] = wxStringPrinter