From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43736 invoked by alias); 26 Feb 2018 06:49:26 -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 43725 invoked by uid 89); 26 Feb 2018 06:49:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Feb 2018 06:49:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 37AF9116C20; Mon, 26 Feb 2018 01:49:23 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wCgHmmRkdqgO; Mon, 26 Feb 2018 01:49:23 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C81C7116C04; Mon, 26 Feb 2018 01:49:22 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 7667A83054; Mon, 26 Feb 2018 10:49:18 +0400 (+04) Date: Mon, 26 Feb 2018 06:49:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA v2 2/4] Initial support for variant parts Message-ID: <20180226064918.trbwkkkrhitv6nyb@adacore.com> References: <20180222203018.23551-1-tom@tromey.com> <20180222203018.23551-3-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222203018.23551-3-tom@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-02/txt/msg00373.txt.bz2 On Thu, Feb 22, 2018 at 01:30:16PM -0700, Tom Tromey wrote: > This adds some initial support for variant parts to gdbtypes.h. A > variant part is represented as a union. The union has a flag > indicating that it has a discriminant, and information about the > discriminant is attached using the dynamic property system. > > 2018-02-22 Tom Tromey > > * value.h (value_union_variant): Declare. > * valops.c (value_union_variant): New function. > * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro. > (struct discriminant_info): New. > (enum dynamic_prop_node_kind) : New > enumerator. > (struct main_type) : New field. OK, with just one minor typo below... > + /* Compute the discriminant. Note that unpack_field_as_long handles > + sign extension when necessary, as does the DWARF reader -- so > + signed discriminants will be handled correct despite the use of correct -> correctly Thanks! -- Joel