This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: libc functions in gdb expressions
- From: Daniel Jacobowitz <drow at false dot org>
- To: Thomas Covenant <null_geodesic at yahoo dot com>
- Cc: GDB Mailinglist <gdb at sources dot redhat dot com>
- Date: Wed, 28 Sep 2005 17:58:13 -0400
- Subject: Re: libc functions in gdb expressions
- References: <20050928204945.5092.qmail@web34811.mail.mud.yahoo.com>
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