public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix list.cc xmethods test.
@ 2015-04-27 22:33 Doug Evans
  2015-04-27 22:41 ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Evans @ 2015-04-27 22:33 UTC (permalink / raw)
  To: gcc-patches, libstdc++

Hi.

While we should eventually get the xmethods to handle cxx11,
this patch fixes the current failure.
The xmethod matcher doesn't currently handle __cxx11 in the type name.

Adding cxx11 support can be a follow up patch.

Ok to commit?

2015-04-27  Doug Evans  <dje@google.com>

	* testsuite/libstdc++-xmethods/list.cc (_GLIBCXX_USE_CXX11_ABI):
	Define to zero.

Index: testsuite/libstdc++-xmethods/list.cc
===================================================================
--- testsuite/libstdc++-xmethods/list.cc	(revision 222477)
+++ testsuite/libstdc++-xmethods/list.cc	(working copy)
@@ -18,6 +18,9 @@
 // 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libstdc++: Fix list.cc xmethods test.
  2015-04-27 22:33 [PATCH] libstdc++: Fix list.cc xmethods test Doug Evans
@ 2015-04-27 22:41 ` Jonathan Wakely
  2015-04-29 16:09   ` Doug Evans
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2015-04-27 22:41 UTC (permalink / raw)
  To: Doug Evans; +Cc: gcc-patches, libstdc++

On 27 April 2015 at 23:33, Doug Evans wrote:
> Hi.
>
> While we should eventually get the xmethods to handle cxx11,
> this patch fixes the current failure.
> The xmethod matcher doesn't currently handle __cxx11 in the type name.
>
> Adding cxx11 support can be a follow up patch.

Agreed. And when that's done we should backport it to the gcc-5-branch too.

> Ok to commit?

OK for trunk, thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libstdc++: Fix list.cc xmethods test.
  2015-04-27 22:41 ` Jonathan Wakely
@ 2015-04-29 16:09   ` Doug Evans
  2015-04-29 16:18     ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Evans @ 2015-04-29 16:09 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-patches, libstdc++

On Mon, Apr 27, 2015 at 3:41 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 27 April 2015 at 23:33, Doug Evans wrote:
>> Hi.
>>
>> While we should eventually get the xmethods to handle cxx11,
>> this patch fixes the current failure.
>> The xmethod matcher doesn't currently handle __cxx11 in the type name.
>>
>> Adding cxx11 support can be a follow up patch.
>
> Agreed. And when that's done we should backport it to the gcc-5-branch too.
>
>> Ok to commit?
>
> OK for trunk, thanks

Tested the same patch on the gcc 5.0 branch.
Just double checking ... ok to apply there 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libstdc++: Fix list.cc xmethods test.
  2015-04-29 16:09   ` Doug Evans
@ 2015-04-29 16:18     ` Jonathan Wakely
  2015-04-29 16:33       ` Jonathan Wakely
  2015-05-01 17:02       ` Jonathan Wakely
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Wakely @ 2015-04-29 16:18 UTC (permalink / raw)
  To: Doug Evans; +Cc: gcc-patches, libstdc++

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libstdc++: Fix list.cc xmethods test.
  2015-04-29 16:18     ` Jonathan Wakely
@ 2015-04-29 16:33       ` Jonathan Wakely
  2015-05-01 17:02       ` Jonathan Wakely
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2015-04-29 16:33 UTC (permalink / raw)
  To: Doug Evans; +Cc: gcc-patches, libstdc++

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libstdc++: Fix list.cc xmethods test.
  2015-04-29 16:18     ` Jonathan Wakely
  2015-04-29 16:33       ` Jonathan Wakely
@ 2015-05-01 17:02       ` Jonathan Wakely
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2015-05-01 17:02 UTC (permalink / raw)
  To: Doug Evans; +Cc: gcc-patches, libstdc++

[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]

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.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1174 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-01 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27 22:33 [PATCH] libstdc++: Fix list.cc xmethods test Doug Evans
2015-04-27 22:41 ` Jonathan Wakely
2015-04-29 16:09   ` Doug Evans
2015-04-29 16:18     ` Jonathan Wakely
2015-04-29 16:33       ` Jonathan Wakely
2015-05-01 17:02       ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).