]>
Commit | Line | Data |
---|---|---|
3b9aa4e8 VZ |
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 | |
5 | # in the future...) | |
6 | # Author: Vadim Zeitlin | |
7 | # Created: 2009-01-04 | |
8 | # RCS-Id: $Id:$ | |
9 | # Copyright: (c) 2009 Vadim Zeitlin | |
10 | # License: wxWindows licence | |
11 | ############################################################################### | |
12 | ||
13 | # shamelessly stolen from std::string example | |
14 | class wxStringPrinter: | |
15 | def __init__(self, val): | |
16 | self.val = val | |
17 | ||
18 | def to_string(self): | |
19 | return '"' + self.val['m_impl']['_M_dataplus']['_M_p'].string() + '"' | |
20 | ||
21 | gdb.pretty_printers['^wxString$'] = wxStringPrinter |