gdbsupport: rename source files to .cc
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 13 Feb 2020 21:27:02 +0000 (16:27 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 13 Feb 2020 21:27:03 +0000 (16:27 -0500)
commit06b3c5bdb018262d7c09cda9d4637015c7ebe779
treef993098885934d494acfcd5bf7e4203701437b88
parent8f432634a53e91a1026dc81dbf3e70a7cd45c724
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.
74 files changed:
gdbserver/ChangeLog
gdbserver/Makefile.in
gdbsupport/ChangeLog
gdbsupport/Makefile.am
gdbsupport/Makefile.in
gdbsupport/agent.c [deleted file]
gdbsupport/agent.cc [new file with mode: 0644]
gdbsupport/btrace-common.c [deleted file]
gdbsupport/btrace-common.cc [new file with mode: 0644]
gdbsupport/buffer.c [deleted file]
gdbsupport/buffer.cc [new file with mode: 0644]
gdbsupport/cleanups.c [deleted file]
gdbsupport/cleanups.cc [new file with mode: 0644]
gdbsupport/common-debug.c [deleted file]
gdbsupport/common-debug.cc [new file with mode: 0644]
gdbsupport/common-exceptions.c [deleted file]
gdbsupport/common-exceptions.cc [new file with mode: 0644]
gdbsupport/common-inferior.c [deleted file]
gdbsupport/common-inferior.cc [new file with mode: 0644]
gdbsupport/common-regcache.c [deleted file]
gdbsupport/common-regcache.cc [new file with mode: 0644]
gdbsupport/common-utils.c [deleted file]
gdbsupport/common-utils.cc [new file with mode: 0644]
gdbsupport/environ.c [deleted file]
gdbsupport/environ.cc [new file with mode: 0644]
gdbsupport/errors.c [deleted file]
gdbsupport/errors.cc [new file with mode: 0644]
gdbsupport/fileio.c [deleted file]
gdbsupport/fileio.cc [new file with mode: 0644]
gdbsupport/filestuff.c [deleted file]
gdbsupport/filestuff.cc [new file with mode: 0644]
gdbsupport/format.c [deleted file]
gdbsupport/format.cc [new file with mode: 0644]
gdbsupport/gdb-dlfcn.c [deleted file]
gdbsupport/gdb-dlfcn.cc [new file with mode: 0644]
gdbsupport/gdb_tilde_expand.c [deleted file]
gdbsupport/gdb_tilde_expand.cc [new file with mode: 0644]
gdbsupport/gdb_vecs.c [deleted file]
gdbsupport/gdb_vecs.cc [new file with mode: 0644]
gdbsupport/gdb_wait.c [deleted file]
gdbsupport/gdb_wait.cc [new file with mode: 0644]
gdbsupport/job-control.c [deleted file]
gdbsupport/job-control.cc [new file with mode: 0644]
gdbsupport/netstuff.c [deleted file]
gdbsupport/netstuff.cc [new file with mode: 0644]
gdbsupport/new-op.c [deleted file]
gdbsupport/new-op.cc [new file with mode: 0644]
gdbsupport/pathstuff.c [deleted file]
gdbsupport/pathstuff.cc [new file with mode: 0644]
gdbsupport/print-utils.c [deleted file]
gdbsupport/print-utils.cc [new file with mode: 0644]
gdbsupport/ptid.c [deleted file]
gdbsupport/ptid.cc [new file with mode: 0644]
gdbsupport/rsp-low.c [deleted file]
gdbsupport/rsp-low.cc [new file with mode: 0644]
gdbsupport/run-time-clock.c [deleted file]
gdbsupport/run-time-clock.cc [new file with mode: 0644]
gdbsupport/safe-strerror.c [deleted file]
gdbsupport/safe-strerror.cc [new file with mode: 0644]
gdbsupport/scoped_mmap.c [deleted file]
gdbsupport/scoped_mmap.cc [new file with mode: 0644]
gdbsupport/selftest.c [deleted file]
gdbsupport/selftest.cc [new file with mode: 0644]
gdbsupport/signals-state-save-restore.c [deleted file]
gdbsupport/signals-state-save-restore.cc [new file with mode: 0644]
gdbsupport/signals.c [deleted file]
gdbsupport/signals.cc [new file with mode: 0644]
gdbsupport/tdesc.c [deleted file]
gdbsupport/tdesc.cc [new file with mode: 0644]
gdbsupport/thread-pool.c [deleted file]
gdbsupport/thread-pool.cc [new file with mode: 0644]
gdbsupport/xml-utils.c [deleted file]
gdbsupport/xml-utils.cc [new file with mode: 0644]
gnulib/Makefile.in