Use standard_testfile in i386-bp_permanent.exp

This patch is to use standard_testfile in i386-bp_permanent.exp to replace
existing setting to testfile, srcfile and binfile.  So it fixes a problem
in i386-bp_permanent.exp in parallel testing.

$ make -j3 check TESTS='gdb.guile/scm-section-script.exp gdb.arch/i386-bp_permanent.exp'
....
gdb compile failed, /usr/bin/ld: cannot open output file x86/gdb/testsuite/gdb.arch/i386-bp_permanent: No such file or directory
collect2: error: ld returned 1 exit status

gdb/testsuite:

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

	* gdb.arch/i386-bp_permanent.exp: Use standard_testfile.
Revert: linespec.c (iterate_name_matcher): Fix arguments to symbol_name_cmp.

This patch causes regressions in ada's operator_bp.exp test.
That's because it uses wild_match which expects arguments in
the original order.

There is still a bug here.  It's hard to see because either minsyms
save the day, or the needed symtab gets expanded before linespecs
need it because of the call to cp_canonicalize_string_no_typedefs
in linespec.c:find_linespec_symbols.
But if you disable both of those things, then the bug is visible.

bash$ ./gdb -D ./data-directory testsuite/gdb.cp/anon-ns
(gdb) b doit(void)
Function "doit(void)" not defined.

gdb/ChangeLog:

	Revert:
	PR symtab/17602
	* linespec.c (iterate_name_matcher): Fix arguments to symbol_name_cmp.
Fix parallel testing issues in gdb.guile tests

Some gdb.guile tests such as scm-error.exp copies .scm file to
${subdir}/, how ${subdir} doesn't exist in parallel testing
(outputs/${subdir} exists).

$ make -j3 check TESTS='gdb.guile/scm-section-script.exp gdb.guile/scm-error.exp gdb.guile/scm-frame-args.exp'

ERROR: remote_download to host of ../../../../git/gdb/testsuite/gdb.guile/scm-section-script.scm to gdb.guile/t-scm-section-script.scm: cp: cannot create regular file 'gdb.guile/t-scm-section-script.scm': No such file or directory
ERROR: remote_download to host of ../../../../git/gdb/testsuite/gdb.guile/scm-frame-args.scm to gdb.guile/t-scm-frame-args.scm: cp: cannot create regular file
'gdb.guile/t-scm-frame-args.scm': No such file or directory
ERROR: remote_download to host of ../../../../git/gdb/testsuite/gdb.guile/scm-error-1.scm to gdb.guile/t-scm-error-1.scm: cp: cannot create regular file 'gdb.guile/t-scm-error-1.scm': No such file or directory

This patch is to remove the third argument of gdb_remote_download, so
that gdb_remote_download can return the correct location.

Further, these tests only copy .scm files to a different name.  From what
I can tell from the comments, looks we do this to avoid clobbering file
in in-tree build.  However, if source and dest of copy are the same, the
operation is no-op.  So it makes few sense to copy .scm files to a
different names.  I tried in-tree build/test with this patch, test
result isn't changed.

gdb/testsuite:

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

	* gdb.guile/scm-error.exp: Remove the third argument to
	gdb_remote_download.
	* gdb.guile/scm-frame-args.exp: Likewise.
	* gdb.guile/scm-section-script.exp: Likewise.
Revert: Don't enable gdbtk in testsuite

This patch is to revert my previous commit, because we shouldn't remove
gdbtk bits from gdb/testsuite/configure.ac while keep gdbtk bits in
gdb/configure.ac.

gdb/testsuite:

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

	Revert:

	* configure.ac: Remove AC_ARG_ENABLE for gdbtk.  Don't invoke
	AC_CONFIG_SUBDIRS(gdb.gdbtk).
	* configure: Re-generated.
Define bfd_elf32_get_synthetic_symtab for x32

	* elf64-x86-64.c (bfd_elf32_get_synthetic_symtab): New.
Add myself as write after approval maintainer

gdb/ChangeLog:

	* MAINTAINERS (Write After Approval): Add "Andreas From".
Remove const from many struct objfile *

I am just not sure if we should go the route of
        struct objfile * -> const struct objfile *
or the other way of:
        const struct objfile * -> struct objfile *

Normally const adding is better but here I do not see much useful to have any
struct objfile * const and then it just causes pointer compatibility problems.

On Wed, 03 Dec 2014 18:18:44 +0100, Doug Evans wrote:
struct objfile is one case where I've decided to just leave the const
out and not worry about it.

gdb/ChangeLog
2014-12-05  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Remove const from struct objfile *.
	* solib-darwin.c, solib-spu.c, solib-svr4.c, solib.c, solist.h,
	symtab.c, symtab.h: In these files.
Unify lookup_symbol_in_objfile_symtabs

That's right, block_lookup_symbol_primary()'s additional requirement over
block_lookup_symbol() is:
	Function is useful if one iterates all global/static blocks of an
	objfile.

Which is satisfied both in lookup_symbol_in_objfile_symtabs() and in
lookup_global_symbol_from_objfile() thanks to their's ALL_OBJFILE_COMPUNITS.

In fact after reverting that ba715d7fe49c8a59660fbd571b935b29eb7cfbdb above
the lines of code were exactly the same.

So instead of accelerating both lookup_symbol_in_objfile_symtabs() and
lookup_global_symbol_from_objfile() I just accelerated
lookup_symbol_in_objfile_symtabs() and I am proposing to reuse
lookup_symbol_in_objfile_symtabs() in lookup_global_symbol_from_objfile()
instead.  In fact such unification would already save some lines of code even
before the checked-in acceleration patch above.

gdb/ChangeLog
2014-12-05  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* symtab.c (lookup_symbol_in_objfile_symtabs): New declaration.
	(lookup_global_symbol_from_objfile): Call it.
2014-12-05  Steve Ellcey  <sellcey@mips.com>

	* ecoff.c (_bfd_ecoff_slurp_symbol_table): Add cast.
Add string representation of ELF e_flags for AVR.

binutils/ChangeLog:

	* readelf.c (decode_AVR_machine_flags): New function.
	(get_machine_flags): Add EM_AVR case.
Automatic date update in version.in