Cast to uintptr_t when calling ptrace32 on aix

When I verify my changes to target.h doesn't break build on aix, I get
the following build error on a clean GDB checkout.

../../binutils-gdb/gdb/aix-thread.c: In function 'pdc_read_regs':
../../binutils-gdb/gdb/aix-thread.c:366:4: error: passing argument 3 of 'ptrace32' makes integer from pointer without a cast [-Werror]
    if (!ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL))
    ^
../../binutils-gdb/gdb/aix-thread.c:263:1: note: expected 'long long int' but argument is of type 'uint32_t *'
 ptrace32 (int req, int id, addr_ptr addr, int data, int *buf)
 ^

../../binutils-gdb/gdb/aix-thread.c:375:42: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       if (!ptrace32 (PTT_READ_FPRS, tid, (addr_ptr) fprs, 0, NULL))
                                          ^

../../binutils-gdb/gdb/aix-thread.c:392:39: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    if (!ptrace32 (PTT_READ_SPRS, tid, (addr_ptr) &sprs32, 0, NULL))

GCC uses -maix32 in default, so the 'long long' is 64 bit and address
is 32 bit.  Such warnings should go away if -maix64 is used.

In this patch, I cast the parameter to uintptr_t first, and then cast
to addr_ptr.

gdb:

2014-01-07  Yao Qi  <yao@codesourcery.com>
	    Joel Brobecker  <brobecker@adacore.com>

	* aix-thread.c (pdc_read_regs): Cast parameter to uintptr_t.
	(pdc_write_regs): Likewise.
	(fetch_regs_kernel_thread): Likewise.
	(store_regs_kernel_thread): Likewise.
[AArch64] Add GAS recognition for "xgene-1"

* config/tc-aarch64.c (aarch64_cpus): Add entry for "xgene-1"

This adds support for the AppliedMicro X-Gene 1 processor to the
assembler.
Fix missing-prototypes error for '_initialize_spu_nat'

This patch fixes this build error below:

../../binutils-gdb/gdb/spu-linux-nat.c:616:1: error: no previous prototype for ‘_initialize_spu_nat’ [-Werror=missing-prototypes]

gdb:

2014-01-07  Yao Qi  <yao@codesourcery.com>

	* spu-linux-nat.c (_initialize_spu_nat): Declare.
Remove duplicated #include's from GDB

This patch simply removes duplicated #include statements in the gdb/
directory.  If there are two duplicated #include statements, this patch
keeps the first #include and removes the second.

Those duplicates have been found by using the checkincludes.pl tool from
the Linux kernel and double checked manually once again if the #include
statements are affected by #ifdef macros.

2014-01-06  Honggyu Kim  <hong.gyu.kim@lge.com>

	* ada-lang.c: Remove duplicated include statements.
	* alphabsd-nat.c: Ditto.
	* amd64-darwin-tdep.c: Ditto.
	* amd64fbsd-nat.c: Ditto.
	* auto-load.c: Ditto.
	* ax-gdb.c: Ditto.
	* breakpoint.c: Ditto.
	* dbxread.c: Ditto.
	* fork-child.c: Ditto.
	* gdb_usleep.c: Ditto.
	* i386-darwin-tdep.c: Ditto.
	* i386fbsd-nat.c: Ditto.
	* infcmd.c: Ditto.
	* inferior.c: Ditto.
	* jv-lang.c: Ditto.
	* linux-nat.c: Ditto.
	* linux-tdep.c: Ditto.
	* m68kbsd-nat.c: Ditto.
	* m68klinux-nat.c: Ditto.
	* microblaze-tdep.c: Ditto.
	* mips-linux-tdep.c: Ditto.
	* mn10300-tdep.c: Ditto.
	* nto-tdep.c: Ditto.
	* opencl-lang.c: Ditto.
	* osdata.c: Ditto.
	* printcmd.c: Ditto.
	* regcache.c: Ditto.
	* remote-m32r-sdi.c: Ditto.
	* remote.c: Ditto.
	* symfile.c: Ditto.
	* symtab.c: Ditto.
	* tilegx-linux-nat.c: Ditto.
	* tilegx-tdep.c: Ditto.
	* tracepoint.c: Ditto.
	* valops.c: Ditto.
	* vaxbsd-nat.c: Ditto.
	* windows-nat.c: Ditto.
	* xtensa-tdep.c: Ditto.
remove ANSI_PROTOTYPES

This removes the last use of ANSI_PROTOTYPES in the tree.
It appears in gas.

I didn't even rebuild this but I think it is obviously correct.

2014-01-07  Tom Tromey  <tromey@redhat.com>

	* config/tc-xc16x.h: Don't use ANSI_PROTOTYPES.
remove uses of PARAMS from binutils

This removes the last uses of PARAMS from binutils.

The two changes in binutils were tested by rebuilding.
I didn't rebuild the gas change but I think it is obviously correct.

2014-01-07  Tom Tromey  <tromey@redhat.com>

	* coffgrok.h (coff_ofile): Don't use PARAMS.
	* nlmheader.y (strerror): Don't use PARAMS.

2014-01-07  Tom Tromey  <tromey@redhat.com>

	* config/tc-microblaze.h (parse_cons_expression_microblaze): Don't
	use PARAMS.
remove VA_* from binutils

This removes the last uses of the obsolete VA_* macros from binutils.

All the binutils and bfd changes were tested by rebuilding.
I didn't rebuild the gas change but I think it is obviously correct.

2014-01-07  Tom Tromey  <tromey@redhat.com>

	* elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
	wrappers.

2014-01-07  Tom Tromey  <tromey@redhat.com>

	* bucomm.c (fatal, non_fatal): Replace obsolete VA_* macros with
	stdarg macros.
	* dlltool.c (inform): Replace obsolete VA_* macros with stdarg
	macros.
	* dllwrap.c (inform, warn): Replace obsolete VA_* macros with
	stdarg macros.

2014-01-07  Tom Tromey  <tromey@redhat.com>

	* config/tc-tic30.c (debug): Avoid old VA_* compatibility
	wrappers.
remove PARAMS from include/cgen

This removes the remaining uses of PARAMS from include/cgen.
Tested by rebuilding; a file in opcodes includes this header.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* bitset.h: Remove uses of PARAMS.
remove PARAMS from sim

This removes the last uses of PARAMS from sim.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* README-HACKING: Don't use PARAMS.
	* arm/wrapper.c: Don't use PARAMS.
	* bfin/sim-main.h: Don't use PARAMS.
	* common/callback.c: Don't use PARAMS.
	* common/cgen-trace.c: Don't use PARAMS.
	* common/run-sim.h: Don't use PARAMS.
	* common/run.c: Don't use PARAMS.
	* common/sim-base.h: Don't use PARAMS.
	* common/sim-load.c: Don't use PARAMS.
	* common/sim-options.h: Don't use PARAMS.
	* common/sim-trace.c: Don't use PARAMS.
	* common/sim-trace.h: Don't use PARAMS.
	* common/sim-utils.h: Don't use PARAMS.
	* cr16/cr16_sim.h: Don't use PARAMS.
	* cr16/gencode.c: Don't use PARAMS.
	* cr16/interp.c: Don't use PARAMS.
	* cr16/simops.c: Don't use PARAMS.
	* d10v/d10v_sim.h: Don't use PARAMS.
	* d10v/gencode.c: Don't use PARAMS.
	* d10v/interp.c: Don't use PARAMS.
	* d10v/simops.c: Don't use PARAMS.
	* erc32/erc32.c: Don't use PARAMS.
	* erc32/exec.c: Don't use PARAMS.
	* erc32/float.c: Don't use PARAMS.
	* erc32/func.c: Don't use PARAMS.
	* erc32/sis.c: Don't use PARAMS.
	* erc32/sis.h: Don't use PARAMS.
	* mips/interp.c: Don't use PARAMS.
	* mips/sim-main.h: Don't use PARAMS.
	* sh/interp.c: Don't use PARAMS.
	* v850/sim-main.h: Don't use PARAMS.
	* v850/v850_sim.h: Don't use PARAMS.
remove VA_* macros from sim

Remove the obsolete VA_* macros from sim.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* common/cgen-trace.c: Don't use old VA_* macros.
	* common/sim-load.c (xprintf): Likewise.
	* common/sim-trace.c (trace_printf, debug_printf): Likewise.
Fix dir command for duplicated paths and add a new testcase.

gdb/ChangeLog:
2014-01-07  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

	* source.c (add_path): Fix check for duplicated paths in the previously
	included paths.

gdb/testsuite/ChangeLog:
2014-01-07  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.base/source-dir.exp: New file.
Use correct default for target functions that return pointer

	* target.c (return_null): Define.
	(update_current_target): Use it instead of return_zero for
	functions that return a pointer.
AARCH64: Change cpsr type to be 64bit.

2013-12-18  Andrew Pinski  <apinski@cavium.com>

	* features/aarch64-core.xml (cpsr): Change to be 64bit.
	* features/aarch64.c: Regenerate.
daily update
	Fix PR16201.
	* coff-pe-read.c (struct read_pe_section_data): Add index field.
	(add_pe_exported_sym): Use SECTION_DATA->INDEX for call
	to prim_record_mininal_symbol_and_info.
	(add_pe_forwarded_sym): Use known section number of forwarded symbol
	in call to prim_record_minimal_symbol_and_info.
	(read_pe_exported_syms): Set index field of section_data.
Pass name to symbol_file_add_from_bfd

This patch fixes the following build error:

../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: passing argument 2 of ‘symbol_file_add_from_bfd’ makes pointer from integer without a cast [-Werror]
In file included from ../../binutils-gdb/gdb/spu-linux-nat.c:29:0:
../../binutils-gdb/gdb/symfile.h:444:24: note: expected ‘const char *’ but argument is of type ‘int’
../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: passing argument 3 of ‘symbol_file_add_from_bfd’ makes integer from pointer without a cast [-Werror]
In file included from ../../binutils-gdb/gdb/spu-linux-nat.c:29:0:
../../binutils-gdb/gdb/symfile.h:444:24: note: expected ‘int’ but argument is of type ‘void *’
../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: passing argument 5 of ‘symbol_file_add_from_bfd’ makes integer from pointer without a cast [-Werror]
In file included from ../../binutils-gdb/gdb/spu-linux-nat.c:29:0:
../../binutils-gdb/gdb/symfile.h:444:24: note: expected ‘int’ but argument is of type ‘void *’
../../binutils-gdb/gdb/spu-linux-nat.c:383:5: error: too few arguments to function ‘symbol_file_add_from_bfd’

Argument 'name' was added to function symbol_file_add_from_bfd by this patch

  [patchv4 4/5] Keep objfile original filename
  https://sourceware.org/ml/gdb-patches/2013-09/msg00683.html

but caller of symbol_file_add_from_bfd in spu-linux-nat.c wasn't updated.

This patch fixes the build error.

gdb:

2014-01-08  Yao Qi  <yao@codesourcery.com>

	* spu-linux-nat.c (spu_symbol_file_add_from_memory): Pass
	return value of bfd_get_filename to symbol_file_add_from_bfd.
Fix pointer assignment with different signedness

This patch fixes these errors below:

../../binutils-gdb/gdb/spu-linux-nat.c: In function ‘spu_symbol_file_add_from_memory’:
../../binutils-gdb/gdb/spu-linux-nat.c:368:3: error: pointer targets in passing argument 2 of ‘spu_proc_xfer_spu’ differ in signedness [-Werror=pointer-sign]
../../binutils-gdb/gdb/spu-linux-nat.c:232:1: note: expected ‘gdb_byte *’ but argument is of type ‘char *’
../../binutils-gdb/gdb/spu-linux-nat.c: In function ‘spu_xfer_partial’:
../../binutils-gdb/gdb/spu-linux-nat.c:598:7: error: pointer targets in passing argument 1 of ‘strtoulst’ differ in signedness [-Werror=pointer-sign]
In file included from ../../binutils-gdb/gdb/defs.h:769:0,
                 from ../../binutils-gdb/gdb/spu-linux-nat.c:21:
../../binutils-gdb/gdb/utils.h:43:15: note: expected ‘const char *’ but argument is of type ‘gdb_byte *’

gdb:

2014-01-08  Yao Qi  <yao@codesourcery.com>

	* spu-linux-nat.c (spu_symbol_file_add_from_memory): Change
	type of 'id' to gdb_byte.  Cast 'id' to 'const char *'.
	(spu_xfer_partial): Cast 'buf' to 'const char *'.
Add missing ChangeLog entries.
Bump version to 7.7.50.DATE-cvs.

Now that the GDB 7.7 branch has been created, we can
bump the version number.

gdb/ChangeLog:

	GDB 7.7 branch created (79301218fa0f074c5656db0ec8972a5ddcf91fb5):
	* version.in: Bump version to 7.7.50.DATE-cvs.
Update NEWS post GDB 7.7 branch creation.

gdb/ChangeLog:

	* NEWS: Create a new section for the next release branch.
	Rename the section of the current branch, now that it has
	been cut.