From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14271 invoked by alias); 4 Oct 2002 21:11:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14264 invoked from network); 4 Oct 2002 21:11:28 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by sources.redhat.com with SMTP; 4 Oct 2002 21:11:28 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id g94LBSs20616 for ; Fri, 4 Oct 2002 14:11:28 -0700 (PDT) Received: from scv3.apple.com (scv3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Fri, 4 Oct 2002 14:11:19 -0700 Received: from molly.local. (vpn-scv-x2-210.apple.com [17.219.193.210]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id g94LBR317856; Fri, 4 Oct 2002 14:11:27 -0700 (PDT) Date: Fri, 04 Oct 2002 14:11:00 -0000 Subject: Re: [PATCH] Print vector registers in natural format, not hex Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: gdb-patches@sources.redhat.com To: Daniel Jacobowitz From: Klee Dienes In-Reply-To: <20021004205309.GA17616@nevyn.them.org> Message-Id: Content-Transfer-Encoding: quoted-printable X-SW-Source: 2002-10/txt/msg00140.txt.bz2 On Friday, October 4, 2002, at 04:53 PM, Daniel Jacobowitz wrote: > Just got one nit. > > First of all, in characters > v16_int8 =3D {'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', '@', 'I',=20 > '\017', '=B0', 'Z', '@', '-', '=B0', 'Z', 'T'} > > is more natural to me. It's a vector of chars, not a string. > > Secondly, this is an 'int8' type. Are characters really the way to go? Although I agree with you, that's not really a result of this patch,=20 but rather long-standing GDB behavior. The patch is only causing $v1=20 to be printed according to its type declaration, which in this case is: type =3D union __gdb_builtin_type_vec128 { int128_t uint128; float v4_float[4]; int32_t v4_int32[4]; int16_t v8_int16[8]; int8_t v16_int8[16]; } Then the following code in c-valprint.c causes it to be printed as a=20 string: /* For an array of chars, print with string syntax. */ if (eltlen =3D=3D 1 && ((TYPE_CODE (elttype) =3D=3D TYPE_CODE_INT) || ((current_language->la_language =3D=3D language_m2) && (TYPE_CODE (elttype) =3D=3D TYPE_CODE_CHAR))) && (format =3D=3D 0 || format =3D=3D 's')) You could probably make a good case that arrays of 'int' should be=20 printed as you describe, but that's a debate I'll leave to someone else.