Automatic date update in version.in
PR 17185

PR 17185 describes a problem with using gdb+guile with libgc 7.4.0.
The symptom is a hang in sigsuspend.
[The thread referenced in the PR has the details.]
It's not clear what the right fix is, or even where the bug is yet.
This patch applies the same workaround Guile has applied.
There is no functionality or real performance loss with this,
and Guile has been using it for awhile.

    	* configure.ac: Add check for header gc/gc.h.
    	Add check for function setenv.
    	* configure: Regenerate.
    	* config.in: Regenerate.
    	* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
PR guile/17177

	* guile/lib/gdb.scm (pretty-printers): Export.
	(set-pretty-printers!): Export.
	* guile/lib/gdb/printing.scm (gdb module): Update.
	(prepend-pretty-printer!, append-pretty-printer!): Update.
	* guile/scm-pretty-print.c (pretty_printer_list_name): Delete.
	(pretty_printer_list_var): Delete.
	(pretty_printer_list): New static global.
	(gdbscm_pretty_printers): New function.
	(gdbscm_set_pretty_printers_x): New function.
	(ppscm_find_pretty_printer_from_gdb): Update.
	(pretty_printer_functions): Add pretty-printers, set-pretty-printers!.
	(gdbscm_initialize_pretty_printers): Update.

	doc/
	* guile.texi (Guile Pretty Printing API): Fix typo.
	Document set-pretty-printers!, pretty-printers.
	(Selecting Guile Pretty-Printers): Update.
	Mention program-space based pretty-printers.
PR build/17105.

Tested with/without guile,python on amd64-linux.

I'm not sure we still have to deal with shells that can't
handle empty for lists, but I played it safe.
Otherwise this patch would be a lot smaller (though a diff -b
will still show the real changes).

	PR build/17105
	* configure.ac: Add AM_CONDITIONALs for HAVE_PYTHON, HAVE_GUILE.
	* configure: Regenerate.
	* data-directory/Makefile.in (PYTHON_FILE_LIST): Renamed from
	PYTHON_FILES.
	(PYTHON_FILES): New variable.
	(GUILE_FILE_LIST): Renamed from GUILE_FILES.
	(GUILE_FILES): New variable.
	(stamp-python, install-python, uninstall-python): Handle empty
	file list.
	(stamp-guile, install-guile, uninstall-guile): Ditto.
PR guile/17146 preparatory work.

	* data-directory/Makefile.in (GUILE_FILES): Add support.scm.
	* guile/lib/gdb/support.scm: New file.
	* guile/guile.c (gdbscm_init_module_name): Change to "gdb".
	* guile/lib/gdb.scm: Load gdb/init.scm as an include file.
	All uses updated.
	* guile/lib/gdb/init.scm (SCM_ARG1, SCM_ARG2): Moved to support.scm.
	All uses updated.
	(%assert-type): Ditto, and renamed to assert-type.
	(%exception-print-style): Delete.

	testsuite/
	* gdb.guile/types-module.exp: Add tests for wrong type arguments.
PR guile/17146

	* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro.
	(GDB_GUILD_TARGET_FLAG, GDB_TRY_GUILD): New macros.
	* configure.ac: Try to use guild to compile an scm file, if it fails
	then disable guile support.
	* configure: Regenerate.
	* data-directory/Makefile.in (GUILE_SOURCE_FILES): Renamed from
	GUILE_FILE_LIST.
	(GUILE_COMPILED_FILES): New variable.
	(GUILE_FILES) Update.
	(GUILD, GUILD_TARGET_FLAG, GUILD_COMPILE_FLAGS): New variables.
	(stamp-guile): Compile scm files.
	* guile/guile.c (boot_guile_support): New function.
	(standard_throw_args_p): New function.
	(print_standard_throw_error, print_throw_error): New functions.
	(handle_boot_error): New function.
	(initialize_scheme_side): Rewrite to call boot_guile_support.
	* guile/lib/gdb/boot.scm: Update %load-compiled-path.  Load gdb.go.
	* guile/lib/gdb/init.scm (%silence-compiler-warnings%): New function.
Automatic date update in version.in
Properly match PLT entry against .got.plt relocation

Relocations against .got.plt section may not be in the same order as
entries in PLT section.  It is incorrect to assume that the Ith reloction
index against .got.plt section always maps to the (I + 1)th entry in PLT
section.  This patch matches the .got.plt relocation offset/index in PLT
entry against the index in .got.plt relocation table.  It only checks
R_*_JUMP_SLOT and R_*_IRELATIVE relocations.  It ignores R_*_TLS_DESC
and R_*_TLSDESC relocations since they have different PLT entries.

bfd/

	PR binutils/17154
	* elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT
	and R_*_IRELATIVE relocation offset with PLT entry.
	* elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
	(elf_x86_64_plt_sym_val_offset_plt_bnd): New.
	(elf_x86_64_get_synthetic_symtab): Use it.

ld/testsuite/

	PR binutils/17154
	* ld-ifunc/pr17154-i386.d: New file.
	* ld-ifunc/pr17154-x86-64.d: Likewise.
	* ld-ifunc/pr17154-x86.s: Likewise.
	* ld-x86-64/bnd-ifunc-2.d: Likewise.
	* ld-x86-64/bnd-ifunc-2.s: Likewise.
	* ld-x86-64/mpx.exp: Run bnd-ifunc-2.
	* ld-x86-64/tlsdesc-nacl.pd: Updated.
	* ld-x86-64/tlsdesc.pd: Likewise.
Match PLT entry only for ELFOSABI_GNU input

	* elf32-i386.c (elf_i386_plt_sym_val): Match PLT entry only for
	ELFOSABI_GNU input.
	* elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
	(elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
watchpoint-reuse-slot.exp: Correctly skip unsupported commands.

The test case "watchpoint-reuse-slot.exp" yields a lot of failures on
s390/s390x: all instances of awatch, rwatch, and hbreak are performed
even though they aren't supported on these targets.  This is because
the test case ignores non-support error messages when probing for
support of these commands, like:

    (gdb) rwatch buf.byte[0]
    Target does not support this type of hardware watchpoint.

The patch adds handling for this case in the appropriate
gdb_test_multiple invocations.

gdb/testsuite/
    * gdb.base/watchpoint-reuse-slot.exp: Handle the case that the
    target lacks support for awatch, rwatch, or hbreak.
2014-07-28  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

    * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Report no hardware
    breakpoint support correctly.
Automatic date update in version.in
PR guile/17203

	* guile/scm-param.c (pascm_parameter_defined_p): New function.
	(gdbscm_register_parameter_x): Call it.  Raise error for pre-existing
	parameters.

	testsuite/
	* gdb.guile/scm-parameter.exp: Add tests for trying to create
	previously existing parameter, and previously ambiguously spelled
	parameter.
Fix PR 17206

As reported in PR 17206, an internal error is triggered when command
until is executed.  In infcmd.c:until_next_command, step_range_end is
set to 'pc',

  if (!func)
    {
      struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);

      if (msymbol.minsym == NULL)
	error (_("Execution is not within a known function."));

      tp->control.step_range_start = BMSYMBOL_VALUE_ADDRESS (msymbol);
      tp->control.step_range_end = pc;
    }

and later in infrun.c:resume, the assert below is triggered in PR
17206.

  if (tp->control.may_range_step)
    {
      /* If we're resuming a thread with the PC out of the step
	 range, then we're doing some nested/finer run control
	 operation, like stepping the thread out of the dynamic
	 linker or the displaced stepping scratch pad.  We
	 shouldn't have allowed a range step then.  */
      gdb_assert (pc_in_thread_step_range (pc, tp));
    }

In until_next_command, we set step range to [XXX, pc), so pc isn't
within the range.  pc_in_thread_step_range returns false and the
assert is triggered.  AFAICS, the range we want in until_next_command
is [XXX, pc] instead of [XXX, pc), because we want to program step
until greater than pc.  This patch is to set step_range_end to
'pc + 1'.  Running until-nodebug.exp with unpatched GDB will get the
following fail,

FAIL: gdb.base/until-nodebug.exp: until 2 (GDB internal error)

and the fail goes away when the fix is applied.

gdb:

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

	PR gdb/17206
	* infcmd.c (until_next_command): Set step_range_end to PC + 1.

gdb/testsuite:

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

	PR gdb/17206
	* gdb.base/until-nodebug.exp: New.
Merge remote-tracking branch 'gnu/gdb-7.8-branch' into 7.8