ARM/gas: Fix a build failure with GCC 4.3.3

cc1: warnings being treated as errors
.../gas/config/tc-arm.c: In function 'add_to_lit_pool':
.../gas/config/tc-arm.c:3193: error: 'imm1' may be used uninitialized in this function

	* config/tc-arm.c (add_to_lit_pool): Preinitialize `imm1'.
ARM/opcodes: Fix negative hexadecimal offset disassembly

2014-08-21  Nathan Sidwell  <nathan@codesourcery.com>
            Maciej W. Rozycki  <macro@codesourcery.com>

	opcodes/
	* arm-dis.c (print_arm_address): Negate the GPR-relative offset
	returned if the U bit is set.

2014-08-21  Paul Brook  <paul@codesourcery.com>

	gas/testsuite/
	* gas/arm/arch7a-mp.d: Adjust according to `print_arm_address'
	offset fix.
	* gas/arm/arch7r-mp.d: Likewise.
Power/GAS: Don't set VLE annotation for non-VLE processors/instructions

Only set the VLE flag if the instruction has been pulled via the VLE
instruction set.  This way the flag is guaranteed to be set for VLE-only
instructions or for VLE-only processors, however it'll remain clear for
dual-mode instructions on dual-mode and, more importantly, standard-mode
processors.

	gas/
	* config/tc-ppc.c (md_assemble): Only set the PPC_APUINFO_VLE
	flag if both the processor and opcode flags match.

	ld/testsuite/
	* ld-powerpc/apuinfo-vle.rd: New test.
	* ld-powerpc/apuinfo-vle.s: New test source.
	* ld-powerpc/apuinfo.rd: Adjust according to GAS PPC_APUINFO_VLE
	handling change.
	* ld-powerpc/powerpc.exp: Run the new test.
aarch64: Decode dwarf2 register numbers

	* dwarf.h (init_dwarf_regnames_aarch64): Declare.
	* dwarf.c (dwarf_regnames_aarch64): New.
	(init_dwarf_regnames_aarch64): New.
	(init_dwarf_regnames): Call it.
	* objdump.c (dump_dwarf): Likewise.
aarch64: Fix CFA encoding of vector registers

	* config/tc-aarch64.c (tc_aarch64_regname_to_dw2regnum): Fix
	register number for vector register types.
aarch64: Adjust dwarf2 encoding factors

	* config/tc-aarch64.h (DWARF2_LINE_MIN_INSN_LENGTH): Set to 4.
	(DWARF2_CIE_DATA_ALIGNMENT): Set to -8.
Create a typedef for record_line: record_line_ftype.

gdb/ChangeLog:

	* buildsym.h (record_line_ftype): New typedef.
	(record_line): Use it.
	* dwarf2read.c (dwarf_record_line, dwarf_finish_line): New functions.
	(dwarf_decode_lines_1): Call them.
daily update
Fix pr 17276.

See the description here:
https://sourceware.org/ml/gdb-patches/2014-08/msg00283.html

This patch keeps track of whether the current line has seen a
non-zero discriminator, and if so coalesces consecutive entries
for the same line (by ignoring all entries after the first).

gdb/ChangeLog:

	PR 17276
	* dwarf2read.c (dwarf_record_line_p): New function.
	(dwarf_decode_lines_1): Ignore subsequent line number entries
	for the same line if any entry had a non-zero discriminator.

gdb/testsuite/ChangeLog:

	* gdb.dwarf2/dw2-single-line-discriminators.S: New file.
	* gdb.dwarf2/dw2-single-line-discriminators.c: New file.
	* gdb.dwarf2/dw2-single-line-discriminators.exp: New file.
Fix frv-elf sim, default hardware to off.

At 2974be626, frv-elf fails at the dv_sockser_install declaration in
sim/frv/tconfig.in.  But, with the trivial #include's added (see other
sims tconfig.in, like cris or mn10300), it *still* fails building
sim/frv/devices.c because of a missing UART_INCHAR_ADDR.  I have no
insight into what'd be a valid value, except that there's a definition
in m32r, which was probably used as a template with frv not finished.
Simulated hardware should not have been be enabled, and was indeed not
enabled by default before 94c63d78f (2013-03-23), where it seems to
have been enabled for no simulator-specific reason.  Except
dv-sockser.o wasn't enabled even then: sim/frv/config.in wasn't
regenerated, so HAVE_DV_SOCKSER was never defined.  Maybe people were
fooled by this in sim/frv/Makefile.in at that time (these two lines
were later deleted, in 73e76d20):
CONFIG_DEVICES = dv-sockser.o
CONFIG_DEVICES =
(As it seems people have missed it before: the second line overrides
the first...)  I'm guessing these lines were part of the
never-completed hardware-support.  Commit 73e76d20 attempted to move
the imagined dv-sockser.o from $(CONFIG_DEVICES) to $(frv_extra_objs)
but missed that AC_SUBST would only affect @frv_extra_objs@ (not
$(frv_extra_objs) per se) so nothing happened regarding sockser:
dv-sockser.o was not compiled and HAVE_DV_SOCKSER was not defined.
I'm removing the $(frv_extra_objs) too, to avoid confusion.  The best
action seems to be disabling all hardware support by default again
until a specific sim maintainer finishes the work.
Make check-sim for frv-elf shows no failures after this.

sim/frv:
	* configure.ac: Default simulator hardware to off again.  Remove
	dead frv_extra_objs substitution.
	* configure: Regenerate.
	* Makefile.in: Remove unused frv_extra_objs.
Fix iq2000-elf sim, default hardware to off.

See nearby (previous) commit for the frv sim; this similarly fails at
the dv_sockser_install declaration in sim/iq2000/tconfig.in.  There's
no HAVE_DV_SOCKSER conditionals here and no other dv-sockser.o
artefacts so maybe there is no further fallout, but I'm going to
disable sim-hardware just be consistent with the state before
94c63d78f (2013-03-23) and with the actions for the frv sim.  Make
check-sim for iq2000-elf shows no failures but that's in no small part
because it has no test-suite.

sim/iq2000:
	* configure.ac: Default simulator hardware to off again
	without emitting errors when off or dv-sockser.o unavailable.
	* configure: Regenerate.
Fix sh64-elf sim, default hardware to off.

See nearby (previous) commit for the iq2000 sim; this similarly fails
at the dv_sockser_install declaration in sim/sh64/tconfig.in.  I'm
disabling simulator hardware to be consistent with the state before
94c63d78f (2013-03-23) and with the actions for the frv sim and the
iq2000 sim.  Make check-sim for sh64-elf shows no regressions (25
failures; 357 expected passes) compared to bf3d9781ec049 (before the
recent config.in regen, after sim-hardware mostly-enabled) and
eed23bb4a1 (before the sim-hardware mostly-enabled; 2013-03-23).

sim/sh64:
	* configure.ac: Default simulator hardware to off again
	without emitting errors when off or dv-sockser.o unavailable.
	* configure: Regenerate.
Fix m32r-elf sim, default hardware to off.

The situation here is similar to that of the other nearby (previous)
sims fixed; it fails at the dv_sockser_install declaration in
sim/m32r/tconfig.in.  But, as opposed to e.g. frv, this *does* have a
definition of UART_INCHAR_ADDR et al.  It's somewhat tempting to keep
sim-hardware enabled here but, I'm disabling it for the same reasons
as for frv.  Unsurprisingly (as m32r seems to be the template), the
same confusing lines are in sim/m32r/Makefile.in as in
sim/frv/Makefile.in at that time, deleted in 73e76d20.  Again, commit
73e76d20 (for m32r as well as for frv) attempted to move the
non-existing dv-sockser.o use to $(m32r_extra_objs) but missed that
AC_SUBST would only affect @m32r_extra_objs@ and not
$(m32r_extra_objs) per se so nothing happened.  As for frv, I'm
removing the $(m32r_extra_objs) too, to avoid confusion.  Make
check-sim for m32r-elf shows no regressions (5 failures; 100 expected
passes) compared to bf3d9781ec049 (before the recent config.in regen,
after sim-hardware mostly-enabled) and eed23bb4a1 (before the
sim-hardware mostly-enabled; 2013-03-23).

sim/m32r:
	* configure.ac: Default simulator hardware to off again.  Remove
	dead m32r_extra_objs substitution.
	* configure: Regenerate.
	* Makefile.in: Remove unused frv_extra_objs.
daily update
set print symbol off in py-value.exp and scm-value.exp

I see the following fails on arm-none-eabi target,

print sn^M
$14 = 0x0 <_ftext>^M
(gdb) FAIL: gdb.python/py-value.exp: print sn

print sn^M
$14 = 0x0 <_ftext>^M
(gdb) FAIL: gdb.guile/scm-value.exp: print sn

as <_ftext> is unexpected.  This patch is to set print symbol off to
avoid printing this.

gdb/testsuite:

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

	* gdb.guile/scm-value.exp (test_lazy_strings): Set print
	symbol off.
	* gdb.python/py-value.exp (test_lazy_strings): Likewise.
Update comments in scan_partial_symbols and add_partial_subprogram

I read comment of scan_partial_symbols about NEED_PC and how *LOWPC
and *HIGHPC are updated:

   DW_AT_ranges).  If NEED_PC is set, then this function will set
   *LOWPC and *HIGHPC to the lowest and highest PC values found in CU
   and record the covered ranges in the addrmap.

NEED_PC is only used in the callee of scan_partial_symbols,
add_partial_subprogram,

  if (pdi->tag == DW_TAG_subprogram)
    {
      if (pdi->has_pc_info)
        {
          if (pdi->lowpc < *lowpc)
            *lowpc = pdi->lowpc;
          if (pdi->highpc > *highpc)
            *highpc = pdi->highpc;
	  if (need_pc)

*LOWPC and *HIGHPC is updated regardless of NEED_PC.  When NEED_PC is
true, addrmap is updated.  It would be clear to rename NEED_PC to
SET_ADDRMAP.  That is what this patch does.  Beside this, this patch
also adjust comments in related functions.

gdb:

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

	* dwarf2read.c (scan_partial_symbols):  Update comments.
	Rename argument 'need_pc' with 'set_addrmap'.
	（add_partial_namespace): Rename argument 'need_pc' with
	'set_addrmap'.
	(add_partial_module): Likewise.
	(add_partial_subprogram): Likewise.  Update comments.
	(dwarf2_name): Fix typo.
daily update
gas tests for the sparc instructions ldfsr, stfsr, ldx, ldxa, stx, stxa, ldxfsr, stxfsr, ldxefsr.

- V8 instructions:  ldfsr, stfsr
- V9 instructions:  ldx, ldxa, stx, stxa, ldxfsr, stxfsr
- V9b instructions: ldxefsr

Tested on sparc64-*-linux-gnu.

[gas/testsuite/Changelog]

2014-08-25  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* gas/sparc/ldx_stx.s: New file.
	* gas/sparc/ldx_stx.d: Likewise.

	* gas/sparc/ldx_efsr.s: New file.
	* gas/sparc/ldx_efsr.d: Likewise.

	* gas/sparc/ld_st_fsr.s: New file.
	* gas/sparc/ld_st_fsr.d: Likewise.

	* gas/sparc/sparc.exp: Run the tests ldx_stx, ldx_efsr and
	ld_st_fsr.
Fix grammatical error in comments

gdb:

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

	* dwarf2read.c: Fix grammatical error.
linux-nat.c (linux_nat_close): Don't pass NULL for "this".

gdb/ChangeLog:

	* linux-nat.c (linux_nat_close): Don't pass NULL for "this".
	Pass NULL instead of 0 for context pointer.