]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Enable printers and xmethods for std::__cxx11::list
authorJonathan Wakely <jwakely@redhat.com>
Thu, 18 May 2017 09:23:29 +0000 (10:23 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 18 May 2017 09:23:29 +0000 (10:23 +0100)
Backport from mainline
2016-10-11  Jonathan Wakely  <jwakely@redhat.com>

* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
Register printer for std::__cxx11::list.
* python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
std::__cxx11::list as well as std::list.

From-SVN: r248181

libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/python/libstdcxx/v6/xmethods.py
libstdc++-v3/testsuite/libstdc++-xmethods/list.cc

index f5af14f2ed345a394436ee0cea41aaa4cb190f70..21a2b09a3f40a0dc1a0aca83b7d007c0906b3504 100644 (file)
@@ -1,3 +1,13 @@
+2017-05-18  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline
+       2016-10-11  Jonathan Wakely  <jwakely@redhat.com>
+
+       * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
+       Register printer for std::__cxx11::list.
+       * python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
+       std::__cxx11::list as well as std::list.
+
 2017-05-17  Jonathan Wakely  <jwakely@redhat.com>
 
        Backport from mainline
index 51bd03a3ac5f440c65e82b628c5ddc6d38dc3aa0..3b4badfe9bdc81088b1d942df9ccb126d81121d2 100644 (file)
@@ -1343,6 +1343,7 @@ def build_libstdcxx_dictionary ():
     libstdcxx_printer.add_container('std::', 'bitset', StdBitsetPrinter)
     libstdcxx_printer.add_container('std::', 'deque', StdDequePrinter)
     libstdcxx_printer.add_container('std::', 'list', StdListPrinter)
+    libstdcxx_printer.add_container('std::__cxx11::', 'list', StdListPrinter)
     libstdcxx_printer.add_container('std::', 'map', StdMapPrinter)
     libstdcxx_printer.add_container('std::', 'multimap', StdMapPrinter)
     libstdcxx_printer.add_container('std::', 'multiset', StdSetPrinter)
index 4505f0f0669b0601053effdcbb81cf28a3cb584b..fb0af74a810eebca92cfb83bf017f239b8bcc7f4 100644 (file)
@@ -381,7 +381,7 @@ class ListMethodsMatcher(gdb.xmethod.XMethodMatcher):
         self.methods = [self._method_dict[m] for m in self._method_dict]
 
     def match(self, class_type, method_name):
-        if not re.match('^std::list<.*>$', class_type.tag):
+        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:
index 050f75b807eb288eca761c00387ed391c9b24a38..6c02de943f8b9cabe72e921dcb25de4e5318a5d1 100644 (file)
@@ -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