Move cleanups.[ch] to common

This commit moves cleanups.[ch] into gdb/common/.  The only change to
the content of the files is that cleanups.c's include list was altered
to match its new location.

gdb/ChangeLog:

	* cleanups.h: Moved to...
	* common/cleanups.h: New file.
	* cleanups.c: Moved to...
	* common/cleanups.c: New file.  Include common-defs.h and
	cleanups.h.  Do not include defs.h.
	* Makefile.in (SFILES): Replace cleanups.c with common/cleanups.c.
	(HFILES_NO_SRCDIR): Replace cleanups.h with common/cleanups.h.
	(cleanups.o): New rule.

gdb/gdbserver/ChangeLog:

	* Makefile.in (SFILES): Add common/cleanups.c.
	(OBS): cleanups.o.
	(cleanups.o): New rule.
This commit is contained in:
Gary Benson 2014-08-04 11:37:44 +01:00
parent e3d6ba5d32
commit e31806255f
6 changed files with 31 additions and 6 deletions

View file

@ -1,3 +1,14 @@
2014-08-29 Gary Benson <gbenson@redhat.com>
* cleanups.h: Moved to...
* common/cleanups.h: New file.
* cleanups.c: Moved to...
* common/cleanups.c: New file. Include common-defs.h and
cleanups.h. Do not include defs.h.
* Makefile.in (SFILES): Replace cleanups.c with common/cleanups.c.
(HFILES_NO_SRCDIR): Replace cleanups.h with common/cleanups.h.
(cleanups.o): New rule.
2014-08-29 Gary Benson <gbenson@redhat.com> 2014-08-29 Gary Benson <gbenson@redhat.com>
* common/errors.h (internal_warning): New declaration. * common/errors.h (internal_warning): New declaration.

View file

@ -794,7 +794,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
breakpoint.c break-catch-sig.c break-catch-throw.c \ breakpoint.c break-catch-sig.c break-catch-throw.c \
build-id.c buildsym.c \ build-id.c buildsym.c \
c-exp.y c-lang.c c-typeprint.c c-valprint.c c-varobj.c \ c-exp.y c-lang.c c-typeprint.c c-valprint.c c-varobj.c \
charset.c cleanups.c cli-out.c coffread.c coff-pe-read.c \ charset.c common/cleanups.c cli-out.c coffread.c coff-pe-read.c \
complaints.c completer.c continuations.c corefile.c corelow.c \ complaints.c completer.c continuations.c corefile.c corelow.c \
cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \ cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
d-exp.y d-lang.c d-support.c d-valprint.c \ d-exp.y d-lang.c d-support.c d-valprint.c \
@ -885,7 +885,7 @@ 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 \ 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 \ 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 \ solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
m2-lang.h stack.h charset.h cleanups.h addrmap.h command.h solist.h source.h \ m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \ target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \ tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \
tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \ tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
@ -937,7 +937,7 @@ ctf.h nat/i386-cpuid.h nat/i386-gcc-cpuid.h target/resume.h \
target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \ target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \
common/print-utils.h common/rsp-low.h nat/i386-dregs.h x86-linux-nat.h \ common/print-utils.h common/rsp-low.h nat/i386-dregs.h x86-linux-nat.h \
i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \ i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \
common/common-debug.h common/common-debug.h common/cleanups.h
# Header files that already have srcdir in them, or which are in objdir. # Header files that already have srcdir in them, or which are in objdir.
@ -2162,6 +2162,10 @@ common-debug.o: ${srcdir}/common/common-debug.c
$(COMPILE) $(srcdir)/common/common-debug.c $(COMPILE) $(srcdir)/common/common-debug.c
$(POSTCOMPILE) $(POSTCOMPILE)
cleanups.o: ${srcdir}/common/cleanups.c
$(COMPILE) $(srcdir)/common/cleanups.c
$(POSTCOMPILE)
# #
# gdb/target/ dependencies # gdb/target/ dependencies
# #

View file

@ -17,7 +17,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h" #include "common-defs.h"
#include "cleanups.h"
/* The cleanup list records things that have to be undone /* The cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.) if an error happens (descriptors to be closed, memory to be freed, etc.)

View file

@ -1,3 +1,9 @@
2014-08-29 Gary Benson <gbenson@redhat.com>
* Makefile.in (SFILES): Add common/cleanups.c.
(OBS): cleanups.o.
(cleanups.o): New rule.
2014-08-29 Gary Benson <gbenson@redhat.com> 2014-08-29 Gary Benson <gbenson@redhat.com>
* utils.c (internal_vwarning): New function. * utils.c (internal_vwarning): New function.

View file

@ -170,7 +170,7 @@ SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \
$(srcdir)/common/filestuff.c $(srcdir)/target/waitstatus.c \ $(srcdir)/common/filestuff.c $(srcdir)/target/waitstatus.c \
$(srcdir)/nat/mips-linux-watch.c $(srcdir)/common/print-utils.c \ $(srcdir)/nat/mips-linux-watch.c $(srcdir)/common/print-utils.c \
$(srcdir)/common/rsp-low.c $(srcdir)/common/errors.c \ $(srcdir)/common/rsp-low.c $(srcdir)/common/errors.c \
$(srcdir)/common/common-debug.c $(srcdir)/common/common-debug.c $(srcdir)/common/cleanups.c
DEPFILES = @GDBSERVER_DEPFILES@ DEPFILES = @GDBSERVER_DEPFILES@
@ -183,7 +183,7 @@ OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o \
target.o waitstatus.o utils.o debug.o version.o vec.o gdb_vecs.o \ target.o waitstatus.o utils.o debug.o version.o vec.o gdb_vecs.o \
mem-break.o hostio.o event-loop.o tracepoint.o xml-utils.o \ mem-break.o hostio.o event-loop.o tracepoint.o xml-utils.o \
common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \ common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \
tdesc.o print-utils.o rsp-low.o errors.o common-debug.o \ tdesc.o print-utils.o rsp-low.o errors.o common-debug.o cleanups.o \
$(XML_BUILTIN) $(DEPFILES) $(LIBOBJS) $(XML_BUILTIN) $(DEPFILES) $(LIBOBJS)
GDBREPLAY_OBS = gdbreplay.o version.o GDBREPLAY_OBS = gdbreplay.o version.o
GDBSERVER_LIBS = @GDBSERVER_LIBS@ GDBSERVER_LIBS = @GDBSERVER_LIBS@
@ -544,6 +544,9 @@ errors.o: ../common/errors.c
common-debug.o: ../common/common-debug.c common-debug.o: ../common/common-debug.c
$(COMPILE) $< $(COMPILE) $<
$(POSTCOMPILE) $(POSTCOMPILE)
cleanups.o: ../common/cleanups.c
$(COMPILE) $<
$(POSTCOMPILE)
waitstatus.o: ../target/waitstatus.c waitstatus.o: ../target/waitstatus.c
$(COMPILE) $< $(COMPILE) $<
$(POSTCOMPILE) $(POSTCOMPILE)