]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdbsupport/ChangeLog
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.
40 files changed:
gdbserver/ChangeLog
gdbserver/Makefile.in
gdbsupport/ChangeLog
gdbsupport/Makefile.am
gdbsupport/Makefile.in
gdbsupport/agent.cc [moved from gdbsupport/agent.c with 100% similarity]
gdbsupport/btrace-common.cc [moved from gdbsupport/btrace-common.c with 100% similarity]
gdbsupport/buffer.cc [moved from gdbsupport/buffer.c with 100% similarity]
gdbsupport/cleanups.cc [moved from gdbsupport/cleanups.c with 100% similarity]
gdbsupport/common-debug.cc [moved from gdbsupport/common-debug.c with 100% similarity]
gdbsupport/common-exceptions.cc [moved from gdbsupport/common-exceptions.c with 100% similarity]
gdbsupport/common-inferior.cc [moved from gdbsupport/common-inferior.c with 100% similarity]
gdbsupport/common-regcache.cc [moved from gdbsupport/common-regcache.c with 100% similarity]
gdbsupport/common-utils.cc [moved from gdbsupport/common-utils.c with 100% similarity]
gdbsupport/environ.cc [moved from gdbsupport/environ.c with 100% similarity]
gdbsupport/errors.cc [moved from gdbsupport/errors.c with 100% similarity]
gdbsupport/fileio.cc [moved from gdbsupport/fileio.c with 100% similarity]
gdbsupport/filestuff.cc [moved from gdbsupport/filestuff.c with 100% similarity]
gdbsupport/format.cc [moved from gdbsupport/format.c with 100% similarity]
gdbsupport/gdb-dlfcn.cc [moved from gdbsupport/gdb-dlfcn.c with 100% similarity]
gdbsupport/gdb_tilde_expand.cc [moved from gdbsupport/gdb_tilde_expand.c with 100% similarity]
gdbsupport/gdb_vecs.cc [moved from gdbsupport/gdb_vecs.c with 100% similarity]
gdbsupport/gdb_wait.cc [moved from gdbsupport/gdb_wait.c with 100% similarity]
gdbsupport/job-control.cc [moved from gdbsupport/job-control.c with 100% similarity]
gdbsupport/netstuff.cc [moved from gdbsupport/netstuff.c with 100% similarity]
gdbsupport/new-op.cc [moved from gdbsupport/new-op.c with 100% similarity]
gdbsupport/pathstuff.cc [moved from gdbsupport/pathstuff.c with 100% similarity]
gdbsupport/print-utils.cc [moved from gdbsupport/print-utils.c with 100% similarity]
gdbsupport/ptid.cc [moved from gdbsupport/ptid.c with 100% similarity]
gdbsupport/rsp-low.cc [moved from gdbsupport/rsp-low.c with 100% similarity]
gdbsupport/run-time-clock.cc [moved from gdbsupport/run-time-clock.c with 100% similarity]
gdbsupport/safe-strerror.cc [moved from gdbsupport/safe-strerror.c with 100% similarity]
gdbsupport/scoped_mmap.cc [moved from gdbsupport/scoped_mmap.c with 100% similarity]
gdbsupport/selftest.cc [moved from gdbsupport/selftest.c with 100% similarity]
gdbsupport/signals-state-save-restore.cc [moved from gdbsupport/signals-state-save-restore.c with 100% similarity]
gdbsupport/signals.cc [moved from gdbsupport/signals.c with 100% similarity]
gdbsupport/tdesc.cc [moved from gdbsupport/tdesc.c with 100% similarity]
gdbsupport/thread-pool.cc [moved from gdbsupport/thread-pool.c with 100% similarity]
gdbsupport/xml-utils.cc [moved from gdbsupport/xml-utils.c with 100% similarity]
gnulib/Makefile.in