From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4091 invoked by alias); 27 Sep 2005 13:57:21 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3762 invoked by uid 22791); 27 Sep 2005 13:57:15 -0000 Received: from nproxy.gmail.com (HELO nproxy.gmail.com) (64.233.182.201) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 27 Sep 2005 13:57:15 +0000 Received: by nproxy.gmail.com with SMTP id l37so413796nfc for ; Tue, 27 Sep 2005 06:57:12 -0700 (PDT) Received: by 10.48.3.12 with SMTP id 12mr543422nfc; Tue, 27 Sep 2005 06:57:12 -0700 (PDT) Received: by 10.48.157.14 with HTTP; Tue, 27 Sep 2005 06:57:12 -0700 (PDT) Message-ID: <6541ed4c05092706575e8f1a37@mail.gmail.com> Date: Tue, 27 Sep 2005 13:57:00 -0000 From: David Lamy-Charrier Reply-To: David Lamy-Charrier To: gdb@sources.redhat.com Subject: Re: How to access files (open/read/close) from gdb script ? In-Reply-To: <20050926173638.GC8277@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6541ed4c050926074274c08518@mail.gmail.com> <6541ed4c05092607445929e846@mail.gmail.com> <1127746273.14120.60.camel@localhost.localdomain> <6541ed4c05092608534877c12@mail.gmail.com> <20050926170314.GP772@adacore.com> <6541ed4c05092610342d7d63c1@mail.gmail.com> <20050926173638.GC8277@nevyn.them.org> X-SW-Source: 2005-09/txt/msg00209.txt.bz2 > > Is there anywhere a list of allowed functions from gdb script (I know > > that printf, strcmp... are allowed) ? > > They aren't "allowed" per se. You're calling functions in the program > you're debugging when you do this. > > You have two options: use "shell" and its limitations, or wrap GDB in > something that processes its input and output, like Expect. Thanks for your hints, but I am using a GUI front-end (Elicpse) for GDB, so I can't process GDB's input and ouput. That's why I was trying to do it from a GDB script... By the way, in a "debugguee" program, is there any way to know if the program is currently running "in" GDB or if it is freely running (without debuuger connected) ?? Thanks again, David