forked from qt-creator/qt-creator
Debugger: Fix std::string dumper for GCC 9
Fixes: QTCREATORBUG-22753 Fixes: QTCREATORBUG-22680 Change-Id: I75e2855d27bc2b83880379fee2364586b9d4a90e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -634,6 +634,15 @@ def qdumpHelper_std__string(d, value, charType, format):
|
|||||||
qdumpHelper__std__string__MSVC(d, value, charType, format)
|
qdumpHelper__std__string__MSVC(d, value, charType, format)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# GCC 9, QTCREATORBUG-22753
|
||||||
|
try:
|
||||||
|
data = value["_M_dataplus"]["_M_p"].pointer()
|
||||||
|
size = int(value["_M_string_length"])
|
||||||
|
d.putCharArrayHelper(data, size, charType, format)
|
||||||
|
return
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
data = value.extractPointer()
|
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
|
||||||
|
Reference in New Issue
Block a user