From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76744 invoked by alias); 20 Jun 2016 23:43: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 76725 invoked by uid 89); 20 Jun 2016 23:43:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients 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; Mon, 20 Jun 2016 23:43:24 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B7F085542; Mon, 20 Jun 2016 23:43:23 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5KNhM8M006992; Mon, 20 Jun 2016 19:43:22 -0400 Subject: Re: [PATCH 6/6] Add a gdbarch 'print_auxv' method for FreeBSD ABIs. To: John Baldwin , gdb-patches@sourceware.org, binutils@sourceware.org References: <20160616060202.63470-1-jhb@FreeBSD.org> <20160616060202.63470-7-jhb@FreeBSD.org> From: Pedro Alves Message-ID: <01923c04-aa57-ad6e-83ac-127f157a24ac@redhat.com> Date: Mon, 20 Jun 2016 23:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160616060202.63470-7-jhb@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-06/txt/msg00343.txt.bz2 On 06/16/2016 07:02 AM, John Baldwin wrote: > > +static int > +fbsd_print_auxv (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, > + CORE_ADDR val) Missing intro comment. > +{ > + const char *name; > + const char *description; > + enum auxv_format flavor; > + > + switch (type) > + { > +#define _TAGNAME(tag) #tag > +#define TAGNAME(tag) _TAGNAME(AT_##tag) > +#define TAG(tag, text, kind) \ > + case AT_FREEBSD_##tag: name = TAGNAME(tag); description = text; flavor = kind; break > + TAG (EXECPATH, _("Executable path"), str); > + TAG (CANARY, _("Canary for SSP"), hex); > + TAG (CANARYLEN, ("Length of the SSP canary"), dec); > + TAG (OSRELDATE, _("OSRELDATE"), dec); > + TAG (NCPUS, _("Number of CPUs"), dec); > + TAG (PAGESIZES, _("Pagesizes"), hex); > + TAG (PAGESIZESLEN, _("Number of pagesizes"), dec); > + TAG (TIMEKEEP, _("Pointer to timehands"), hex); > + TAG (STACKPROT, _("Initial stack protection"), hex); > + default: > + return (0); Write: return 0; However, with the suggestion in the previous patch, this would be a direct call to default_print_auxv_entry. > + } > + > + fprint_single_auxv (file, name, description, flavor, type, val); > + return (1); return 1; Thanks, Pedro Alves