From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40752 invoked by alias); 18 Dec 2015 12:39:25 -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 40734 invoked by uid 89); 18 Dec 2015 12:39:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Uses, Preparation, Hx-languages-length:1715, customization 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, 18 Dec 2015 12:39:23 +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 (Postfix) with ESMTPS id 2686BA0B4C; Fri, 18 Dec 2015 12:39:22 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBICdKQL027541; Fri, 18 Dec 2015 07:39:21 -0500 Message-ID: <5673FE78.5030900@redhat.com> Date: Fri, 18 Dec 2015 12:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Walfred Tedeschi , brobecker@adacore.com CC: gdb-patches@sourceware.org Subject: Re: [PATCH V2 2/5] Preparation for new siginfo on Linux. References: <1450371416-24270-1-git-send-email-walfred.tedeschi@intel.com> <1450371416-24270-2-git-send-email-walfred.tedeschi@intel.com> In-Reply-To: <1450371416-24270-2-git-send-email-walfred.tedeschi@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-12/txt/msg00359.txt.bz2 On 12/17/2015 04:56 PM, Walfred Tedeschi wrote: > First add new structure and function to allow architecture customization > for the siginfo structure. > > 2015-12-15 Walfred Tedeschi > > * linux-tdep.h (linux_siginfo_extra_field_values): New enum values. > (linux_siginfo_extra_fields): New enum type. (linux_siginfo_extra_fields): New enum_flags type. > * linux-tdep.c (linux_get_siginfo_type_with_fields): New function. > (linux_get_siginfo_type): Uses new function. * linux-tdep.c (linux_get_siginfo_type): Rename to ... (linux_get_siginfo_type_with_fields): ... this. Add parameter. (linux_get_siginfo_type): Reimplement as wrapper around linux_get_siginfo_type_with_fields. > diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h > index 9beb6f6..c0c9d91 100644 > --- a/gdb/linux-tdep.h > +++ b/gdb/linux-tdep.h > @@ -24,6 +24,15 @@ > Should include common/enum-flags.h. (And mention it in ChangeLog.) > struct regcache; > > +/* Enum used to define which kind of siginfo is used by the architecture. */ I'd suggest: /* Flag values indicating the extra fields in an architecture's siginfo_t type. */ > +enum linux_siginfo_extra_field_values > +{ > + LINUX_SIGINFO_FIELD_ADDR_BND = 1 Please document the value. > +}; > + > +/* Defines a type for the values defined in linux_siginfo_extra_field_values. */ I think you can just say: /* Define the corresponding enum_flags type. */ > +DEF_ENUM_FLAGS_TYPE (enum linux_siginfo_extra_field_values, linux_siginfo_extra_fields); > + > typedef char *(*linux_collect_thread_registers_ftype) (const struct regcache *, > ptid_t, > bfd *, char *, int *, Thanks, Pedro Alves