summaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-02-13 16:27:02 -0500
committerSimon Marchi <simon.marchi@efficios.com>2020-02-13 16:27:03 -0500
commit06b3c5bdb018262d7c09cda9d4637015c7ebe779 (patch)
treef993098885934d494acfcd5bf7e4203701437b88 /gdbserver
parent8f432634a53e91a1026dc81dbf3e70a7cd45c724 (diff)
downloadbinutils-gdb-06b3c5bdb018262d7c09cda9d4637015c7ebe779.tar.gz
gdbsupport: rename source files to .cc
This patch renames the .c source files in gdbsupport to .cc. In the gdb directory, there is an argument against renaming the source files, which is that it makes using some git commands more difficult to do archeology. Some commands have some kind of "follow" option that makes git try to follow renames, but it doesn't work in all situations. Given that we have just moved the gdbsupport directory, that argument doesn't hold for source files in that directory. I therefore suggest renaming them to .cc, so that they are automatically recognized as C++ by various tools and editors. The original motivation behind this is that when building gdbsupport with clang, I get: CC agent.o clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated] In the gdb/ directory, we make clang happy by passing "-x c++". We could do this in gdbsupport too, but I think that renaming the files is a better long-term solution. gdbserver still does its own build of gdbsupport, so a few changes in its Makefile are necessary. gdbsupport/ChangeLog: * Makefile.am: Rename source files from .c to .cc. (CC, CFLAGS): Don't override. (AM_CFLAGS): Rename to ... (AM_CXXFLAGS): ... this. * Makefile.in: Re-generate. * %.c: Rename to %.cc. gdbserver/ChangeLog: * Makefile.in: Rename gdbsupport source files from .c to .cc.
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/ChangeLog4
-rw-r--r--gdbserver/Makefile.in56
2 files changed, 32 insertions, 28 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index 1f930c48ad2..919ad78f5ea 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2020-02-13 Simon Marchi <simon.marchi@efficios.com>
+
+ * Makefile.in: Rename gdbsupport source files from .c to .cc.
+
2020-02-12 Hannes Domani <ssbssa@yahoo.de>
* win32-low.c (win32_create_inferior): Set signal_pid.
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index 60a52d3412b..d912a0babef 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -207,32 +207,32 @@ SFILES = \
$(srcdir)/../gdb/arch/arm-get-next-pcs.c \
$(srcdir)/../gdb/arch/arm-linux.c \
$(srcdir)/../gdb/arch/ppc-linux-common.c \
- $(srcdir)/../gdbsupport/btrace-common.c \
- $(srcdir)/../gdbsupport/buffer.c \
- $(srcdir)/../gdbsupport/cleanups.c \
- $(srcdir)/../gdbsupport/common-debug.c \
- $(srcdir)/../gdbsupport/common-exceptions.c \
- $(srcdir)/../gdbsupport/common-inferior.c \
- $(srcdir)/../gdbsupport/common-regcache.c \
- $(srcdir)/../gdbsupport/common-utils.c \
- $(srcdir)/../gdbsupport/errors.c \
- $(srcdir)/../gdbsupport/environ.c \
- $(srcdir)/../gdbsupport/fileio.c \
- $(srcdir)/../gdbsupport/filestuff.c \
- $(srcdir)/../gdbsupport/job-control.c \
- $(srcdir)/../gdbsupport/gdb-dlfcn.c \
- $(srcdir)/../gdbsupport/gdb_tilde_expand.c \
- $(srcdir)/../gdbsupport/gdb_vecs.c \
- $(srcdir)/../gdbsupport/gdb_wait.c \
- $(srcdir)/../gdbsupport/netstuff.c \
- $(srcdir)/../gdbsupport/new-op.c \
- $(srcdir)/../gdbsupport/pathstuff.c \
- $(srcdir)/../gdbsupport/print-utils.c \
- $(srcdir)/../gdbsupport/ptid.c \
- $(srcdir)/../gdbsupport/rsp-low.c \
- $(srcdir)/../gdbsupport/safe-strerror.c \
- $(srcdir)/../gdbsupport/tdesc.c \
- $(srcdir)/../gdbsupport/xml-utils.c \
+ $(srcdir)/../gdbsupport/btrace-common.cc \
+ $(srcdir)/../gdbsupport/buffer.cc \
+ $(srcdir)/../gdbsupport/cleanups.cc \
+ $(srcdir)/../gdbsupport/common-debug.cc \
+ $(srcdir)/../gdbsupport/common-exceptions.cc \
+ $(srcdir)/../gdbsupport/common-inferior.cc \
+ $(srcdir)/../gdbsupport/common-regcache.cc \
+ $(srcdir)/../gdbsupport/common-utils.cc \
+ $(srcdir)/../gdbsupport/errors.cc \
+ $(srcdir)/../gdbsupport/environ.cc \
+ $(srcdir)/../gdbsupport/fileio.cc \
+ $(srcdir)/../gdbsupport/filestuff.cc \
+ $(srcdir)/../gdbsupport/job-control.cc \
+ $(srcdir)/../gdbsupport/gdb-dlfcn.cc \
+ $(srcdir)/../gdbsupport/gdb_tilde_expand.cc \
+ $(srcdir)/../gdbsupport/gdb_vecs.cc \
+ $(srcdir)/../gdbsupport/gdb_wait.cc \
+ $(srcdir)/../gdbsupport/netstuff.cc \
+ $(srcdir)/../gdbsupport/new-op.cc \
+ $(srcdir)/../gdbsupport/pathstuff.cc \
+ $(srcdir)/../gdbsupport/print-utils.cc \
+ $(srcdir)/../gdbsupport/ptid.cc \
+ $(srcdir)/../gdbsupport/rsp-low.cc \
+ $(srcdir)/../gdbsupport/safe-strerror.cc \
+ $(srcdir)/../gdbsupport/tdesc.cc \
+ $(srcdir)/../gdbsupport/xml-utils.cc \
$(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
$(srcdir)/../gdb/nat/linux-btrace.c \
$(srcdir)/../gdb/nat/linux-namespaces.c \
@@ -600,7 +600,7 @@ arch/%-ipa.o: ../gdb/arch/%.c
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
-gdbsupport/%-ipa.o: ../gdbsupport/%.c
+gdbsupport/%-ipa.o: ../gdbsupport/%.cc
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
@@ -633,7 +633,7 @@ arch/%.o: ../gdb/arch/%.c
$(COMPILE) $<
$(POSTCOMPILE)
-gdbsupport/%.o: ../gdbsupport/%.c
+gdbsupport/%.o: ../gdbsupport/%.cc
$(COMPILE) $<
$(POSTCOMPILE)