From aad9eab9f2f44b585531edd4f403ad2da632e44a Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Thu, 19 Apr 2012 05:58:52 +0000 Subject: [PATCH] gdb: * Makefile.in (SFILES): Add common/vec.c and remove vec.c. (vec.o): New rule. * vec.c: Move it ... * common/vec.c: ... here. * vec.h: Move it ... * common/vec.h: ... here. gdb/gdbserver: * Makefile.in (SFILES): Add common/vec.c. (OBS): Add vec.o. (vec.o): New rule. --- gdb/ChangeLog | 9 +++++++++ gdb/Makefile.in | 8 ++++++-- gdb/{ => common}/vec.c | 5 +++++ gdb/{ => common}/vec.h | 3 +++ gdb/gdbserver/ChangeLog | 6 ++++++ gdb/gdbserver/Makefile.in | 7 ++++++- 6 files changed, 35 insertions(+), 3 deletions(-) rename gdb/{ => common}/vec.c (98%) rename gdb/{ => common}/vec.h (99%) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 75e2b81d3a..317ec269a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2012-04-19 Yao Qi + + * Makefile.in (SFILES): Add common/vec.c and remove vec.c. + (vec.o): New rule. + * vec.c: Move it ... + * common/vec.c: ... here. + * vec.h: Move it ... + * common/vec.h: ... here. + 2012-04-19 Yao Qi * gdb-code-style.el: New. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 8958acdfbd..19e46a13b1 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -733,7 +733,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ typeprint.c \ ui-out.c utils.c ui-file.h ui-file.c \ user-regs.c \ - valarith.c valops.c valprint.c value.c varobj.c vec.c \ + valarith.c valops.c valprint.c value.c varobj.c common/vec.c \ xml-tdesc.c xml-support.c \ inferior.c gdb_usleep.c \ record.c gcore.c \ @@ -779,7 +779,7 @@ gdbarch.h bsd-uthread.h gdb_stat.h memory-map.h memrange.h \ mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \ ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \ f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \ -objfiles.h vec.h disasm.h mips-tdep.h ser-base.h \ +objfiles.h common/vec.h disasm.h mips-tdep.h ser-base.h \ gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \ inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h inf-ttrace.h \ solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \ @@ -1942,6 +1942,10 @@ common-agent.o: $(srcdir)/common/agent.c $(COMPILE) $(srcdir)/common/agent.c $(POSTCOMPILE) +vec.o: ${srcdir}/common/vec.c + $(COMPILE) $(srcdir)/common/vec.c + $(POSTCOMPILE) + # # gdb/tui/ dependencies # diff --git a/gdb/vec.c b/gdb/common/vec.c similarity index 98% rename from gdb/vec.c rename to gdb/common/vec.c index 3793a6a39e..360dc9672e 100644 --- a/gdb/vec.c +++ b/gdb/common/vec.c @@ -17,7 +17,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef GDBSERVER +#include "server.h" +#else #include "defs.h" +#endif + #include "vec.h" struct vec_prefix diff --git a/gdb/vec.h b/gdb/common/vec.h similarity index 99% rename from gdb/vec.h rename to gdb/common/vec.h index 7ec27a1931..fa15370dd9 100644 --- a/gdb/vec.h +++ b/gdb/common/vec.h @@ -21,8 +21,11 @@ #define GDB_VEC_H #include + +#ifndef GDBSERVER #include "gdb_string.h" #include "gdb_assert.h" +#endif /* The macros here implement a set of templated vector types and associated interfaces. These templates are implemented with diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index d238062bee..372c556ed4 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2012-04-19 Yao Qi + + * Makefile.in (SFILES): Add common/vec.c. + (OBS): Add vec.o. + (vec.o): New rule. + 2012-04-19 Yao Qi * remote-utils.c (prepare_resume_reply): Replace with macro diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 6225e655f6..7d29f85e8f 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -143,6 +143,7 @@ SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \ $(srcdir)/win32-arm-low.c $(srcdir)/win32-i386-low.c \ $(srcdir)/win32-low.c $(srcdir)/wincecompat.c \ $(srcdir)/hostio.c $(srcdir)/hostio-errno.c \ + $(srcdir)/common/vec.c \ $(srcdir)/common/common-utils.c $(srcdir)/common/xml-utils.c \ $(srcdir)/common/linux-osdata.c $(srcdir)/common/ptid.c \ $(srcdir)/common/buffer.c @@ -155,7 +156,7 @@ SOURCES = $(SFILES) TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o target.o \ - utils.o version.o \ + utils.o version.o vec.o \ mem-break.o hostio.o event-loop.o tracepoint.o \ xml-utils.o common-utils.o ptid.o buffer.o \ dll.o \ @@ -386,6 +387,7 @@ ptid_h = $(srcdir)/../common/ptid.h ax_h = $(srcdir)/ax.h agent_h = $(srcdir)/../common/agent.h linux_osdata_h = $(srcdir)/../common/linux-osdata.h +vec_h = $(srcdir)/../common/vec.h server_h = $(srcdir)/server.h $(regcache_h) config.h $(srcdir)/target.h \ $(srcdir)/mem-break.h $(srcdir)/../common/gdb_signals.h \ $(srcdir)/../common/common-utils.h \ @@ -468,6 +470,9 @@ linux-ptrace.o: ../common/linux-ptrace.c $(server_h) common-utils.o: ../common/common-utils.c $(server_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER +vec.o: ../common/vec.c $(vec_h) + $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER + xml-utils.o: ../common/xml-utils.c $(server_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER