Re: libc functions in gdb expressions

Daniel Jacobowitz
2005-09-28T21:58:29Z

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