This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libc functions in gdb expressions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]