public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-tromey-python: Fix StdBitSetPrinter in cases where the member _M_w is not an array.
@ 2009-02-24 8:39 pmuldoon
0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2009-02-24 8:39 UTC (permalink / raw)
To: archer-commits
The branch, archer-tromey-python has been updated
via 6b43f0eaec652104bcbf802d7a86869d956ce4e4 (commit)
from f17c887e8b4aa77c8a49885a0f8bf2dab0dba228 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 6b43f0eaec652104bcbf802d7a86869d956ce4e4
Author: Phil Muldoon <pmuldoon@redhat.com>
Date: Tue Feb 24 08:38:00 2009 +0000
Fix StdBitSetPrinter in cases where the member _M_w is not an array.
2009-02-23 Phil Muldoon <pmuldoon@redhat.com>
* python/lib/gdb/libstdcxx/v6/printers.py
(StdBitsetPrinter.children): Check "_M_w" for int type. If it is an
int type, convert to array.
-----------------------------------------------------------------------
Summary of changes:
gdb/python/lib/gdb/libstdcxx/v6/printers.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 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 508a22d..e7b3495 100644
--- a/gdb/python/lib/gdb/libstdcxx/v6/printers.py
+++ b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
@@ -337,7 +337,16 @@ class StdBitsetPrinter:
def children (self):
words = self.val['_M_w']
wtype = words.type()
- tsize = wtype.target().sizeof()
+
+ # The _M_w member can be either an unsigned long, or an
+ # array. This depends on the template specialization used.
+ # If it is a single long, convert to a single element list.
+ if wtype.code () == gdb.TYPE_CODE_ARRAY:
+ tsize = wtype.target ().sizeof ()
+ else:
+ words = [words]
+ tsize = wtype.sizeof ()
+
nwords = wtype.sizeof() / tsize
result = []
byte = 0
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-24 8:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-24 8:39 [SCM] archer-tromey-python: Fix StdBitSetPrinter in cases where the member _M_w is not an array pmuldoon
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).