From 7982c440d5e74d9edf762d5ace0d0b9d3fb6623a Mon Sep 17 00:00:00 2001 From: Jeremy Ephron Date: Sun, 26 Apr 2020 13:54:50 -0700 Subject: [PATCH] Debugger: Fix STL map size bug on Windows Fixed a bug in obtaining the size of STL map with MinGW 32/64. Retrieved the size directly rather than unpacking the size from the data (which is not present in on Windows). Tested for compatibility with LLVM/LLDB on macOS. Change-Id: I4d836d6288465e82d694de0405965586683c1355 Reviewed-by: hjk --- share/qtcreator/debugger/stdtypes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index b08b9d603de..9d5cd0029ac 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -283,7 +283,8 @@ def qdump__std__map(d, value): return # stuff is actually (color, pad) with 'I@', but we can save cycles/ - (compare, stuff, parent, left, right, size) = value.split('pppppp') + (compare, stuff, parent, left, right) = value.split('ppppp') + size = value["_M_t"]["_M_impl"]["_M_node_count"].integer() d.check(0 <= size and size <= 100 * 1000 * 1000) d.putItemCount(size)