diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-06-21 09:57:29 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-06-26 07:18:06 +0000 |
commit | 5eba3bde9369fa084f2fe4d935f302ea2061db83 (patch) | |
tree | 9d18286089d8851879c64ee7537cf06d14b4425d /share | |
parent | 01f26bd5b748a7b2257debd0f6d35fb15fcaa284 (diff) | |
download | qt-creator-5eba3bde9369fa084f2fe4d935f302ea2061db83.tar.gz |
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 "<not accessible>" being shown);
for example, when expanding 's' at the breakpoint
in the following example:
#include <string>
template<class T>
class myallocator : public std::allocator<T> {};
int main()
{
std::basic_string<char, std::char_traits<char>, myallocator<char>> s("hello");
return 0; // break here and expand value of 's' in locals view
}
Change-Id: I0ca98de50d83a1f6e6f019acc37a1302a05fdba8
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/debugger/stdtypes.py | 2 |
1 files changed, 1 insertions, 1 deletions
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() |