public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-fedora-merge: rh504356: Fix "some Python error when displaying some C++ objects".
@ 2009-06-08 22:27 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2009-06-08 22:27 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-fedora-merge has been updated
       via  000db8b7bfef8581ef099ccca8689cfddfea1be8 (commit)
      from  8d9ab68fc0955c9de6320bec2821a21e3244600d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 000db8b7bfef8581ef099ccca8689cfddfea1be8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Jun 9 00:25:42 2009 +0200

    rh504356: Fix "some Python error when displaying some C++ objects".
    
    https://bugzilla.redhat.com/show_bug.cgi?id=504356#c3
    
    patch for python printer
    
    This turned out to be a bug already fixed in the latest
    libstdc++ printers.  I'm attaching a patch I made against
    the SRPM gdb-6.8.50.20090302.  I didn't update the .spec
    file, sorry.
    
    I compared the SRPM's printers with the latest and the other
    differences are very minor.

-----------------------------------------------------------------------

Summary of changes:
 gdb/python/lib/gdb/libstdcxx/v6/printers.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/gdb/python/lib/gdb/libstdcxx/v6/printers.py b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
index 58fd91c..8c0efc5 100644
--- a/gdb/python/lib/gdb/libstdcxx/v6/printers.py
+++ b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
@@ -27,9 +27,11 @@ class StdPointerPrinter:
         self.val = val
 
     def to_string (self):
+        if self.val['_M_refcount']['_M_pi'] == 0:
+            return '%s (empty) %s' % (self.typename, self.val['_M_ptr'])
         return '%s (count %d) %s' % (self.typename,
-        self.val['_M_refcount']['_M_pi']['_M_use_count'],
-        self.val['_M_ptr'])
+                                     self.val['_M_refcount']['_M_pi']['_M_use_count'],
+                                     self.val['_M_ptr'])
 
 class UniquePointerPrinter:
     "Print a unique_ptr"


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-08 22:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-08 22:27 [SCM] archer-jankratochvil-fedora-merge: rh504356: Fix "some Python error when displaying some C++ objects" jkratoch

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).