From 5eba3bde9369fa084f2fe4d935f302ea2061db83 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 21 Jun 2019 09:57:29 +0200 Subject: Fix std::basic_string printer with custom allocator This fixes expansion of 'std::basic_string' in the locals view when a custom allocator is used (which previously would result in "" being shown); for example, when expanding 's' at the breakpoint in the following example: #include template class myallocator : public std::allocator {}; int main() { std::basic_string, myallocator> s("hello"); return 0; // break here and expand value of 's' in locals view } Change-Id: I0ca98de50d83a1f6e6f019acc37a1302a05fdba8 Reviewed-by: hjk --- share/qtcreator/debugger/stdtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index 8e80aafcdb..b0b6899563 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -1095,7 +1095,7 @@ def qdump__std____cxx11__basic_string(d, value): (data, size) = value.split("pI") else: try: - data = value["_M_dataplus"]["_M_p"] + data = value["_M_dataplus"]["_M_p"].pointer() size = int(value["_M_string_length"]) except: d.putEmptyValue() -- cgit v1.2.1