From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32287 invoked by alias); 17 Mar 2010 21:19:39 -0000 Received: (qmail 32277 invoked by uid 22791); 17 Mar 2010 21:19:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-pv0-f169.google.com (HELO mail-pv0-f169.google.com) (74.125.83.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Mar 2010 21:19:35 +0000 Received: by pvg2 with SMTP id 2so1044539pvg.0 for ; Wed, 17 Mar 2010 14:19:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.188.8 with SMTP id q8mr1678708rvp.0.1268860774050; Wed, 17 Mar 2010 14:19:34 -0700 (PDT) Date: Wed, 17 Mar 2010 21:19:00 -0000 Message-ID: <1957618c1003171419q24c02ee7vdf293b210bbba849@mail.gmail.com> Subject: gdb python setup problem From: Yogesh Mundada To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00109.txt.bz2 Hi, I am trying 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=548): ---------------------- #!/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