This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb, gdbserver, gdbsupport: add .gitattributes files
- From: Simon Marchi <simark at simark dot ca>
- To: Tankut Baris Aktemur <tankut dot baris dot aktemur at intel dot com>, gdb-patches at sourceware dot org
- Date: Thu, 5 Mar 2020 09:24:03 -0500
- Subject: Re: [PATCH] gdb, gdbserver, gdbsupport: add .gitattributes files
- References: <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