This is the mail archive of the
mailing list for the Archer project.
Re: A few python/pretty-printing questions
Thank you both for your replies.
On 6-Apr-09, at 5:57 PM, Tom Tromey wrote:
"Ray" == Ray Ruvinskiy <email@example.com> writes:
Ray> - Can pretty-printers be toggled on a case-by-case basis? If I
Ray> printer enabled for a certain type, can I still look at the raw
Yes, "print /r value". Here, "r" means "raw".
Ray> - Is it possible to export convenience variables from within the
Ray> python layer so that they would be visible from the gdb prompt?
We don't have an API for this, but I suppose we could add one.
Ray> - Suppose I want to pass an expression of the form
Ray> 'this->inner1.inner2.leaf' to a python command, is there a quick
Ray> way to look up the gdb.Value corresponding to the name, or do I
Ray> have to first look up 'this' and then index into the dictionary?
You can use the function gdb.parse_and_eval to parse an expression,
evaluate it, and yield a Value. We'll probably change the name of
this function, AFAIK none of us particularly likes this name :)