This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Problem Assining Values to Arrays in GDB 4.17
On Thu, 2008-04-03 at 07:32 +0200, JBWeeN wrote:
> It does not work, If a use a system call gdb says that command is undefined.
> I get the following error:
> (gdb) memcpy(myArray, {1.2, 2.0, 5.7}, 3*sizeof(double))
> Undefined command: "memcpy". Try "help".
Ah, well, you see, gdb does not know "memcpy" as a
command, but it understands it as part of an expression.
(gdb) print memcpy (myArray, whatever, 3*sizeof(double))
For this special case of calling a function when you
do not really care to see the return value printed,
there is the command "call". Just substitute "call"
for "print" above.