From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7733 invoked by alias); 17 Mar 2010 21:27:48 -0000 Received: (qmail 7708 invoked by uid 22791); 17 Mar 2010 21:27:48 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-px0-f203.google.com (HELO mail-px0-f203.google.com) (209.85.216.203) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Mar 2010 21:27:44 +0000 Received: by pxi41 with SMTP id 41so1145640pxi.23 for ; Wed, 17 Mar 2010 14:27:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.91.9 with SMTP id t9mr702138rvl.195.1268861262485; Wed, 17 Mar 2010 14:27:42 -0700 (PDT) In-Reply-To: <1957618c1003171419q24c02ee7vdf293b210bbba849@mail.gmail.com> References: <1957618c1003171419q24c02ee7vdf293b210bbba849@mail.gmail.com> Date: Wed, 17 Mar 2010 21:27:00 -0000 Message-ID: <6421d2b81003171427k4bca5acfr28d443bcaf5cbf8@mail.gmail.com> Subject: Re: gdb python setup problem From: Zi Shen Lim To: Yogesh Mundada Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00110.txt.bz2 In GDB 7.0, you can get into a python shell: '(gdb) python'. To source a python script (e.g. '(gdb) source myscript.py'), you'll need GDB 7.1. On Wed, Mar 17, 2010 at 2:19 PM, Yogesh Mundada wrote: > Hi, > > I am =A0trying to use gdb scripting using python on karmic. My gdb > version is 7.0-ubuntu. If I start gdb and execute python command then > I get a python prompt (making me think that python patch is accepted > in gdb mainline now). However, if I write following script > (http://tromey.com/blog/?p=3D548): > ---------------------- > #!/home/yogesh/build/gdb/gdb -P > import sys > import gdb > print "Here" > ---------------------- > > and execute it, I get following error: > ---------------------- > /home/yogesh/build/gdb/gdb: unrecognized option '-P' > Use `/home/yogesh/build/gdb/gdb --help' for a complete list of options. > ---------------------- > > Then I got the source code from archer-tromey-python branch as > mentioned in http://sourceware.org/gdb/wiki/PythonGdb. I compiled that > source code but still it did not have any -P option for python > scripting. > > What should I do to get python scripting working with gdb? > > -Yogesh >