+class wxFileNamePrinter:
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ # It is simpler to just call the internal function here than to iterate
+ # over m_dirs array ourselves. The disadvantage of this approach is
+ # that it requires a live inferior process and so doesn't work when
+ # debugging using only a core file. If this ever becomes a serious
+ # problem, this should be rewritten to use m_dirs and m_name and m_ext.
+ return gdb.parse_and_eval('((wxFileName*)%s)->GetFullPath(0)' %
+ self.val.address)
+