public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* libc functions in gdb expressions
@ 2005-09-28 21:55 Thomas Covenant
  2005-09-28 21:58 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Covenant @ 2005-09-28 21:55 UTC (permalink / raw)
  To: GDB Mailinglist

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?

Thanks!


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libc functions in gdb expressions
  2005-09-28 21:55 libc functions in gdb expressions Thomas Covenant
@ 2005-09-28 21:58 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-09-28 21:58 UTC (permalink / raw)
  To: Thomas Covenant; +Cc: GDB Mailinglist

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-28 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-28 21:55 libc functions in gdb expressions Thomas Covenant
2005-09-28 21:58 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).