This is the mail archive of the 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

2009/5/22 Phil Muldoon <>:
> Sreejith wrote:
>> 2009/5/22 Paul Pluzhnikov <>:
>> ?(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.

In my previous mail, I had mentioned out put of both (python print
myList and print myList). Here it is for your reference:

(gdb) print myList
$1 = {<_List_base<int, std::allocator<int> >> = {
   _M_impl = {<allocator<std::_List_node<int> >> =
{<new_allocator<std::_List_node<int> >> = {<No data fields>}, <No data
fields>}, _M_node = {
       _M_next = 0x682150, _M_prev = 0x6821e0}}}, <No data fields>}

>From your explanation, I understand that there is no printers
registered matching the type of myList and hence gdb is using it's
'own printer'. Is that correct? Please share your thoughts.


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