From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16000 invoked by alias); 4 Mar 2016 21:48:09 -0000 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 Received: (qmail 15982 invoked by uid 89); 4 Mar 2016 21:48:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=54C7, 6D53, 01D3, 01d3 X-HELO: mail-yw0-f178.google.com Received: from mail-yw0-f178.google.com (HELO mail-yw0-f178.google.com) (209.85.161.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 04 Mar 2016 21:48:07 +0000 Received: by mail-yw0-f178.google.com with SMTP id g127so55111456ywf.2 for ; Fri, 04 Mar 2016 13:48:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=mhx+RizYdRNmXMvTapaTV1EY0gdL9E9tUaIUyKBDjiA=; b=TrdoccLAjqAtYNxI7QccN9LKzgqXjjzgqLYAbN9MGaNYUw8BvTpiiBcEwz8mwpe190 JN9ZWNp/m3gjKrUePkFAguQnUFdAVaPAJcND9EuFZwGiw8YfRgN0EKNg8jFd+iOPGoag NONGNv+xseLZryA25iPASFYlMm22gTcssa8HouRyKWEiOMpNQBaZ9rPCxaxJb2Te6h+J gZYCoS2YSDa8RWLE2+68mpgMGNbISObzcCqZAZbEx7y/BkjSkS5GtbRwlNaM0KU5klJy RwkdlW+9bgLIb/qkgu377XgKJmFHYJVD599jZG2HRgpAWOpZ9BR4AcoWmtvwREQEh79d 2aEQ== X-Gm-Message-State: AD7BkJJRkmRHMA37nky+X7PPljf9Rbc3cRwqO9PxRaHmqaauhiyi7uCrzE8T40ZgpHv+wuucofJ+b/ikoPAvfA== MIME-Version: 1.0 X-Received: by 10.129.109.216 with SMTP id i207mr2351145ywc.50.1457128085383; Fri, 04 Mar 2016 13:48:05 -0800 (PST) Received: by 10.37.24.2 with HTTP; Fri, 4 Mar 2016 13:48:05 -0800 (PST) In-Reply-To: <87k2lim6rg.fsf@linux-m68k.org> References: <20160304144231.GA7767@host1.jankratochvil.net> <87k2lim6rg.fsf@linux-m68k.org> Date: Fri, 04 Mar 2016 21:48:00 -0000 Message-ID: Subject: Re: Printing a 2D array in a C program From: Neven Sajko To: Andreas Schwab Cc: Jan Kratochvil , gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00014.txt.bz2 On 4 March 2016 at 19:34, Andreas Schwab wrote: > This is correct, *m has the type int[sz]. If you want to print all > elements pointed to by m you need to use `print *m@sz'. > > 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." Thank you :) But it seems `print *m@(int)sz' is needed because enum aren't integral types?