* elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
resize_section_table cleanup

	* exec.c (exec_close_1): Call clear_section_table instead of
	resize_section_table.
	(clear_section_table): New function.
	(resize_section_table): Make static.  Rename arg num_added to
	adjustment.
	* exec.h (clear_section_table): Declare.
	(resize_section_table): Delete.
	* progspace.c (release_program_space): Call clear_section_table
	instead of resize_section_table.
daily update
	* guile/scm-param.c (pascm_make_param_smob): Add ARI comment.
	(gdbscm_make_parameter): Ditto.
Fix regexp pattern in gdb.base/default.exp

I see this failure on arm-none-eabi gdb testing.

target native^M
Undefined target command: "native".  Try "help target".^M
(gdb) FAIL: gdb.base/default.exp: target native

This patch is to update the regexp pattern to match "native" instead of
"child".

gdb/testsuite:

2014-06-04  Yao Qi  <yao@codesourcery.com>

	* gdb.base/default.exp: Replace "child" with "native" in
	regexp pattern.
Fix a regexp pattern in gdb.base/auto-connect-native-target.exp

When I test gdb head (for 7.8 release) on arm-none-eabi, I find the
following this failure, which are caused by the improper regexp
pattern in the test.

(gdb) help target native^M
Undefined target command: "native".  Try "help target".^M
(gdb) FAIL: gdb.base/auto-connect-native-target.exp: help target native

The space in front of "$gdb_prompt $" looks redundant, and this patch
is to remove it from the regexp pattern.

gdb/testsuite:

2014-06-04  Yao Qi  <yao@codesourcery.com>

	* gdb.base/auto-connect-native-target.exp: Remove redundant
	space from the regexp pattern.
Add system test before "set remote system-call-allowed 1" to fileio.exp

This patch is update version according to the discussion in
https://www.sourceware.org/ml/gdb-patches/2009-11/msg00090.html.
If test get the target doesn't support fileio system according to the
remote log.   It will set this test as "unsupported".

Before I made this patch, I want add a check before all of tests in this
file.  But I found that the target maybe support one call but not others.
For example: my target support Fwrite, Fopen and so on.  But not Fgettimeofday.
And it doesn't support Fsystem NULL but it support Fsystem not NULL.
So I think if we want to check target support fileio, we need check them
one by one.

2014-06-04  Nathan Sidwell  <nathan@codesourcery.com>
	    Hui Zhu  <hui@codesourcery.com>

	* gdb.base/fileio.exp: Add test for shell not available as well as
	available.
	* gdb.base/fileio.c (test_system): Check for shell twice.
btrace: async support

Add support for async command execution.  This fixes the gdb.btrace tests.

	* record-btrace.c: Include event-loop.h and inf-loop.h.
	(record_btrace_resume_exec_dir)
	(record_btrace_async_inferior_event_handler)
	(record_btrace_handle_async_inferior_event): New.
	(record_btrace_open): Create async event handler.
	(record_btrace_close): Delete async event handler.
	(record_btrace_resume): Set record_btrace_resume_exec_dir,
	Mark async event handler.
	(record_btrace_execution_direction): New.
	(init_record_btrace_ops): Initialize to_execution_direction.
* guile/scm-type.c (type_smob): Remove duplicate typedef.
bfd/elfnn-aarch64.c: Cleanup a couple of TLS functions

Add an assert and remove an unused line of code.

bfd/ChangeLog:

2014-06-04  Will Newton  <will.newton@linaro.org>

        * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
	being non-NULL into an assert.
	(elfNN_aarch64_tls_relax): Remove unused code.
Tweak sss-bp-on-user-bp.exp

sss-bp-on-user-bp.c has an assumption that write to integer can be
compiled to a single instruction, which isn't true on some arch, such
as arm.  This test requires setting two breakpoints on two consecutive
instructions, so this patch is to get the address of the next
instruction via disassemble and set the 2nd breakpoint there.  This
approach is portable.

This patch fixes the fails in sss-bp-on-user-bp.exp on arm-none-abi
target.  There is no change in x86 test results.  I also revert the
patch to PR breakpoints/17000, and verified that the patched
sss-bp-on-user-bp.exp still trigger the fail on
x86-with-software-single-step.

gdb/testsuite:

2014-06-04  Yao Qi  <yao@codesourcery.com>

	* gdb.base/sss-bp-on-user-bp.c (main): Remove comments.
	* gdb.base/sss-bp-on-user-bp.exp: Don't set breakpoint on
	"set bar break here".  Get the next instruction address and
	set breakpoint there.  Remove "bar break" from the regexp
	patterns.
convert to_thread_address_space to use TARGET_DEFAULT_FUNC

This converts to_thread_address_space to use TARGET_DEFAULT_FUNC.

This method was one of a handful not using the normal target
delegation approach.  The only rationale here is consistency in the
target vector.

Built and regtested on x86-64 Fedora 20.

2014-06-04  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (default_thread_address_space): New function.
	(target_thread_address_space): Simplify.
	* target.h (struct target_ops) <to_thread_address_space>: Add
	TARGET_DEFAULT_FUNC.
constify to_attach

This constifies the "args" argument to the target_ops to_attach
method.

I updated all instances of the method.  I could not compile all of
them but I hand-inspected them.  In all cases either the argument is
ignored, or it is passed to parse_pid_to_attach.  (linux-nat does some
extra stuff, but that one I built...)

If you want to try it on your host of choice, please do so.

The code in parse_pid_to_attach seems a little bogus to me.  If there
is a platform with a broken strtoul, we have better methods for fixing
the issue now.  However, I left the code as is since it is clearly ok
to do so.

Built and regtested on x86-64 Fedora 20.

2014-06-04  Tom Tromey  <tromey@redhat.com>

	* procfs.c (procfs_attach): Make "args" const.
	* windows-nat.c (windows_attach): Make "args" const.
	* nto-procfs.c (procfs_attach): Make "args" const.
	* inf-ttrace.c (inf_ttrace_attach): Make "args" const.
	* go32-nat.c (go32_attach): Make "args" const.
	* gnu-nat.c (gnu_attach): Make "args" const.
	* darwin-nat.c (darwin_attach): Make "args" const.
	* inf-ptrace.c (inf_ptrace_attach): Make "args" const.
	* linux-nat.c (linux_nat_attach): Make "args" const.
	* remote.c (extended_remote_attach_1, extended_remote_attach):
	Make "args" const.
	* target.h (struct target_ops) <to_attach>: Make "args" const.
	(find_default_attach): Likewise.
	* utils.c (parse_pid_to_attach): Make "args" const.
	* utils.h (parse_pid_to_attach): Update.
minor cleanups in is_dynamic_type

I noticed that gdbtypes.c:is_dynamic_type has some unneeded "break"s.
This patch cleans up the function a bit, removing those and removing
the switch's default case so that the end of the function is a bit
clearer.

2014-06-04  Tom Tromey  <tromey@redhat.com>

	* gdbtypes.c (is_dynamic_type): Remove unneeded "break"s.
handle VLA in a struct or union

It is valid in GNU C to have a VLA in a struct or union type, but gdb
did not handle this.

This patch adds support for these cases in the obvious way.

Built and regtested on x86-64 Fedora 20.
New tests included.

2014-06-04  Tom Tromey  <tromey@redhat.com>

	* ada-lang.c (ada_template_to_fixed_record_type_1): Use
	value_from_contents_and_address_unresolved.
	(ada_template_to_fixed_record_type_1): Likewise.
	(ada_which_variant_applies): Likewise.
	* value.h (value_from_contents_and_address_unresolved): Declare.
	* value.c (value_from_contents_and_address_unresolved): New
	function.
	* gdbtypes.c (is_dynamic_type, resolve_dynamic_type)
	<TYPE_CODE_STRUCT, TYPE_CODE_UNION>: New cases.
	(resolve_dynamic_struct, resolve_dynamic_union): New functions.

2014-06-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/vla-datatypes.exp: Add tests for VLA-in-structure and
	VLA-in-union.
	* gdb.base/vla-datatypes.c (vla_factory): Add vla_struct,
	inner_vla_struct, vla_union types.  Initialize objects of those
	types and compute their sizes.
gdbserver crash if the_target->supports_z_point_type is NULL

When debugging on LynxOS targets (and probably on SPU targets as well),
inserting a breakpoint and resuming the program's execution causes
GDBserver to crash.

The crash occurs while handling the Z0 packet sent by GDB to insert
our breakpoint, because z_type_supported calls
the_target->supports_z_point_type without checking that it is not NULL
This patch fixes the issue by making z_type_supported return false if
the_target->supports_z_point_type is NULL.

gdb/gdbserver/ChangeLog:

        PR server/17023
        * mem-break.c (z_type_supported): Return zero if
        THE_TARGET->SUPPORTS_Z_POINT_TYPE is NULL.

Tested on ppx-lynx5.
daily update
Split create-breakpoint! into make-breakpoint, register-breakpoint!.
Rename breakpoint-delete! to delete-breakpoint!.

	* guile/scm-breakpoint.c (struct gdbscm_breakpoint_object): New members
	is_scheme_bkpt, spec.
	(bpscm_make_breakpoint_smob): Initialize new members.
	(gdbscm_create_breakpoint_x): Split into two ...
	(gdbscm_make_breakpoint, gdbscm_register_breakpoint_x): New functions.
	(bpscm_breakpoint_deleted): Reset breakpoint number and stop function.
	(scheme_function breakpoint_functions): Update.
	* guile/lib/gdb.scm: Delete create-breakpoint!.  Rename
	breakpoint-delete! to delete-breakpoint!.  Add make-breakpoint,
	register-breakpoint!.

	testsuite/
	* gdb.guile/scm-breakpoint.exp: Update.
	Add tests for breakpoint registration.

	doc/
	* guile.texi (Breakpoints In Guile): Update.
Delete scm-generics.exp.

Support for smobs as goops classes is changing in guile 2.2.
We may eventually switch to using structs instead of smobs,
so remove any claim we support goops or generics for now.

	* gdb.guile/scm-generics.exp: Delete.
Make it easy to make --disable-werror the default for both binutils and gdb

The goal of this patch is to provide an easy way to make
--disable-werror the default when building binutils, or the parts
of binutils that need to get built when building GDB. In development
mode, we want to continue making -Werror the default with GCC.
But, when making releases, I think we want to make it as easy as
possible for regular users to successfully build from sources.

GDB already has this kind of feature to turn -Werror as well as
the use of the libmcheck library. As GDB Release Manager, I take
advantage of it to turn those off after having cut the branch.
I'd like to be able to do the same for the binutils bits. And
perhaps Tristan will want to do the same for his releases too
(not sure, binutils builders might be a little savvier than GDB
builders).

This patch introduces a new file, called development.sh, which
just sets a variable called $development. In our development branches
(Eg. "master"), it's set to true. But setting it to false would allow
us to change the default behavior of various development-related
features to be turned off; in this case, it turns off the use of
-Werror by default (use --enable-werror to turn it back on).

bfd/ChangeLog:

        * development.sh: New file.
        * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
        Make -Werror the default with GCC only if DEVELOPMENT is true.
        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
        $(srcdir)/development.sh.
        * Makefile.in, configure: Regenerate.

binutils/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gas/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gold/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): New.
        * Makefile.in, configure: Regenerate.

gprof/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

ld/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

opcodes/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gdb/ChangeLog:

        * development.sh: Delete.
        * Makefile.in (config.status): Adjust dependency on development.sh.
        * configure.ac: Adjust development.sh source call.
        * configure: Regenerate.

gdb/gdbserver/ChangeLog:

        * configure.ac: Adjust development.sh source call.
        * Makefile.in (config.status): Adjust dependency on development.sh.
        * configure: Regenerate.

Tested on x86_64-linux by building two ways: One with DEVELOPMENT
set to true, and one with DEVELOPMENT set to false. In the first
case, I could see the use of -Werror, while it disappeared in
the second case.