diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/ChangeLog ./bfd/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/ChangeLog	2015-01-12 01:48:33.000000000 +0000
+++ ./bfd/ChangeLog	2015-01-13 01:48:36.000000000 +0000
@@ -1,3 +1,9 @@
+2015-01-12  Terry Guo  <terry.guo@arm.com>
+
+	* elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
+	function.
+	(_bfd_elf_gc_mark_extra_sections): Use it.
+
 2015-01-11  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR ld/17827
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/doc/ChangeLog ./bfd/doc/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/doc/ChangeLog	2015-01-12 01:48:33.000000000 +0000
+++ ./bfd/doc/ChangeLog	2015-01-13 01:48:36.000000000 +0000
@@ -1,3 +1,17 @@
+2015-01-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+	    Alan Modra  <amodra@gmail.com>
+
+	PR 17817
+	* Makefile.am (aoutx.stamp): cp -p $srcdir/aoutx.texi to keep
+	timestamps so that makeinfo need not be installed.
+	(archive.stamp, archures.stamp, bfdt.stamp, cache.stamp,
+	coffcode.stamp, core.stamp, elf.stamp, elfcode.stamp, mmo.stamp,
+	format.stamp, libbfd.stamp, bfdio.stamp, bfdwin.stamp,
+	opncls.stamp, reloc.stamp, section.stamp, syms.stamp, targets.stamp,
+	init.stamp, hash.stamp, linker.stamp): Similarly.
+	(bfdver.texi): Use test rather than [ ] in commands.
+	* Makefile.in: Regenerate.
+
 2014-08-05  Doug Evans  <dje@google.com>
 
 	* chew.c (skip_past_newline_1): New function.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/doc/Makefile.am ./bfd/doc/Makefile.am
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/doc/Makefile.am	2015-01-12 01:48:33.000000000 +0000
+++ ./bfd/doc/Makefile.am	2015-01-13 01:48:36.000000000 +0000
@@ -97,18 +97,21 @@ protos: libbfd.h libcoff.h bfd.h
 aoutx.texi: aoutx.stamp ; @true
 aoutx.stamp: $(srcdir)/../aoutx.h $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >aoutx.tmp
+	test -e aoutx.texi || test ! -f $(srcdir)/aoutx.texi || cp -p $(srcdir)/aoutx.texi .
 	$(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
 	touch $@
 
 archive.texi: archive.stamp ; @true
 archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >archive.tmp
+	test -e archive.texi || test ! -f $(srcdir)/archive.texi || cp -p $(srcdir)/archive.texi .
 	$(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
 	touch $@
 
 archures.texi: archures.stamp ; @true
 archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >archures.tmp
+	test -e archures.texi || test ! -f $(srcdir)/archures.texi || cp -p $(srcdir)/archures.texi .
 	$(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
 	touch $@
 
@@ -117,114 +120,133 @@ archures.stamp: $(srcdir)/../archures.c 
 bfdt.texi: bfdt.stamp ; @true
 bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >bfd.tmp
+	test -e bfdt.texi || test ! -f $(srcdir)/bfdt.texi || cp -p $(srcdir)/bfdt.texi .
 	$(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
 	touch $@
 
 cache.texi: cache.stamp ; @true
 cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >cache.tmp
+	test -e cache.texi || test ! -f $(srcdir)/cache.texi || cp -p $(srcdir)/cache.texi .
 	$(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
 	touch $@
 
 coffcode.texi: coffcode.stamp ; @true
 coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >coffcode.tmp
+	test -e coffcode.texi || test ! -f $(srcdir)/coffcode.texi || cp -p $(srcdir)/coffcode.texi .
 	$(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
 	touch $@
 
 core.texi: core.stamp ; @true
 core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >core.tmp
+	test -e core.texi || test ! -f $(srcdir)/core.texi || cp -p $(srcdir)/core.texi .
 	$(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
 	touch $@
 
 elf.texi: elf.stamp ; @true
 elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >elf.tmp
+	test -e elf.texi || test ! -f $(srcdir)/elf.texi || cp -p $(srcdir)/elf.texi .
 	$(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
 	touch $@
 
 elfcode.texi: elfcode.stamp ; @true
 elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >elfcode.tmp
+	test -e elfcode.texi || test ! -f $(srcdir)/elfcode.texi || cp -p $(srcdir)/elfcode.texi .
 	$(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
 	touch $@
 
 mmo.texi: mmo.stamp ; @true
 mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >mmo.tmp
+	test -e mmo.texi || test ! -f $(srcdir)/mmo.texi || cp -p $(srcdir)/mmo.texi .
 	$(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
 	touch $@
 
 format.texi: format.stamp ; @true
 format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >format.tmp
+	test -e format.texi || test ! -f $(srcdir)/format.texi || cp -p $(srcdir)/format.texi .
 	$(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
 	touch $@
 
 libbfd.texi: libbfd.stamp ; @true
 libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >libbfd.tmp
+	test -e libbfd.texi || test ! -f $(srcdir)/libbfd.texi || cp -p $(srcdir)/libbfd.texi .
 	$(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
 	touch $@
 
 bfdio.texi: bfdio.stamp ; @true
 bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdio.tmp
+	test -e bfdio.texi || test ! -f $(srcdir)/bfdio.texi || cp -p $(srcdir)/bfdio.texi .
 	$(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
 	touch $@
 
 bfdwin.texi: bfdwin.stamp ; @true
 bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdwin.tmp
+	test -e bfdwin.texi || test ! -f $(srcdir)/bfdwin.texi || cp -p $(srcdir)/bfdwin.texi .
 	$(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
 	touch $@
 
 opncls.texi: opncls.stamp ; @true
 opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >opncls.tmp
+	test -e opncls.texi || test ! -f $(srcdir)/opncls.texi || cp -p $(srcdir)/opncls.texi .
 	$(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
 	touch $@
 
 reloc.texi: reloc.stamp ; @true
 reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >reloc.tmp
+	test -e reloc.texi || test ! -f $(srcdir)/reloc.texi || cp -p $(srcdir)/reloc.texi .
 	$(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
 	touch $@
 
 section.texi: section.stamp ; @true
 section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >section.tmp
+	test -e section.texi || test ! -f $(srcdir)/section.texi || cp -p $(srcdir)/section.texi .
 	$(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
 	touch $@
 
 syms.texi: syms.stamp ; @true
 syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >syms.tmp
+	test -e syms.texi || test ! -f $(srcdir)/syms.texi || cp -p $(srcdir)/syms.texi .
 	$(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
 	touch $@
 
 targets.texi: targets.stamp ; @true
 targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >targets.tmp
+	test -e targets.texi || test ! -f $(srcdir)/targets.texi || cp -p $(srcdir)/targets.texi .
 	$(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
 	touch $@
 
 init.texi: init.stamp ; @true
 init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >init.tmp
+	test -e init.texi || test ! -f $(srcdir)/init.texi || cp -p $(srcdir)/init.texi .
 	$(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
 	touch $@
 
 hash.texi: hash.stamp ; @true
 hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >hash.tmp
+	test -e hash.texi || test ! -f $(srcdir)/hash.texi || cp -p $(srcdir)/hash.texi .
 	$(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
 	touch $@
 
 linker.texi: linker.stamp ; @true
 linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >linker.tmp
+	test -e linker.texi || test ! -f $(srcdir)/linker.texi || cp -p $(srcdir)/linker.texi .
 	$(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
 	touch $@
 
@@ -316,11 +338,11 @@ bfd.h: $(BFD_H_DEP)
 bfdver.texi: $(srcdir)/Makefile.in
 	@echo "creating $@"; \
 	echo "@set VERSION $(VERSION)" > bfdver.texi; \
-	if [ -n "$(PKGVERSION)" ]; then \
+	if test -n "$(PKGVERSION)"; then \
 	  echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
 	fi; \
 	echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
-	if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
+	if test -n "$(REPORT_BUGS_TEXI)"; then \
 	  echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
 	fi
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/doc/Makefile.in ./bfd/doc/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/doc/Makefile.in	2015-01-12 01:48:33.000000000 +0000
+++ ./bfd/doc/Makefile.in	2015-01-13 01:48:36.000000000 +0000
@@ -796,18 +796,21 @@ protos: libbfd.h libcoff.h bfd.h
 aoutx.texi: aoutx.stamp ; @true
 aoutx.stamp: $(srcdir)/../aoutx.h $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >aoutx.tmp
+	test -e aoutx.texi || test ! -f $(srcdir)/aoutx.texi || cp -p $(srcdir)/aoutx.texi .
 	$(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
 	touch $@
 
 archive.texi: archive.stamp ; @true
 archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >archive.tmp
+	test -e archive.texi || test ! -f $(srcdir)/archive.texi || cp -p $(srcdir)/archive.texi .
 	$(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
 	touch $@
 
 archures.texi: archures.stamp ; @true
 archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >archures.tmp
+	test -e archures.texi || test ! -f $(srcdir)/archures.texi || cp -p $(srcdir)/archures.texi .
 	$(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
 	touch $@
 
@@ -816,114 +819,133 @@ archures.stamp: $(srcdir)/../archures.c 
 bfdt.texi: bfdt.stamp ; @true
 bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >bfd.tmp
+	test -e bfdt.texi || test ! -f $(srcdir)/bfdt.texi || cp -p $(srcdir)/bfdt.texi .
 	$(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
 	touch $@
 
 cache.texi: cache.stamp ; @true
 cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >cache.tmp
+	test -e cache.texi || test ! -f $(srcdir)/cache.texi || cp -p $(srcdir)/cache.texi .
 	$(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
 	touch $@
 
 coffcode.texi: coffcode.stamp ; @true
 coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >coffcode.tmp
+	test -e coffcode.texi || test ! -f $(srcdir)/coffcode.texi || cp -p $(srcdir)/coffcode.texi .
 	$(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
 	touch $@
 
 core.texi: core.stamp ; @true
 core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >core.tmp
+	test -e core.texi || test ! -f $(srcdir)/core.texi || cp -p $(srcdir)/core.texi .
 	$(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
 	touch $@
 
 elf.texi: elf.stamp ; @true
 elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >elf.tmp
+	test -e elf.texi || test ! -f $(srcdir)/elf.texi || cp -p $(srcdir)/elf.texi .
 	$(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
 	touch $@
 
 elfcode.texi: elfcode.stamp ; @true
 elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >elfcode.tmp
+	test -e elfcode.texi || test ! -f $(srcdir)/elfcode.texi || cp -p $(srcdir)/elfcode.texi .
 	$(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
 	touch $@
 
 mmo.texi: mmo.stamp ; @true
 mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >mmo.tmp
+	test -e mmo.texi || test ! -f $(srcdir)/mmo.texi || cp -p $(srcdir)/mmo.texi .
 	$(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
 	touch $@
 
 format.texi: format.stamp ; @true
 format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >format.tmp
+	test -e format.texi || test ! -f $(srcdir)/format.texi || cp -p $(srcdir)/format.texi .
 	$(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
 	touch $@
 
 libbfd.texi: libbfd.stamp ; @true
 libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >libbfd.tmp
+	test -e libbfd.texi || test ! -f $(srcdir)/libbfd.texi || cp -p $(srcdir)/libbfd.texi .
 	$(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
 	touch $@
 
 bfdio.texi: bfdio.stamp ; @true
 bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdio.tmp
+	test -e bfdio.texi || test ! -f $(srcdir)/bfdio.texi || cp -p $(srcdir)/bfdio.texi .
 	$(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
 	touch $@
 
 bfdwin.texi: bfdwin.stamp ; @true
 bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdwin.tmp
+	test -e bfdwin.texi || test ! -f $(srcdir)/bfdwin.texi || cp -p $(srcdir)/bfdwin.texi .
 	$(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
 	touch $@
 
 opncls.texi: opncls.stamp ; @true
 opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >opncls.tmp
+	test -e opncls.texi || test ! -f $(srcdir)/opncls.texi || cp -p $(srcdir)/opncls.texi .
 	$(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
 	touch $@
 
 reloc.texi: reloc.stamp ; @true
 reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >reloc.tmp
+	test -e reloc.texi || test ! -f $(srcdir)/reloc.texi || cp -p $(srcdir)/reloc.texi .
 	$(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
 	touch $@
 
 section.texi: section.stamp ; @true
 section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >section.tmp
+	test -e section.texi || test ! -f $(srcdir)/section.texi || cp -p $(srcdir)/section.texi .
 	$(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
 	touch $@
 
 syms.texi: syms.stamp ; @true
 syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >syms.tmp
+	test -e syms.texi || test ! -f $(srcdir)/syms.texi || cp -p $(srcdir)/syms.texi .
 	$(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
 	touch $@
 
 targets.texi: targets.stamp ; @true
 targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >targets.tmp
+	test -e targets.texi || test ! -f $(srcdir)/targets.texi || cp -p $(srcdir)/targets.texi .
 	$(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
 	touch $@
 
 init.texi: init.stamp ; @true
 init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >init.tmp
+	test -e init.texi || test ! -f $(srcdir)/init.texi || cp -p $(srcdir)/init.texi .
 	$(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
 	touch $@
 
 hash.texi: hash.stamp ; @true
 hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >hash.tmp
+	test -e hash.texi || test ! -f $(srcdir)/hash.texi || cp -p $(srcdir)/hash.texi .
 	$(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
 	touch $@
 
 linker.texi: linker.stamp ; @true
 linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC)
 	./$(MKDOC) -f $(srcdir)/doc.str < $< >linker.tmp
+	test -e linker.texi || test ! -f $(srcdir)/linker.texi || cp -p $(srcdir)/linker.texi .
 	$(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
 	touch $@
 
@@ -970,11 +992,11 @@ bfd.h: $(BFD_H_DEP)
 bfdver.texi: $(srcdir)/Makefile.in
 	@echo "creating $@"; \
 	echo "@set VERSION $(VERSION)" > bfdver.texi; \
-	if [ -n "$(PKGVERSION)" ]; then \
+	if test -n "$(PKGVERSION)"; then \
 	  echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
 	fi; \
 	echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
-	if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
+	if test -n "$(REPORT_BUGS_TEXI)"; then \
 	  echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
 	fi
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/elflink.c ./bfd/elflink.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/elflink.c	2015-01-12 01:48:33.000000000 +0000
+++ ./bfd/elflink.c	2015-01-13 01:48:36.000000000 +0000
@@ -11971,6 +11971,47 @@ _bfd_elf_gc_mark (struct bfd_link_info *
   return ret;
 }
 
+/* Scan and mark sections in a special or debug section group.  */
+
+static void
+_bfd_elf_gc_mark_debug_special_section_group (asection *grp)
+{
+  /* Point to first section of section group.  */
+  asection *ssec;
+  /* Used to iterate the section group.  */
+  asection *msec;
+
+  bfd_boolean is_special_grp = TRUE;
+  bfd_boolean is_debug_grp = TRUE;
+
+  /* First scan to see if group contains any section other than debug
+     and special section.  */
+  ssec = msec = elf_next_in_group (grp);
+  do
+    {
+      if ((msec->flags & SEC_DEBUGGING) == 0)
+	is_debug_grp = FALSE;
+
+      if ((msec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) != 0)
+	is_special_grp = FALSE;
+
+      msec = elf_next_in_group (msec);
+    }
+  while (msec != ssec);
+
+  /* If this is a pure debug section group or pure special section group,
+     keep all sections in this group.  */
+  if (is_debug_grp || is_special_grp)
+    {
+      do
+	{
+	  msec->gc_mark = 1;
+	  msec = elf_next_in_group (msec);
+	}
+      while (msec != ssec);
+    }
+}
+
 /* Keep debug and special sections.  */
 
 bfd_boolean
@@ -12011,13 +12052,17 @@ _bfd_elf_gc_mark_extra_sections (struct 
 	continue;
 
       /* Keep debug and special sections like .comment when they are
-	 not part of a group, or when we have single-member groups.  */
+	 not part of a group.  Also keep section groups that contain
+	 just debug sections or special sections.  */
       for (isec = ibfd->sections; isec != NULL; isec = isec->next)
-	if ((elf_next_in_group (isec) == NULL
-	     || elf_next_in_group (isec) == isec)
-	    && ((isec->flags & SEC_DEBUGGING) != 0
-		|| (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0))
-	  isec->gc_mark = 1;
+	{
+	  if ((isec->flags & SEC_GROUP) != 0)
+	    _bfd_elf_gc_mark_debug_special_section_group (isec);
+	  else if (((isec->flags & SEC_DEBUGGING) != 0
+		    || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
+		   && elf_next_in_group (isec) == NULL)
+	    isec->gc_mark = 1;
+	}
 
       if (! debug_frag_seen)
 	continue;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/version.h ./bfd/version.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/bfd/version.h	2015-01-12 01:48:33.000000000 +0000
+++ ./bfd/version.h	2015-01-13 01:48:36.000000000 +0000
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150112
+#define BFD_VERSION_DATE 20150113
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/djunpack.bat ./djunpack.bat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/djunpack.bat	2015-01-12 01:54:08.000000000 +0000
+++ ./djunpack.bat	2015-01-13 01:53:22.000000000 +0000
@@ -17,8 +17,8 @@ Rem
 Rem The following 2 lines need to be changed with each new GDB release, to
 Rem be identical to the name of the top-level directory where the GDB
 Rem distribution unpacks itself.
-set GDBVER=$package-7.8.50.20150112
-if "%GDBVER%"=="$package-7.8.50.20150112" GoTo EnvOk
+set GDBVER=$package-7.8.50.20150113
+if "%GDBVER%"=="$package-7.8.50.20150113" GoTo EnvOk
 Rem If their environment space is too small, re-exec with a larger one
 command.com /e:4096 /c %0 %1
 GoTo End
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/ChangeLog ./gdb/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/ChangeLog	2015-01-12 01:48:36.000000000 +0000
+++ ./gdb/ChangeLog	2015-01-13 01:48:38.000000000 +0000
@@ -1,3 +1,20 @@
+2015-01-12  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* top.h (gdb_add_history): Declare.
+	* top.c (command_count): New variable.
+	(gdb_add_history): New function.
+	(gdb_safe_append_history): New static function.
+	(quit_force): Call it.
+	(command_line_input): Use gdb_add_history instead of
+	add_history.
+	* event-top.c (command_line_handler): Likewise.
+
+2015-01-12  James Clarke  <jrtc27@jrtc27.com>  (tiny patch)
+
+	PR gdb/17046
+	* darwin-nat.c: Replace <machine/setjmp.h> #include by
+	<setjmp.h> #include.
+
 2015-01-11  Doug Evans  <xdje42@gmail.com>
 
 	* dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/darwin-nat.c ./gdb/darwin-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/darwin-nat.c	2015-01-12 01:48:36.000000000 +0000
+++ ./gdb/darwin-nat.c	2015-01-13 01:48:39.000000000 +0000
@@ -41,7 +41,7 @@
 
 #include <sys/ptrace.h>
 #include <sys/signal.h>
-#include <machine/setjmp.h>
+#include <setjmp.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <signal.h>
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gcore.1 ./gdb/doc/gcore.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gcore.1	2015-01-12 01:52:35.000000000 +0000
+++ ./gdb/doc/gcore.1	2015-01-13 01:52:17.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GCORE 1"
-.TH GCORE 1 "2015-01-12" "gdb-7.8.50.20150112-cvs" "GNU Development Tools"
+.TH GCORE 1 "2015-01-13" "gdb-7.8.50.20150113-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.1 ./gdb/doc/gdb.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.1	2015-01-12 01:52:35.000000000 +0000
+++ ./gdb/doc/gdb.1	2015-01-13 01:52:17.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDB 1"
-.TH GDB 1 "2015-01-12" "gdb-7.8.50.20150112-cvs" "GNU Development Tools"
+.TH GDB 1 "2015-01-13" "gdb-7.8.50.20150113-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info ./gdb/doc/gdb.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-1 ./gdb/doc/gdb.info-1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-1	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-1	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -45,7 +45,7 @@ Debugging with GDB
 
 This file describes GDB, the GNU symbolic debugger.
 
-   This is the Tenth Edition, for GDB (GDB) Version 7.8.50.20150112-cvs.
+   This is the Tenth Edition, for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -494,7 +494,7 @@ Let us use GDB to try to see what is goi
      There is absolutely no warranty for GDB; type "show warranty"
       for details.
 
-     GDB 7.8.50.20150112-cvs, Copyright 1999 Free Software Foundation, Inc...
+     GDB 7.8.50.20150113-cvs, Copyright 1999 Free Software Foundation, Inc...
      (gdb)
 
 GDB reads only enough symbol data to know where to find the rest when
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-2 ./gdb/doc/gdb.info-2
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-2	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-2	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-3 ./gdb/doc/gdb.info-3
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-3	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-3	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-4 ./gdb/doc/gdb.info-4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-4	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-4	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-5 ./gdb/doc/gdb.info-5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-5	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-5	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -8107,7 +8107,7 @@ and TeX (or `texi2roff') to typeset the 
 
    GDB includes an already formatted copy of the on-line Info version
 of this manual in the `gdb' subdirectory.  The main Info file is
-`gdb-7.8.50.20150112-cvs/gdb/gdb.info', and it refers to subordinate
+`gdb-7.8.50.20150113-cvs/gdb/gdb.info', and it refers to subordinate
 files matching `gdb.info*' in the same directory.  If necessary, you
 can print out these files, or read them with any editor; but they are
 easier to read using the `info' subsystem in GNU Emacs or the
@@ -8118,8 +8118,8 @@ distribution.
 Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
 
    If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-7.8.50.20150112-cvs', in the case of version
-7.8.50.20150112-cvs), you can make the Info file by typing:
+source directory (`gdb-7.8.50.20150113-cvs', in the case of version
+7.8.50.20150113-cvs), you can make the Info file by typing:
 
      cd gdb
      make gdb.info
@@ -8144,7 +8144,7 @@ format.  On its own, TeX cannot either r
 
    If you have TeX and a DVI printer program installed, you can typeset
 and print this manual.  First switch to the `gdb' subdirectory of the
-main source directory (for example, to `gdb-7.8.50.20150112-cvs/gdb')
+main source directory (for example, to `gdb-7.8.50.20150113-cvs/gdb')
 and type:
 
      make gdb.dvi
@@ -8153,8 +8153,8 @@ and type:
 
    ---------- Footnotes ----------
 
-   (1) In `gdb-7.8.50.20150112-cvs/gdb/refcard.ps' of the version
-7.8.50.20150112-cvs release.
+   (1) In `gdb-7.8.50.20150113-cvs/gdb/refcard.ps' of the version
+7.8.50.20150113-cvs release.
 
 
 File: gdb.info,  Node: Installing GDB,  Next: Maintenance Commands,  Prev: Formatting Documentation,  Up: Top
@@ -8263,39 +8263,39 @@ preparing GDB for installation; you can 
 in a single directory, whose name is usually composed by appending the
 version number to `gdb'.
 
-   For example, the GDB version 7.8.50.20150112-cvs distribution is in
-the `gdb-7.8.50.20150112-cvs' directory.  That directory contains:
+   For example, the GDB version 7.8.50.20150113-cvs distribution is in
+the `gdb-7.8.50.20150113-cvs' directory.  That directory contains:
 
-`gdb-7.8.50.20150112-cvs/configure (and supporting files)'
+`gdb-7.8.50.20150113-cvs/configure (and supporting files)'
      script for configuring GDB and all its supporting libraries
 
-`gdb-7.8.50.20150112-cvs/gdb'
+`gdb-7.8.50.20150113-cvs/gdb'
      the source specific to GDB itself
 
-`gdb-7.8.50.20150112-cvs/bfd'
+`gdb-7.8.50.20150113-cvs/bfd'
      source for the Binary File Descriptor library
 
-`gdb-7.8.50.20150112-cvs/include'
+`gdb-7.8.50.20150113-cvs/include'
      GNU include files
 
-`gdb-7.8.50.20150112-cvs/libiberty'
+`gdb-7.8.50.20150113-cvs/libiberty'
      source for the `-liberty' free software library
 
-`gdb-7.8.50.20150112-cvs/opcodes'
+`gdb-7.8.50.20150113-cvs/opcodes'
      source for the library of opcode tables and disassemblers
 
-`gdb-7.8.50.20150112-cvs/readline'
+`gdb-7.8.50.20150113-cvs/readline'
      source for the GNU command-line interface
 
-`gdb-7.8.50.20150112-cvs/glob'
+`gdb-7.8.50.20150113-cvs/glob'
      source for the GNU filename pattern-matching subroutine
 
-`gdb-7.8.50.20150112-cvs/mmalloc'
+`gdb-7.8.50.20150113-cvs/mmalloc'
      source for the GNU memory-mapped malloc package
 
    The simplest way to configure and build GDB is to run `configure'
 from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-7.8.50.20150112-cvs' directory.
+is the `gdb-7.8.50.20150113-cvs' directory.
 
    First switch to the `gdb-VERSION-NUMBER' source directory if you are
 not already in it; then run `configure'.  Pass the identifier for the
@@ -8303,7 +8303,7 @@ platform on which GDB will run as an arg
 
    For example:
 
-     cd gdb-7.8.50.20150112-cvs
+     cd gdb-7.8.50.20150113-cvs
      ./configure HOST
      make
 
@@ -8325,8 +8325,8 @@ you may need to run `sh' on it explicitl
 
    If you run `configure' from a directory that contains source
 directories for multiple libraries or programs, such as the
-`gdb-7.8.50.20150112-cvs' source directory for version
-7.8.50.20150112-cvs, `configure' creates configuration files for every
+`gdb-7.8.50.20150113-cvs' source directory for version
+7.8.50.20150113-cvs, `configure' creates configuration files for every
 directory level underneath (unless you tell it not to, with the
 `--norecursion' option).
 
@@ -8367,13 +8367,13 @@ directory.  If the path to `configure' w
 argument to `--srcdir', you can leave out the `--srcdir' option; it is
 assumed.)
 
-   For example, with version 7.8.50.20150112-cvs, you can build GDB in a
+   For example, with version 7.8.50.20150113-cvs, you can build GDB in a
 separate directory for a Sun 4 like this:
 
-     cd gdb-7.8.50.20150112-cvs
+     cd gdb-7.8.50.20150113-cvs
      mkdir ../gdb-sun4
      cd ../gdb-sun4
-     ../gdb-7.8.50.20150112-cvs/configure sun4
+     ../gdb-7.8.50.20150113-cvs/configure sun4
      make
 
    When `configure' builds a configuration using a remote source
@@ -8384,7 +8384,7 @@ directory `gdb-sun4/libiberty', and GDB 
 
    Make sure that your path to the `configure' script has just one
 instance of `gdb' in it.  If your path to `configure' looks like
-`../gdb-7.8.50.20150112-cvs/gdb/configure', you are configuring only
+`../gdb-7.8.50.20150113-cvs/gdb/configure', you are configuring only
 one subdirectory of GDB, not the whole package.  This leads to build
 errors about missing include files such as `bfd/bfd.h'.
 
@@ -8400,8 +8400,8 @@ called `configure' (or one of its subdir
 
    The `Makefile' that `configure' generates in each source directory
 also runs recursively.  If you type `make' in a source directory such
-as `gdb-7.8.50.20150112-cvs' (or in a separate configured directory
-configured with `--srcdir=DIRNAME/gdb-7.8.50.20150112-cvs'), you will
+as `gdb-7.8.50.20150113-cvs' (or in a separate configured directory
+configured with `--srcdir=DIRNAME/gdb-7.8.50.20150113-cvs'), you will
 build all the required libraries, and then build GDB.
 
    When you have multiple hosts or targets configured in separate
@@ -8446,7 +8446,7 @@ you can use it to test your guesses on a
      Invalid configuration `i986v': machine `i986v' not recognized
 
 `config.sub' is also distributed in the GDB source directory
-(`gdb-7.8.50.20150112-cvs', for version 7.8.50.20150112-cvs).
+(`gdb-7.8.50.20150113-cvs', for version 7.8.50.20150113-cvs).
 
 
 File: gdb.info,  Node: Configure Options,  Next: System-wide configuration,  Prev: Config Names,  Up: Installing GDB
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-6 ./gdb/doc/gdb.info-6
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-6	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-6	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-7 ./gdb/doc/gdb.info-7
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-7	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-7	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-8 ./gdb/doc/gdb.info-8
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdb.info-8	2015-01-12 01:52:34.000000000 +0000
+++ ./gdb/doc/gdb.info-8	2015-01-13 01:52:16.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150112-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150113-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdbinit.5 ./gdb/doc/gdbinit.5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdbinit.5	2015-01-12 01:52:36.000000000 +0000
+++ ./gdb/doc/gdbinit.5	2015-01-13 01:52:17.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBINIT 5"
-.TH GDBINIT 5 "2015-01-12" "gdb-7.8.50.20150112-cvs" "GNU Development Tools"
+.TH GDBINIT 5 "2015-01-13" "gdb-7.8.50.20150113-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdbserver.1 ./gdb/doc/gdbserver.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/doc/gdbserver.1	2015-01-12 01:52:35.000000000 +0000
+++ ./gdb/doc/gdbserver.1	2015-01-13 01:52:17.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBSERVER 1"
-.TH GDBSERVER 1 "2015-01-12" "gdb-7.8.50.20150112-cvs" "GNU Development Tools"
+.TH GDBSERVER 1 "2015-01-13" "gdb-7.8.50.20150113-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/event-top.c ./gdb/event-top.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/event-top.c	2015-01-12 01:48:37.000000000 +0000
+++ ./gdb/event-top.c	2015-01-13 01:48:39.000000000 +0000
@@ -667,7 +667,7 @@ command_line_handler (char *rl)
 
   /* Add line to history if appropriate.  */
   if (*linebuffer && input_from_terminal_p ())
-    add_history (linebuffer);
+    gdb_add_history (linebuffer);
 
   /* Note: lines consisting solely of comments are added to the command
      history.  This is useful when you type a command, and then
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/po/gdb.pot ./gdb/po/gdb.pot
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/po/gdb.pot	2015-01-12 01:52:32.000000000 +0000
+++ ./gdb/po/gdb.pot	2015-01-13 01:52:13.000000000 +0000
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-01-12 01:52+0000\n"
+"POT-Creation-Date: 2015-01-13 01:52+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21111,7 +21111,7 @@ msgstr ""
 msgid "Invalid modifier: %c."
 msgstr ""
 
-#: record.c:685 top.c:1576
+#: record.c:685 top.c:1643
 #, possible-c-format
 msgid "integer %u out of range"
 msgstr ""
@@ -26771,197 +26771,202 @@ msgstr ""
 msgid "The filename in which to record the command history is \"%s\".\n"
 msgstr ""
 
-#: top.c:1158
+#: top.c:930 top.c:958
+#, possible-c-format
+msgid "Could not rename %s to %s: %s"
+msgstr ""
+
+#: top.c:1225
 msgid ""
 "\n"
 "For bug reporting instructions, please see:\n"
 msgstr ""
 
-#: top.c:1162
+#: top.c:1229
 msgid ""
 "Find the GDB manual and other documentation resources online at:\n"
 "<http://www.gnu.org/software/gdb/documentation/>.\n"
 msgstr ""
 
-#: top.c:1164
+#: top.c:1231
 msgid "For help, type \"help\".\n"
 msgstr ""
 
-#: top.c:1165
+#: top.c:1232
 msgid "Type \"apropos word\" to search for commands related to \"word\"."
 msgstr ""
 
-#: top.c:1173
+#: top.c:1240
 #, possible-c-format
 msgid ""
 "This GDB was configured as follows:\n"
 "   configure --host=%s --target=%s\n"
 msgstr ""
 
-#: top.c:1177
+#: top.c:1244
 #, possible-c-format
 msgid ""
 "             --with-auto-load-dir=%s\n"
 "             --with-auto-load-safe-path=%s\n"
 msgstr ""
 
-#: top.c:1182
+#: top.c:1249
 msgid "             --with-expat\n"
 msgstr ""
 
-#: top.c:1186
+#: top.c:1253
 msgid "             --without-expat\n"
 msgstr ""
 
-#: top.c:1191
+#: top.c:1258
 #, possible-c-format
 msgid "             --with-gdb-datadir=%s%s\n"
 msgstr ""
 
-#: top.c:1195
+#: top.c:1262
 #, possible-c-format
 msgid "             --with-iconv-bin=%s%s\n"
 msgstr ""
 
-#: top.c:1200
+#: top.c:1267
 #, possible-c-format
 msgid "             --with-jit-reader-dir=%s%s\n"
 msgstr ""
 
-#: top.c:1204
+#: top.c:1271
 msgid "             --with-libunwind-ia64\n"
 msgstr ""
 
-#: top.c:1208
+#: top.c:1275
 msgid "             --without-libunwind-ia64\n"
 msgstr ""
 
-#: top.c:1213
+#: top.c:1280
 msgid "             --with-lzma\n"
 msgstr ""
 
-#: top.c:1217
+#: top.c:1284
 msgid "             --without-lzma\n"
 msgstr ""
 
-#: top.c:1222
+#: top.c:1289
 #, possible-c-format
 msgid "             --with-python=%s%s\n"
 msgstr ""
 
-#: top.c:1227
+#: top.c:1294
 msgid "             --with-guile\n"
 msgstr ""
 
-#: top.c:1231
+#: top.c:1298
 msgid "             --without-guile\n"
 msgstr ""
 
-#: top.c:1236
+#: top.c:1303
 #, possible-c-format
 msgid "             --with-relocated-sources=%s\n"
 msgstr ""
 
-#: top.c:1241
+#: top.c:1308
 #, possible-c-format
 msgid "             --with-separate-debug-dir=%s%s\n"
 msgstr ""
 
-#: top.c:1245
+#: top.c:1312
 #, possible-c-format
 msgid "             --with-sysroot=%s%s\n"
 msgstr ""
 
-#: top.c:1249
+#: top.c:1316
 #, possible-c-format
 msgid "             --with-system-gdbinit=%s%s\n"
 msgstr ""
 
-#: top.c:1253
+#: top.c:1320
 msgid "             --with-zlib\n"
 msgstr ""
 
-#: top.c:1257
+#: top.c:1324
 msgid "             --without-zlib\n"
 msgstr ""
 
-#: top.c:1262
+#: top.c:1329
 msgid "             --with-babeltrace\n"
 msgstr ""
 
-#: top.c:1266
+#: top.c:1333
 msgid "             --without-babeltrace\n"
 msgstr ""
 
 #. We assume "relocatable" will be printed at least once, thus we always
 #. print this text.  It's a reasonably safe assumption for now.
-#: top.c:1272
+#: top.c:1339
 msgid ""
 "\n"
 "(\"Relocatable\" means the directory can be moved with the GDB installation\n"
 "tree, and GDB will still find it.)\n"
 msgstr ""
 
-#: top.c:1353
+#: top.c:1420
 #, possible-c-format
 msgid "\tInferior %d [%s] will be detached.\n"
 msgstr ""
 
-#: top.c:1357
+#: top.c:1424
 #, possible-c-format
 msgid "\tInferior %d [%s] will be killed.\n"
 msgstr ""
 
-#: top.c:1382
+#: top.c:1449
 msgid ""
 "A debugging session is active.\n"
 "\n"
 msgstr ""
 
-#: top.c:1384
+#: top.c:1451
 msgid ""
 "\n"
 "Quit anyway? "
 msgstr ""
 
-#: top.c:1589
+#: top.c:1656
 msgid "\"set history\" must be followed by the name of a history subcommand.\n"
 msgstr ""
 
-#: top.c:1682
+#: top.c:1749
 #, possible-c-format
 msgid "Gdb's prompt is \"%s\".\n"
 msgstr ""
 
-#: top.c:1689
+#: top.c:1756
 #, possible-c-format
 msgid "Editing of command lines as they are typed is %s.\n"
 msgstr ""
 
-#: top.c:1698
+#: top.c:1765
 #, possible-c-format
 msgid "Annotation_level is %s.\n"
 msgstr ""
 
-#: top.c:1705
+#: top.c:1772
 #, possible-c-format
 msgid "Notification of completion for asynchronous execution commands is %s.\n"
 msgstr ""
 
-#: top.c:1728
+#: top.c:1795
 #, possible-c-format
 msgid "GDB's data directory is \"%s\".\n"
 msgstr ""
 
-#: top.c:1773
+#: top.c:1840
 msgid "Set gdb's prompt"
 msgstr ""
 
-#: top.c:1774
+#: top.c:1841
 msgid "Show gdb's prompt"
 msgstr ""
 
-#: top.c:1779
+#: top.c:1846
 msgid ""
 "Don't repeat this command.\n"
 "Primarily used inside of user-defined commands that should not be repeated "
@@ -26969,44 +26974,44 @@ msgid ""
 "hitting return."
 msgstr ""
 
-#: top.c:1785
+#: top.c:1852
 msgid "Set editing of command lines as they are typed."
 msgstr ""
 
-#: top.c:1786
+#: top.c:1853
 msgid "Show editing of command lines as they are typed."
 msgstr ""
 
-#: top.c:1787
+#: top.c:1854
 msgid ""
 "Use \"on\" to enable the editing, and \"off\" to disable it.\n"
 "Without an argument, command line editing is enabled.  To edit, use\n"
 "EMACS-like or VI-like commands like control-P or ESC."
 msgstr ""
 
-#: top.c:1795
+#: top.c:1862
 msgid "Set saving of the history record on exit."
 msgstr ""
 
-#: top.c:1796
+#: top.c:1863
 msgid "Show saving of the history record on exit."
 msgstr ""
 
-#: top.c:1797
+#: top.c:1864
 msgid ""
 "Use \"on\" to enable the saving, and \"off\" to disable it.\n"
 "Without an argument, saving is enabled."
 msgstr ""
 
-#: top.c:1804
+#: top.c:1871
 msgid "Set the size of the command history,"
 msgstr ""
 
-#: top.c:1805
+#: top.c:1872
 msgid "Show the size of the command history,"
 msgstr ""
 
-#: top.c:1806
+#: top.c:1873
 msgid ""
 "ie. the number of previous commands to keep a record of.\n"
 "If set to \"unlimited\", the number of commands kept in the history\n"
@@ -27014,61 +27019,61 @@ msgid ""
 "variable \"HISTSIZE\", or to 256 if this variable is not set."
 msgstr ""
 
-#: top.c:1815
+#: top.c:1882
 msgid "Set the filename in which to record the command history"
 msgstr ""
 
-#: top.c:1816
+#: top.c:1883
 msgid "Show the filename in which to record the command history"
 msgstr ""
 
-#: top.c:1817
+#: top.c:1884
 msgid "(the list of previous commands of which a record is kept)."
 msgstr ""
 
-#: top.c:1823
+#: top.c:1890
 msgid "Set whether to confirm potentially dangerous operations."
 msgstr ""
 
-#: top.c:1824
+#: top.c:1891
 msgid "Show whether to confirm potentially dangerous operations."
 msgstr ""
 
-#: top.c:1830
+#: top.c:1897
 msgid "Set annotation_level."
 msgstr ""
 
-#: top.c:1831
+#: top.c:1898
 msgid "Show annotation_level."
 msgstr ""
 
-#: top.c:1832
+#: top.c:1899
 msgid ""
 "0 == normal;     1 == fullname (for use when running under emacs)\n"
 "2 == output annotated suitably for use by programs that control GDB."
 msgstr ""
 
-#: top.c:1840
+#: top.c:1907
 msgid "Set notification of completion for asynchronous execution commands."
 msgstr ""
 
-#: top.c:1841
+#: top.c:1908
 msgid "Show notification of completion for asynchronous execution commands."
 msgstr ""
 
-#: top.c:1842
+#: top.c:1909
 msgid "Use \"on\" to enable the notification, and \"off\" to disable it."
 msgstr ""
 
-#: top.c:1849
+#: top.c:1916
 msgid "Set GDB's data directory."
 msgstr ""
 
-#: top.c:1850
+#: top.c:1917
 msgid "Show GDB's data directory."
 msgstr ""
 
-#: top.c:1851
+#: top.c:1918
 msgid "When set, GDB uses the specified path to search for data files."
 msgstr ""
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/testsuite/ChangeLog ./gdb/testsuite/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/testsuite/ChangeLog	2015-01-12 01:48:38.000000000 +0000
+++ ./gdb/testsuite/ChangeLog	2015-01-13 01:48:39.000000000 +0000
@@ -1,3 +1,13 @@
+2015-01-12  Pedro Alves  <palves@redhat.com>
+
+	* gdb.python/py-prompt.exp: When the board can't spawn for attach,
+	restore GDBFLAGS before returning.
+
+2015-01-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.python/py-frame.exp (test Frame.read_register(rip)): Use
+	is_amd64_regs_target and is_x86_like_target.
+
 2015-01-11  Doug Evans  <xdje42@gmail.com>
 
 	* lib/dwarf.exp (Dwarf): Flag an error if a numeric attribute value
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/testsuite/gdb.python/py-frame.exp ./gdb/testsuite/gdb.python/py-frame.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/testsuite/gdb.python/py-frame.exp	2015-01-12 01:48:40.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-frame.exp	2015-01-13 01:48:40.000000000 +0000
@@ -105,9 +105,15 @@ gdb_test "python print ('result = %s' % 
   " = True" \
   "test Frame.read_register(pc)"
 
-# On x86-64, PC is in $rip register.
-if {[istarget x86_64-*]} {
-    gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.read_register('rip')))" \
+# Test arch-specific register name.
+set pc ""
+if {[is_amd64_regs_target]} {
+    set pc "rip"
+} elseif {[is_x86_like_target]} {
+    set pc "eip"
+}
+if { $pc != "" } {
+    gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.read_register('$pc')))" \
 	" = True" \
-	"test Frame.read_register(rip)"
+	"test Frame.read_register($pc)"
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/testsuite/gdb.python/py-prompt.exp ./gdb/testsuite/gdb.python/py-prompt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/testsuite/gdb.python/py-prompt.exp	2015-01-12 01:48:40.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prompt.exp	2015-01-13 01:48:40.000000000 +0000
@@ -76,6 +76,7 @@ gdb_test "python print (\"'\" + str(p\[0
 gdb_exit
 
 if {![can_spawn_for_attach]} {
+    set GDBFLAGS $saved_gdbflags
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/top.c ./gdb/top.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/top.c	2015-01-12 01:48:40.000000000 +0000
+++ ./gdb/top.c	2015-01-13 01:48:40.000000000 +0000
@@ -895,7 +895,74 @@ gdb_rl_operate_and_get_next (int count, 
 
   return rl_newline (1, key);
 }
-
+
+/* Number of user commands executed during this session.  */
+
+static int command_count = 0;
+
+/* Add the user command COMMAND to the input history list.  */
+
+void
+gdb_add_history (const char *command)
+{
+  add_history (command);
+  command_count++;
+}
+
+/* Safely append new history entries to the history file in a corruption-free
+   way using an intermediate local history file.  */
+
+static void
+gdb_safe_append_history (void)
+{
+  int ret, saved_errno;
+  char *local_history_filename;
+  struct cleanup *old_chain;
+
+  local_history_filename
+    = xstrprintf ("%s-gdb%d~", history_filename, getpid ());
+  old_chain = make_cleanup (xfree, local_history_filename);
+
+  ret = rename (history_filename, local_history_filename);
+  saved_errno = errno;
+  if (ret < 0 && saved_errno != ENOENT)
+    {
+      warning (_("Could not rename %s to %s: %s"),
+	       history_filename, local_history_filename,
+	       safe_strerror (saved_errno));
+    }
+  else
+    {
+      if (ret < 0)
+	{
+	  /* If the rename failed with ENOENT then either the global history
+	     file never existed in the first place or another GDB process is
+	     currently appending to it (and has thus temporarily renamed it).
+	     Since we can't distinguish between these two cases, we have to
+	     conservatively assume the first case and therefore must write out
+	     (not append) our known history to our local history file and try
+	     to move it back anyway.  Otherwise a global history file would
+	     never get created!  */
+	   gdb_assert (saved_errno == ENOENT);
+	   write_history (local_history_filename);
+	}
+      else
+	{
+	  append_history (command_count, local_history_filename);
+	  history_truncate_file (local_history_filename, history_max_entries);
+	}
+
+      ret = rename (local_history_filename, history_filename);
+      saved_errno = errno;
+      if (ret < 0 && saved_errno != EEXIST)
+        warning (_("Could not rename %s to %s: %s"),
+		 local_history_filename, history_filename,
+		 safe_strerror (saved_errno));
+    }
+
+  do_cleanups (old_chain);
+}
+
 /* Read one line from the command input stream `instream'
    into the local static buffer `linebuffer' (whose current length
    is `linelength').
@@ -1094,7 +1161,7 @@ command_line_input (const char *prompt_a
 
   /* Add line to history if appropriate.  */
   if (*linebuffer && input_from_terminal_p ())
-    add_history (linebuffer);
+    gdb_add_history (linebuffer);
 
   /* Save into global buffer if appropriate.  */
   if (repeat)
@@ -1445,7 +1512,7 @@ quit_force (char *args, int from_tty)
     {
       if (write_history_p && history_filename
 	  && input_from_terminal_p ())
-	write_history (history_filename);
+	gdb_safe_append_history ();
     }
   DO_PRINT_EX;
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/top.h ./gdb/top.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/gdb/top.h	2015-01-12 01:48:40.000000000 +0000
+++ ./gdb/top.h	2015-01-13 01:48:40.000000000 +0000
@@ -79,6 +79,8 @@ extern int history_expansion_p;
 extern int server_command;
 extern char *lim_at_start;
 
+extern void gdb_add_history (const char *);
+
 extern void show_commands (char *args, int from_tty);
 
 extern void set_history (char *, int);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/md5.sum ./md5.sum
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150112/md5.sum	2015-01-12 01:54:08.000000000 +0000
+++ ./md5.sum	2015-01-13 01:53:22.000000000 +0000
@@ -38,7 +38,7 @@ f74f5720bf485dc971d7b4151b97318b  bfd/pe
 d714ee957aefa81619f03058d91b23cb  bfd/elfcore.h
 c81d65148831d8cdd82361f4e75ad0c2  bfd/elf64-mips.c
 57287cb3abe2dc7f66af4ab28aafebe9  bfd/cpu-m9s12x.c
-db5a89a0d5c18eda8aa3751f8d07b919  bfd/version.h
+52ccd36ed09cd967a5e38752264196d1  bfd/version.h
 a107ac2f34a58b7629fbff59490f61f1  bfd/cpu-tilegx.c
 ceebc66a221f8f9297b660d643de9009  bfd/coff-mcore.c
 b33e0ba78cdd46c771e365ab8b48bfc1  bfd/cpu-avr.c
@@ -211,7 +211,7 @@ df585392717c30d973de1a223c137975  bfd/ho
 32a838331884511de9bb58e74e244cf4  bfd/doc/reloc.texi
 072910d553f79906db69fa7c0e956bba  bfd/doc/fdl.texi
 290b494aadac1ae4d748fc49bd52f332  bfd/doc/section.texi
-da7193a00490816963843a47040103f9  bfd/doc/Makefile.in
+323184d55ec6a5bb9d4c021b271203fd  bfd/doc/Makefile.in
 236e856bb13ee47adc5d7d253037640d  bfd/doc/bfdwin.texi
 a11231531c5c3cd6e7babf06426a657e  bfd/doc/ChangeLog-9103
 d2b923f7732c26442570c16fd1dfac5a  bfd/doc/hash.texi
@@ -228,9 +228,9 @@ f910f218438622b07bc2760b2aca068e  bfd/do
 9c29ea7f3f782cb53452b5d3d266fb9b  bfd/doc/bfdint.texi
 9afb3e98dc09050c90da3ce1973dea7c  bfd/doc/archures.texi
 51139f6af786e74446d01ec49807fc28  bfd/doc/elf.texi
-47d431b8e369e28fe114394dedff71c3  bfd/doc/Makefile.am
+8196495ec881df172b578acd0e5f80ef  bfd/doc/Makefile.am
 7edf511939deb638e8291f264c4249e1  bfd/doc/bfdio.texi
-e5d7154700ed7ad126a57d44dc1a9758  bfd/doc/ChangeLog
+ddf1297dbd2a66531f06e6f5cbffb0da  bfd/doc/ChangeLog
 d9f7fec3dee69a6c3084e6d4cfd88371  bfd/doc/cache.texi
 6a1a507e85b4d8cee41c3defa9d24e6a  bfd/doc/opncls.texi
 b0bc392e3b3bfff71aaa7c8636f16b91  bfd/doc/linker.texi
@@ -353,7 +353,7 @@ aaf75a51efde4236b5cc8cf6715d6f6a  bfd/el
 0089dbf3a4ad169d55640677b226b650  bfd/elf32-m68hc12.c
 4d0c2686f1edcf70929603738d5d2302  bfd/elf32-m32c.c
 8f7b5397a7bb5d502a9997e19d244cea  bfd/ChangeLog-2014
-d56a014832c6ff7ff68a3ca34ac71dd1  bfd/elflink.c
+f10e052223369ebe0e9d1574db41752a  bfd/elflink.c
 2cdeb7afabf688efbc9ff6bce9baf055  bfd/elf32-iq2000.c
 d33b4e9b597e25668a8cfd80acf88d36  bfd/aout0.c
 9fd7bb9c147690eb727439c7efb0464c  bfd/elf-hppa.h
@@ -431,7 +431,7 @@ fd30f5988bcb1ac96b9cce47b1ab5469  bfd/el
 7b89e415f08d597d888efc2c3dded43c  bfd/elfxx-ia64.h
 5d6400b5358d7e0ac9d4a67eb20c20aa  bfd/elf32-or1k.c
 cf1a0b18fa9480d842f34e55bb2749f4  bfd/targets.c
-2d7f30c5ba479622e6d52e2be8c45901  bfd/ChangeLog
+21c0b530618459bd763ed462fa2fc318  bfd/ChangeLog
 f8ab1d36a2214606a4c8b223824d7e67  bfd/section.c
 03a3e8bbf7ffcbbed93d51fd38587804  bfd/elf-s390-common.c
 3b45f6190ac856f0e04c77018c6bc28b  bfd/elf32-lm32.c
@@ -922,7 +922,7 @@ c5e2f2b4c2a50b902dc183726c47320b  gdb/va
 a1d4a9f9cc0889b776920167d21ade7b  gdb/sparc64nbsd-tdep.c
 c074b817bcafa21628660800eef8348f  gdb/c-typeprint.c
 dd44cebeac33294f04a8cfbc55a589c3  gdb/xtensa-tdep.c
-f4540c3ee95728f9a9686246be715ea6  gdb/top.c
+7e95e312421f1eee6a0518d7285592c1  gdb/top.c
 001635cdda1a55a603854c760ae55c48  gdb/python/py-cmd.c
 afb00927983ce834b553cd4b764514bc  gdb/python/py-infthread.c
 f40fa46aee5e124221ecc85c11c0e625  gdb/python/py-continueevent.c
@@ -1126,7 +1126,7 @@ cee0d35ecab391686a75de1f03a3a474  gdb/so
 988fc7c511dbc6afdbb950743e69f090  gdb/minsyms.c
 f3ff4ebb96f423721dfa8c47a310fe1f  gdb/i386-darwin-tdep.c
 7b8a5048cfb6f899a8199897f0864c8f  gdb/ChangeLog-2005
-77c25b703b0a1cb1d968ff8e6c797102  gdb/event-top.c
+9b585bacddc38d52168b69a1267d2756  gdb/event-top.c
 f56dccd6c1e3cdff7a9f0c6798cbada7  gdb/inf-ttrace.h
 986fbf2a341b6e1acfe0922b9ca014f8  gdb/mem-break.c
 380331ec2eb36a0ac59045f90310e589  gdb/charset.c
@@ -1192,7 +1192,7 @@ f571180ebe3426e9508ee431a3de6faf  gdb/ta
 da0949217a3c7d31f623a9517920cf5a  gdb/i386-sol2-tdep.c
 0167ccd7bd73859358b714a105e106dc  gdb/frame.h
 f1e70b7629a655908002488f39cfc407  gdb/spu-tdep.h
-c969d93365799fa58f12051abc9686cf  gdb/darwin-nat.c
+6dfcf5b88f7ebd2e3766cf24cdf80604  gdb/darwin-nat.c
 3f1859508cbb0c96c2a3f34e91abd372  gdb/symfile-debug.c
 3876b403848cdb175382b0651a80028b  gdb/stack.c
 84cc919f7d894be243cedc55e21ec96d  gdb/ser-tcp.c
@@ -1895,7 +1895,7 @@ a0a99850b216ffab1ee61e5668ab8d2a  gdb/te
 3da274b968ba93b400c459ac5293cf21  gdb/testsuite/gdb.python/py-sync-interp.c
 e17fce4d29be532be40531218764f3cb  gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
 4d95180b9972ce262b64df385e15f18f  gdb/testsuite/gdb.python/py-objfile.c
-1223d7b1cd148485ddd137e3ea7ddbb1  gdb/testsuite/gdb.python/py-frame.exp
+5c87523cf98b1ec48e8bdf3761f2b51f  gdb/testsuite/gdb.python/py-frame.exp
 ef99dbad1232f21dfd9a5bcf5b7bc8ca  gdb/testsuite/gdb.python/py-framefilter.py
 86e246acca8993959033f2e7b993e3cf  gdb/testsuite/gdb.python/py-value-cc.exp
 720d52d5a11f807ddf3fd17ff0407049  gdb/testsuite/gdb.python/py-section-script.exp
@@ -1925,7 +1925,7 @@ eef0f7a02e7d23d2f28ad5df04a3a496  gdb/te
 8367467101801b6e118a3af528601691  gdb/testsuite/gdb.python/py-events.py
 425335bc085dce42b810a1b99336a996  gdb/testsuite/gdb.python/py-frame-args.c
 0408fed72b1aeddb53112fe4054b2b68  gdb/testsuite/gdb.python/py-events-shlib.c
-708bcfa24f8ff78c7c01acd4bd8372db  gdb/testsuite/gdb.python/py-prompt.exp
+b3d2bcc6363456b4080cbfeb213041f7  gdb/testsuite/gdb.python/py-prompt.exp
 2db47e6d29838ffc8b96dabce27fef00  gdb/testsuite/gdb.python/source1
 cee52a94f909d092154f9fcaa9fcb764  gdb/testsuite/gdb.python/py-linetable.c
 7dde992c265a9bf984ef08f06c3b0f11  gdb/testsuite/gdb.python/py-finish-breakpoint2.py
@@ -3650,7 +3650,7 @@ b047847a5183b4462b5b135cfd964543  gdb/te
 4127afeb79b2a2bff6c65f128ebd5969  gdb/testsuite/gdb.go/integers.exp
 ea5ff936bcbd68cbc91cb8771230db91  gdb/testsuite/gdb.go/strings.go
 81b7ed6cb92c627d245bd2efc4b953b9  gdb/testsuite/gdb.go/methods.go
-a5c5df2bc18e6389eb6e176443a3a89a  gdb/testsuite/ChangeLog
+b20c2e14c6175e06ec4c732455813f3d  gdb/testsuite/ChangeLog
 b3f11b21e5921c419a43f93720dedf85  gdb/testsuite/gdb.asm/empty.inc
 37858e142701cb0c2b792e4f739ee3eb  gdb/testsuite/gdb.asm/asm-source.exp
 f1621bbbb2acbec5adef86d7d9549975  gdb/testsuite/gdb.asm/bfin.inc
@@ -4287,43 +4287,43 @@ f5615bbb876f5d6b8ff495ea635f223d  gdb/f-
 e88f32d160934e36fa7d803d483a1e2e  gdb/gdb_curses.h
 1bbdb3e7ea9ca53f9a8cf1a548dca9f5  gdb/jv-valprint.c
 8108dd8f906f2654fecc74958cf383db  gdb/doc/psrc.sed
-e6abbcb35a7a89cb1ec4cc70aad90e67  gdb/doc/gdb.info-3
-03afb9c7e1590de874310e334d133c69  gdb/doc/gdb.info-4
+a480c50c44c2cc81142e0976526f6940  gdb/doc/gdb.info-3
+680d1ca748484f22033f926e3b7d7d9f  gdb/doc/gdb.info-4
 ab0fe311032294b952da80585b8b90e7  gdb/doc/fdl.texi
 be5469929c58735017a3a1e083554ac7  gdb/doc/Makefile.in
-4c3807212801004b637632b8df34bdc5  gdb/doc/gdb.info-7
+727c1c908469386df7fb91ae3530e061  gdb/doc/gdb.info-7
 65ee16c0a68d8954d5892092576beb66  gdb/doc/observer.texi
-b4f310538ed30bec54780ed63b5ec4ec  gdb/doc/gdbserver.1
+ced35586cc284351bea5ec64e8a85354  gdb/doc/gdbserver.1
 669fb3191fafb1ca7da855243682fe4e  gdb/doc/guile.texi
 f81a0e00e0cb9e41b078069fb9bedb07  gdb/doc/stack_frame.txt
 ab34a4a36fd27cddd3c7838273cfb1dd  gdb/doc/stabs.info
-3ed20803f099a6ca99820d938225217a  gdb/doc/gdb.info-5
-7136e0d0a661ddb27ec1cd7d6204188e  gdb/doc/gdb.info-8
+9a625d7b1d51232b2e8de0cb88bcf4b3  gdb/doc/gdb.info-5
+90751331216f6ee30435306539c9e1b2  gdb/doc/gdb.info-8
 4fb6b0bb12bb47f2079a5e38f7dcdcf7  gdb/doc/agentexpr.texi
-36b8f4927a14f25326c3f84542da7c74  gdb/doc/gdb.info-1
+90f34be1fec6d1f01c1ff86e5695c2a7  gdb/doc/gdb.info-1
 d5d06eaf9b4d44aa442a4a281aa9aea4  gdb/doc/a4rc.sed
-aa22222e0e67c0c54047422b4d9e91d9  gdb/doc/gdb.info-6
+82a7279e275bed294814e12b46c0f0c3  gdb/doc/gdb.info-6
 617ff61537614374081e71cf136ed6ee  gdb/doc/gdb.texinfo
 553b7fe1bf4b5d8b96fdb8cd83503de1  gdb/doc/stack_frame.svg
 04c82b1da7e894a6555868e4f86225af  gdb/doc/filter-for-doxygen
 938187ce9976cbeb134b49335770152c  gdb/doc/Doxyfile-gdb-api.in
 f828e05ce4faab3d297f32d540f77c99  gdb/doc/annotate.info
-124a26342f162c86c91e6459a94166b8  gdb/doc/gdb.info-2
+a1f9f8115434c870bb00d46815fd4775  gdb/doc/gdb.info-2
 df443225fa3e5719ca7e6925a7e633e0  gdb/doc/refcard.tex
 6076d300a46651562d4ecd0604442414  gdb/doc/stack_frame.png
-196db831e1ff1656e1891d1791bc5052  gdb/doc/gdb.info
+6817d2c528ad269719ac89edb0bf565d  gdb/doc/gdb.info
 51f928aef51288aa002575df7e06ff0d  gdb/doc/python.texi
 fa1abec9272120122bf7638320e90d4c  gdb/doc/stabs.texinfo
 79b3164c0be1f0b42183bf1d8a5a8591  gdb/doc/ChangeLog
-7b71cd9d4aa8d8db0f9c50a37489b830  gdb/doc/gdb.1
-3a853ebb9d2e249bee95eee9d5230271  gdb/doc/gcore.1
+c36fb81f63d7f67f564bb453a531454f  gdb/doc/gdb.1
+25943aa0e690188292c10c7c75af3b83  gdb/doc/gcore.1
 d39233c86ed6a6dc9e853ae6a11fe03e  gdb/doc/stack_frame.pdf
 2daa53916456ce35b6806c2883623b89  gdb/doc/Doxyfile-base.in
 7e8f20fd3b739803f4bd3991d35a4a1f  gdb/doc/all-cfg.texi
 bf96494e6e4d346175babd5ef9781882  gdb/doc/gpl.texi
 cd5e3faa9bd1b684a73c7d527cdb4988  gdb/doc/filter-params.pl
 7bfdb0765c5d050d204fbb30aeeba0d8  gdb/doc/stack_frame.eps
-a4271e0704aac7bdb17e215c402ea9d7  gdb/doc/gdbinit.5
+4426caf74a587fdf1961caa2ec0608b2  gdb/doc/gdbinit.5
 d606e873666ae0bc7bc7c84d6c9c2332  gdb/doc/Doxyfile-gdb-xref.in
 705bf0b3fb65b3f7e3db4cc5d9ae8eba  gdb/doc/annotate.texinfo
 79278fc2f5486809779a9a8f8883d401  gdb/doc/doxy-index.in
@@ -4785,7 +4785,7 @@ e5c081bec329720b4c0d37fb1bf8adae  gdb/p-
 f1679b5d9950d66febb8259748700963  gdb/std-regs.c
 9da9e540b1c6970695a3161272737803  gdb/go-lang.h
 23e51b25e50614cfba06a52e405e2243  gdb/i386-windows-nat.c
-3736d239154520b747c4e712e72ce29b  gdb/po/gdb.pot
+fd49e51c1a26c8c3fbfd204109b1e0a8  gdb/po/gdb.pot
 1851bff0653201a488dcae18dde7efad  gdb/po/gdbtext
 8a1de3f60e39741f918cc93c69d9fe76  gdb/ada-lang.c
 5e0c6b053fd9575dde3084e69835d9c3  gdb/dcache.h
@@ -4811,7 +4811,7 @@ b21eb0affa9c0fa159d8dc3a1483410e  gdb/jv
 32bb803ab1e68860f1402dbe7e2cb0f5  gdb/nbsd-nat.h
 83df4734061e07b644f77632819578cf  gdb/mipsread.c
 f5c872d4805a7ac039b4dfc840f4bb8a  gdb/amd64-darwin-tdep.c
-274dbd87d7a33a626e6270fd39126d6f  gdb/ChangeLog
+8d8194e25677fc2639e89d5aabb4f85c  gdb/ChangeLog
 5a1dbe4837b41ee2b9cc7a35e0d20a61  gdb/go-typeprint.c
 c6de4736a691dfc690f55e7b69880511  gdb/score-tdep.c
 5a44fd4377f0804008a3697e72efbfe3  gdb/xml-support.h
@@ -5147,7 +5147,7 @@ ca9158e7ede27a090a3228b2965721fb  gdb/gl
 4e561c5317f6ed3cc9cfc53293100794  gdb/linux-nat.c
 232fae6c14bb330d684a735fbd258bdf  gdb/ppcfbsd-tdep.c
 72c2a6c8c1d784dedb9da73e84229cab  gdb/sh-tdep.h
-fdff848ebe9cb9a3a06617699a60e22f  gdb/top.h
+be04f4bf35ddca6beee6d0ad2b02bb72  gdb/top.h
 4cf92f060caa4b507788fd93345f5036  gdb/xml-syscall.h
 b6d84aeab0e43717df6dd2cd1ac6dd59  gdb/xtensa-linux-nat.c
 1f6b545be0b6822eca215d0b5f1edfc2  gdb/exc_request.defs
