------- Comment #3 from pluto at agmk dot net 2010-09-14 12:04 ------- (In reply to comment #1) > It's nothing to do with unordered_map, it's std::string, and it fails because > lazy_string was added in GDB 7.1 > > we can probably do something like > > if (gdb.VERSION == '7.0'): > return '"' + self.val['_M_dataplus']['_M_p'].string (length = len) > + '"' > return self.val['_M_dataplus']['_M_p'].lazy_string (length = len)
this change isn't perfect because the gdb.VERSION may be decorated with vendor strings. can we get something like this in lbistdc++: - return self.val['_M_dataplus']['_M_p'].lazy_string (length = len) + if hasattr(self.val['_M_dataplus']['_M_p'], "lazy_string"): + return self.val['_M_dataplus']['_M_p'].lazy_string (length = len) + return self.val['_M_dataplus']['_M_p'].string (length = len) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45403