public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated
@ 2009-09-01 8:16 noamraph at gmail dot com
2009-09-01 8:16 ` [Bug gdb/10584] " noamraph at gmail dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-01 8:16 UTC (permalink / raw)
To: gdb-prs
Hello,
If I create a Python pretty-printer, it doesn't get updated in GUI using gdb.
This is because the MI var doesn't get updated. To recreate:
Download bug.c, bug.py which I will attach in a minute.
> gcc -g bug.c
> gdb --int mi2
(gdb) python execfile("bug.py") # Install pretty-printer for type "MyInt"
(gdb) break main
(gdb) run
(gdb) next # do x = 3
(gdb) -var-create x * x
(gdb) next # x = 5
(gdb) -var-update * # Doesn't report x changing.
This was tested on a current CVS: 6.8.50.20090831
Thanks,
Noam
--
Summary: MI vars with Python pretty-printers don't get updated
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned at sourceware dot org
ReportedBy: noamraph at gmail dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
@ 2009-09-01 8:16 ` noamraph at gmail dot com
2009-09-01 8:17 ` noamraph at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-01 8:16 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-01 08:16 -------
Created an attachment (id=4162)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4162&action=view)
C Source needed to recreate the bug
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
2009-09-01 8:16 ` [Bug gdb/10584] " noamraph at gmail dot com
@ 2009-09-01 8:17 ` noamraph at gmail dot com
2009-09-01 9:12 ` noamraph at gmail dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-01 8:17 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-01 08:17 -------
Created an attachment (id=4163)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4163&action=view)
Python source needed to recreate the bug
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
2009-09-01 8:16 ` [Bug gdb/10584] " noamraph at gmail dot com
2009-09-01 8:17 ` noamraph at gmail dot com
@ 2009-09-01 9:12 ` noamraph at gmail dot com
2009-09-01 9:13 ` noamraph at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-01 9:12 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-01 09:12 -------
Ok, here's a workaround/half-fix:
Apply the patch. It simply comments out two lines which avoid updating a value
which has a pretty printer and for which -var-list-children was not called.
Python pretty-printers get updated without calling -var-list-children - the
attached bug.py is an example.
Now, use bug-workaround.py instead of bug.py. It seems that gdb doesn't update
the value before getting its string. bug-workaround.py references and
dereferences the value, with the effect of re-evaluating it.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (2 preceding siblings ...)
2009-09-01 9:12 ` noamraph at gmail dot com
@ 2009-09-01 9:13 ` noamraph at gmail dot com
2009-09-01 9:14 ` noamraph at gmail dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-01 9:13 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-01 09:13 -------
Created an attachment (id=4165)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4165&action=view)
Patch to half-fix the bug
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (3 preceding siblings ...)
2009-09-01 9:13 ` noamraph at gmail dot com
@ 2009-09-01 9:14 ` noamraph at gmail dot com
2009-09-01 16:06 ` tromey at redhat dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-01 9:14 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-01 09:14 -------
Created an attachment (id=4166)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4166&action=view)
Workaround which works when the patch is applied
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (4 preceding siblings ...)
2009-09-01 9:14 ` noamraph at gmail dot com
@ 2009-09-01 16:06 ` tromey at redhat dot com
2009-09-03 7:45 ` noamraph at gmail dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2009-09-01 16:06 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2009-09-01 16:06 -------
This code has been extensively reworked on the python branch in
the archer repository. We've also discussed the design quite a bit
on the archer and gdb lists.
If you could try that branch, it would help.
We'll be pushing this code into CVS as soon as we all agree it is ready.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (5 preceding siblings ...)
2009-09-01 16:06 ` tromey at redhat dot com
@ 2009-09-03 7:45 ` noamraph at gmail dot com
2009-09-03 13:26 ` noamraph at gmail dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-03 7:45 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-03 07:45 -------
I just checked it with the archer-tromey-python branch, and it works with no
workarounds needed!
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (6 preceding siblings ...)
2009-09-03 7:45 ` noamraph at gmail dot com
@ 2009-09-03 13:26 ` noamraph at gmail dot com
2009-09-03 13:37 ` noamraph at gmail dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-03 13:26 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-03 13:26 -------
Sorry, I was mistaken. The variable was updated because the pretty-printer
wasn't used at all...
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (7 preceding siblings ...)
2009-09-03 13:26 ` noamraph at gmail dot com
@ 2009-09-03 13:37 ` noamraph at gmail dot com
2009-09-03 16:15 ` tromey at redhat dot com
2009-09-03 18:14 ` tromey at redhat dot com
10 siblings, 0 replies; 12+ messages in thread
From: noamraph at gmail dot com @ 2009-09-03 13:37 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From noamraph at gmail dot com 2009-09-03 13:37 -------
Ok. If I do -enable-pretty-printing (in the python branch), we return to the
original bug - even bug-workaround doesn't work. :-(
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (8 preceding siblings ...)
2009-09-03 13:37 ` noamraph at gmail dot com
@ 2009-09-03 16:15 ` tromey at redhat dot com
2009-09-03 18:14 ` tromey at redhat dot com
10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2009-09-03 16:15 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2009-09-03 16:15 -------
I'm looking at it.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at sourceware dot|tromey at redhat dot com
|org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2009-09-03 16:15:35
date| |
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/10584] MI vars with Python pretty-printers don't get updated
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
` (9 preceding siblings ...)
2009-09-03 16:15 ` tromey at redhat dot com
@ 2009-09-03 18:14 ` tromey at redhat dot com
10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2009-09-03 18:14 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2009-09-03 18:14 -------
I fixed this on the archer-tromey-python branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|6.8 |6.9
http://sourceware.org/bugzilla/show_bug.cgi?id=10584
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-09-03 18:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-01 8:16 [Bug gdb/10584] New: MI vars with Python pretty-printers don't get updated noamraph at gmail dot com
2009-09-01 8:16 ` [Bug gdb/10584] " noamraph at gmail dot com
2009-09-01 8:17 ` noamraph at gmail dot com
2009-09-01 9:12 ` noamraph at gmail dot com
2009-09-01 9:13 ` noamraph at gmail dot com
2009-09-01 9:14 ` noamraph at gmail dot com
2009-09-01 16:06 ` tromey at redhat dot com
2009-09-03 7:45 ` noamraph at gmail dot com
2009-09-03 13:26 ` noamraph at gmail dot com
2009-09-03 13:37 ` noamraph at gmail dot com
2009-09-03 16:15 ` tromey at redhat dot com
2009-09-03 18:14 ` tromey at redhat dot com
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).