From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13256 invoked by alias); 28 Sep 2005 21:58:29 -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 13097 invoked by uid 22791); 28 Sep 2005 21:58:15 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 28 Sep 2005 21:58:15 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EKjwL-0005uC-N1; Wed, 28 Sep 2005 17:58:13 -0400 Date: Wed, 28 Sep 2005 21:58:00 -0000 From: Daniel Jacobowitz To: Thomas Covenant Cc: GDB Mailinglist Subject: Re: libc functions in gdb expressions Message-ID: <20050928215813.GA22635@nevyn.them.org> Mail-Followup-To: Thomas Covenant , GDB Mailinglist References: <20050928204945.5092.qmail@web34811.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050928204945.5092.qmail@web34811.mail.mud.yahoo.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00236.txt.bz2 On Wed, Sep 28, 2005 at 01:49:45PM -0700, Thomas Covenant wrote: > I've noticed that functions like strlen and strcmp are > available for use in expressions like > > (gdb) print strcmp(s, "foo!") > > during my debugging sessions with GDB. > > Is the entire C library available for expressions? I've just answered this one, so I have it handy... > 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. So, in short, whatever functions are linked in to the program you're debugging are available. -- Daniel Jacobowitz CodeSourcery, LLC