diff options
author | Tom de Vries <tdevries@suse.de> | 2022-05-12 14:52:41 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-05-12 14:52:41 +0200 |
commit | c8a9e88bf6ff32d90d082d07d3c5d12b938f8335 (patch) | |
tree | a34d347c8ca0e5d878fa8ee20247235fbc4739e5 /gdb/alloc.c | |
parent | 678dc756a5741d278be2e14630bc10d2fb31a22a (diff) | |
download | gdb-c8a9e88bf6ff32d90d082d07d3c5d12b938f8335.zip gdb-c8a9e88bf6ff32d90d082d07d3c5d12b938f8335.tar.gz gdb-c8a9e88bf6ff32d90d082d07d3c5d12b938f8335.tar.bz2 |
[gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc
When running test-case gdb.cp/break-f-std-string.exp on openSUSE Leap 15.3
with system gcc 7.5.0, I run into:
...
(gdb) whatis /r std::string^M
No symbol "string" in namespace "std".^M
(gdb) FAIL: gdb.cp/break-f-std-string.exp: _GLIBCXX_USE_CXX11_ABI=1: \
whatis /r std::string
...
The same for gcc 8.2.1, but it passes with gcc 9.3.1.
At source level (as we can observe in the .ii file with -save-temps) we have
indeed:
...
namespace std {
namespace __cxx11 {
typedef basic_string<char> string;
}
}
...
while with gcc 9.3.1, we have instead:
...
namespace std {
namespace __cxx11 {
...
}
typedef basic_string<char> string;
}
...
due to gcc commit 33b43b0d8cd ("Define std::string and related typedefs
outside __cxx11 namespace").
Fix this by adding the missing typedef for gcc version 5 (the first version to
have the dual abi) to 8 (the last version missing aforementioned gcc commit).
Tested on x86_64-linux, with:
- system gcc 7.5.0
- gcc 4.8.5, 8.2.1, 9.3.1, 10.3.0, 11.2.1
- clang 8.0.1, 12.0.1
Diffstat (limited to 'gdb/alloc.c')
0 files changed, 0 insertions, 0 deletions