forked from qt-creator/qt-creator
Dumpers: Fix string+allocator dumper for old GCC versions
Older versions of GCC headers don't have _M_string_length. Tested against GCC 4.4.4. Change-Id: Ib3a025edeb26afce7fd54acfb6e965e64200f024 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
fff3b41833
commit
29ecf16ed3
@@ -695,13 +695,15 @@ def qdumpHelper_std__string(d, value, charType, format):
|
|||||||
# GCC 9, QTCREATORBUG-22753
|
# GCC 9, QTCREATORBUG-22753
|
||||||
try:
|
try:
|
||||||
data = value["_M_dataplus"]["_M_p"].pointer()
|
data = value["_M_dataplus"]["_M_p"].pointer()
|
||||||
|
except:
|
||||||
|
data = value.extractPointer()
|
||||||
|
try:
|
||||||
size = int(value["_M_string_length"])
|
size = int(value["_M_string_length"])
|
||||||
d.putCharArrayHelper(data, size, charType, format)
|
d.putCharArrayHelper(data, size, charType, format)
|
||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
data = value.extractPointer()
|
|
||||||
# We can't lookup the std::string::_Rep type without crashing LLDB,
|
# We can't lookup the std::string::_Rep type without crashing LLDB,
|
||||||
# so hard-code assumption on member position
|
# so hard-code assumption on member position
|
||||||
# struct { size_type _M_length, size_type _M_capacity, int _M_refcount; }
|
# struct { size_type _M_length, size_type _M_capacity, int _M_refcount; }
|
||||||
|
Reference in New Issue
Block a user