From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15249 invoked by alias); 22 May 2009 08:42:51 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 15239 invoked by uid 22791); 22 May 2009 08:42:50 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4A1661A6.8090200@redhat.com> 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> <4A1661A6.8090200@redhat.com> Date: Fri, 22 May 2009 08:42:00 -0000 Message-ID: <41aa4e6c0905220142s131f0966tb981645da6d67478@mail.gmail.com> Subject: Re: Archer in Cygwin help From: Sreejith To: Phil Muldoon Cc: Paul Pluzhnikov , archer@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2009-q2/txt/msg00109.txt.bz2 2009/5/22 Phil Muldoon : > Sreejith wrote: >> >> 2009/5/22 Paul Pluzhnikov : >> =A0(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): >> =A0File "", line 1, in >> NameError: name 'myList' is not defined >> > > Python does not know anything about myList, it is something that is defin= ed > 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 =3D {<_List_base >> =3D { _M_impl =3D { >> =3D { >> =3D {}, }, _M_node =3D { _M_next =3D 0x682150, _M_prev =3D 0x6821e0}}}, } (gdb) >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. -Sreejith