Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb, gdbserver, gdbsupport: add .gitattributes files
Date: Thu, 05 Mar 2020 14:24:00 -0000	[thread overview]
Message-ID: <c51cc599-a331-8770-684b-dfae22ec44e7@simark.ca> (raw)
In-Reply-To: <1583398866-6771-1-git-send-email-tankut.baris.aktemur@intel.com>

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  <tankut.baris.aktemur@intel.com>
> 
> 	* .gitattributes: New file.
> 
> gdbserver/ChangeLog:
> 2020-03-05  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
> 
> 	* .gitattributes: New file.
> 
> gdbsupport/ChangeLog:
> 2020-03-05  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
> 
> 	* .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


  reply	other threads:[~2020-03-05 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05  9:01 Tankut Baris Aktemur
2020-03-05 14:24 ` Simon Marchi [this message]
2020-03-05 15:07   ` Aktemur, Tankut Baris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c51cc599-a331-8770-684b-dfae22ec44e7@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tankut.baris.aktemur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox