Remove incorrect ATTRIBUTE_UNUSED from nios2 bfd

2013-11-03  Sandra Loosemore  <sandra@codesourcery.com>

	bfd/
	* elf32-niso2.c (nios2_elf32_do_hi16_relocate): Remove incorrect
	ATTRIBUTE_UNUSED from parameter.
	(nios2_elf_do_lo16_relocate): Likewise.
	(nios2_elf32_do_hiadj16_relocate): Likewise.
	(nios2_elf32_do_pcrel_lo16_relocate): Likewise.
	(nios2_elf32_do_pcrel_hiadj16_relocate): Likewise.
	(nios2_elf32_do_pcrel16_relocate): Likewise.
	(nios2_elf32_do_call26_relocate): Likewise.
	(nios2_elf32_do_gprel_relocate): Likewise.
	(nios2_elf32_do_ujmp_relocate): Likewise.
	(nios2_elf32_do_cjmp_relocate): Likewise.
	(nios2_elf32_do_callr_relocate): Likewise.
	(nios2_elf32_gc_mark_hook): Likewise.
Remove powerpc.cc copy of use_plt_offset

This adds an extra flag for needs_dynamic_reloc() in order to remove
the copy of this function and use_plt_offset() in powerpc.cc, and
tweaks the powerpc get_reference_flags() to return the flag as
appropriate.  ELFv2 does not want ELFv1 behaviour here.

	* symtab.h (Symbol::Reference_flags): Add FUNC_DESC_ABI.
	(Symbol::needs_dynamic_reloc): Test new flag.
	* powerpc.cc (needs_dynamic_reloc, use_plt_offset): Delete.
	(Target_powerpc::Scan::get_reference_flags): Add target param.
	Return FUNC_DESC_ABI for 64-bit ELFv1.
	(Target_powerpc::Branch_info::make_stub): Adjust get_reference_flags
	call.
	(Target_powerpc::Scan::global): Use Symbol::needs_dynamic_reloc.
	(Target_powerpc::Relocate::relocate): Use Symbol::use_plt_offset.
Improve performance of large restore commands

I noticed a large (100MB) restore took hours to complete. The problem
is memory_xfer_partial repeatedly mallocs and memcpys the entire
100MB buffer for breakpoint shadow handling only to find a small
portion of it is actually written.

The testcase that originally took hours now takes 50 seconds.

gdb/
2013-07-29  Anton Blanchard  <anton@samba.org>

	* target.c (memory_xfer_partial): Cap write to 4KB.
x86-64/gas: fix an asymmetry in suffix/register checking

Without this, constructs like "orw %rax, (%rax)" aren't being rejected
(other than any other wrong suffix/register combination).

gas/
2013-11-04  Jan Beulich <jbeulich@suse.com>

	* config/tc-i386.c (check_long_reg): Correct comment indentation.
	(check_qword_reg): Correct comment and its indentation.
	(check_word_reg): Extend comment and correct its indentation. Also
	check for 64-bit register.

gas/testsuite/
2013-11-04  Jan Beulich <jbeulich@suse.com>

	* gas/i386/x86-64-suffix-bad.[sl]: New.
	* gas/i386/i386.exp: Run new test.
fix up log-file toggling

Currently a proc in gdb.exp toggles the expect (and thus dejagnu)
logging.  This is not a super idea, but it is there to avoid putting
some preprocessor output into the log.

In the right circumstances, this can result in the log file being
mysteriously truncated.  I think this happens because it doesn't
necessarily write to the correct log file again.

The fix is to use "log_file -info" to save the previous log file.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* lib/gdb.exp (get_compiler_info): Use log_file -info and
	restore from that.
fix some simple thinkos in the test suite

This fixes some parallelization thinkos from a while ago.  I'm not
sure how the problems ever slipped through.  In addition to a thinko
fix in twice.exp, this also finishes fixing it up for parallelization.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/gcore-buffer-overflow.exp: Use
	standard_output_file, not standard_testfile.
	* gdb.base/twice.exp: Use standard_testfile, not
	standard_output_file.  Use gdb_remote_download.
fix weird.exp for parallel testing

This fixes up gdb.stabs/weird.exp for parallel testing.  This just
means using gdb_remote_download and standard_output_file, so that the
tests end up in the right place.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.stabs/weird.exp: Use gdb_remote_download and
	standard_output_file.
fix up gdb.gdb

This fixes the gdb.gdb tests to be parallel-safe, by ensuring that the
new "xgdb" file ends up in the standard output directory during the
tests.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.gdb/selftest.exp: Use standard_output_file.
	* lib/selftest-support.exp (do_self_tests): Use
	standard_output_file.
fix up gdb.xml

This fixes the gdb.xml tests to be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.xml/tdesc-arch.exp: Use standard_output_file.  Make
	downloads conditional on remote host.
	(set_arch): Likewise.
	* gdb.xml/tdesc-regs.exp: Use gdb_remote_download.
	(load_description): Use standard_output_file.
fix up gdb.mi

This fixes gdb.mi to be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed):
	Use "dwarf2 always-disassemble" for the "maint set" test.
	* gdb.mi/mi-file-transfer.exp (test_file_transfer): Use
	standard_output_file.
	* gdb.mi/mi-logging.exp: Use standard_output_file.
fix up gdb.trace

This fixes gdb.trace to be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.trace/mi-traceframe-changed.exp: Pass -DTFILE_DIR
	to compilation.  Use standard_output_file.
	(test_tfind_tfile): Update.
	* gdb.trace/tfile.c (write_basic_trace_file)
	(write_error_trace_file): Use TFILE_DIR.
	* gdb.trace/tfile.exp: Pass -DTFILE_DIR to compilation.  Use
	standard_output_file.
simple changes in gdb.base

This makes more changes in gdb.base to make it parallel-safe.  I think
the changes in this particular patch are relatively straightforward,
so I've grouped them all together.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/advance.exp: Use standard_testfile and
	prepare_for_testing.
	* gdb.base/bigcore.exp: Use standard_output_file.  "cd" to
	appropriate directory when local.
	* gdb.base/dump.exp: Use standard_output_file.  Update all
	"dump" and "restore" filenames.
	* gdb.base/interact.exp: Use standard_output_file.
	* gdb.base/jit-so.exp: Don't download file when local.
	* gdb.base/jit.exp (compile_jit_test): Don't download file
	when local.
	* gdb.base/list.exp: Use gdb_remote_download.
	* gdb.base/maint.exp: Use standard_output_file.
	* gdb.base/prelink.exp: Use standard_output_file.
	* gdb.base/save-bp.exp: Use standard_output_file.
	* gdb.base/sepdebug.exp: Use standard_testfile,
	standard_output_file.
	(test_different_dir): Don't declare objdir.
	* gdb.base/solib-search.exp: Use standard_output_file.
	* gdb.base/step-line.exp: Use gdb_remote_download.
	* gdb.base/trace-commands.exp: Use standard_output_file.
update checkpoint test

This fixes the "checkpoint" test to use the standard output directory.
This makes the test be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/checkpoint.c (main): Use PI_TXT and COPY1_TXT
	defines.
	* gdb.base/checkpoint.exp: Define PI_TXT and COPY1_TXT during
	compilation.  Use prepare_for_testing, standard_output_file.
update fileio test

This updates the fileio test to be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/fileio.c (test_open, test_write, test_read)
	(test_lseek, test_close, test_stat, test_fstat)
	(test_isatty, test_system, test_rename, test_unlink):
	Use OUTDIR define.
	* gdb.base/fileio.exp: Define OUTDIR during compilation.
	Use standard_output_file.
introduce relative_filename and use it

This introduces a new relative_filename proc to gdb.exp and changes
some tests to use it.  This helps make these tests parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/fullname.exp: Use standard_output_file,
	relative_filename.
	* gdb.base/hashline1.exp: Use standard_testfile,
	standard_output_file, relative_filename, clean_restart.
	* gdb.base/hashline2.exp: Use standard_testfile,
	standard_output_file.
	* gdb.base/hashline3.exp: Use standard_testfile,
	standard_output_file, relative_filename.
	* lib/gdb.exp (relative_filename): New proc.
fix up gdb.server

This fixes gdb.server to be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.server/file-transfer.exp: Use standard_output_file.
make gdb.asm parallel-safe

This fixes gdb.asm to be parallel-safe.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.asm/asm-source.exp: Use standard_output_file.
fix argv0-symlink.exp for parallel mode

argv0-symlink.exp doesn't work properly if standard_output_file puts
files into a per-test subdirectory.  That's because it assumes that
files appear in $subdir, which is no longer true.

This patch fixes the problem by computing the correct directory at
runtime.

Tested both with and without GDB_PARALLEL on x86-64 Fedora 18.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/argv0-symlink.exp: Compute executable's directory
	dynamically.
fix some "exec" tests

A few tests run an inferior that execs some other program.  The name
of this exec'd program is compiled in.  These tests assume the current
test suite directory layout, but fail in parallel mode.

This patch fixes these tests by letting the .exp files pass in the
directory names at compile time.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/foll-exec.c (main): Use BASEDIR.
	* gdb.base/foll-exec.exp: Define BASEDIR during compilation.
	* gdb.base/foll-vfork.c (main): Use BASEDIR.
	* gdb.base/foll-vfork.exp: Define BASEDIR during compilation.
	* gdb.multi/bkpt-multi-exec.c (main): Use BASEDIR.
	* gdb.multi/bkpt-multi-exec.exp: Define BASEDIR during compilation.
fix some fission tests

A couple of Fission tests rely on the current directory layout.  This
assumption is not valid in parallel mode.

This patch fixes the problem by removing the relative directory from
the .S files and instead having the tests set debug-file-directory
before opening the main file.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.dwarf2/fission-base.S: Remove "gdb.dwarf/".
	* gdb.dwarf2/fission-base.exp: Set debug-file-directory
	before loading binfile.
	* gdb.dwarf2/fission-loclists.S: Remove "gdb.dwarf/".
	* gdb.dwarf2/fission-loclists.exp: Set debug-file-directory
	before loading binfile.