Fix mi_expect_stop for non-zero exit codes

The message displayed by gdb is different when the inferior exits with
zero and non-zero values, this fix takes that into account.

gdb/testsuite/ChangeLog:
2014-05-13  Simon Marchi  <simon.marchi@ericsson.com>

	* lib/mi-support.exp (mi_expect_stop): Expect message for
	inferiors that exit with non-zero exit code.
Fix argument passing in mi_run_cmd_full

Passing arguments did not work when use_mi_command was set.

gdb/testsuite/ChangeLog:
2014-05-13  Simon Marchi  <simon.marchi@ericsson.com>

	* lib/mi-support.exp (mi_run_cmd_full): Set arguments by calling
	"-exec-arguments" or "set args" before running the inferior.
* dwarf2read.c (read_structure_type): Delete outdated comments.
Make more robust when run in parallel mode.

Since we're not compiling with gcc, we don't know where the
DWO file will ultimately be built.  It could be built in
testsuite/gdb.dwarf2/foo (non-parallel mode) or
testsuite/outputs/gdb.dwarf2/foo (parallel mode).

	* gdb.dwarf2/fission-reread.S: Remove directory from .dwo file path.
	* gdb.dwarf2/fission-reread.exp: Set debug-file-directory before
	loading file.  Add test for TU lookup.
daily update
Fix prologue analysis for ldr.w and ldrd instruction

Prologue analysis for ldr.w and ldrd instruction obtains offset from
first two bytes that contains opcode of instruction. It should obtain
offset from next two bytes that actually contain operands.

       * arm-tdep.c (thumb_analyze_prologue): Fix offset calculation for
	ldr.w and ldrd instructions.

Signed-off-by: Taimoor Mirza <tmirza@codesourcery.com>
Fix changelong entry.

  Each changelog entry should be tab-prefixed.
Fix display of tabulation character for mingw hosts.

Pierre proposed this patch
https://sourceware.org/ml/gdb-patches/2013-10/msg00011.html and
Tom gave a suggestion that it's better to do check \t in print_wchar
<https://sourceware.org/ml/gdb-patches/2013-11/msg00148.html>
However, I don't see the follow-up to this discussion.

We encounter two fails in printcmds.exp on mingw host, and Pierre's
patch fixes them.  I pick it up, update a little per Tom's
comments, and post it here for review.  This patch fixes these fails
below on mingw32 host.

FAIL: gdb.base/charset.exp: print string in ASCII
FAIL: gdb.base/charset.exp: try printing '\t' in ASCII
FAIL: gdb.base/charset.exp: print string in ISO-8859-1
FAIL: gdb.base/charset.exp: try printing '\t' in ISO-8859-1
FAIL: gdb.base/charset.exp: print string in UTF-32
FAIL: gdb.base/charset.exp: try printing '\t' in UTF-32
FAIL: gdb.base/printcmds.exp: p ctable1[9]
FAIL: gdb.base/printcmds.exp: p &ctable1[1*8]

Also regression tested on x86_64-linux.  Is it OK?

gdb:

2014-05-16  Pierre Muller  <muller@sourceware.org>
	    Yao Qi  <yao@codesourcery.com>

	* valprint.c (print_wchar): Move the code on checking whether
	W is a printable wide char to the default branch of switch
	statement below.  Call wchar_printable instead of gdb_iswprint.
Copy file1.txt to remote host in dw2-filename.exp and dw2-anonymous-func.exp

Some gdb.dwarf2/*.exp tests copy file1.txt to host via gdb_remote_download
but dw2-filename.exp and dw2-anonymous-func.exp don't do that.  Looks like
an oversight in this patch
https://sourceware.org/ml/gdb-patches/2013-08/msg00365.html

There are some fails in remote host testing.
FAIL: gdb.dwarf2/dw2-anonymous-func.exp: list file1.txt
FAIL: gdb.dwarf2/dw2-filename.exp: interpreter-exec mi -file-list-exec-source-files
FAIL: gdb.dwarf2/dw2-filename.exp: info sources

This patch is to invoke gdb_remote_download to copy file1.txt to host
and remote it at the end.  This patch fixes these fails above.

gdb/testsuite:

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

	* gdb.dwarf2/dw2-filename.exp: Copy file1.txt to host.  Remove
	file1.txt from host at the end.
	* gdb.dwarf2/dw2-anonymous-func.exp: Likewise.
mi-support.exp: Fix some pastos.

gdb/testsuite/
2014-05-16  Pedro Alves  <palves@redhat.com>

	* lib/mi-support.exp (mi_expect_stop): On timeout, say "timeout"
	instead of "unknown output after running".
This adds support for marking RL78 binaries as either supporting 32-bit
or 64-bit doubles.  It also makes the linker complain if the user attempts
to link together binaries with different sized doubles.

	* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
	64-bit doubles objects mix with 32-bit doubles objects.
	(rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.

	* readelf.c (get_machine_flags): Handle RL78 64-bit doubles flag.

	* config/tc-rl78.c (enum options): Add OPTION_32BIT_DOUBLES
	and OPTION_64BIT_DOUBLES.
	(md_longopts): Add -m32bit-doubles and -m64bit-doubles.
	(md_parse_option): Parse -m32bit-doubles and -m64bit-doubles.
	(md_show_usage): Show all of the RL78 options.
	(rl78_float_cons): New static functions.
	(md_pseudo_table): Update handler for "double".
This fixes a few issues with pe/coff build-ids that were discovered since the
original patches were posted:

  pe/coff: Display GUID build-id in the conventional way
  pe/coff: Don't interpret debug directory in section with no contents
  pe/coff: Keep .build-id with --only-keep-debug
  pe/coff: Don't break .build-id with objcopy/strip

	* peXXigen.c (pe_print_debugdata): Don't interpret debug directory
	in a section with no contents.
	(is_vma_in_section, find_section_by_vma): New functions.
	(_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
	offsets in the debug directory.
	(_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
	Byte-swap GUID from little-endian to big-endian order for
	consistent and conventional display.

	* objcopy.c (is_nondebug_keep_contents_section): New function.
	(setup_section): Use it.
	* configure.tgt: Add /lib to dragonfly NATIVE_LIB_DIRS.
Import the "dirfd" gnulib module.

2014-05-16  Gregory Fong  <gregory.0xf0@gmail.com>

	Import the "dirfd" gnulib module.
	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add dirfd.
	* gnulib/aclocal.m4: Update.
	* gnulib/config.in: Update.
	* gnulib/configure: Update.
	* gnulib/import/Makefile.am: Update.
	* gnulib/import/Makefile.in: Update.
	* gnulib/import/dirfd.c: New.
	* gnulib/import/m4/dirfd.m4: New.
	* gnulib/import/m4/gnulib-cache.m4: Update.
	* gnulib/import/m4/gnulib-comp.m4: Update.
New command line option -D.

	* NEWS: Mention it.
	* main.c (set_gdb_data_directory): New function.
	(captured_main): Recognize -D.  Flag error for --data-directory "".
	Call set_gdb_data_directory.
	(print_gdb_help): Print --data-directory, -D.
	* main.h (set_gdb_data_directory): Declare.
	* top.c (staged_gdb_datadir): New static global.
	(set_gdb_datadir): Call set_gdb_data_directory
	(show_gdb_datadir): New function.
	(init_main): Update init of data-directory parameter.

	testsuite/
	* gdb.base/catch-syscall.exp (test_catch_syscall_fail_nodatadir):
	Update.
	(do_syscall_tests_without_xml): Update.

	doc/
	* gdb.texinfo (Mode Options): Add -D.
* gdb.base/Makefile.in (EXECUTABLES): Add completion.
	* gdb.base/completion.exp: Check that all expected files exist
	before doing file completion.
daily update
Improve docs of qfThreadInfo packet.

gdb/doc/gdb.texinfo (General Query Packets): Add a note about thread IDs
mentioned in the qfThreadInfo reply.
Copy over changes from guile.texi.

	* python.texi (Basic Python) <gdb.execute>: Add text.
	(Basic Python) <gdb.post_event>: Remove "main" from "main GDB thread".
	(Values From Inferior) <Python string>: Add text.
	(Values From Inferior) <Value.string>: Clarify string length handling.
	(Pretty Printing API): Add cindex.
	(Types In Python) <TYPE_CODE_*>: Use vtable instead of table.
	Remove unnecessary index of gdb.TYPE_CODE_*.  Replace @findex with
	@vindex.
	(Commands In Python) <COMPLETE_*>: Similarly.
	(Symbols In Python) <SYMBOL_*>: Similarly.
	(Breakpoints In Python) <WP_*>: Similarly.
	(Breakpoints In Python) <BP_*>: Similarly.