From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41722 invoked by alias); 10 Aug 2015 14:31:12 -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 41713 invoked by uid 89); 10 Aug 2015 14:31:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_40,LIKELY_SPAM_BODY,RP_MATCHES_RCVD,SPF_PASS,UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 10 Aug 2015 14:31:11 +0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7AEV4sm025491 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Aug 2015 14:31:05 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7AEV4hU008994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 10 Aug 2015 14:31:04 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t7AEV4Yd012442; Mon, 10 Aug 2015 14:31:04 GMT Received: from termi.oracle.com (/10.175.171.201) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2015 07:31:03 -0700 From: jose.marchesi@oracle.com (Jose E. Marchesi) To: Sergio Durigan Junior Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [PATCH V4 5/9] New probe type: DTrace USDT probes. References: <87r3tp722i.fsf@redhat.com> <20150325191418.GA32233@adacore.com> <87bnjfraq1.fsf@oracle.com> <20150326175028.GA13867@adacore.com> <87y4mdjcie.fsf@oracle.com> <20150331184727.GF13867@adacore.com> <878uedey48.fsf@oracle.com> <20150806213103.GC14992@adacore.com> <874mkb9qv9.fsf@oracle.com> <87k2t7rxmk.fsf@oracle.com> <20150807151232.GD14992@adacore.com> <87h9o7esmb.fsf@redhat.com> Date: Mon, 10 Aug 2015 14:31:00 -0000 In-Reply-To: <87h9o7esmb.fsf@redhat.com> (Sergio Durigan Junior's message of "Sun, 09 Aug 2015 23:21:00 -0400") Message-ID: <87io8nw6nv.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00216.txt.bz2 > Also, I didn't say it before, I wasn't so sure that casting a binary > stream to a structure to read its contents was the best way to do > things. It can of works, but makes the code a little harder to read, > IMO, because accessing its contents requires the accessor macros. > Perhaps it might be better to just have decoding routines that take > the binary data and produce the corresponding struct, with the data > properly decoded. That way, you can add DOF version checks and decode > the data differently, without the rest of the code having to worry > about which version of the type they should be using. It's not obvious > to me that this way is better than the current way, but that's how > I would have tried it first... (just my 2 cents) I agree. Something else really worth doing is creating a debug setting for DTrace probes, and print useful information while decoding them. That sounds like a good idea. Let me work on that...