Hi all,<div><br></div><div>I've made a pretty printer for some objects that we use here on my work, and one of them is giving me a headache: It's just a wrapper for boost::any, witch can store a bunch of basic types and a std::list and a std::string. The problem is that my printer is doing everything fine, ie making the correct casts, and on gdb in console mode everything is showed as suspected. On KDevelop, in other hand, the std::list and std::string is not being recognized, and it's being printed in old style. But passing over a normal string shows up normally.</div>
<div><br></div><div>Here is the printer:</div><div><br></div><div><div>class AnyPrinter:</div><div>    "Print a Any"</div><div>    def __init__(self, val):</div><div>        self.val = val</div><div><br></div><div>
    def to_string(self):</div><div>        wich = '%d' % self.val['m_any']['which_']</div><div><br></div><div>        if wich == '0':</div><div>            return self.val['m_any']['storage_']['data_'].cast(gdb.lookup_type('int'))</div>
<div>        elif wich == '1':</div><div>            return self.val['m_any']['storage_']['data_'].cast(gdb.lookup_type('char'))</div><div>        elif wich == '2':</div><div>
            return self.val['m_any']['storage_']['data_'].cast(gdb.lookup_type('double'))</div><div>        elif wich == '3':</div><div>            return self.val['m_any']['storage_']['data_'].cast(gdb.lookup_type('std::list<Communication::Detail::GenericBean, std::allocator<Communication::Detail::GenericBean> >'))</div>
<div>        elif wich == '4':</div><div>            return self.val['m_any']['storage_']['data_'].cast(gdb.lookup_type('bool'))</div><div>        elif wich == '5':</div><div>
            return self.val['m_any']['storage_']['data_'].cast(gdb.lookup_type('std::string'))</div><div><br></div><div>        return "Any"</div></div><div><br></div><div>Printing an Any on gdb witch contains strings returns a nicely formated output. On KDevelop, it's show as it wasn't recognized.</div>