platform/upstream/binutils.git
11 years agoSmall fix (first word of sentence to start with capital letter)
Joel Brobecker [Tue, 12 Nov 2013 03:31:04 +0000 (07:31 +0400)]
Small fix (first word of sentence to start with capital letter)

gdb/doc/ChangeLog:

        * gdb.texinfo (GDB/MI Miscellaneous Commands): Fix the first
        word of a couple of sentences to start with a capital letter.

11 years agoAdd missing ChangeLog entry for a7e332c24b77168bc61d4ee776bf29c831fbbc88
Joel Brobecker [Tue, 12 Nov 2013 03:20:02 +0000 (07:20 +0400)]
Add missing ChangeLog entry for a7e332c24b77168bc61d4ee776bf29c831fbbc88

(Implement GDB/MI equivalent of "info exceptions" CLI command)

11 years agoDocument "info exceptions" and "-info-ada-exception" new commands.
Joel Brobecker [Fri, 8 Nov 2013 10:21:14 +0000 (14:21 +0400)]
Document "info exceptions" and "-info-ada-exception" new commands.

gdb/doc/ChangeLog:

        * gdb.texinfo (Ada): Add entry in menu for new "Ada Exceptions" node.
        (Ada Exceptions): New node.
        (GDB/MI): Add entry in menu for new "GDB/MI Ada Exceptions
        Commands" node.
        (GDB/MI Ada Exceptions Commands): New node.
        (GDB/MI Miscellaneous Commands): Document new "info-ada-exceptions"
        field in the output of the "-list-features" command.
        * NEWS: Add entry for the new "info exceptions" CLI command,
        and for the new "-info-ada-exceptions" GDB/MI command.

11 years agoImplement GDB/MI equivalent of "info exceptions" CLI command.
Joel Brobecker [Thu, 7 Nov 2013 13:15:46 +0000 (17:15 +0400)]
Implement GDB/MI equivalent of "info exceptions" CLI command.

This patch implements a new GDB/MI command implementing the equivalent
of the "info exceptions" CLI command.  The command syntax is:

    -info-ada-exceptions [REGEXP]

Here is an example of usage (slightly formatted by hand to make it
easier to read):

    -info-ada-exceptions ions\.a_
    ^done,ada-exceptions=
      {nr_rows="2",nr_cols="2",
       hdr=[{width="1",alignment="-1",col_name="name",colhdr="Name"},
            {width="1",alignment="-1",col_name="address",colhdr="Address"}],
       body=[{name="global_exceptions.a_global_exception",
              address="0x0000000000613a80"},
             {name="global_exceptions.a_private_exception",
              address="0x0000000000613ac0"}]}

Also, in order to allow graphical frontends to easily determine
whether this command is available or not, the output of the
"-list-features" command has been augmented to contain
"info-ada-exceptions".

gdb/Changelog:

        * mi/mi-cmds.h (mi_cmd_info_ada_exceptions): Add declaration.
        * mi/mi-cmds.c (mi_cmds): Add entry for -info-ada-exceptions
        command.
        * mi/mi-cmd-info.c: #include "ada-lang.c" and "arch-utils.c".
        (mi_cmd_info_ada_exceptions): New function.
        * mi/mi-main.c (mi_cmd_list_features): Add "info-ada-exceptions".

gdb/testsuite/ChangeLog:

        * gdb.ada/mi_exc_info: New testcase.

11 years agoAdd command to list Ada exceptions
Joel Brobecker [Thu, 7 Nov 2013 13:40:48 +0000 (17:40 +0400)]
Add command to list Ada exceptions

This patch adds a new command "info exceptions" whose purpose is to
provide the list of exceptions currently defined in the inferior.
The usage is:

    (gdb) info exceptions [REGEXP]

Without argument, the command lists all exceptions.  Otherwise,
only those whose name match REGEXP are listed.

For instance:

    (gdb) info exceptions
    All defined Ada exceptions:
    constraint_error: 0x613dc0
    program_error: 0x613d40
    storage_error: 0x613d00
    tasking_error: 0x613cc0
    global_exceptions.a_global_exception: 0x613a80
    global_exceptions.a_private_exception: 0x613ac0

The name of the command, as well as its output is part of a legacy
I inherited long ago. It's output being parsed by frontends such as
GPS, I cannot easily change it. Same for the command name.

The implementation is mostly self-contained, and is written in a way
that should make it easy to implement the GDB/MI equivalent. The
careful reviewer will notice that the code added in ada-lang.h could
normally be made private inside ada-lang.c.  But these will be used
by the GDB/MI implementation.  Rather than making those private now,
only to move them later, I've made them public right away.

gdb/ChangeLog:

        * ada-lang.h: #include "vec.h".
        (struct ada_exc_info): New.
        (ada_exc_info): New typedef.
        (DEF_VEC_O(ada_exc_info)): New vector.
        (ada_exceptions_list): Add declaration.
        * ada-lang.c (ada_is_exception_sym)
        (ada_is_non_standard_exception_sym, compare_ada_exception_info)
        (sort_remove_dups_ada_exceptions_list)
        (ada_exc_search_name_matches, ada_add_standard_exceptions)
        (ada_add_exceptions_from_frame, ada_add_global_exceptions)
        (ada_exceptions_list_1, ada_exceptions_list)
        (info_exceptions_command): New function.
        (_initialize_ada_language): Add "info exception" command.

gdb/testsuite/ChangeLog:

        * gdb.ada/info_exc: New testcase.

11 years ago * gdb.arch/arm-bl-branch-dest.exp: Use gdb_test_file_name instead
Doug Evans [Mon, 11 Nov 2013 23:58:06 +0000 (15:58 -0800)]
* gdb.arch/arm-bl-branch-dest.exp: Use gdb_test_file_name instead
of testfile.

11 years agoFix ChangeLog entries from earlier commit.
Catherine Moore [Mon, 11 Nov 2013 23:34:48 +0000 (15:34 -0800)]
Fix ChangeLog entries from earlier commit.

11 years agodaily update
Alan Modra [Mon, 11 Nov 2013 23:00:02 +0000 (09:30 +1030)]
daily update

11 years ago2013-11-11 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Mon, 11 Nov 2013 19:49:45 +0000 (19:49 +0000)]
2013-11-11  Phil Muldoon  <pmuldoon@redhat.com>

PR python/15629
* NEWS: Add linetable feature.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-linetable entries.
* python/py-linetable.c: New file.
* python/py-symtab.c (stpy_get_linetable): New function.
* python/python-internal.h (symtab_to_linetable_object): Declare.
(gdbpy_initialize_linetable): Ditto.
* python/python.c (_initialize_python): Call
gdbpy_initialize_linetable.

2013-11-11  Phil Muldoon  <pmuldoon@redhat.com>

  * gdb.python/py-linetable.S: New file.
* gdb.python/py-linetable.c: New file.
  * gdb.python/py-linetable.exp: New file.

2013-11-11  Phil Muldoon  <pmuldoon@redhat.com>

* gdb.texinfo (Symbol Tables In Python): Add linetable method entry.
(Line Tables In Python): New node.

11 years ago2013-11-11 Catherine Moore <clm@codesourcery.com>
Catherine Moore [Mon, 11 Nov 2013 16:03:47 +0000 (08:03 -0800)]
2013-11-11  Catherine Moore  <clm@codesourcery.com>

gas/
* config/mips/tc-mips.c (convert_reg_type): Use
INSN_LOAD_MEMORY instead of INSN_LOAD_MEMORY_DELAY.
(reg_needs_delay): Likewise.
(insns_between): Likewise.

include/
* opcode/mips.h (INSN_LOAD_MEMORY_DELAY): Rename to...
(INSN_LOAD_MEMORY): ...this.

opcodes/
* mips-dis.c (print_insn_mips): Use
INSN_LOAD_MEMORY instead of INSN_LOAD_MEMORY_DELAY.
(print_insn_micromips): Likewise.
* mips-opc.c (LDD): Remove.
(CLD): Include INSN_LOAD_MEMORY.
(LM): New.
(mips_builtin_opcodes): Use LM instead of LDD.
        Add LM to load instructions.

11 years agoDandling memory pointers in Ada catchpoints with GDB/MI.
Joel Brobecker [Wed, 30 Oct 2013 10:18:24 +0000 (11:18 +0100)]
Dandling memory pointers in Ada catchpoints with GDB/MI.

When using the GDB/MI commands to insert a catchpoint on a specific
Ada exception, any re-evaluation of that catchpoint (for instance
a re-evaluation performed after a shared library got mapped by the
inferior) fails. For instance, with any Ada program:

    (gdb)
    -catch-exception -e program_error
    ^done,bkptno="1",bkpt={[...]}
    (gdb)
    -exec-run
    =thread-group-started,id="i1",pid="28315"
    =thread-created,id="1",group-id="i1"
    ^running
    *running,thread-id="all"
    (gdb)
    =library-loaded,[...]
    &"warning: failed to reevaluate internal exception condition for catchpoint 1: No definition of \"exec\" in current context.\n"
    &"warning: failed to reevaluate internal exception condition for catchpoint 1: No definition of \"exec\" in current context.\n"
    [...]

The same is true if using an Ada exception catchpoint.

The problem comes from the fact that that we deallocate the strings
given as arguments to create_ada_exception_catchpoint, while the latter
just makes shallow copies of those strings, thus creating dandling
pointers.

This patch fixes the issue by passing freshly allocated strings to
create_ada_exception_catchpoint, while at the same time updating
create_ada_exception_catchpoint's documentation to make it clear
that deallocating the strings is no longer the responsibility of
the caller.

gdb/ChangeLog:

        * ada-lang.c (create_ada_exception_catchpoint): Enhance
        the documentation of fields "except_string" and "condition".
        * mi/mi-cmd-catch.c (mi_cmd_catch_assert): Reallocate
        CONDITION on the heap before passing it to
        create_ada_exception_catchpoint.
        (mi_cmd_catch_exception): Likewise for EXCEPTION_NAME and
        CONDITION.

gdb/testsuite/ChangeLog:

        * gdb.ada/mi_ex_cond: New testcase.

Tested on x86_64-linux.  The "-break-list" test FAILs without
this patch.

11 years agofix "tkill" check
Tom Tromey [Mon, 11 Nov 2013 14:35:57 +0000 (07:35 -0700)]
fix "tkill" check

An earlier patch removed the check for "syscall" since the results
were not used in the C code.  However, the result was used, via the
cache variable, elsewhere in configure.

This patch fixes the problem by checking for "syscall" at the point at
which HAVE_TKILL_SYSCALL is defined.

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

* config.in, configure: Rebuild.
* configure.ac (HAVE_TKILL_SYSCALL): Check for "syscall".

11 years agoMinor reformatting in remote-sim.c (gdbsim_detach declaration).
Joel Brobecker [Mon, 11 Nov 2013 14:13:40 +0000 (18:13 +0400)]
Minor reformatting in remote-sim.c (gdbsim_detach declaration).

gdb/ChangeLog:

        * remote-sim.c (gdbsim_detach): Break declaration into
        shorter lines.  No code change.

11 years agoFix argument type on gdbsim_detach prototype.
Edjunior Barbosa Machado [Mon, 11 Nov 2013 13:00:14 +0000 (07:00 -0600)]
Fix argument type on gdbsim_detach prototype.

2013-11-11  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

* remote-sim.c (gdbsim_detach): Fix prototype.

11 years ago * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Fix hard-coded
Yufeng Zhang [Mon, 11 Nov 2013 10:26:41 +0000 (10:26 +0000)]
* elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Fix hard-coded
size of struct elf_prstatus.

11 years ago2013-11-08 Jan-Benedict Glaw <jbglaw@lug-owl.de
Jan-Benedict Glaw [Mon, 11 Nov 2013 08:35:51 +0000 (09:35 +0100)]
2013-11-08  Jan-Benedict Glaw  <jbglaw@lug-owl.de

* config/tc-ppc.c (ppc_elf_localentry): Add cast.

[BR]: https://sourceware.org/ml/binutils/2013-11/msg00064.html

11 years agoPowerPC64 ELFv2, allocate dynreloc space for ifunc
Alan Modra [Mon, 11 Nov 2013 03:16:26 +0000 (13:46 +1030)]
PowerPC64 ELFv2, allocate dynreloc space for ifunc

* elf64-ppc.c (allocate_dynrelocs): Revert 2013-11-04 change.

11 years agoCorrect elf64-ppc.c handling of protected symbols
Alan Modra [Tue, 5 Nov 2013 23:50:52 +0000 (10:20 +1030)]
Correct elf64-ppc.c handling of protected symbols

Some places in elf64-ppc.c carelessly used SYMBOL_CALLS_LOCAL when
the proper test is SYMBOL_REFERENCES_LOCAL for cases where we take the
address of a protected symbol.  This works OK for function descriptors
but not for ELFv2.  Setting symbols to their global entry stub a
little earlier is to ensure _bfd_elf_hash_symbol allows such symbols
in .gnu.hash.

* elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_REFERENCES_LOCAL
here, not SYMBOL_CALLS_LOCAL.
(ppc64_elf_relocate_section): Likewise.
(size_global_entry_stubs): Set undefined symbols on their global
entry stubs here..
(build_global_entry_stubs): ..rather than here.
(ppc64_elf_build_stubs): Don't reset glink->size before calling
build_global_entry_stubs.

11 years agodaily update
Alan Modra [Sun, 10 Nov 2013 23:00:01 +0000 (09:30 +1030)]
daily update

11 years agodaily update
Alan Modra [Sat, 9 Nov 2013 23:00:02 +0000 (09:30 +1030)]
daily update

11 years agodaily update
Alan Modra [Fri, 8 Nov 2013 23:00:01 +0000 (09:30 +1030)]
daily update

11 years agoChange "set debug dwarf2-read" to take a verbosity level.
Doug Evans [Fri, 8 Nov 2013 19:47:08 +0000 (11:47 -0800)]
Change "set debug dwarf2-read" to take a verbosity level.

* dwarf2read.c (dwarf2_read_debug): Change to unsigned int.
(create_debug_types_hash_table): Only print debugging messages for
each TU if dwarf2-read >= 2.
(process_queue): Ditto.
(_initialize_dwarf2_read): Make "set debug dwarf2-read" a zuinteger.
Update doc string.

doc/
* gdb.texinfo (Debugging Output): Update text for
"set debug dwarf2-read".

11 years agoremove unused gdbserver configury
Tom Tromey [Tue, 5 Nov 2013 17:06:21 +0000 (10:06 -0700)]
remove unused gdbserver configury

This updates gdbserver's configure.ac to remove checks that aren't
directly needed by gdbserver.

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

* configure, config.in: Rebuild.
* configure.ac: Remove unused configury.

11 years agofix a comment in configure.ac
Tom Tromey [Tue, 5 Nov 2013 16:54:13 +0000 (09:54 -0700)]
fix a comment in configure.ac

My grepping around showed that HAVE_MULTIPLE_PROC_FDS is only ever
mentioned in a comment in configure.ac.  Since the macro is long dead,
let's remove the last mention.

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

* configure: Rebuild.
* configure.ac: Remove mentions of HAVE_MULTIPLE_PROC_FDS.

11 years agogdb configure updates
Tom Tromey [Tue, 5 Nov 2013 16:54:03 +0000 (09:54 -0700)]
gdb configure updates

Now that the configury needed for the "common" and "target"
directories is in common.m4, some code in gdb's configure.ac is
redundant.

I ran this script after making an "ID" file using mkid:

   sed -n 's/^.*\(HAVE_[A-Z0-9_]*\).*$/\1/p' config.in |
   while read x; do
     echo ===== $x
     gid $x | egrep -v '^(testsuite|gnulib|common|target|gdbserver)/'
   done

This finds all the spots using HAVE_ defines, and, more importantly,
makes it clear which defines aren't used in the main parts of gdb.

From this I came up with this patch to remove all the unused bits.

There are a few that are subtly used -- for example the configure
script sometimes checks internal configure cache variables, meaning
some checks cannot be removed.

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

* configure, config.in: Rebuild.
* configure.ac: Remove unused configury.

11 years agouse gdb_string.h in m32c-tdep.c
Tom Tromey [Tue, 5 Nov 2013 16:48:26 +0000 (09:48 -0700)]
use gdb_string.h in m32c-tdep.c

m32c-tdep.c is the last user of HAVE_STRING_H in gdb proper.  It
really ought to be using gdb_string.h instead, as the rest of gdb
does.

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

* m32c-tdep.c: Use gdb_string.h.

11 years agoremove link.h checks
Tom Tromey [Tue, 5 Nov 2013 16:45:03 +0000 (09:45 -0700)]
remove link.h checks

The removal of solib-sunos.c also removed the last user of various
macros defined by configure.

This patch removes the corresponding configure code.

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

* configure, config.in: Rebuild.
* configure.ac: Remove all link.h-related checks.

11 years agointroduce common.m4
Tom Tromey [Wed, 24 Apr 2013 16:45:45 +0000 (10:45 -0600)]
introduce common.m4

It has bothered me for a while that files in common/ use macros
defined via autoconf checks, but rely on each configure.ac doing the
proper checks independently.

This patch introduces common/common.m4 which consolidates the checks
assumed by code in common.

The rule I propose is that if something is needed or used by common,
it should be checked for by common.m4.  However, if the check is also
needed by gdb or gdbserver, then it should be duplicated there.

Built and regtested on x86-64 Fedora 18 (though this is hardly the
most strenuous case) and using the Fedora 18 mingw cross compilers.  I
also examined the config.in diffs to ensure that symbols did not go
missing.

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

* acinclude.m4: Include common.m4.
* common/common.m4: New file.
* configure, config.in: Rebuild.
* configure.ac: Use GDB_AC_COMMON.

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

* acinclude.m4: Include common.m4, codeset.m4.
* configure, config.in: Rebuild.
* configure.ac: Use GDB_AC_COMMON.

11 years agoChange "set debug symtab-create" to take a verbosity level.
Doug Evans [Fri, 8 Nov 2013 18:43:23 +0000 (10:43 -0800)]
Change "set debug symtab-create" to take a verbosity level.

* NEWS: Mention that "set debug symtab-create" now accepts a
verbosity level.
* buildsym.c (end_symtab_from_static_block): Call set_symtab_primary
to set the symtab's primary flag.
* jit.c (finalize_symtab): Ditto.
* mdebugread.c (psymtab_to_symtab_1): Ditto.
* symfile.c (allocate_symtab): Only print debugging messages for
symtab_create_debug levels 2 and higher.
* symtab.c (symtab_create_debug): Change type to unsigned int.
(set_symtab_primary): New function.
(_initialize_symtab): Change "set debug symtab-create" to a
zuinteger option.
* symtab.h (set_symtab_primary): Declare.
(symtab_create_debug): Update decl.

doc/
* gdb.texinfo (Debugging Output): Update text for
"set debug symtab-create".

11 years ago* Makefile.in: Regenerate.
tschwinge [Thu, 7 Nov 2013 18:09:31 +0000 (18:09 +0000)]
* Makefile.in: Regenerate.

Follow-up to r204173.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204536 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago* Makefile.tpl: Fix typo. * Makefile.in: Regenerate.
tschwinge [Thu, 7 Nov 2013 15:08:10 +0000 (15:08 +0000)]
* Makefile.tpl: Fix typo. * Makefile.in: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204520 138bc75d-0d04-0410-961f-82ee72b054a4

11 years agoDisable libcilkrts when C++ is not used.
bviyer [Tue, 5 Nov 2013 14:43:37 +0000 (14:43 +0000)]
Disable libcilkrts when C++ is not used.

2013-11-04  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        * configure.ac: Added libcilkrts to noconfig list when C++ is not
        supported.
        * configure: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204396 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago/ * Makefile.tpl (STAGE1_CONFIGURE_FLAGS): Pass --disable-build-format-warnings....
jason [Wed, 30 Oct 2013 17:30:05 +0000 (17:30 +0000)]
/ * Makefile.tpl (STAGE1_CONFIGURE_FLAGS): Pass --disable-build-format-warnings. gcc/ * configure.ac (loose_warn): Add -Wno-format if --disable-build-format-warnings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204217 138bc75d-0d04-0410-961f-82ee72b054a4

11 years agoAdded Cilk runtime library (libcilkrts) into GCC.
bviyer [Tue, 29 Oct 2013 18:37:47 +0000 (18:37 +0000)]
Added Cilk runtime library (libcilkrts) into GCC.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204173 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago2013-10-29 Marc Glisse <marc.glisse@inria.fr>
glisse [Tue, 29 Oct 2013 13:15:48 +0000 (13:15 +0000)]
2013-10-29 Marc Glisse <marc.glisse@inria.fr>

PR tree-optimization/58689
include/
* ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro.
* libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename,
concat_copy): Mark with attributes nonnull(1) and returns_nonnull.
(concat, reconcat, concat_copy2, choose_temp_base, xstrerror,
xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init):
Mark with attribute returns_nonnull.

libiberty/
* concat.c: Remove note about xmalloc.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204159 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago* testsuite/test-demangle.c: Include unistd.h.
gerald [Sun, 27 Oct 2013 18:35:20 +0000 (18:35 +0000)]
* testsuite/test-demangle.c: Include unistd.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204107 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago* Makefile.def (target_modules): Remove libmudflap (languages): Remove check-target...
law [Sat, 26 Oct 2013 10:14:34 +0000 (10:14 +0000)]
* Makefile.def (target_modules): Remove libmudflap (languages): Remove check-target-libmudflap). * Makefile.in: Rebuilt. * Makefile.tpl (check-target-libmudflap-c++): Remove. * configure.ac (target_libraries): Remove target-libmudflap. Remove checks which disabled libmudflap on some systems. * configure: Rebuilt. * libmudflap: Directory removed.

* Makefile.in (C_COMMON_OBJS): Remove tree-mudflap.
(OBJS): Remove tree-nomudflap.o
(GTFILES): Remove tree-mudflap.c
* builtins.c (expand_builtin_alloc): Remove mudflap support.
* gcc.c (MFWRAP_SPEC, MFLIB_SPEC): Likewise.
(mfwrap_spec, mflib_spec): Likewise.
(cpp_unique_options, cc1_options, static_specs): Likewise.
* gimplify (gimplify_vla_decl, build_va_arg_indirect_ref): Likewise.
* passes.def: Likewise.
* toplev.c (compile_file, process_options): Likewise.
* tree-inline.c (copy_tree_r): Likewise.
* tree-pass.,h (make_pass_mudflap_1, make_pass_mudflap_2): Likewise.
* varasm.c (make_decl_rtl, make_decl_rtl_for_debug): Likewise.
(build_constant_desc, output_constant_def_contents): Likewise.
(categorize_decl_for_section): Likewise.
* tree-mudflap.c: Removed.
* tree-mudflap.h: Removed.
* tree-nomudflap.c: Removed.
* bfin/uclinux.h (MFWRAP_SPEC): Remove.
* moxie/uclinux.h (MFWRAP_SPEC): Likewise.
* rs6000/aix.h (MFWRAP_SPEC, MFLIB_SPEC): Likewise.
* config/sol2.h (MFLIB_SPEC): Likewise.
* doc/install.texi: Remove mudflap references.
* doc/passes.texi: Similarly.
* doc/sourcebuild.texi: Similarly.
* doc/invoke.texi: Remove mudlfap related options.

* c-family/c-common.c (c_define_builtins): Remove mudflap support.
* c-family/c.opt: Ignore and warn for mudflap options.

* g++.dg/torture/pr49309.C: Removed.
* gcc.dg/dfp/pr35739.c: Removed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204090 138bc75d-0d04-0410-961f-82ee72b054a4

11 years agolibiberty/ 2013-10-25 Gary Benson <gbenson@redhat.com>
gary [Fri, 25 Oct 2013 13:56:51 +0000 (13:56 +0000)]
libiberty/ 2013-10-25 Gary Benson <gbenson@redhat.com>

* cp-demangle.c (struct d_saved_scope): New structure.
(struct d_print_info): New fields saved_scopes and
num_saved_scopes.
(d_print_init): Initialize the above.
(d_print_free): New function.
(cplus_demangle_print_callback): Call the above.
(d_copy_templates): New function.
(d_print_comp): New variables saved_templates and
need_template_restore.
[DEMANGLE_COMPONENT_REFERENCE,
DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first
time the component is traversed, and use the captured scope for
subsequent traversals.
* testsuite/demangle-expected: Add regression test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204068 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago* testsuite/test-expandargv.c: Include unistd.h.
gerald [Wed, 23 Oct 2013 21:31:45 +0000 (21:31 +0000)]
* testsuite/test-expandargv.c: Include unistd.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203993 138bc75d-0d04-0410-961f-82ee72b054a4

11 years agoFix up ChangeLog entries (name, e-mail, formatting, otherwise).
gerald [Wed, 23 Oct 2013 21:30:54 +0000 (21:30 +0000)]
Fix up ChangeLog entries (name, e-mail, formatting, otherwise).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203992 138bc75d-0d04-0410-961f-82ee72b054a4

11 years ago2013-10-22 Sterling Augustine <saugustine@google.com>
sterling [Tue, 22 Oct 2013 18:12:28 +0000 (18:12 +0000)]
2013-10-22 Sterling Augustine <saugustine@google.com>

* gdb/gdb-index.h: Merge from gdb tree.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203931 138bc75d-0d04-0410-961f-82ee72b054a4

11 years agoRemove CpuNop from CPU_K6_2_FLAGS
H.J. Lu [Fri, 8 Nov 2013 17:42:08 +0000 (09:42 -0800)]
Remove CpuNop from CPU_K6_2_FLAGS

PR gas/16140
* i386-gen.c (cpu_flag_init): Remove CpuNop from CPU_K6_2_FLAGS.
* i386-init.h: Regenerated.

11 years agoRemove strayed entry
H.J. Lu [Fri, 8 Nov 2013 16:46:07 +0000 (08:46 -0800)]
Remove strayed entry

11 years agoconstify to_detach
Tom Tromey [Tue, 19 Mar 2013 15:23:17 +0000 (09:23 -0600)]
constify to_detach

This patch constifies the target_ops method to_detach.

This is a small cleanup, but also, I think, a bug-prevention fix,
since gdb already acts as if the "args" argument here was const.

In particular, top.c:quit_force calls kill_or_detach via
iterate_over_inferiors.  kill_or_detach calls target_detach, passing
the same argument each time.  So, if one of these methods was not
const-correct, then kill_or_detach would change its behavior in a
strange way.

I could not build every target I modified in this patch.  I've
inspected them all by hand, though.  Many targets do not use the
"args" parameter; a couple pass it to atoi; and a few pass it on to
the to_detach method of the target beneath.  The only code that
required a real change was in linux-nat.c, and that only needed the
introduction of a temporary variable for const-correctness.

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

* aix-thread.c (aix_thread_detach): Update.
* corelow.c (core_detach): Update.
* darwin-nat.c (darwin_detach): Update.
* dec-thread.c (dec_thread_detach): Update.
* gnu-nat.c (gnu_detach): Update.
* go32-nat.c (go32_detach): Update.
* inf-ptrace.c (inf_ptrace_detach): Update.
* inf-ttrace.c (inf_ttrace_detach): Update.
* linux-fork.c (linux_fork_detach): Update.
* linux-fork.h (linux_fork_detach): Update.
* linux-nat.c (linux_nat_detach): Update.  Introduce "tem"
local for const-correctness.
* linux-thread-db.c (thread_db_detach): Update.
* monitor.c (monitor_detach): Update.
* nto-procfs.c (procfs_detach): Update.
* procfs.c (procfs_detach): Update.
* record.c (record_detach): Update.
* record.h (record_detach): Update.
* remote-m32r-sdi.c (m32r_detach): Update.
* remote-mips.c (mips_detach): Update.
* remote-sim.c (gdbsim_detach): Update.
* remote.c (remote_detach_1, remote_detach)
(extended_remote_detach): Update.
* sol-thread.c (sol_thread_detach): Update.
* target.c (target_detach): Make "args" const.
(init_dummy_target): Update.
* target.h (struct target_ops) <to_detach>: Make argument const.
(target_detach): Likewise.
* windows-nat.c (windows_detach): Update.

11 years agoFix email address in earlier entry.
Doug Evans [Fri, 8 Nov 2013 07:27:58 +0000 (23:27 -0800)]
Fix email address in earlier entry.

11 years agoPR 11786
Doug Evans [Fri, 8 Nov 2013 00:43:39 +0000 (16:43 -0800)]
PR 11786
*  solib-svr4.c (svr4_exec_displacement): Ignore filesz, memsz, flags
and align fields for PT_GNU_RELRO segments.

testsuite/
* gdb.base/gcore-relro-pie.c: New file.
* gdb.base/gcore-relro-pie.exp: New file.

11 years ago Add pretty-printing of .debug_gnu_pubnames, .debug_gnu_pubtypes.
Doug Evans [Thu, 7 Nov 2013 22:58:41 +0000 (14:58 -0800)]
Add pretty-printing of .debug_gnu_pubnames, .debug_gnu_pubtypes.
* dwarf.c (get_gdb_index_symbol_kind_name): New function.
(display_debug_pubnames_worker): Renamed from display_debug_pubnames.
Add support for .debug_gnu_pubnames, .debug_gnu_pubtypes.
(display_debug_pubnames, display_debug_pubnames_gnu): New functions.
(display_gdb_index): Redo printing of symbol kind.
(debug_displays): Add .debug_gnu_pubnames, .debug_gnu_pubtypes.
* dwarf.h (dwarf_section_display_enum): Add gnu_pubnames, gnu_pubtypes.
* readelf.c (process_section_headers): Add gnu_pubnames, gnu_pubtypes.

11 years agodaily update
Alan Modra [Thu, 7 Nov 2013 23:00:01 +0000 (09:30 +1030)]
daily update

11 years agoSet CPU type in BFD backend for x86_64-nacl* and i?86-nacl* targets
Roland McGrath [Wed, 6 Nov 2013 22:47:05 +0000 (14:47 -0800)]
Set CPU type in BFD backend for x86_64-nacl* and i?86-nacl* targets

bfd/
* archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't
collide with bfd_mach_l1om.
* bfd-in2.h: Regenerate.

* elf32-i386.c (elf32_i386_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf32-i386-nacl definition.
* elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf64-x86-64-nacl definition.
(elf32_x86_64_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf32-x86-64-nacl definition.

binutils/
* objdump.c (dump_dwarf): Grok bfd_mach_x86_64_nacl and
bfd_mach_x64_32_nacl as equivalent to bfd_mach_x86_64.

ld/testsuite/
* ld-x86-64/x86-64.exp (mixed1, mixed2): Loosen error string match
so it accepts "i386:nacl" in place of "i386".
* ld-x86-64/ilp32-2.d: Likewise.
* ld-x86-64/ilp32-3.d: Likewise.
* ld-x86-64/lp64-2.d: Likewise.
* ld-x86-64/lp64-3.d: Likewise.

11 years agosim/ChangeLog: Correct bug number in previous commit.
Will Newton [Thu, 7 Nov 2013 16:14:51 +0000 (16:14 +0000)]
sim/ChangeLog: Correct bug number in previous commit.

11 years agosim/arm: Prevent crash when running sim with no binary.
Will Newton [Tue, 29 Oct 2013 16:43:07 +0000 (09:43 -0700)]
sim/arm: Prevent crash when running sim with no binary.

2013-11-07  Will Newton  <will.newton@linaro.org>

PR gdb/15508
* arm/wrapper.c (sim_create_inferior): Call init before
accessing STATE.

11 years agosim/arm: Prevent NULL pointer dereference in sim_create_inferior.
Will Newton [Tue, 29 Oct 2013 16:20:48 +0000 (09:20 -0700)]
sim/arm: Prevent NULL pointer dereference in sim_create_inferior.

2013-11-07  Will Newton  <will.newton@linaro.org>

PR gdb/9195
* arm/wrapper.c (sim_create_inferior): Avoid calling
bfd_get_mach with a NULL bfd.

11 years ago2013-11-07 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 7 Nov 2013 13:08:40 +0000 (13:08 +0000)]
2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

      * ChangeLog: Fix blank lines between entry and PR.

11 years ago2013-11-07 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 7 Nov 2013 12:32:31 +0000 (12:32 +0000)]
2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

        PR python/15747
        * python/py-cmd.c: Add COMPLETE_EXPRESSION constant.

2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

        * gdb.python/py-cmd.exp: Add COMPLETE_EXPRESSION tests.
        * gdb.python/py-cmd.c: New File.

2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

        * gdb.texinfo (Commands In Python): Document COMPLETE_EXPRESSION
        constant.

11 years ago2013-11-07 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Thu, 7 Nov 2013 12:04:45 +0000 (12:04 +0000)]
2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

* python/py-breakpoint.c (bppy_get_temporary): New function.
(bppy_init): New keyword: temporary. Parse it and set breakpoint
to temporary if True.

2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

* gdb.python/py-breakpoint.exp: Add temporary breakpoint tests.

2013-11-07  Phil Muldoon  <pmuldoon@redhat.com>

* gdb.texinfo (Breakpoints In Python): Document temporary
option in breakpoint constructor, and add documentation to the
temporary attribute.

11 years ago2013-11-07 Jose E. Marchesi <jose.marchesi@oracle.com>
Jose E. Marchesi [Thu, 7 Nov 2013 10:04:28 +0000 (02:04 -0800)]
2013-11-07  Jose E. Marchesi  <jose.marchesi@oracle.com>

* sparc-tdep.c (sparc_analyze_control_transfer): Assertion
removed to allow analyzing unconditional branch instructions
with PC-relative offsets of zero.

11 years agoRemove varobj_language_string, languages and varobj_languages
Yao Qi [Wed, 9 Oct 2013 14:10:14 +0000 (22:10 +0800)]
Remove varobj_language_string, languages and varobj_languages

This patch does some cleanups, removing some language-related stuff.
Note that mi_cmd_var_info_expression uses varobj_language_string,
which is redundant, because we can get language name from
lang->la_natural_name.

varobj_language_string doesn't have "Ada", which looks like a bug to
me.  With this patch applied, this problem doesn't exist, because the
language name is got from the same place (field la_natural_name).

gdb:

2013-11-07  Yao Qi  <yao@codesourcery.com>

* mi/mi-cmd-var.c: Include "language.h".
(mi_cmd_var_info_expression): Get language name from
language_defn.
* varobj.c (varobj_language_string): Remove.
(variable_language): Remove declaration.
(languages): Remove.
(varobj_get_language): Change the type of return value.
(variable_language): Remove.
* varobj.h (enum varobj_languages): Remove.
(varobj_language_string): Remove declaration.
(varobj_get_language): Update declaration.

gdb/doc:

2013-11-07  Yao Qi  <yao@codesourcery.com>

* gdb.texinfo (GDB/MI Variable Objects): Update doc about the
output of "-var-info-expression".

11 years agoNew field 'la_natural_name' in struct language_defn
Yao Qi [Sat, 26 Oct 2013 08:00:11 +0000 (16:00 +0800)]
New field 'la_natural_name' in struct language_defn

This patch adds "natural name" of each supported languages, which will
be used by the next patch.

gdb:

2013-11-07  Yao Qi  <yao@codesourcery.com>

* language.h (struct language_defn) <la_natural_name>: New field.
* ada-lang.c (ada_language_defn): Initialize field 'la_natural_name'.
* c-lang.c (c_language_defn): Likewise.
(cplus_language_defn, asm_language_defn): Likewise.
* d-lang.c (d_language_defn): Likewise.
* f-lang.c (f_language_defn): Likewise.
* go-lang.c (go_language_defn): Likewise.
* jv-lang.c (java_language_defn): Likewise.
* language.c (unknown_language_defn ): Likewise.
(auto_language_defn): Likewise.
* m2-lang.c (m2_language_defn): Likewise.
* objc-lang.c (objc_language_defn): Likewise.
* opencl-lang.c (opencl_language_defn): Likewise.
* p-lang.c (pascal_language_defn): Likewise.

11 years agoConstify 'la_name' in struct language_defn
Yao Qi [Sat, 26 Oct 2013 07:37:15 +0000 (15:37 +0800)]
Constify 'la_name' in struct language_defn

Hi,
When I add another name of language, I find field 'la_name' can be
'const char *'.  This patch is to constify it.

gdb:

2013-11-07  Yao Qi  <yao@codesourcery.com>

* language.c (language_str): Return const char *.
(add_language): Add const to 'language_names'
* language.h (struct language_defn) <la_name>: Add const.
(language_str: Update declaration.

11 years ago * gdb.python/py-arch.exp: Tweak test name for bad memory access test.
Doug Evans [Thu, 7 Nov 2013 06:39:27 +0000 (22:39 -0800)]
* gdb.python/py-arch.exp: Tweak test name for bad memory access test.

11 years agodaily update
Alan Modra [Wed, 6 Nov 2013 23:00:01 +0000 (09:30 +1030)]
daily update

11 years agoS390: Fix TDB regset recognition
Andreas Arnez [Tue, 5 Nov 2013 17:43:50 +0000 (18:43 +0100)]
S390: Fix TDB regset recognition

When checking for the presence of the TDB regset, the current code
interprets ENODATA from PTRACE_GETREGSET as an indication that the TDB
regset *could* occur on this system, but the inferior stopped outside
a transaction.  However, the Linux kernel actually reports ENODATA
even on systems without the transactional execution facility.  Thus
the logic is now changed to check the TE field in the HWCAP as well.

This version also checks the existence of the TDB regset -- just to be
on the safe side when running on TE-enabled hardware with a kernel
that does not offer the TDB regset for some reason.

gdb/
* s390-linux-nat.c (s390_read_description): Consider the TE field
in the HWCAP for determining 'have_regset_tdb'.

gdbserver/
* linux-s390-low.c (HWCAP_S390_TE): New define.
(s390_arch_setup): Consider the TE field in the HWCAP for
determining 'have_regset_tdb'.

11 years agoFix assert failure with --emit-relocs and .eh_frame sections.
Cary Coutant [Wed, 6 Nov 2013 18:34:26 +0000 (10:34 -0800)]
Fix assert failure with --emit-relocs and .eh_frame sections.

gold/
PR gold/15758
* object.cc (Sized_relobj_file::do_layout): Handle .eh_frame sections
before reloc sections.

11 years agogdb/dwarf2read.c: Sanity check DW_AT_sibling values.
Will Newton [Fri, 1 Nov 2013 21:14:50 +0000 (14:14 -0700)]
gdb/dwarf2read.c: Sanity check DW_AT_sibling values.

When reading objects with corrupt debug information it is possible that
the sibling chain can form a loop, which leads to an infinite loop and
memory exhaustion.

Avoid this situation by disregarding and DW_AT_sibling values that point
to a lower address than the current entry.

gdb/ChangeLog:

2013-11-06  Will Newton  <will.newton@linaro.org>

PR gdb/12866
* dwarf2read.c (skip_one_die): Sanity check DW_AT_sibling
values.  (read_partial_die): Likewise.

11 years agoRevert "2013-11-06 Muhammad Bilal <mbilal@codesourcery.com>"
Muhammad Bilal [Wed, 6 Nov 2013 14:43:45 +0000 (19:43 +0500)]
Revert "2013-11-06  Muhammad Bilal  <mbilal@codesourcery.com>"

This reverts commit dd99d3d15a7d8f41e139dea7871c4fe44cd4b616.

11 years ago2013-11-06 Muhammad Bilal <mbilal@codesourcery.com>
Muhammad Bilal [Wed, 6 Nov 2013 13:53:50 +0000 (18:53 +0500)]
2013-11-06  Muhammad Bilal  <mbilal@codesourcery.com>

PR cli/15224
* top.c (init_main): 'set history save on' by default.

11 years ago[DOC] shell startup files, clarifications and fixes.
Pedro Alves [Wed, 6 Nov 2013 12:26:55 +0000 (12:26 +0000)]
[DOC] shell startup files, clarifications and fixes.

When Bash is started non-interactively, it runs the script pointed by
the BASH_ENV environment variable, not .bashrc.  While at it, mention
Z shell in the warning too, and mention non-interactive mode
explicitly.

gdb/doc/
2013-11-06  Pedro Alves  <palves@redhat.com>

* gdb.texinfo (Starting) <set/show startup-with-shell>: Mention
non-interactive mode.
(Environment) <shell startup files warning>: Mention
non-interactive mode.  Mention .zshenv for Z shell, and talk about
BASH_ENV instead of .bashrc for BASH.

11 years ago2013-11-06 Muhammad Bilal <mbilal@codesourcery.com>
Muhammad Bilal [Wed, 6 Nov 2013 06:42:52 +0000 (11:42 +0500)]
2013-11-06  Muhammad Bilal  <mbilal@codesourcery.com>

       PR cli/16122
       * top.c (command_line_input): Unify interactivity tests to use
       input_from_terminal_p.
       * event-top.c (command_line_handler): Likewise.

11 years agoTest on solib load and unload
Yao Qi [Wed, 25 Sep 2013 03:46:10 +0000 (11:46 +0800)]
Test on solib load and unload

This patch is to add a test case to on the performance of GDB handling
load and unload of shared library.

In V4:

 - Handle malloc and dlopen failure,
 - Document test parameters.

In V3, there are some changes,

 - Adapt to perf test framework changes.
 - Measure load and unload separately.

In V2, there are some changes,

 - A new proc gdb_produce_source to produce source files.  I tried to
   move all source file generation code out of solib.exp, but
   compilation step still needs to know the generated file names.  I
   have to hard-code the file names in compilation step, which is not
   good to me, so I give up on this moving.
 - SOLIB_NUMBER -> SOLIB_COUNT
 - New variable SOLIB_DLCLOSE_REVERSED_ORDER to control the order of
   iterating a list of shared libs to dlclose them.
 - New variable GDB_PERFORMANCE to enable these perf test cases.
 - Remove dlsym call in solib.c.
 - Update solib.py for the updated framework.

gdb/testsuite/

* lib/gdb.exp (gdb_produce_source): New procedure.
* gdb.perf/solib.c: New.
* gdb.perf/solib.exp: New.
* gdb.perf/solib.py: New.

11 years agoMention perf test in testsuite/README
Yao Qi [Wed, 16 Oct 2013 06:50:16 +0000 (14:50 +0800)]
Mention perf test in testsuite/README

gdb/testsuite:

2013-11-06  Yao Qi  <yao@codesourcery.com>

* README: Mention performance tests.

11 years agoPerf test framework
Yao Qi [Tue, 24 Sep 2013 09:56:26 +0000 (17:56 +0800)]
Perf test framework

This patch adds a basic framework to do performance testing for GDB.
perftest.py is about the test case, testresult.py is about test
results, and how are they saved.  reporter.py is about how results
are reported (in what format).  measure.py is about measuring the
execution of tests by a collection of measurements.

In V5:
 - Simplify perftest.exp.

In V4:

 - Rename MeasurementCPUTime to MeasurementCpuTime,
 - Add 'pass' in empty method,
 - Simplify string comparison in perftest.exp.
 - Rename GDB_PERFORMANCE to GDB_PERFTEST_MODE and rename
   GDB_PERFORMANCE_TIMEOUT to GDB_PERFTEST_TIMEOUT.

In V3, there are some changes,

 - Add wall time measurement, cpu time measurement and vmsize
   measurement.
 - Rename SingleStatisticTestCase to TestCaseWithBasicMeasurements,
   which measures cpu time, wall time, and memory (vmsize).
 - GDB_PERFORMANCE=run|compile|both to control the mode of perf
   testing.
 - New GDB_PERFORMANCE_TIMEOUT to specify the timeout.
 - Split proc prepare to proc compile and startup.
 - Disable GC while doing measurements.

In V2, there are several changes to address Doug and Sanimir's
comments.

 - Add copyright header and docstring in perftest/__init__.py
 - Remove config.py.
 - Fix docstring format.
 - Rename classes "SingleVariable" to "SingleStatistic".
 - Don't extend gdb.Function in class TestCase.  Add a new method run
   to run the test case so that we can pass parameters to test.
 - Allow to customize whether to warm up and to append test log.
 - Move time measurement into test harness.  Add a new class
   Measurement for a specific measurement and a new class Measure to
   measure them for a given test case.
 - A new class ResultFactory to create instances of TestResult.
 - New file lib/perftest.exp, which is to do some preparations and
   cleanups to simplify each *.exp file.
 - Skip compilation step if GDB_PERFORMANCE_SKIP_COMPILE is set.

gdb/testsuite/

2013-11-06  Yao Qi  <yao@codesourcery.com>

* lib/perftest.exp: New.
* gdb.perf/lib/perftest/__init__.py: New.
* gdb.perf/lib/perftest/measure.py: New.
* gdb.perf/lib/perftest/perftest.py: New.
* gdb.perf/lib/perftest/reporter.py: New.
* gdb.perf/lib/perftest/testresult.py: New.

11 years agoNew make target 'check-perf' and new dir gdb.perf
Yao Qi [Wed, 25 Sep 2013 04:41:45 +0000 (12:41 +0800)]
New make target 'check-perf' and new dir gdb.perf

We add a new dir gdb.perf in testsuite for all performance tests.
However, current 'make check' logic will either run dejagnu in
directory testsuite or iterate all gdb.* directories which has *.exp
files.  Both of them will run tests in gdb.perf.  We want to achieve:

 1) typical 'make check' should not run performance tests.  In each perf
    test case, GDB_PERFTEST_MODE is checked.  If it doesn't exist, return.
 2) run perf tests easily.  We add a new makefile target 'check-perf'.

gdb:

2013-11-06  Yao Qi  <yao@codesourcery.com>

* Makefile.in (check-perf): New target.

gdb/testsuite:

2013-11-06  Yao Qi  <yao@codesourcery.com>

* Makefile.in (check-perf): New target.
* configure.ac (AC_OUTPUT): Output Makefile in gdb.perf.
* configure: Re-generated.
* gdb.perf/Makefile.in: New.

11 years ago* elf32-rl78.c (elf32_rl78_relax_delete_bytes): Make sure relocs
DJ Delorie [Wed, 6 Nov 2013 03:13:04 +0000 (22:13 -0500)]
* elf32-rl78.c (elf32_rl78_relax_delete_bytes): Make sure relocs
are loaded before trying to use them.

11 years agodaily update
Alan Modra [Tue, 5 Nov 2013 23:00:01 +0000 (09:30 +1030)]
daily update

11 years agogas/
Yufeng Zhang [Tue, 5 Nov 2013 20:54:22 +0000 (20:54 +0000)]
gas/

* config/tc-aarch64.c (parse_sys_reg): Update to use aarch64_sys_reg;
call aarch64_sys_reg_deprecated_p and warn about the deprecated
system registers.

gas/testsuite/

* gas/aarch64/deprecated.d: New file.
* gas/aarch64/deprecated.l: New file.
* gas/aarch64/deprecated.s: New file.
* gas/aarch64/sysreg-1.s: Add tests.
* gas/aarch64/sysreg-1.d: Add tests.

include/opcode/

* aarch64.h (aarch64_sys_reg): New typedef.
(aarch64_sys_regs): Change to define with the new type.
(aarch64_sys_reg_deprecated_p): Declare.

opcodes/

* aarch64-opc.c (F_DEPRECATED): New macro.
(aarch64_sys_regs): Update; flag "spsr_svc" and "spsr_hyp" with
F_DEPRECATED.
(aarch64_print_operand): Call aarch64_sys_reg_deprecated_p on
AARCH64_OPND_SYSREG.

11 years agogas/
Yufeng Zhang [Tue, 5 Nov 2013 20:50:18 +0000 (20:50 +0000)]
gas/

* config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_COND1.

gas/testsuite/

* gas/aarch64/alias.s: Add tests.
* gas/aarch64/alias.d: Update.
* gas/aarch64/no-aliases.d: Update.
* gas/aarch64/diagnostic.s: Add tests.
* gas/aarch64/diagnostic.l: Update.
* gas/aarch64/illegal.s: Add tests.
* gas/aarch64/illegal.l: Update.

include/opcode/

* aarch64.h (enum aarch64_operand_class): Add AARCH64_OPND_CLASS_COND.
(enum aarch64_opnd): Add AARCH64_OPND_COND1.

opcodes/

* aarch64-dis.c (convert_ubfm_to_lsl): Check for cond != '111x'.
(convert_from_csel): Likewise.
* aarch64-opc.c (operand_general_constraint_met_p): Handle
AARCH64_OPND_CLASS_COND and AARCH64_OPND_COND1.
(aarch64_print_operand): Handle AARCH64_OPND_COND1.
* aarch64-tbl.h (aarch64_opcode_table): Use COND1 instead of
COND for cinc, cset, cinv, csetm and cneg.
(AARCH64_OPERANDS): Add entry for AARCH64_OPND_COND1.
* aarch64-asm-2.c: Re-generated.
* aarch64-dis-2.c: Ditto.
* aarch64-opc-2.c: Ditto.

11 years agoopcodes/
Yufeng Zhang [Tue, 5 Nov 2013 20:46:24 +0000 (20:46 +0000)]
opcodes/

* aarch64-opc.c (set_syntax_error): New function.
(operand_general_constraint_met_p): Replace set_other_error
with set_syntax_error.

gas/testsuite/

* gas/aarch64/diagnostic.s: Add tests of ldp/stp.
* gas/aarch64/diagnostic.l: Update.

11 years agoPass ignored unresolved relocations to ld backend
H.J. Lu [Tue, 5 Nov 2013 18:29:44 +0000 (10:29 -0800)]
Pass ignored unresolved relocations to ld backend

bfd/

PR ld/4409
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for
error ignored.
* elf-m10200.c (mn10200_elf_relocate_section): Updated.
* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
* elf32-arm.c (elf32_arm_relocate_section): Likewise.
* elf32-avr.c (elf32_avr_relocate_section): Likewise.
* elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
(bfin_relocate_section): Likewise.
* elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-crx.c (elf32_crx_relocate_section): Likewise.
* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
* elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
* elf32-frv.c (elf32_frv_relocate_section): Likewise.
* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
* elf32-i386.c (elf_i386_relocate_section): Likewise.
* elf32-i860.c (elf32_i860_relocate_section): Likewise.
* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-metag.c (elf_metag_relocate_section): Likewise.
* elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
* elf32-mep.c (mep_elf_relocate_section): Likewise.
* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
* elf32-mt.c (mt_elf_relocate_section): Likewise.
* elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-rl78.c (rl78_elf_relocate_section): Likewise.
* elf32-rx.c (rx_elf_relocate_section): Likewise.
* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
* elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-v850.c (v850_elf_relocate_section): Likewise.
* elf32-vax.c (elf_vax_relocate_section): Likewise.
* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
* elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.

* elfnn-ia64.c (elfNN_ia64_relocate_section): Skip if error
from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored.

ld/testsuite/

PR ld/4409
* ld-ia64/error1.d: New file.
* ld-ia64/error1.s: Likewise.
* ld-ia64/error2.d: Likewise.
* ld-ia64/error3.d: Likewise.

11 years agoconfig/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.
Will Newton [Fri, 1 Nov 2013 00:21:11 +0000 (17:21 -0700)]
config/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.

Parsing a vector mov instruction currently leads to a phantom undefined
symbol being added to the symbol table. e.g.:

       .text
       mov     x0, v0.D[0]

Produces an undefined symbol called "v0.D".

gas/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

PR gas/16103
* config/tc-aarch64.c (parse_operands): Avoid trying to
parse a vector register as an immediate.

gas/testsuite/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

* gas/aarch64/advsimd-mov-bad.d: New file.
* gas/aarch64/advsimd-mov-bad.s: Likewise.

11 years agogdb/arm-tdep.c: Use filtered output in arm_print_float_info.
Will Newton [Sat, 2 Nov 2013 00:44:19 +0000 (17:44 -0700)]
gdb/arm-tdep.c: Use filtered output in arm_print_float_info.

gdb/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

PR gdb/7670
* arm-tdep.c (print_fpu_flags): Use filtered output routines.
(arm_print_float_info): Likewise.

11 years agoHide ppc64 .TOC. from --export-dynamic
Alan Modra [Tue, 5 Nov 2013 02:08:51 +0000 (12:38 +1030)]
Hide ppc64 .TOC. from --export-dynamic

I can't see any good reason why anyone would want a dynamic .TOC., so
hide it in a way that is respected by _bfd_elf_export_symbol.  This
also fixes an abort in relocate_section on not finding sreloc for .TOC.

* elf64-ppc.c (ppc64_elf_func_desc_adjust): Make .TOC. defined and
hidden.
(ppc64_elf_set_toc): Adjust.

11 years agoUpdate elf64-ppc.c to use elf_link_hash_table shortcuts.
Alan Modra [Tue, 5 Nov 2013 01:22:26 +0000 (11:52 +1030)]
Update elf64-ppc.c to use elf_link_hash_table shortcuts.

These shortcuts to dynamic sections in ppc_link_hash_table predated
their geneneric elf hash table equivalents.

* elf64-ppc.c (struct ppc_link_hash_table): Remove got, plt, relplt,
iplt, reliplt.  Update all references to use elf.sgot, elf.splt,
elf.srelplt, elf.iplt and elf.irelplt.

11 years agodaily update
Alan Modra [Mon, 4 Nov 2013 23:00:03 +0000 (09:30 +1030)]
daily update

11 years agoswitch to fully parallel mode
Tom Tromey [Tue, 27 Aug 2013 17:52:25 +0000 (11:52 -0600)]
switch to fully parallel mode

This switches "make check" to fully parallel mode.

One primary issue facing full parallelization is the overhead of
"runtest".  On my machine, if I "touch gdb.base/empty.exp", making a
new file, and then "time runtest.exp", it takes 0.08 seconds.

Multiply this by the 1008 (in my configuration) tests and you get ~80
seconds.  This is the overhead that would theoretically be present if
all tests were run in parallel.

However, the problem isn't nearly as bad as this, for two reasons.

First, you must divide by the number of jobs, assuming perfect
parallelization -- reasonably true for small -j numbers, based on the
results I see.

Second, the current test suite parallelization approach bundles the
tests, largely by directory, but also splitting up gdb.base into two
halves.

I was curious to see how the current bundling played out in practice,
so I ran "make -j1 check RUNTEST='/bin/time runtest'".  This invokes
the parallel mode (thus the bundling) and then shows the time taken by
each invocation of runtest.

Then, I ran "/bin/time make -j3 check".  (See below about -j2.)

The time for the entire -j3 test run was the same as the time for
"gdb.base1".  What this means is that gdb.base1 is currently the
time-limiting run, preventing further parallelization gains.

So, I reason, whatever overhead we see from full parallelization will
only be seen by "-j1" and "-j2".

I then tried a -j2 test run.  This does take longer than a -j3 build,
meaning that the gdb.base1 job finishes and then proceeds to other
runtest invocations.

Finally I tried a -j2 test run with the appended patch.
This was 9% slower than the -j2 run without the patch.

I think that is a reasonable slowdown for what is probably a rare
case.  I believe this patch will yield faster test results for all -j
values greater than 2.  For -j3 on my machine, the test suite is a few
seconds faster; I didn't try any larger -j values.

For -j1, I went ahead and changed the Makefile so that, if no -j
option is given, then the "check-single" mode is used.  You can still
use "make -j1 check" to get single-job parallel-mode, though of course
there's no good reason to do so.

This change is likely to speed up the plain "make check" scenario a
little as we will now bypass dg-extract-results.sh.

One drawback of this change is that "make -jN check" is now much more
verbose.  I generally only look at the .sum and .log files, but
perhaps this will bother some.

Another interesting question is scalability of the result.  The
slowest test, which limits the scalability, took 80.78 seconds.  The
mean of the remaining tests is 1.08 seconds.  (Note that this is just
a rough estimate, since there are still outliers.)

This means we can run 80.78 / 1.08 =~ 74 tests in the time available.
And, in this data set (slightly older than the above, but materially
the same) there were 948 tests.  So, I think the current test suite
should scale ok up to about -j12.

We could improve this number if need be by breaking up the biggest
tests.

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

* Makefile.in (TEST_DIRS): Remove.
(TEST_TARGETS, check-parallel): Rewrite.
(check-gdb.%, BASE1_FILES, BASE2_FILES, check-gdb.base%)
(subdir_do, subdirs): Remove.
(do-check-parallel, check/%): New targets.
(clean): Remove outputs, temp, and cache directories.
(saw_dash_j): New variable.
(CHECK_TARGET): Use it.
(check): Depend on all, site.exp.  Rewrite.
(check-single): Remove dependencies.
(slow_tests, all_tests, reordered_tests): New variables.

11 years agofix some fission tests
Tom Tromey [Fri, 18 Oct 2013 20:25:06 +0000 (14:25 -0600)]
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.

11 years agofix some "exec" tests
Tom Tromey [Fri, 18 Oct 2013 20:00:44 +0000 (14:00 -0600)]
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.

11 years agofix argv0-symlink.exp for parallel mode
Tom Tromey [Fri, 18 Oct 2013 19:12:32 +0000 (13:12 -0600)]
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.

11 years agomake gdb.asm parallel-safe
Tom Tromey [Fri, 23 Aug 2013 20:16:58 +0000 (14:16 -0600)]
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.

11 years agofix up gdb.server
Tom Tromey [Fri, 23 Aug 2013 18:27:36 +0000 (12:27 -0600)]
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.

11 years agointroduce relative_filename and use it
Tom Tromey [Fri, 23 Aug 2013 18:18:57 +0000 (12:18 -0600)]
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.

11 years agoupdate fileio test
Tom Tromey [Fri, 23 Aug 2013 18:18:39 +0000 (12:18 -0600)]
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.

11 years agoupdate checkpoint test
Tom Tromey [Fri, 23 Aug 2013 18:18:27 +0000 (12:18 -0600)]
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.

11 years agosimple changes in gdb.base
Tom Tromey [Fri, 23 Aug 2013 18:18:01 +0000 (12:18 -0600)]
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.

11 years agofix up gdb.trace
Tom Tromey [Fri, 23 Aug 2013 18:09:22 +0000 (12:09 -0600)]
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.

11 years agofix up gdb.mi
Tom Tromey [Fri, 23 Aug 2013 16:44:49 +0000 (10:44 -0600)]
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.

11 years agofix up gdb.xml
Tom Tromey [Fri, 23 Aug 2013 16:16:53 +0000 (10:16 -0600)]
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.

11 years agofix up gdb.gdb
Tom Tromey [Fri, 23 Aug 2013 13:51:39 +0000 (07:51 -0600)]
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.

11 years agofix weird.exp for parallel testing
Tom Tromey [Thu, 22 Aug 2013 18:05:39 +0000 (12:05 -0600)]
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.

11 years agofix some simple thinkos in the test suite
Tom Tromey [Thu, 22 Aug 2013 18:10:25 +0000 (12:10 -0600)]
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.

11 years agofix up log-file toggling
Tom Tromey [Thu, 22 Aug 2013 19:09:35 +0000 (13:09 -0600)]
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.