This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

Re: Archer in Cygwin help


Sreejith wrote:
2009/5/22 Paul Pluzhnikov <ppluzhnikov@google.com>:
(gdb) python import gdb.libstdcxx.v6.printers
(gdb)


Ok looks like the printers are loaded, that's good!


(gdb) python print myList
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'myList' is not defined

Python does not know anything about myList, it is something that is defined in the inferior (the program you are debugging). So the error message is correct from Python's point of view. At this point you should use:


print myList

(not: python print myList.) What happens then is the pretty-printing code will ask the Python pretty-printers if they have a printer registered that can print that variable. If so that printer is called, and the output is returned to GDB. GDB then formats the output and prints it to the screen.


Let us know how it turns out!


Regards

Phil


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