diff mbox

libstdc++: Fix list.cc xmethods test.

Message ID 20150501170250.GG3618@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely May 1, 2015, 5:02 p.m. UTC
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 mbox

Patch

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