On 11/06/14 17:47, Matthias Clasen wrote:
On Tue, 2014-06-10 at 17:26 +0100, Andrew Price wrote:
On 10/06/14 15:59, Sandro Mani wrote:
(hmpf, hit wrong key.. continuing..)
I'm getting
Python Exception <type 'exceptions.TypeError'> instance has no next()
method:
whenever I try to print out a backtrace with gdb. Anyone else noticing
this? Any idea which component is reponsible? Downgrading gdb and python
did not help.
Do you have broken gdb-python backtrace hooks in your ~/.gdbinit or
something like that?
Andy
Something changed in gdb's python suppport and broke the gobject python
snipplets that are installed by glib2-devel. I lack the python skills to
fix that, and could find much information about what changed in gdb when
I looked into it this weekend.
If somebody who speaks python could look into it, that would be
fantastic.
Does the patch below work? gdb's git commits are difficult to make sense
of but I found a clue in the comment at the bottom of the class that the
snipplet subclasses:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/python/lib/gdb/FrameIterator.py;h=c99a91e556c;hb=HEAD
(Summary: next() and __next__() are required to appease both python 2
and python 3)
I switched the names around to match the calling convention in that file
but it can probably be done the other way too, with next() calling
__next__(), which might be cleaner.
Cheers,
Andy
--- /usr/share/glib-2.0/gdb/gobject.py.old 2014-06-11 20:12:32.037000000
+0100
+++ /usr/share/glib-2.0/gdb/gobject.py 2014-06-11 20:38:29.108000000 +0100
@@ -238,7 +238,7 @@
return i
return -1
- def __next__ (self):
+ def next (self):
# Ensure we have enough frames for a full signal emission
self.fill()
@@ -274,6 +274,9 @@
return self.queue.pop(0)
+ def __next__ (self):
+ return self.next()
+
class GFrameFilter(object):
name = 'glib'
enabled = True
--
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe:
https://admin.fedoraproject.org/mailman/listinfo/test