From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30532 invoked by alias); 3 Apr 2008 17:37:34 -0000 Received: (qmail 30523 invoked by uid 22791); 3 Apr 2008 17:37:34 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 Apr 2008 17:37:17 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 757183BEAC; Thu, 3 Apr 2008 10:37:15 -0700 (PDT) Subject: Re: Problem Assining Values to Arrays in GDB 4.17 From: Michael Snyder To: JBWeeN Cc: gdb@sourceware.org In-Reply-To: References: <1207159771.31772.124.camel@localhost.localdomain> Content-Type: text/plain Date: Thu, 03 Apr 2008 21:48:00 -0000 Message-Id: <1207244235.31772.168.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00032.txt.bz2 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.