aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/.gitattributes
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-03-05 15:59:22 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-03-05 15:59:22 +0100
commit842806cb6f1c321666dd086a79a0fdfbd35497ed (patch)
treec0974203fc029d72ea80471b1e1fdf1b0a5c6d58 /gdbsupport/.gitattributes
parent92d4b13bf378f575cdc796ec9340c12267b7eff1 (diff)
downloadbinutils-842806cb6f1c321666dd086a79a0fdfbd35497ed.zip
binutils-842806cb6f1c321666dd086a79a0fdfbd35497ed.tar.gz
binutils-842806cb6f1c321666dd086a79a0fdfbd35497ed.tar.bz2
gdb, gdbserver, gdbsupport: add .gitattributes files
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.
Diffstat (limited to 'gdbsupport/.gitattributes')
-rw-r--r--gdbsupport/.gitattributes6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdbsupport/.gitattributes b/gdbsupport/.gitattributes
new file mode 100644
index 0000000..6df2574
--- /dev/null
+++ b/gdbsupport/.gitattributes
@@ -0,0 +1,6 @@
+# -*- conf -*-
+
+# Use cpp-style diffs for .h files. This is useful
+# if you modify classes defined in a header file.
+
+*.h diff=cpp