2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
	    Andrew Jenner  <andrew@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	Based on the nios2-elf port from Altera Corporation.

	gdb/
	* Makefile.in (ALL_TARGET_OBS): Add nios2-tdep.o and
	nios2-linux-tdep.o.
	(HFILES_NO_SRCDIR): Add nios2-tdep.h.
	(ALLDEPFILES): Add nios2-tdep.c and nios2-linux-tdep.c.
	* configure.tgt: Add nios2*-*-linux* and nios2*-*-* targets.
	* nios2-tdep.h: New.
	* nios2-tdep.c: New.
	* nios2-linux-tdep.c: New.
	* features/Makefile (WHICH): Add nios2-linux.
	(nios2-linux-expedite): Set.
	* features/nios2-cpu.xml: New.
	* features/nios2.xml: New.
	* features/nios2-linux.xml: New.
	* features/nios2.c: New (autogenerated).
	* features/nios2-linux.c: New (autogenerated).
	* regformats/nios2-linux.dat: New (autogenerated).
	* NEWS (Changes since GDB 7.6): Add new Nios II targets
	and commands.

	gdb/doc/
	* gdb.texinfo (Nios II): New section.
	(Nios II Features): New section.
2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
	    Andrew Jenner  <andrew@codesourcery.com>

	gdb/gdbserver/
	* Makefile.in (SFILES): Add linux-nios2-low.c.
	(clean): Add action to delete nios2-linux.c.
	(nios2-linux.c): New rule.
	* configure.srv: Add nios2*-*-linux*.
	* linux-nios2-low.c: New.
2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* gdb.xml/tdesc-regs.exp: Add case for nios2.
gdb/
	* gcore.c (gcore_create_callback): Ignore sections with
	separate_debug_objfile_backlink != NULL.
	gdb/
	* ppc-linux-nat.c (ppc_linux_new_thread): Clear the new thread's
	debug state prior to replicating existing hardware watchpoints or
	breakpoints.

	gdb/testsuite/
	* gdb.threads/wp-replication.c: New file.
	* gdb.threads/wp-replication.exp: New file.
gdb/
	* solib-dsbt.c (enable_break): Declare.
	(dsbt_current_sos): Remove call to enable_break2.
	(enable_break2): Rename to enable_break.  Set solib breakpoint
	on '_dl_debug_state'.
	(enable_break): Remove.
gdb/
	* solib-dsbt.c (struct dsbt_info) <enable_break2_done>: Remove.
	(get_dsbt_info, enable_break, dsbt_clear_solib): Update.
Rename TARGET_OBJECT_AIX_LIBRARIES to TARGET_OBJECT_LIBRARIES_AIX

More consistent with the name of other similar object names.

gdb/ChangeLog:

	* target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]:
	Renames TARGET_OBJECT_AIX_LIBRARIES.
	* rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with
	TARGET_OBJECT_LIBRARIES_AIX throughout.
	* solib-aix.c: Likwise.
AIX: Change XML to use library-list-aix instead of library-list.

This is more consistent with what we do with other similar XML lists,
and avoids a potential confusion with the library-list XML list.

gdb/ChangeLog:

        * features/library-list-aix.dtd: Replace library-list by
        library-list-aix.
        * rs6000-nat.c: Replace library-list by library-list-aix
        throughout.
        * solib-aix.c: Likewise.
rs6000-nat.c:rs6000_core_ldinfo: Remove \n at end of error message.

gdb/ChangeLog:

        * rs6000-nat.c (rs6000_core_ldinfo): Remove '\n' at end of
        error message (ARI fix).
Add missing ChangeLog entries...

... for the following commits:

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * rs6000-nat.c (rs6000_core_ldinfo): Remove '\n' at end of
       error message (ARI fix).

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * features/library-list-aix.dtd: Replace library-list by
       library-list-aix.
       * rs6000-nat.c: Replace library-list by library-list-aix
       throughout.
       * solib-aix.c: Likewise.

2013-05-07  Joel Brobecker  <brobecker@adacore.com>

       * target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]:
       Renames TARGET_OBJECT_AIX_LIBRARIES.
       * rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with
       TARGET_OBJECT_LIBRARIES_AIX throughout.
       * solib-aix.c: Likwise.

There were added, but accidently not checked in.
	* contrib/ari/gdb_ari.sh (SOLIB_ADD, SOLIB_CREATE_INFERIOR_HOOK)
	(PC_SOLIB): Change type from ari_deprecate to ari_regression.
	* nios2-tdep.c (nios2_dwarf_reg_to_regnum): ARI fix: remove
	trailing new line from warning message.
	* common/linux-btrace.c: ARI fix: Include "gdb_wait.h"
	instead of <sys/wait.h>.
bfd/elf-ifunc.c: Remove unused function _bfd_elf_create_ifunc_dyn_reloc.

bfd/ChangeLog:

2013-05-07  Will Newton  <will.newton@linaro.org>

        * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
	function.
	* elf-bfd.h: Likewise.
bfd/elf-ifunc.c: Add header size arg to _bfd_elf_allocate_ifunc_dyn_relocs.

bfd/ChangeLog:

2013-05-07  Will Newton  <will.newton@linaro.org>

	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
	plt_header_size argument for ports where it differs from
	plt_entry_size.
	* elf-bfd.h: Likewise.
	* elf32-i386.c: Pass plt_header_size to
	_bfd_elf_allocate_ifunc_dyn_relocs.
	* elf64-x86-64.c: Likewise.
gdb/
2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/15413:
	* breakpoint.c (condition_completer): Simplify the code to
	disconsider multiple locations of breakpoints when completing the
	"condition" command.

gdb/testsuite/
2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR breakpoints/15413:
	* gdb.base/pending.exp: Add test for completion of the "condition"
	command for pending breakpoints.
	* gdb.linespec/linespec.ex: Add test for completion of the
	"condition" command when dealing with multiple locations.
Merge gdb.arch/system-gcore.exp into gdb.base/gcore.exp

The test case gdb.arch/system-gcore.exp is almost an identical copy of
gdb.base/gcore.exp.  The only functional change is the additional
comparison of the "info reg system" command output.

It should be safe to perform this comparison on all architectures.
Thus the patch removes the arch-specific version and adds "info reg
system" to the common gcore test case instead.

Tested on i686-linux and s390x-linux.

gdb/testsuite/Changelog:
2013-05-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>

	* gdb.arch/system-gcore.exp: Remove.
	* gdb.arch/gcore.c: Remove.
	* gdb.base/gcore.exp: Add "info reg system".
	* lib/selftest-support.exp: New file.
	* gdb.gdb/complaints.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	* gdb.gdb/observer.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	(test_observer): Don't call setup_test.  Remove argument.
	* gdb.gdb/selftest.exp: Load selftest-support.exp.
	(find_gdb): Remove.
	* gdb.gdb/complaints.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	(test_with_self): Don't call setup_test.  Remove argument.

2013-05-07  Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libc/stdlib/__atexit.c (__atexit_lock): Declare.
        * libc/stdlib/__call_atexit.c (__atexit_lock): Define.