From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 948 invoked by alias); 3 Sep 2010 16:21:56 -0000 Received: (qmail 923 invoked by uid 22791); 3 Sep 2010 16:21:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Sep 2010 16:21:43 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id DF7F81C159D8; Fri, 3 Sep 2010 18:21:40 +0200 (CEST) Received: from igel.home (ppp-93-104-152-151.dynamic.mnet-online.de [93.104.152.151]) by mail.mnet-online.de (Postfix) with ESMTP id AEC5E1C001BB; Fri, 3 Sep 2010 18:21:40 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 871CFCA299; Fri, 3 Sep 2010 18:21:40 +0200 (CEST) From: Andreas Schwab To: Nicolas Sabouret Cc: gdb@sourceware.org Subject: Re: printing array in function References: <4C80BA7A.3030309@lip6.fr> X-Yow: RELATIVES!! Date: Fri, 03 Sep 2010 16:21:00 -0000 In-Reply-To: <4C80BA7A.3030309@lip6.fr> (Nicolas Sabouret's message of "Fri, 03 Sep 2010 11:06:02 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: 2010-09/txt/msg00014.txt.bz2 Nicolas Sabouret writes: > The problem we have is that arrays passed to functions are seen as There is no such thing as an array parameter in C. > pointers by gdb. Here is a simple example : > > 1: void f(int tab[]) { This is the same as f(int *), see §6.7.5.3#7. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."