]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbserver: rename source files to .cc
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 13 Feb 2020 21:27:51 +0000 (16:27 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 13 Feb 2020 21:27:51 +0000 (16:27 -0500)
For the same reasons outlined in the previous patch, this patch renames
gdbserver source files to .cc.

I have moved the "-x c++" switch to only those rules that require it.

gdbserver/ChangeLog:

* Makefile.in: Rename source files from .c to .cc.
* %.c: Rename to %.cc.
* configure.ac: Rename server.c to server.cc.
* configure: Re-generate.

66 files changed:
gdbserver/ChangeLog
gdbserver/Makefile.in
gdbserver/ax.cc [moved from gdbserver/ax.c with 100% similarity]
gdbserver/configure
gdbserver/configure.ac
gdbserver/debug.cc [moved from gdbserver/debug.c with 100% similarity]
gdbserver/dll.cc [moved from gdbserver/dll.c with 100% similarity]
gdbserver/event-loop.cc [moved from gdbserver/event-loop.c with 100% similarity]
gdbserver/fork-child.cc [moved from gdbserver/fork-child.c with 100% similarity]
gdbserver/gdbreplay.cc [moved from gdbserver/gdbreplay.c with 100% similarity]
gdbserver/hostio-errno.cc [moved from gdbserver/hostio-errno.c with 100% similarity]
gdbserver/hostio.cc [moved from gdbserver/hostio.c with 100% similarity]
gdbserver/i387-fp.cc [moved from gdbserver/i387-fp.c with 100% similarity]
gdbserver/inferiors.cc [moved from gdbserver/inferiors.c with 100% similarity]
gdbserver/linux-aarch32-low.cc [moved from gdbserver/linux-aarch32-low.c with 100% similarity]
gdbserver/linux-aarch32-tdesc.cc [moved from gdbserver/linux-aarch32-tdesc.c with 100% similarity]
gdbserver/linux-aarch64-ipa.cc [moved from gdbserver/linux-aarch64-ipa.c with 100% similarity]
gdbserver/linux-aarch64-low.cc [moved from gdbserver/linux-aarch64-low.c with 100% similarity]
gdbserver/linux-aarch64-tdesc.cc [moved from gdbserver/linux-aarch64-tdesc.c with 100% similarity]
gdbserver/linux-amd64-ipa.cc [moved from gdbserver/linux-amd64-ipa.c with 100% similarity]
gdbserver/linux-arm-low.cc [moved from gdbserver/linux-arm-low.c with 100% similarity]
gdbserver/linux-arm-tdesc.cc [moved from gdbserver/linux-arm-tdesc.c with 100% similarity]
gdbserver/linux-bfin-low.cc [moved from gdbserver/linux-bfin-low.c with 100% similarity]
gdbserver/linux-cris-low.cc [moved from gdbserver/linux-cris-low.c with 100% similarity]
gdbserver/linux-crisv32-low.cc [moved from gdbserver/linux-crisv32-low.c with 100% similarity]
gdbserver/linux-i386-ipa.cc [moved from gdbserver/linux-i386-ipa.c with 100% similarity]
gdbserver/linux-ia64-low.cc [moved from gdbserver/linux-ia64-low.c with 100% similarity]
gdbserver/linux-low.cc [moved from gdbserver/linux-low.c with 100% similarity]
gdbserver/linux-m32r-low.cc [moved from gdbserver/linux-m32r-low.c with 100% similarity]
gdbserver/linux-m68k-low.cc [moved from gdbserver/linux-m68k-low.c with 100% similarity]
gdbserver/linux-mips-low.cc [moved from gdbserver/linux-mips-low.c with 100% similarity]
gdbserver/linux-nios2-low.cc [moved from gdbserver/linux-nios2-low.c with 100% similarity]
gdbserver/linux-ppc-ipa.cc [moved from gdbserver/linux-ppc-ipa.c with 100% similarity]
gdbserver/linux-ppc-low.cc [moved from gdbserver/linux-ppc-low.c with 100% similarity]
gdbserver/linux-s390-ipa.cc [moved from gdbserver/linux-s390-ipa.c with 100% similarity]
gdbserver/linux-s390-low.cc [moved from gdbserver/linux-s390-low.c with 100% similarity]
gdbserver/linux-sh-low.cc [moved from gdbserver/linux-sh-low.c with 100% similarity]
gdbserver/linux-sparc-low.cc [moved from gdbserver/linux-sparc-low.c with 100% similarity]
gdbserver/linux-tic6x-low.cc [moved from gdbserver/linux-tic6x-low.c with 100% similarity]
gdbserver/linux-tile-low.cc [moved from gdbserver/linux-tile-low.c with 100% similarity]
gdbserver/linux-x86-low.cc [moved from gdbserver/linux-x86-low.c with 100% similarity]
gdbserver/linux-x86-tdesc.cc [moved from gdbserver/linux-x86-tdesc.c with 100% similarity]
gdbserver/linux-xtensa-low.cc [moved from gdbserver/linux-xtensa-low.c with 100% similarity]
gdbserver/lynx-i386-low.cc [moved from gdbserver/lynx-i386-low.c with 100% similarity]
gdbserver/lynx-low.cc [moved from gdbserver/lynx-low.c with 100% similarity]
gdbserver/lynx-ppc-low.cc [moved from gdbserver/lynx-ppc-low.c with 100% similarity]
gdbserver/mem-break.cc [moved from gdbserver/mem-break.c with 100% similarity]
gdbserver/notif.cc [moved from gdbserver/notif.c with 100% similarity]
gdbserver/nto-low.cc [moved from gdbserver/nto-low.c with 100% similarity]
gdbserver/nto-x86-low.cc [moved from gdbserver/nto-x86-low.c with 100% similarity]
gdbserver/proc-service.cc [moved from gdbserver/proc-service.c with 100% similarity]
gdbserver/regcache.cc [moved from gdbserver/regcache.c with 100% similarity]
gdbserver/remote-utils.cc [moved from gdbserver/remote-utils.c with 100% similarity]
gdbserver/server.cc [moved from gdbserver/server.c with 100% similarity]
gdbserver/symbol.cc [moved from gdbserver/symbol.c with 100% similarity]
gdbserver/target.cc [moved from gdbserver/target.c with 100% similarity]
gdbserver/tdesc.cc [moved from gdbserver/tdesc.c with 100% similarity]
gdbserver/thread-db.cc [moved from gdbserver/thread-db.c with 100% similarity]
gdbserver/tracepoint.cc [moved from gdbserver/tracepoint.c with 100% similarity]
gdbserver/utils.cc [moved from gdbserver/utils.c with 100% similarity]
gdbserver/win32-arm-low.cc [moved from gdbserver/win32-arm-low.c with 100% similarity]
gdbserver/win32-i386-low.cc [moved from gdbserver/win32-i386-low.c with 100% similarity]
gdbserver/win32-low.cc [moved from gdbserver/win32-low.c with 100% similarity]
gdbserver/wincecompat.cc [moved from gdbserver/wincecompat.c with 100% similarity]
gdbserver/x86-low.cc [moved from gdbserver/x86-low.c with 100% similarity]
gdbserver/xtensa-xtregs.cc [moved from gdbserver/xtensa-xtregs.c with 100% similarity]

index 919ad78f5eab7730c961a3a5dd8827a24ec39729..6e6c268e78212267d94706c470592654e5c05a40 100644 (file)
@@ -1,3 +1,10 @@
+2020-02-13  Simon Marchi  <simon.marchi@efficios.com>
+
+       * Makefile.in: Rename source files from .c to .cc.
+       * %.c: Rename to %.cc.
+       * configure.ac: Rename server.c to server.cc.
+       * configure: Re-generate.
+
 2020-02-13  Simon Marchi  <simon.marchi@efficios.com>
 
        * Makefile.in: Rename gdbsupport source files from .c to .cc.
index d912a0babef93987c9d08ef9959d61190218032a..5d0d608e058abc5a24d5f5d88ae5e2485a026a26 100644 (file)
@@ -79,7 +79,7 @@ include $(srcdir)/../gdb/silent-rules.mk
 
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
-COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
+COMPILE.pre = $(CXX) $(CXX_DIALECT)
 COMPILE.post = -c -o $@
 COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
 POSTCOMPILE = @true
@@ -162,46 +162,46 @@ INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
 # All source files that go into linking GDB remote server.
 
 SFILES = \
-       $(srcdir)/debug.c \
-       $(srcdir)/dll.c \
-       $(srcdir)/gdbreplay.c \
-       $(srcdir)/hostio.c \
-       $(srcdir)/hostio-errno.c \
-       $(srcdir)/i387-fp.c \
-       $(srcdir)/inferiors.c \
-       $(srcdir)/linux-aarch64-low.c \
-       $(srcdir)/linux-arm-low.c \
-       $(srcdir)/linux-bfin-low.c \
-       $(srcdir)/linux-cris-low.c \
-       $(srcdir)/linux-crisv32-low.c \
-       $(srcdir)/linux-ia64-low.c \
-       $(srcdir)/linux-low.c \
-       $(srcdir)/linux-m32r-low.c \
-       $(srcdir)/linux-m68k-low.c \
-       $(srcdir)/linux-mips-low.c \
-       $(srcdir)/linux-nios2-low.c \
-       $(srcdir)/linux-ppc-low.c \
-       $(srcdir)/linux-s390-low.c \
-       $(srcdir)/linux-sh-low.c \
-       $(srcdir)/linux-sparc-low.c \
-       $(srcdir)/linux-tile-low.c \
-       $(srcdir)/linux-x86-low.c \
-       $(srcdir)/linux-xtensa-low.c \
-       $(srcdir)/mem-break.c \
-       $(srcdir)/proc-service.c \
+       $(srcdir)/debug.cc \
+       $(srcdir)/dll.cc \
+       $(srcdir)/gdbreplay.cc \
+       $(srcdir)/hostio.cc \
+       $(srcdir)/hostio-errno.cc \
+       $(srcdir)/i387-fp.cc \
+       $(srcdir)/inferiors.cc \
+       $(srcdir)/linux-aarch64-low.cc \
+       $(srcdir)/linux-arm-low.cc \
+       $(srcdir)/linux-bfin-low.cc \
+       $(srcdir)/linux-cris-low.cc \
+       $(srcdir)/linux-crisv32-low.cc \
+       $(srcdir)/linux-ia64-low.cc \
+       $(srcdir)/linux-low.cc \
+       $(srcdir)/linux-m32r-low.cc \
+       $(srcdir)/linux-m68k-low.cc \
+       $(srcdir)/linux-mips-low.cc \
+       $(srcdir)/linux-nios2-low.cc \
+       $(srcdir)/linux-ppc-low.cc \
+       $(srcdir)/linux-s390-low.cc \
+       $(srcdir)/linux-sh-low.cc \
+       $(srcdir)/linux-sparc-low.cc \
+       $(srcdir)/linux-tile-low.cc \
+       $(srcdir)/linux-x86-low.cc \
+       $(srcdir)/linux-xtensa-low.cc \
+       $(srcdir)/mem-break.cc \
+       $(srcdir)/proc-service.cc \
        $(srcdir)/proc-service.list \
-       $(srcdir)/regcache.c \
-       $(srcdir)/remote-utils.c \
-       $(srcdir)/server.c \
-       $(srcdir)/symbol.c \
-       $(srcdir)/target.c \
-       $(srcdir)/thread-db.c \
-       $(srcdir)/utils.c \
-       $(srcdir)/win32-arm-low.c \
-       $(srcdir)/win32-i386-low.c \
-       $(srcdir)/win32-low.c \
-       $(srcdir)/wincecompat.c \
-       $(srcdir)/x86-low.c \
+       $(srcdir)/regcache.cc \
+       $(srcdir)/remote-utils.cc \
+       $(srcdir)/server.cc \
+       $(srcdir)/symbol.cc \
+       $(srcdir)/target.cc \
+       $(srcdir)/thread-db.cc \
+       $(srcdir)/utils.cc \
+       $(srcdir)/win32-arm-low.cc \
+       $(srcdir)/win32-i386-low.cc \
+       $(srcdir)/win32-low.cc \
+       $(srcdir)/wincecompat.cc \
+       $(srcdir)/x86-low.cc \
        $(srcdir)/../gdb/alloc.c \
        $(srcdir)/../gdb/arch/arm.c \
        $(srcdir)/../gdb/arch/arm-get-next-pcs.c \
@@ -469,7 +469,7 @@ TAGS:       ${TAGFILES}
        etags \
          `for i in yzzy ${DEPFILES}; do \
             if [ x$$i != xyzzy ]; then \
-              echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' \
+              echo ${srcdir}/$$i | sed -e 's/\.o$$/\.cc/' \
                 -e 's,/\(arch\|nat\|target\)/,/../\1/,' \
                 -e 's,/\(gdbsupport\)/,/../../\1/,'; \
             fi; \
@@ -481,7 +481,7 @@ clean:
        rm -f *.o ${ADD_FILES} *~
        rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
        rm -f $(IPA_LIB)
-       rm -f *-generated.c
+       rm -f *-generated.cc
        rm -f stamp-xml
        rm -f $(DEPDIR)/*.Po
        for i in $(CONFIG_SRC_SUBDIR); do \
@@ -541,19 +541,19 @@ am--refresh:
 
 force:
 
-version-generated.c: Makefile $(srcdir)/../gdb/version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
+version-generated.cc: Makefile $(srcdir)/../gdb/version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
        $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir)/../gdb \
                $(host_alias) $(target_alias) $@
 
-xml-builtin-generated.c: stamp-xml; @true
+xml-builtin-generated.cc: stamp-xml; @true
 stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
        $(SILENCE) rm -f xml-builtin.tmp
        $(ECHO_GEN_XML_BUILTIN_GENERATED) $(SHELL) $(XML_DIR)/feature_to_c.sh \
                xml-builtin.tmp $(XML_FILES)
-       $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin-generated.c
+       $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin-generated.cc
        $(SILENCE) echo stamp > stamp-xml
 
-.PRECIOUS: xml-builtin.c
+.PRECIOUS: xml-builtin.cc
 
 # GNU Make has an annoying habit of putting *all* the Makefile variables
 # into the environment, unless you include this target as a circumvention.
@@ -586,87 +586,87 @@ IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
 
 # Rules for special cases.
 
-ax-ipa.o: ax.c
+ax-ipa.o: ax.cc
        $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
        $(POSTCOMPILE)
 
-ax.o: ax.c
+ax.o: ax.cc
        $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
        $(POSTCOMPILE)
 
 # Rules for objects that go in the in-process agent.
 
 arch/%-ipa.o: ../gdb/arch/%.c
-       $(IPAGENT_COMPILE) $<
+       $(IPAGENT_COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 gdbsupport/%-ipa.o: ../gdbsupport/%.cc
        $(IPAGENT_COMPILE) $<
        $(POSTCOMPILE)
 
-%-ipa.o: %-generated.c
+%-ipa.o: %-generated.cc
        $(IPAGENT_COMPILE) $<
        $(POSTCOMPILE)
 
-%-ipa.o: %.c
+%-ipa.o: %.cc
        $(IPAGENT_COMPILE) $<
        $(POSTCOMPILE)
 
 %-ipa.o: ../gdb/%.c
-       $(IPAGENT_COMPILE) $<
+       $(IPAGENT_COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 # Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
-# Therefore, this one needs to be before "%.o: %.c" for it to be considered for
-# files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
+# Therefore, this one needs to be before "%.o: %.cc" for it to be considered for
+# files such as linux-amd64-ipa.o generated from linux-amd64-ipa.cc.
 #
 # Later versions of GNU Make choose the rule with the shortest stem, so it would
 # work in any order.
 
-%-ipa.o: %-ipa.c
+%-ipa.o: %-ipa.cc
        $(IPAGENT_COMPILE) $<
        $(POSTCOMPILE)
 
 # Rules for objects that go in the gdbserver binary.
 
 arch/%.o: ../gdb/arch/%.c
-       $(COMPILE) $<
+       $(COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 gdbsupport/%.o: ../gdbsupport/%.cc
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-%.o: %-generated.c
+%.o: %-generated.cc
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-%.o: %.c
+%.o: %.cc
        $(COMPILE) $<
        $(POSTCOMPILE)
 
 nat/%.o: ../gdb/nat/%.c
-       $(COMPILE) $<
+       $(COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 target/%.o: ../gdb/target/%.c
-       $(COMPILE) $<
+       $(COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 %.o: ../gdb/%.c
-       $(COMPILE) $<
+       $(COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 # Rules for register format descriptions.  Suffix destination files with
 # -generated to identify and clean them easily.
 
-%-generated.c: ../gdb/regformats/%.dat $(regdat_sh)
+%-generated.cc: ../gdb/regformats/%.dat $(regdat_sh)
        $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
 
-%-generated.c: ../gdb/regformats/arm/%.dat $(regdat_sh)
+%-generated.cc: ../gdb/regformats/arm/%.dat $(regdat_sh)
        $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
 
-%-generated.c: ../gdb/regformats/rs6000/%.dat $(regdat_sh)
+%-generated.cc: ../gdb/regformats/rs6000/%.dat $(regdat_sh)
        $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
 
 #
@@ -684,7 +684,7 @@ override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
 else
 override COMPILE.pre = source='$<' object='$@' libtool=no \
        DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
-       $(CXX) -x c++ $(CXX_DIALECT)
+       $(CXX) $(CXX_DIALECT)
 # depcomp handles atomicity for us, so we don't need a postcompile
 # step.
 override POSTCOMPILE =
@@ -713,7 +713,7 @@ all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
 # Disable implicit make rules.
 include $(srcdir)/../gdb/disable-implicit-rules.mk
 
-# Do not delete intermediate files (e.g. *-generated.c).
+# Do not delete intermediate files (e.g. *-generated.cc).
 .SECONDARY:
 
 # This is the end of "Makefile.in".
similarity index 100%
rename from gdbserver/ax.c
rename to gdbserver/ax.cc
index 71b515ec955a1caf5ad8b0ffaaa49130dc2c33d5..7d42803f640d966cbdad4d9ce6300fc1a57af685 100755 (executable)
@@ -582,7 +582,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="server.c"
+ac_unique_file="server.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
index 285a297a1c6c1707f768cc1ccec9667fd4198fdc..0da2bfa95e46adb0428ccd240aeb653d7ffdf587 100644 (file)
@@ -18,7 +18,7 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(server.c)
+AC_INIT(server.cc)
 AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
 
 AM_MAINTAINER_MODE
similarity index 100%
rename from gdbserver/debug.c
rename to gdbserver/debug.cc
similarity index 100%
rename from gdbserver/dll.c
rename to gdbserver/dll.cc
similarity index 100%
rename from gdbserver/gdbreplay.c
rename to gdbserver/gdbreplay.cc
similarity index 100%
rename from gdbserver/hostio.c
rename to gdbserver/hostio.cc
similarity index 100%
rename from gdbserver/i387-fp.c
rename to gdbserver/i387-fp.cc
similarity index 100%
rename from gdbserver/inferiors.c
rename to gdbserver/inferiors.cc
similarity index 100%
rename from gdbserver/linux-low.c
rename to gdbserver/linux-low.cc
similarity index 100%
rename from gdbserver/lynx-low.c
rename to gdbserver/lynx-low.cc
similarity index 100%
rename from gdbserver/mem-break.c
rename to gdbserver/mem-break.cc
similarity index 100%
rename from gdbserver/notif.c
rename to gdbserver/notif.cc
similarity index 100%
rename from gdbserver/nto-low.c
rename to gdbserver/nto-low.cc
similarity index 100%
rename from gdbserver/regcache.c
rename to gdbserver/regcache.cc
similarity index 100%
rename from gdbserver/server.c
rename to gdbserver/server.cc
similarity index 100%
rename from gdbserver/symbol.c
rename to gdbserver/symbol.cc
similarity index 100%
rename from gdbserver/target.c
rename to gdbserver/target.cc
similarity index 100%
rename from gdbserver/tdesc.c
rename to gdbserver/tdesc.cc
similarity index 100%
rename from gdbserver/thread-db.c
rename to gdbserver/thread-db.cc
similarity index 100%
rename from gdbserver/utils.c
rename to gdbserver/utils.cc
similarity index 100%
rename from gdbserver/win32-low.c
rename to gdbserver/win32-low.cc
similarity index 100%
rename from gdbserver/x86-low.c
rename to gdbserver/x86-low.cc