This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/11765] Pretty printer lookup fails with lambda functions


------- Additional Comments From tromey at redhat dot com  2010-06-29 15:07 -------
I think the problem here is that python lambdas do not capture
their environment.  That is, this is not a gdb bug.

I slightly (but not importantly) modified your example and tried "print 5".
I see:

(gdb) p 5
$1 = test 4
test 4
test 4
test 4
test 4
test 4
test 4
test 4
test 4
test 4
5

Now see what happens if I change "i":

(gdb) python i = 23
(gdb) print 5
$2 = test 23
test 23
test 23
test 23
test 23
test 23
test 23
test 23
test 23
test 23
5


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=11765

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]