Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: JBWeeN <jbween@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Problem Assining Values to Arrays in GDB 4.17
Date: Thu, 03 Apr 2008 21:48:00 -0000	[thread overview]
Message-ID: <1207244235.31772.168.camel@localhost.localdomain> (raw)
In-Reply-To: <a0c090600804022232g43aa3e1dj5f86b339d904ce90@mail.gmail.com>

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.




      reply	other threads:[~2008-04-03 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a0c090600804020928v7e2ae98ey1a359889c5b1abc1@mail.gmail.com>
2008-04-02 16:32 ` JBWeeN
2008-04-02 18:09   ` Michael Snyder
2008-04-03  5:33     ` JBWeeN
2008-04-03 21:48       ` Michael Snyder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1207244235.31772.168.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=gdb@sourceware.org \
    --cc=jbween@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox