This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to access files (open/read/close) from gdb script ?
> > 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.
>
> You have two options: use "shell" and its limitations, or wrap GDB in
> something that processes its input and output, like Expect.
Thanks for your hints,
but I am using a GUI front-end (Elicpse) for GDB, so I can't process
GDB's input and ouput.
That's why I was trying to do it from a GDB script...
By the way, in a "debugguee" program, is there any way to know if the
program is currently running "in" GDB or if it is freely running
(without debuuger connected) ??
Thanks again,
David