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 <hjk@qt.io>
This commit is contained in:
Jeremy Ephron
2020-04-26 13:54:50 -07:00
committed by Jeremy Barenholtz
parent 5dfdeec389
commit 7982c440d5

View File

@@ -283,7 +283,8 @@ def qdump__std__map(d, value):
return return
# stuff is actually (color, pad) with 'I@', but we can save cycles/ # 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.check(0 <= size and size <= 100 * 1000 * 1000)
d.putItemCount(size) d.putItemCount(size)