Re: How to implement a new Python command that takes values from tty?
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Yifei" == Yifei Zheng <[email protected]> writes: Yifei> I have written a few gdb pretty-printers using Python but this time Yifei> I'm trying to write a new command in Python. I want it to take Yifei> arguments from gdb and somewhat works like gdb's print. (It's a Yifei> special printer for some kind of std::vector). I'm curious why not write a pretty-printer for this case as well? Yifei> How can I let gdb evaluates the expression for me so that I don't have Yifei> to parse it, and then give me the value instead of the name? You want gdb.parse_and_eval. Tom