From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55767 invoked by alias); 5 Mar 2020 14:24:38 -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 55671 invoked by uid 89); 5 Mar 2020 14:24:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:D*ca X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Mar 2020 14:24:24 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0A0D91E581; Thu, 5 Mar 2020 09:24:03 -0500 (EST) Subject: Re: [PATCH] gdb, gdbserver, gdbsupport: add .gitattributes files To: Tankut Baris Aktemur , gdb-patches@sourceware.org References: <1583398866-6771-1-git-send-email-tankut.baris.aktemur@intel.com> From: Simon Marchi Message-ID: Date: Thu, 05 Mar 2020 14:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <1583398866-6771-1-git-send-email-tankut.baris.aktemur@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-03/txt/msg00114.txt On 2020-03-05 4:01 a.m., Tankut Baris Aktemur wrote: > Create .gitattributes files in gdb/, gdbserver/, and gdbsupport/. > > The files specify cpp-style diffs for .h and .c files. This is > particularly helpful if a class in a header file is modified. > For instance, if the `stop_requested` field of `thread_info` in > gdb/gdbthread.h is modified, we get the following diff with > 'git diff' (using git version 2.17.1): > > @@ -379,7 +379,7 @@ public: > struct target_waitstatus pending_follow; > > /* True if this thread has been explicitly requested to stop. */ > - int stop_requested = 0; > + bool stop_requested = 0; > > /* The initiating frame of a nexting operation, used for deciding > which exceptions to intercept. If it is null_frame_id no > > Note that the context of the change shows up as 'public:'; not so > useful. With the .gitattributes file, we get: > > @@ -379,7 +379,7 @@ class thread_info : public refcounted_object > struct target_waitstatus pending_follow; > > /* True if this thread has been explicitly requested to stop. */ > - int stop_requested = 0; > + bool stop_requested = 0; > > /* The initiating frame of a nexting operation, used for deciding > which exceptions to intercept. If it is null_frame_id no > > The context is successfully shown as 'class thread_info'. > > This patch creates a .gitattributes file per each of gdb, gdbserver, > and gdbsupport folders. An alternative would be to define the > attributes in the root folder -- this would impact all the top-level > folders, though. I opted for the more conservative approach. > > gdb/ChangeLog: > 2020-03-05 Tankut Baris Aktemur > > * .gitattributes: New file. > > gdbserver/ChangeLog: > 2020-03-05 Tankut Baris Aktemur > > * .gitattributes: New file. > > gdbsupport/ChangeLog: > 2020-03-05 Tankut Baris Aktemur > > * .gitattributes: New file. > --- > gdb/.gitattributes | 7 +++++++ > gdbserver/.gitattributes | 6 ++++++ > gdbsupport/.gitattributes | 6 ++++++ > 3 files changed, 19 insertions(+) > create mode 100644 gdb/.gitattributes > create mode 100644 gdbserver/.gitattributes > create mode 100644 gdbsupport/.gitattributes TIL. The patch LGTM, please push. Simon