Replace ARG_MAX with ARG_LAST

We define an enum ARG_MAX in linux_infcall_mmap, but it is conflict
with macro ARG_MAX which is defined in /usr/include/linux/limits.h.
This causes a build failure below,

 gdb/linux-tdep.c: In function 'linux_infcall_mmap':
 gdb/linux-tdep.c:1945:70: error: expected identifier before numeric constant

the enum in the pre-processed source becomes:

  enum
    {
      ARG_ADDR, ARG_LENGTH, ARG_PROT, ARG_FLAGS, ARG_FD, ARG_OFFSET, 131072
    };

This patch is to replace ARG_MAX with ARG_LAST.

gdb:

2014-12-16  Yao Qi  <yao@codesourcery.com>

	* linux-tdep.c (linux_infcall_mmap): Replace ARG_MAX with
	ARG_LAST.
Move NEWS entries to the right section

gdb:

2014-12-16  Yao Qi  <yao@codesourcery.com>

	* NEWS: Move some entries to "Changes since GDB 7.8" section.
aarch64/gdbserver: fix floating point registers display

When using aarch64 gdb with gdbserver, floating point registers are
not correctly displayed, as below:
  (gdb) info registers fpsr fpcr
  fpsr           <unavailable>
  fpcr           <unavailable>

To fix these problems, the missing fpsr and fpcr registers are added
when floating point registers are read/write
Add test for aarch64 floating point
PR server/17457

gdb/gdbserver/

    PR server/17457
    * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
    (AARCH64_FPCR_REGNO): Likewise.
    (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
    (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
    (aarch64_store_fpregset): Likewise.

gdb/testsuite/

    PR server/17457
    * gdb.arch/aarch64-fp.c: New file.
    * gdb.arch/aarch64-fp.exp: New file.

Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
[Linux] Ask kernel to kill inferior when GDB terminates

This patch enhances GDB on GNU/Linux systems in the situation where
we are debugging an inferior that was created from GDB (as opposed
to attached to), by asking the kernel to kill the inferior if GDB
terminates without doing it itself.

This would typically happen when GDB encounters a problem and
crashes, or when it gets killed by an external process. This can
be observed by starting a program under GDB, and then killing
GDB with signal 9. After GDB is killed, the inferior still remains.

This patch also fixes GDBserver similarly.

This fix is conditional on the kernel supporting the PTRACE_O_EXITKILL
feature.  On older kernels, the behavior remains unchanged.

gdb/ChangeLog:

        * nat/linux-ptrace.h (PTRACE_O_EXITKILL): Define if not
        already defined.
        (linux_enable_event_reporting): Add parameter "attached".
        * nat/linux-ptrace.c (linux_test_for_exitkill): New forward
        declaration.  New function.
        (linux_check_ptrace_features): Add linux_test_for_exitkill call.
        (linux_enable_event_reporting): Add new parameter "attached".
        Do not call ptrace with the PTRACE_O_EXITKILL if ATTACHED is
        nonzero.
        * linux-nat.c (linux_init_ptrace): Add parameter "attached".
        Use it.  Update function description.
        (linux_child_post_attach, linux_child_post_startup_inferior):
        Update call to linux_enable_event_reporting.

gdb/gdbserver/ChangeLog:

        * linux-low.c (linux_low_filter_event): Update call to
        linux_enable_event_reporting following the addition of
        a new parameter to that function.

Tested on x86_64-linux, native and native-gdbserver.

I also verified by hand that the inferior gets killed when killing
GDB in the "run" case, while the inferior remains in the "attach"
case. Same for GDBserver.
Fix a memory access violation triggeed by a fuzzed binary.

	PR binutils/17512
	* format.c (bfd_check_format_matches): Check for a matching vector
	before using match priorities.
	* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Fix off-by-one
	errors with previous delta.
Fix indentation of "maint print user-registers"

This fixes a failure of the test case "complete 'info registers '" in
completion.exp on architectures where the user registers have numbers
above 99.  In that case the output of "maint print user-registers" was
no longer indented, and the regexp in the test case failed to add them
to the list of expected completion results.  The fix also swaps the
columns "Name" and "Nr", such that the indentation is always the same,
and to be consistent with the output of "maint print registers".

gdb/ChangeLog:

	* user-regs.c (maintenance_print_user_registers): Swap "Nr" and
	"Name" columns.  Assure that the output is always indented.

gdb/testsuite/ChangeLog:

	* gdb.base/completion.exp: Adjust to format changes of "maint
	print user-registers".
Add in a JALRC alias and fix the NAL instruction.

opcodes/

	* mips-opc.c (mips_builtin_opcodes): Add JALRC alias for JIALC.
	Remove the operand from NAL.

gas/testsuite/

	* gas/mips/r6.s: Test JALRC and NAL
	* gas/mips/r6-n32.d: Add expected output for JALRC and NAL.
	* gas/mips/r6-n64.d: Likewise.
	* gas/mips/r6.d: Likewise.
Fix octeon3 testsuite fallout

gas/testsuite/

	* gas/mips/attr-gnu-4-5.d: Ignore ASEs.
	* gas/mips/attr-gnu-4-6.d: Likewise.
	* gas/mips/attr-gnu-4-7.d: Likewise.
	* gas/mips/attr-none-o32-fp64-nooddspreg.d: Likewise.
	* gas/mips/attr-none-o32-fp64.d: Likewise.
	* gas/mips/attr-none-o32-fpxx.d: Likewise.
Fix internal error in gold when -Map and --compress-debug-sections are used
together.

gold/
	* mapfile.cc (Mapfile::print_input_section): Print uncompressed sizes.
	(Mapfile::print_output_data): Use current_data_size() to avoid
	assert for sections requiring postprocessing; if address is not valid,
	print 0.
	(Mapfile::print_output_section): Use current_data_size(); print note
	that addresses and sizes are before compression.
Automatic date update in version.in