update gdb pretty printer for new String implementation
This commit is contained in:
parent
585e64fd10
commit
02826ff2ca
|
@ -55,6 +55,7 @@ class BufferIterator:
|
||||||
else:
|
else:
|
||||||
return "buffer<none>@(%s, %s)" % (self.val['m_coord']['line'], self.val['m_coord']['column'])
|
return "buffer<none>@(%s, %s)" % (self.val['m_coord']['line'], self.val['m_coord']['column'])
|
||||||
|
|
||||||
|
std_str = gdb.lookup_type("std::string")
|
||||||
class String:
|
class String:
|
||||||
""" Print a String"""
|
""" Print a String"""
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ class String:
|
||||||
self.val = val
|
self.val = val
|
||||||
|
|
||||||
def to_string(self):
|
def to_string(self):
|
||||||
return self.val["m_content"]
|
return self.val.cast(std_str)
|
||||||
|
|
||||||
class Option:
|
class Option:
|
||||||
""" Print a Option"""
|
""" Print a Option"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user