This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] libstdc++: Fix list.cc xmethods test.
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 1 May 2015 18:02:50 +0100
- Subject: Re: [PATCH] libstdc++: Fix list.cc xmethods test.
- Authentication-results: sourceware.org; auth=none
- References: <yjt2fv7lurpw dot fsf at ruffy dot mtv dot corp dot google dot com> <CAH6eHdTEacxQCsCBq6LW1U-7h0h35q+2Su6p_CGEpWto30Hc_g at mail dot gmail dot com> <CADPb22TXmpaGgwOiMwU1+E==8ouzw_xyoP3EH_An4wpp4075zQ at mail dot gmail dot com> <CAH6eHdSW7Q4SH6nMLR7scQOicEd4OR77x5BhWxTHB0mpnO80Jg at mail dot gmail dot com>
On 29/04/15 17:18 +0100, Jonathan Wakely wrote:
On 29 April 2015 at 17:04, Doug Evans wrote:
Tested the same patch on the gcc 5.0 branch.
Just double checking ... ok to apply there too?
Yes, OK for the branch too.
btw, the test is currently marked as unsupported by the test run.
I don't know what would be involved in marking it as failing instead,
but I noticed this happening a lot while I was working with this code.
I can imagine more failures going unnoticed because of this.
That's due to:
(*): Shared library is missing debugging information.^M
skipping: (*): Shared library is missing debugging information.^M
list.gdb:10: Error in sourced command file:^M
Cannot evaluate function -- may be inlined^M
skipping: list.gdb:10: Error in sourced command file:^M
skipping: Cannot evaluate function -- may be inlined^M
UNSUPPORTED: libstdc++-xmethods/list.cc
But I can't say anything more useful than that.
This might be all that's needed to make it work with the new list, but
I can't test it due to the UNSUPPORTED error above.
diff --git a/libstdc++-v3/python/libstdcxx/v6/xmethods.py b/libstdc++-v3/python/libstdcxx/v6/xmethods.py
index 6db0e16..112d854 100644
--- a/libstdc++-v3/python/libstdcxx/v6/xmethods.py
+++ b/libstdc++-v3/python/libstdcxx/v6/xmethods.py
@@ -382,7 +382,8 @@ class ListMethodsMatcher(gdb.xmethod.XMethodMatcher):
def match(self, class_type, method_name):
if not re.match('^std::list<.*>$', class_type.tag):
- return None
+ if not re.match('^std::__cxx11::list<.*>$', class_type.tag):
+ return None
method = self._method_dict.get(method_name)
if method is None or not method.enabled:
return None
diff --git a/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc b/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
index 050f75b..6c02de9 100644
--- a/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
+++ b/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
@@ -18,9 +18,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// List xmethods only recognize the non cxx11 std::list for now.
-#define _GLIBCXX_USE_CXX11_ABI 0
-
#include <list>
int