From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9158 invoked by alias); 22 May 2009 08:26:34 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 9144 invoked by uid 22791); 22 May 2009 08:26:33 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A1661A6.8090200@redhat.com> Date: Fri, 22 May 2009 08:26:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Sreejith CC: Paul Pluzhnikov , archer@sourceware.org Subject: Re: Archer in Cygwin help References: <41aa4e6c0905201017j68b44350s2141ef8af6895701@mail.gmail.com> <4A147E6B.6000708@redhat.com> <41aa4e6c0905210244n3dc5ed65m2f42a7c78658b778@mail.gmail.com> <4A158648.1080004@redhat.com> <41aa4e6c0905211001x21a17ab7gebece0b238177061@mail.gmail.com> <8ac60eac0905211539n21d9b01ex7f5af97a51a4042@mail.gmail.com> <41aa4e6c0905220049p716787c9odd8e936ff4a9b99d@mail.gmail.com> In-Reply-To: <41aa4e6c0905220049p716787c9odd8e936ff4a9b99d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2009-q2/txt/msg00108.txt.bz2 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 "", line 1, in > 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