diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-06-21 09:44:53 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-06-26 07:17:39 +0000 |
commit | 01f26bd5b748a7b2257debd0f6d35fb15fcaa284 (patch) | |
tree | 00293d8413f503d92fe8189c14ab911c47e32c82 /share | |
parent | 0313cdbd87a6726194ec25ddff707a6b74389c88 (diff) |
Fix std::vector<bool> printer with custom allocator
This fixes the std::vector<bool> pretty printer, which
previously just showed "<not accessible>" for variable
'v' for the following sample code (with system GDB
pretty printer disabled so that the custom
pretty printers are used):
#include <vector>
template<class T>
class myallocator : public std::allocator<T> {
};
int main()
{
std::vector<bool, myallocator<bool>> v;
v.push_back(true);
return 0; // break here and check value of 'v'
}
Change-Id: Ia9883aa0b06a396cb3546ac2594a82c1b2062b80
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/debugger/stdtypes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index a14029fdc3..8e80aafcdb 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -973,9 +973,9 @@ def qdumpHelper__std__vector(d, value, isLibCpp): (start, soffset, pad, finish, foffset, pad, alloc) = value.split("pI@pI@p") else: start = value["_M_start"]["_M_p"].pointer() - soffset = value["_M_start"]["_M_offset"] + soffset = value["_M_start"]["_M_offset"].integer() finish = value["_M_finish"]["_M_p"].pointer() - foffset = value["_M_finish"]["_M_offset"] + foffset = value["_M_finish"]["_M_offset"].integer() alloc = value["_M_end_of_storage"].pointer() size = (finish - start) * 8 + foffset - soffset # 8 is CHAR_BIT. else: |