From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8113 invoked by alias); 24 Apr 2013 17:48:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8104 invoked by uid 89); 24 Apr 2013 17:48:41 -0000 X-Spam-SWARE-Status: No, score=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 24 Apr 2013 17:48:40 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3OHmVWP008202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Apr 2013 13:48:31 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3OHmTKa024671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 24 Apr 2013 13:48:30 -0400 From: Tom Tromey To: Walfred Tedeschi Cc: gdb-patches@sourceware.org, drow@false.org Subject: Re: [PATCH] Fix display of structures/bitfields in register description. References: <1366812163-27865-1-git-send-email-walfred.tedeschi@intel.com> Date: Wed, 24 Apr 2013 20:50:00 -0000 In-Reply-To: <1366812163-27865-1-git-send-email-walfred.tedeschi@intel.com> (Walfred Tedeschi's message of "Wed, 24 Apr 2013 16:02:43 +0200") Message-ID: <87wqrrn7ki.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-04/txt/msg00751.txt.bz2 >>>>> "Walfred" == Walfred Tedeschi writes: Walfred> Add support for displaying structures and bitfields for Walfred> registers when executing the "maint print c-tdesc". Command is Walfred> also used when converting the xml target description file into Walfred> c file. Thanks for the patch. I think it looks pretty good. I have a few notes. Walfred> + case TDESC_TYPE_STRUCT: Walfred> + printf_unfiltered Walfred> + (" type = tdesc_create_struct (feature, \"%s\");\n", This emits code to assign to the variable "type". But is this variable defined? Earlier I see: if (type->kind == TDESC_TYPE_UNION && VEC_length (tdesc_type_field, type->u.u.fields) > 0) { printf_unfiltered (" struct tdesc_type *type;\n"); ... which I think is the only spot where it is defined. If this is correct then I think changing this to also check TDESC_TYPE_STRUCT would be appropriate. If it isn't correct, then I'm curious to know what defines 'type' in the output. Walfred> +global srcdir Walfred> +global subdir I don't think these are needed. Walfred> + I think this should be the usual GPL comment. Tom