From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24305 invoked by alias); 7 Aug 2008 19:09:56 -0000 Received: (qmail 24296 invoked by uid 22791); 7 Aug 2008 19:09:55 -0000 X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.185) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 07 Aug 2008 19:08:46 +0000 Received: by fk-out-0910.google.com with SMTP id 19so386545fkr.8 for ; Thu, 07 Aug 2008 12:08:35 -0700 (PDT) Received: by 10.180.240.10 with SMTP id n10mr1697341bkh.69.1218136114969; Thu, 07 Aug 2008 12:08:34 -0700 (PDT) Received: by 10.180.243.20 with HTTP; Thu, 7 Aug 2008 12:08:34 -0700 (PDT) Message-ID: <5d649bdb0808071208h41ae9bf2s60f988118a735758@mail.gmail.com> Date: Thu, 07 Aug 2008 19:09:00 -0000 From: "Neo Jia" To: "Tom Tromey" Subject: Re: Source a python script to gdb plugin? Cc: "Paul Pluzhnikov" , "gdb ml" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5d649bdb0808070039o6503e704gc8deac92ada5d2a6@mail.gmail.com> <5d649bdb0808071000rbe89429xc8b607f5822a60be@mail.gmail.com> <8ac60eac0808071008p6a05e668h66300269b3bf3fd5@mail.gmail.com> 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: 2008-08/txt/msg00136.txt.bz2 On Thu, Aug 7, 2008 at 10:12 AM, Tom Tromey wrote: >>>>>> "Paul" == Paul Pluzhnikov writes: > >>> (gdb) source ./load_libc >>> /home/cjia/workareas/gdb_nvwatch/scripts/load_libc:3: Error in sourced command file: >>> Undefined command: "from". Try "help". > > Paul> Don't you want to switch to python interpreter before doing 'source' > Paul> (or rather its python equivalent)? > > Yes. The "source" command remains unchanged -- it reads gdb command > scripts. > /opt/gdb_plugin/bin/gdb GNU gdb (GDB) 6.8.50.20080716-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: . (gdb) python ./load_libc File "", line 1 ./load_libc ^ SyntaxError: invalid syntax (gdb) Is this the right way to use it? Thanks, Neo > > Tom > -- I would remember that if researchers were not ambitious probably today we haven't the technology we are using!