From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62346 invoked by alias); 15 May 2015 17:04:08 -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 62335 invoked by uid 89); 15 May 2015 17:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 May 2015 17:04:07 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4FH460r006494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 15 May 2015 13:04:06 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4FH44Jh003709; Fri, 15 May 2015 13:04:04 -0400 Message-ID: <55562703.4060104@redhat.com> Date: Fri, 15 May 2015 17:04:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jan Kratochvil , gdb-patches@sourceware.org CC: Phil Muldoon Subject: Re: [PATCH v5 6/7] compile: New 'compile print' References: <20150513201615.4051.5261.stgit@host1.jankratochvil.net> <20150513201704.4051.40784.stgit@host1.jankratochvil.net> In-Reply-To: <20150513201704.4051.40784.stgit@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00400.txt.bz2 A couple very minor nits below, and this is good to go. On 05/13/2015 09:17 PM, Jan Kratochvil wrote: > + if (TYPE_CODE (gdb_type) != TYPE_CODE_PTR) > + error (_("Invalid type code %d of symbol \"%s\" " > + "in compiled module \"%s\"."), > + TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_VAL, > + objfile_name (objfile)); > + > + switch (TYPE_CODE (gdb_type_from_ptr)) > + { > + case TYPE_CODE_ARRAY: > + retval = gdb_type_from_ptr; > + gdb_type_from_ptr = TYPE_TARGET_TYPE (gdb_type_from_ptr); > + break; > + case TYPE_CODE_FUNC: > + retval = gdb_type_from_ptr; AFAIC, retval is always gdb_type_from_ptr, and could be moved out of the switch. > + break; > + default: > + error (_("Invalid type code %d of symbol \"%s\" " > + "in compiled module \"%s\"."), > + TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_PTR_TYPE, > + objfile_name (objfile)); > + } > diff --git a/gdb/compile/compile-object-load.h b/gdb/compile/compile-object-load.h > index f5e887d..3e0e45b 100644 > --- a/gdb/compile/compile-object-load.h > +++ b/gdb/compile/compile-object-load.h > @@ -37,6 +37,14 @@ struct compile_module > > /* User data for SCOPE in use. */ > void *scope_data; > + > + /* Inferior parameter out value address or NULL if the inferior function does not > + have one. */ Line too long, I think. Also, "NULL if the inferior function does not have one" looks like a copy/paste, given this is not a pointer variable. I'd swap around the fields, and write: /* Inferior parameter out value type or NULL if the inferior function does not have one. */ struct type *out_value_type; /* If the inferior function has an out value, this is its address. */ CORE_ADDR out_value_addr; > + CORE_ADDR out_value_addr; > + > + /* Inferior parameter out value type or NULL if the inferior function does not > + have one. */ > + struct type *out_value_type; > }; > Thanks, Pedro Alves