Commit 5a0734a9 authored by hjk's avatar hjk
Browse files

Debugger: Fix std::string display with old LLDB (179.5)



Change-Id: I9a9abd3044a9ec90c67de3060d5895ae0b6b8652
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent e4553711
......@@ -2378,9 +2378,10 @@ def qform__std__string():
return "Inline,In Separate Window"
def qdump__std__string(d, value):
qdump__std__stringHelper1(d, value, 1)
def qdump__std__stringHelper1(d, value, charSize):
data = value["_M_dataplus"]["_M_p"]
baseType = value.type.strip_typedefs()
charSize = d.templateArgument(baseType, 0).sizeof
# We can't lookup the std::string::_Rep type without crashing LLDB,
# so hard-code assumption on member position
# struct { size_type _M_length, size_type _M_capacity, int _M_refcount; }
......@@ -2588,13 +2589,14 @@ def qdump__string(d, value):
qdump__std__string(d, value)
def qdump__std__wstring(d, value):
qdump__std__string(d, value)
charSize = d.lookupType('wchar_t').sizeof
qdump__std__stringHelper1(d, value, charSize)
def qdump__std__basic_string(d, value):
qdump__std__string(d, value)
def qdump__wstring(d, value):
qdump__std__string(d, value)
qdump__std__wstring(d, value)
def qdump____gnu_cxx__hash_set(d, value):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment