platform/upstream/binutils.git
11 years ago * gdb.trace/actions.exp (check_tracepoint): Don't use a full file
Tom Tromey [Fri, 21 Jun 2013 17:18:45 +0000 (17:18 +0000)]
* gdb.trace/actions.exp (check_tracepoint): Don't use a full file
name in a test name.

11 years agogdb/doublest.c: Use frexpl rather than ldfrexp.
Will Newton [Fri, 21 Jun 2013 16:24:14 +0000 (16:24 +0000)]
gdb/doublest.c: Use frexpl rather than ldfrexp.

Most modern systems have frexpl and gnulib provides an implementation
for those that don't, so use it instead of the generic but inaccurate
ldfrexp.

gdb/ChangeLog:

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

* doublest.c (ldfrexp): Remove function.
(convert_doublest_to_floatformat): Call frexpl instead of
ldfrexp.

11 years agogdb/gnulib: Import frexpl.
Will Newton [Fri, 21 Jun 2013 16:17:02 +0000 (16:17 +0000)]
gdb/gnulib: Import frexpl.

gdb/ChangeLog:

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

* gnulib/update-gnulib.sh(IMPORTED_GNULIB_MODULES): Add frexpl.
* gnulib/aclocal.m4: Regenerate.
* gnulib/config.in: Regenerate.
* gnulib/configure: Regenerate.
* gnulib/import/Makefile.am: Update.
* gnulib/import/Makefile.in: Update.
* gnulib/import/m4/gnulib-cache.m4: Update.
* gnulib/import/m4/gnulib-comp.m4: Update.
* gnulib/import/float+.h: Import.
* gnulib/import/float.c: Import.
* gnulib/import/float.in.h: Import.
* gnulib/import/fpucw.h: Import.
* gnulib/import/frexp.c: Import.
* gnulib/import/frexpl.c: Import.
* gnulib/import/isnan.c: Import.
* gnulib/import/isnand-nolibm.h: Import.
* gnulib/import/isnand.c: Import.
* gnulib/import/isnanl-nolibm.h: Import.
* gnulib/import/isnanl.c: Import.
* gnulib/import/itold.c: Import.
* gnulib/import/m4/exponentd.m4: Import.
* gnulib/import/m4/exponentl.m4: Import.
* gnulib/import/m4/float_h.m4: Import.
* gnulib/import/m4/fpieee.m4: Import.
* gnulib/import/m4/frexp.m4: Import.
* gnulib/import/m4/frexpl.m4: Import.
* gnulib/import/m4/isnand.m4: Import.
* gnulib/import/m4/isnanl.m4: Import.
* gnulib/import/m4/math_h.m4: Import.
* gnulib/import/math.c: Import.
* gnulib/import/math.in.h: Import.

11 years agogdb/
Jan Kratochvil [Fri, 21 Jun 2013 15:40:19 +0000 (15:40 +0000)]
gdb/
* common/linux-btrace.c (cpu_supports_btrace): Remove variable vendor,
replace strcmp with signature_INTEL_ebx, signature_INTEL_ecx and
signature_INTEL_edx comparisons.

11 years ago * msp430-decode.opc: New.
Nick Clifton [Fri, 21 Jun 2013 15:01:57 +0000 (15:01 +0000)]
* msp430-decode.opc: New.
* msp430-decode.c: New/generated.
* Makefile.am (TARGET_LIBOPCODES_CFILES): Add msp430-decode.c.
(MAINTAINER_CLEANFILES): Likewise.
Add rule to build msp430-decode.c frommsp430decode.opc
        using the opc2c program.
* Makefile.in: Regenerate.
* configure.in: Add msp430-decode.lo to msp430 architecture files.
* configure: Regenerate.

* msp430-decode.h: New.

11 years ago * msp430: New Directory.
Nick Clifton [Fri, 21 Jun 2013 10:59:14 +0000 (10:59 +0000)]
* msp430: New Directory.
* configure.tgt: Add it.
* configure: Regenerate.

* gennltvals.sh: Add msp430 support.
* nltvals.def: Regenerate.

* Makefile.in: New.
* aclocal.m4: Generate.
* config.in: Generate.
* configure.ac: New.
* configure: Generate.
* msp430-sim.c: New.
* msp430-sim.h: New.
* sim-main.h: New.
* trace.c: New.
* trace.h: New.

11 years ago*** empty log message ***
gdbadmin [Fri, 21 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Fri, 21 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago symtab/15652
Doug Evans [Thu, 20 Jun 2013 22:16:28 +0000 (22:16 +0000)]
symtab/15652
* dwarf2read.c (try_open_dwop_file): New arg search_cwd.
All callers updated.
(open_dwp_file): If we can't find the dwp file, search the basename
in debug-file-directory.

11 years ago * dwarf2read.c (struct dwp_file): Fix comment.
Doug Evans [Thu, 20 Jun 2013 21:58:58 +0000 (21:58 +0000)]
* dwarf2read.c (struct dwp_file): Fix comment.
(open_and_init_dwp_file): Set dwp_file->name to bfd's file name.

11 years ago * source.c (openp): Document OPF_TRY_CWD_FIRST+OPF_SEARCH_IN_PATH
Doug Evans [Thu, 20 Jun 2013 20:12:58 +0000 (20:12 +0000)]
* source.c (openp): Document OPF_TRY_CWD_FIRST+OPF_SEARCH_IN_PATH
better.

11 years agogas/
Richard Sandiford [Thu, 20 Jun 2013 19:25:20 +0000 (19:25 +0000)]
gas/
* config/tc-mips.c (ISA_SUPPORTS_SMARTMIPS, ISA_SUPPORTS_DSP_ASE)
(ISA_SUPPORTS_DSP64_ASE, ISA_SUPPORTS_DSPR2_ASE, ISA_SUPPORTS_EVA_ASE)
(ISA_SUPPORTS_MT_ASE, ISA_SUPPORTS_MCU_ASE, ISA_SUPPORTS_VIRT_ASE)
(ISA_SUPPORTS_VIRT64_ASE): Delete.
(mips_ase): New structure.
(mips_ases): New table.
(FP64_ASES): New macro.
(mips_ase_groups): New array.
(mips_isa_rev, mips_ase_mask, mips_check_isa_supports_ase)
(mips_check_isa_supports_ases, mips_set_ase, mips_lookup_ase): New
functions.
(is_opcode_valid): Use mips_ases to get the 64-bit ASE flags.
(md_parse_option): Use mips_ases and mips_set_ase instead of
separate case statements for each ASE option.
(mips_after_parse_args): Use FP64_ASES.  Use
mips_check_isa_supports_ases to check the ASEs against
other options.
(s_mipsset): Use mips_ases and mips_set_ase instead of
separate if statements for each ASE option.  Use
mips_check_isa_supports_ases, even when a non-ASE option
is specified.

gas/testsuite/
* gas/mips/ase-errors-1.s, gas/mips/ase-errors-1.l,
gas/mips/ase-errors-2.s, gas/mips/ase-errors-2.l,
gas/mips/ase-errors-3.s, gas/mips/ase-errors-3.l,
gas/mips/ase-errors-4.s, gas/mips/ase-errors-4.l: New tests.
* gas/mips/mips.exp: Run them.

11 years agobfd/
Yufeng Zhang [Thu, 20 Jun 2013 16:01:35 +0000 (16:01 +0000)]
bfd/
* bfd-in.h (bfd_elf64_aarch64_set_options): Add 'extern'.
* bfd-in2.h: Re-generated.
* elf64-aarch64.c (RELOC_SECTION): Removed.
(SWAP_RELOC_IN, SWAP_RELOC_OUT): Ditto.
(AARCH64_ELF_OS_ABI_VERSION): Ditto.
(elf64_aarch64_link_hash_traverse): Ditto.
(elf64_aarch64_size_stubs): Change 'Aarch64' to 'AArch64' in the
comment.

opcodes/

* aarch64-dis.c (EMBEDDED_ENV): Remove the check on it.
(SYMTAB_AVAILABLE): Removed.
(#include "elf/aarch64.h): Ditto.

11 years agogdb/
Yao Qi [Thu, 20 Jun 2013 06:49:06 +0000 (06:49 +0000)]
gdb/

* breakpoint.c (create_breakpoint): Fix code indentation.

11 years agogdb/
Yao Qi [Thu, 20 Jun 2013 06:46:11 +0000 (06:46 +0000)]
gdb/

* breakpoint.c (create_breakpoints_sal_default): Remove
parameter 'lsal'.  Update declaration.
(bkpt_create_breakpoints_sal): Caller update.
(tracepoint_create_breakpoints_sal): Likewise.

11 years agoTeach -data-list-register-values to not include unavailable registers
Yao Qi [Thu, 20 Jun 2013 00:39:11 +0000 (00:39 +0000)]
Teach -data-list-register-values to not include unavailable registers

This patch adds an option --skip-unavailable to MI command
-data-list-register-values, so that unavailable registers are not
displayed (on the context of traceframes).

The old -data-list-register-values command behaves like

  -data-list-register-values x 0 8
  ^done,register-values=[{number="0",value="<unavailable>"},{number="8",value="0x80483de"}]

With this patch, an option --skip-unavailable is added,

  -data-list-register-values --skip-unavailable x 0 8
  ^done,register-values=[{number="8",value="0x80483de"}]

gdb:

2013-06-20  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* NEWS: Mention the new option '--skip-unavailable' of command
-data-list-register-values.
* mi/mi-main.c (mi_cmd_data_list_register_values): Accept the
--skip-unavailable option.  Adjust to use output_register.
(output_register): Add new 'skip_unavailable' parameter.
Handle it.

gdb/doc:

2013-06-20  Pedro Alves  <pedro@codesourcery.com>

* gdb.texinfo (GDB/MI Data Manipulation)
<-data-list-register-values>: Document the --skip-unavailable
option.

gdb/testsuite:

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

* gdb.trace/mi-trace-unavailable.exp: Set tracepoint on 'foo'
and set an action.
(test_trace_unavailable): Test command -data-list-register-values
in the context of traceframe and with option --skip-unavailable.
* gdb.trace/trace-unavailable.c (foo): New.
(main): Call it.
* gdb.mi/gdb2549.exp: Update matching pattern.

11 years ago*** empty log message ***
gdbadmin [Thu, 20 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Thu, 20 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb: clean up x86 cpuid implementations
Mike Frysinger [Wed, 19 Jun 2013 22:29:36 +0000 (22:29 +0000)]
gdb: clean up x86 cpuid implementations

We've currently got 3 files doing open coded implementations of cpuid.
Each has its own set of workarounds and varying levels of how well
they're written and are generally hardcoded to specific cpuid functions.
If you try to build the latest gdb as a PIE on an i386 system, the build
will fail because one of them lacks PIC workarounds (wrt ebx).

Specifically, we have:
common/linux-btrace.c:
two copies of cpuid asm w/specific args, one has no workarounds
while the other implicitly does to avoid memcpy
go32-nat.c:
two copies of cpuid asm w/specific args, one has workarounds to
avoid memcpy
gdb/testsuite/gdb.arch/i386-cpuid.h:
one general cpuid asm w/many workarounds copied from older gcc

Fortunately, that last header there is pretty damn good -- it handles
lots of edge cases, the code is nice & tight (uses gcc asm operands
rather than manual movs), and is already almost a general library type
header.  It's also the basis of what is now the public cpuid.h that is
shipped with gcc-4.3+.

So what I've done is pull that test header out and into gdb/common/
(not sure if there's a better place), synced to the version found in
gcc-4.8.0, put a wrapper API around it, and then cut over all the
existing call points to this new header.

Since the func already has support for "is cpuid supported on this proc",
it makes it trivial to push the i386/x86_64 ifdefs down into this wrapper
API too.  Now it can be safely used for all targets and gcc will elide
the unused code for us.

I've verified the gdb.arch testsuite still passes, and this code compiles
for an armv7a host as well as x86_64.  The go32-nat code has been left
ifdef-ed out until someone can test & verify the new stuff works (and if
it doesn't, figure out how to make the new code work).

URL: https://bugs.gentoo.org/467806
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years ago * symfile.c (symfile_bfd_open): Delete unnecessary declaration.
Doug Evans [Wed, 19 Jun 2013 22:20:58 +0000 (22:20 +0000)]
* symfile.c (symfile_bfd_open): Delete unnecessary declaration.
(get_section_index): Ditto.

11 years ago * gdb.base/subst.exp: Delete default rules before further
Luis Machado [Wed, 19 Jun 2013 20:37:26 +0000 (20:37 +0000)]
* gdb.base/subst.exp: Delete default rules before further
tests.

11 years ago * breakpoint.c (_initialize_breakpoint): Remove trailing \n from
Tom Tromey [Wed, 19 Jun 2013 19:07:16 +0000 (19:07 +0000)]
* breakpoint.c (_initialize_breakpoint): Remove trailing \n from
"dprintf" help.

11 years ago2013-06-19 Greta Yorsh <Greta.Yorsh@arm.com>
Kyrylo Tkachov [Wed, 19 Jun 2013 13:26:04 +0000 (13:26 +0000)]
2013-06-19  Greta Yorsh  <Greta.Yorsh@arm.com>

* config/tc-arm.c (arm_cpus): Add support for Cortex-A12.

11 years agogdb/testsuite/
Yao Qi [Wed, 19 Jun 2013 13:07:00 +0000 (13:07 +0000)]
gdb/testsuite/

* gdb.base/maint.exp: Make the test to command 'maint dump-me'
unsupported if it is not registered.

11 years agoaarch64: Revert AArch64 ifunc changes.
Will Newton [Wed, 19 Jun 2013 10:30:59 +0000 (10:30 +0000)]
aarch64: Revert AArch64 ifunc changes.

The AArch64 ifunc patch introduced a regression caused by incorrect
PLT layout. Revert it until a fix is verified.

bfd/ChangeLog:

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

* configure: Regenerated.
* configure.in: Remove aarch64 dependency on elf-ifunc.c.
* elf64-aarch64.c: Remove objalloc.h include.
(elf64_aarch64_howto_dynrelocs): Remove R_AARCH64_IRELATIVE howto.
(struct elf64_aarch64_link_hash_table): Remove ifunc related
members. (elf_aarch64_local_htab_hash): Remove function.
(elf_aarch64_local_htab_eq): Remove function.
(elf_aarch64_get_local_sym_hash): Remove function.
(elf64_aarch64_link_hash_table_create): Remove local hash
table initialization.
(elf64_aarch64_final_link_relocate): Remove sym argument and
handling of ifunc symbols.
(elf64_aarch64_relocate_section): Don't pass sym argument to
elf64_aarch64_final_link_relocate.
(elf64_aarch64_gc_sweep_hook): Remove handling of ifunc symbols.
(elf64_aarch64_adjust_dynamic_symbol): Likewise.
(elf64_aarch64_check_relocs): Likewise.
(elf64_aarch64_post_process_headers): Remove call to
_bfd_elf_set_osabi.
(elf64_aarch64_is_function_type): New function.
(elf64_aarch64_allocate_dynrelocs): Remove handling of ifunc
symbols. (elf_aarch64_allocate_local_dynrelocs): Remove function.
(elf64_aarch64_size_dynamic_sections): Remove call to
elf_aarch64_allocate_local_dynrelocs.
(elf64_aarch64_create_small_pltn_entry): Remove info argument.
Remove creation of R_AARCH64_IRELATIVE dynamic relocs.
(elf64_aarch64_finish_dynamic_symbol): Remove handling of ifunc
symbols. (elf_aarch64_finish_local_dynamic_symbol): Remove
function. (elf64_aarch64_finish_dynamic_sections): Remove call to
elf_aarch64_finish_local_dynamic_symbol.
(elf64_aarch64_add_symbol_hook): Remove function.

include/elf/ChangeLog:

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

* aarch64.h: Remove R_AARCH64_IRELATIVE.

ld/ChangeLog:

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

* emulparams/aarch64elf.sh: Remove IREL_IN_PLT.

ld/testsuite/ChangeLog:

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

* ld-aarch64/aarch64-elf.exp: Remove ifunc tests.
* ld-ifunc/ifunc.exp: Disable ifunc tests on AArch64.
* ld-aarch64/ifunc-1-local.d: Remove.
* ld-aarch64/ifunc-1-local.s: Likewise.
* ld-aarch64/ifunc-1.d: Likewise.
* ld-aarch64/ifunc-1.s: Likewise.
* ld-aarch64/ifunc-10.d: Likewise.
* ld-aarch64/ifunc-10.s: Likewise.
* ld-aarch64/ifunc-11.d: Likewise.
* ld-aarch64/ifunc-11.s: Likewise.
* ld-aarch64/ifunc-12.d: Likewise.
* ld-aarch64/ifunc-12.s: Likewise.
* ld-aarch64/ifunc-13.d: Likewise.
* ld-aarch64/ifunc-13a.s: Likewise.
* ld-aarch64/ifunc-13b.s: Likewise.
* ld-aarch64/ifunc-14a.d: Likewise.
* ld-aarch64/ifunc-14a.s: Likewise.
* ld-aarch64/ifunc-14b.d: Likewise.
* ld-aarch64/ifunc-14b.s: Likewise.
* ld-aarch64/ifunc-14c.d: Likewise.
* ld-aarch64/ifunc-14c.s: Likewise.
* ld-aarch64/ifunc-14d.d: Likewise.
* ld-aarch64/ifunc-14e.d: Likewise.
* ld-aarch64/ifunc-14f.d: Likewise.
* ld-aarch64/ifunc-15.d: Likewise.
* ld-aarch64/ifunc-15.s: Likewise.
* ld-aarch64/ifunc-16.d: Likewise.
* ld-aarch64/ifunc-16.s: Likewise.
* ld-aarch64/ifunc-17a.d: Likewise.
* ld-aarch64/ifunc-17a.s: Likewise.
* ld-aarch64/ifunc-17b.d: Likewise.
* ld-aarch64/ifunc-17b.s: Likewise.
* ld-aarch64/ifunc-18a.d: Likewise.
* ld-aarch64/ifunc-18a.s: Likewise.
* ld-aarch64/ifunc-18b.d: Likewise.
* ld-aarch64/ifunc-18b.s: Likewise.
* ld-aarch64/ifunc-19a.d: Likewise.
* ld-aarch64/ifunc-19a.s: Likewise.
* ld-aarch64/ifunc-19b.d: Likewise.
* ld-aarch64/ifunc-19b.s: Likewise.
* ld-aarch64/ifunc-2-local.d: Likewise.
* ld-aarch64/ifunc-2-local.s: Likewise.
* ld-aarch64/ifunc-2.d: Likewise.
* ld-aarch64/ifunc-2.s: Likewise.
* ld-aarch64/ifunc-20.d: Likewise.
* ld-aarch64/ifunc-20.s: Likewise.
* ld-aarch64/ifunc-3.s: Likewise.
* ld-aarch64/ifunc-3a.d: Likewise.
* ld-aarch64/ifunc-3b.d: Likewise.
* ld-aarch64/ifunc-4.d: Likewise.
* ld-aarch64/ifunc-4.s: Likewise.
* ld-aarch64/ifunc-4a.d: Likewise.
* ld-aarch64/ifunc-5-local.s: Likewise.
* ld-aarch64/ifunc-5.s: Likewise.
* ld-aarch64/ifunc-5a-local.d: Likewise.
* ld-aarch64/ifunc-5a.d: Likewise.
* ld-aarch64/ifunc-5b-local.d: Likewise.
* ld-aarch64/ifunc-5b.d: Likewise.
* ld-aarch64/ifunc-5r-local.d: Likewise.
* ld-aarch64/ifunc-6.s: Likewise.
* ld-aarch64/ifunc-6a.d: Likewise.
* ld-aarch64/ifunc-6b.d: Likewise.
* ld-aarch64/ifunc-7.s: Likewise.
* ld-aarch64/ifunc-7a.d: Likewise.
* ld-aarch64/ifunc-7b.d: Likewise.
* ld-aarch64/ifunc-7c.d: Likewise.
* ld-aarch64/ifunc-8.d: Likewise.
* ld-aarch64/ifunc-8a.s: Likewise.
* ld-aarch64/ifunc-8b.s: Likewise.
* ld-aarch64/ifunc-9.d: Likewise.
* ld-aarch64/ifunc-9.s: Likewise.

11 years ago * dwarf2read.c (dw2_symtab_iter_next): Check value of cu_index
Doug Evans [Wed, 19 Jun 2013 04:38:51 +0000 (04:38 +0000)]
* dwarf2read.c (dw2_symtab_iter_next): Check value of cu_index
before using it.
(dw2_expand_symtabs_matching): Fix symbol kind validity check.
Move test of cu_index closer to use.  Print complaint if cu_index
is bad.

11 years agoFix this entry:
Doug Evans [Wed, 19 Jun 2013 04:32:57 +0000 (04:32 +0000)]
Fix this entry:
- * dwarf2read.c (dwarf2_per_objfile): Replace uses of
+ * dwarf2read.c (dwarf2_per_objfile_free): Replace uses of

11 years agosim: bfin: stricter insn decoding
Mike Frysinger [Wed, 19 Jun 2013 03:12:26 +0000 (03:12 +0000)]
sim: bfin: stricter insn decoding

We wrote a test case that tries every single 32bit opcode on the hardware
and compared it to the sim.  There were a bunch of places in the sim where
we weren't strict enough (requiring certain parts of the opcode be set) so
we were treating a lot of invalid opcodes as valid ones.  This sprinkles
out a lot additional checks in the dsp32alu class.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agodaily update
Alan Modra [Wed, 19 Jun 2013 00:00:03 +0000 (00:00 +0000)]
daily update

11 years ago*** empty log message ***
gdbadmin [Wed, 19 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

11 years ago[Darwin] Fix cleanup leak in machoread.c:macho_symfile_read
Joel Brobecker [Tue, 18 Jun 2013 23:35:37 +0000 (23:35 +0000)]
[Darwin] Fix cleanup leak in machoread.c:macho_symfile_read

This patch fixes a cleanup leak in macho_symfile_read (symbol_table):

          symbol_table = (asymbol **) xmalloc (storage_needed);
          make_cleanup (xfree, symbol_table);

Unfortunately, fixing the leak alone triggers a crash which occurs
while loading the symbols from an executable:

    % gdb
    (gdb) file g_exe
    [SIGSEGV]

The crash is caused by the fact that performing the cleanup
right after the call to macho_symtab_read, as currently done,
is too early.

Indeed, references to this symbol_table get saved in the oso_vector
global during the call to macho_symtab_read via calls to
macho_register_oso, and those references then get accessed
later on, when processing all the OSOs that got pushed (see
call to macho_symfile_read_all_oso).

This patch prevents this by using one single cleanup queue for
the entire function, rather than having additional separate
cleanup queues (Eg: for the handling of the minimal symbols),
thus preventing the premature free'ing of the minimal_symbols
array.

Secondly, this patch takes this opportunity for avoiding the use
of the oso_vector global, thus making it simpler to track its
lifetime.

gdb/ChangeLog:

        * machoread.c (oso_vector): Delete this global.
        (macho_register_oso): Add new parameter "oso_vector_ptr".
        Use it instead of the "oso_vector" global.
        (macho_symtab_read, macho_symfile_read_all_oso): Likewise.
        (macho_symfile_read): Use a local oso_vector, to be free'ed
        at the end of this function, in place of the old "oso_vector"
        global.  Update various function calls accordingly.  Use one
        single cleanup chain for the entire function.

11 years agodo not use dwarf2_per_objfile in dwarf2_per_objfile_free.
Joel Brobecker [Tue, 18 Jun 2013 23:35:24 +0000 (23:35 +0000)]
do not use dwarf2_per_objfile in dwarf2_per_objfile_free.

This patch fixes a case of multiple calls freeing the same data
while free-ing objfiles that have child objfiles (separate debug
info, as is the case on Darwin targets).

Following the code, free_objfile_separate_debug iterates over
all child objfiles of the parent objfile, calling free_objfile:

  for (child = objfile->separate_debug_objfile; child;)
    {
      struct objfile *next_child = child->separate_debug_objfile_link;
      free_objfile (child);
      child = next_child;
    }

This causes, among other things, the free'ing of the child objfile's
private data:

  /* Discard any data modules have associated with the objfile.  The function
     still may reference objfile->obfd.  */
  objfile_free_data (objfile);

This indirectly calls(back) dwarf2_per_objfile_free, which tries
to free the dwarf2read-specific data by using the dwarf2_per_objfile
global, eg:

  for (ix = 0; ix < dwarf2_per_objfile->n_comp_units; ++ix)

Even if we were lucky enough the first time around that this global
actually corresponds to the objfile being destroyed, the global
will still have the same value at the second iteration, and thus
become dangling. Indeed, after dwarf2_per_objfile_free returns
eventually back to free_objfile, free_objfile then deallocates
its objfile_obstack, where the dwarf2_per_objfile is allocated.

Ironically, there should be no need to access that global at all,
here, since the data is passed as an argument of the callback.
And it looks like the dwo/dwp/[...]-handling code is in fact already
using that argument, rather than the global.

This patch thus fixes the problem by doing the same, replacing
all references to DWARF2_PER_OBJFILE by uses of DATA instead.

gdb/ChangeLog:

        * dwarf2read.c (dwarf2_per_objfile): Replace uses of
        DWARF2_PER_OBJFILE by uses of DATA instead.

11 years agoFix PR cli/15603
Tom Tromey [Tue, 18 Jun 2013 19:57:49 +0000 (19:57 +0000)]
Fix PR cli/15603

This fixes PR cli/15603.

The bug here is that when a software watchpoint is being used, gdb
will stop responding to C-c.  This is a regression caused by the
"catch signal" patch.

The problem is that software watchpoints always end up on the bpstat
list.  However, this makes bpstat_explains_signal return
BPSTAT_SIGNAL_HIDE, causing infrun to think that the signal is not a
"random signal".

The fix is to change bpstat_explains_signal to handle this better.  I
chose to do it in a "clean API" way, by passing the signal value to
bpstat_explains_signal and then adding an explains_signal method for
watchpoints, which handles the specifics.

Built and regtested on x86-64 Fedora 18.
New test case included.

* break-catch-sig.c (signal_catchpoint_explains_signal): Add 'sig'
argument.
* breakpoint.c (bpstat_explains_signal): Add 'sig' argument.
Special case signals other than GDB_SIGNAL_TRAP.
(explains_signal_watchpoint): New function.
(base_breakpoint_explains_signal): Add 'sig' argument.
(initialize_breakpoint_ops): Set 'explains_signal' method for
watchpoints.
* breakpoint.h (struct breakpoint_ops) <explains_signal>: Add
signal argument.
(bpstat_explains_signal): Likewise.
* infrun.c (handle_syscall_event, handle_inferior_event): Update.

* gdb.base/random-signal.c: New file.
* gdb.base/random-signal.exp: New file.

11 years agogas/
Richard Sandiford [Tue, 18 Jun 2013 19:38:48 +0000 (19:38 +0000)]
gas/
* config/tc-mips.c (md_shortopts, options, md_longopts)
(md_longopts_size): Move earlier in file.

11 years agogas/
Richard Sandiford [Tue, 18 Jun 2013 19:37:21 +0000 (19:37 +0000)]
gas/
* config/tc-mips.c (mips_set_options): Replace separate "ase_*" fields
with a single "ase" bitmask.
(mips_opts): Update accordingly.
(file_ase, file_ase_explicit): New variables.
(file_ase_mips3d, file_ase_mdmx, file_ase_smartmips, file_ase_dsp)
(file_ase_dspr2, file_ase_eva, file_ase_mt, file_ase_virt): Delete.
(ISA_HAS_ROR): Adjust for mips_set_options change.
(is_opcode_valid): Take the base ase mask directly from mips_opts.
(mips_ip): Adjust for mips_set_options change.
(md_parse_option): Likewise.  Update file_ase_explicit.
(mips_after_parse_args): Adjust for mips_set_options change.
Use bitmask operations to select the default ASEs.  Set file_ase
rather than individual per-ASE variables.
(s_mipsset): Adjust for mips_set_options change.
(mips_elf_final_processing): Test file_ase rather than
file_ase_mdmx.  Remove commented-out code.

11 years agogas/
Richard Sandiford [Tue, 18 Jun 2013 19:34:17 +0000 (19:34 +0000)]
gas/
* config/tc-mips.c (mips_cpu_info): Add an "ase" field.
(MIPS_CPU_ASE_SMARTMIPS, MIPS_CPU_ASE_DSP, MIPS_CPU_ASE_MT)
(MIPS_CPU_ASE_MIPS3D, MIPS_CPU_ASE_MDMX, MIPS_CPU_ASE_DSPR2)
(MIPS_CPU_ASE_MCU, MIPS_CPU_ASE_VIRT, MIPS_CPU_ASE_EVA): Delete.
(mips_after_parse_args): Use the new "ase" field to choose
the default ASEs.
(mips_cpu_info_table): Move ASEs from the "flags" field to the
"ase" field.

11 years agogas/testsuite/
Richard Sandiford [Tue, 18 Jun 2013 19:23:40 +0000 (19:23 +0000)]
gas/testsuite/
* gas/mips/eva.d: Use -32.

11 years ago * python/py-inferior.c (gdbpy_selected_inferior): Don't incref.
Tom Tromey [Tue, 18 Jun 2013 18:43:27 +0000 (18:43 +0000)]
* python/py-inferior.c (gdbpy_selected_inferior): Don't incref.

11 years ago * python/python.c (finish_python_initialization): Decref
Tom Tromey [Tue, 18 Jun 2013 18:42:09 +0000 (18:42 +0000)]
* python/python.c (finish_python_initialization): Decref
'pythondir' on failure path as well.

11 years agotestsuite/gdb.base: Make skip test use defined behaviour.
Will Newton [Tue, 18 Jun 2013 18:16:16 +0000 (18:16 +0000)]
testsuite/gdb.base: Make skip test use defined behaviour.

The skip test currently relies on the order of evaluation of
arguments which is not defined. Use the comma operator where
order is defined instead.

gdb/testsuite/ChangeLog:

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

* gdb.base/skip.c: Use comma to evaluate results of foo()
and bar() before passing to baz().
* gdb.base/skip.c: baz() now takes one argument instead of
two.

11 years agoFix PR symtab/15391
Tom Tromey [Tue, 18 Jun 2013 18:11:19 +0000 (18:11 +0000)]
Fix PR symtab/15391

PR symtab/15391 is a failure with the DW_OP_GNU_implicit_pointer
feature.

I tracked it down to a logic error in read_pieced_value.  The code
truncates this_size_bits according to the type size and offset too
early -- it should do it after taking bits_to_skip into account.

This patch fixes the bug.

While testing this, I also tripped across a latent bug because
indirect_pieced_value does not sign-extend where needed.  This patch
fixes this bug as well.

Finally, Pedro pointed out that a previous version implemented sign
extension incorrectly.  This version introduces a new gdb_sign_extend
function for this.  A couple of notes on this function:

* It has the gdb_ prefix to avoid clashes with various libraries that
  felt free to avoid proper namespacing.  There is a "sign_extend"
  function in a Tile GX header, in an SOM-related BFD header (and in
  sh64-tdep.c and as a macro in arm-wince-tdep.c, but those are
  ours...)

* I looked at all the sign extensions in gdb and didn't see ones that
  I felt comfortable converting to use this function; in large part
  because I don't have a good way to test the conversion.

Built and regtested on x86-64 Fedora 18.  New test cases included;
this required a minor addition to the DWARF assembler.  Note that the
DWARF CU made by implptrpiece.exp uses a funny pointer size in order
to show the sign-extension bug on all platforms.

* dwarf2loc.c (read_pieced_value): Truncate this_size_bits
after taking bits_to_skip into account.  Sign extend byte_offset.
* utils.h (gdb_sign_extend): Declare.
* utils.c (gdb_sign_extend): New function.

* gdb.dwarf2/implptrpiece.exp: New file.
* gdb.dwarf2/implptrconst.exp (d): New variable.
Print d.
* lib/dwarf2.exp (Dwarf::_location): Handle DW_OP_piece.

11 years agogdb/
Jan Kratochvil [Tue, 18 Jun 2013 15:50:33 +0000 (15:50 +0000)]
gdb/
* dwarf2read.c (write_psymtabs_to_index): Ignore NULL PSYMTAB.

11 years ago * config/tc-arm.c (symbol_preemptible): New function.
Richard Earnshaw [Tue, 18 Jun 2013 14:41:09 +0000 (14:41 +0000)]
* config/tc-arm.c (symbol_preemptible): New function.
(relax_branch): Use it.

11 years agofix python-selftest.exp failure with gdbserver
Tom Tromey [Tue, 18 Jun 2013 14:12:09 +0000 (14:12 +0000)]
fix python-selftest.exp failure with gdbserver

python-selftest.exp fails with an error when using the
native-gdbserver.exp board.

The bug is that the selftest code doesn't work in this situation.  It
never has.

This patch fixes the problem by pushing the needed check into
do_self_tests.  This helps prevent the problem in the future.

* lib/selftest-support.exp (do_self_tests): Reject remote or
non-native targets.
* gdb.gdb/complaints.exp: Remove check.
* gdb.gdb/observer.exp: Remove check.
* gdb.gdb/xfullpath.exp: Remove check.
* gdb.gdb/complaints.exp: Remove check.

11 years ago*** empty log message ***
gdbadmin [Tue, 18 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Tue, 18 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago2013-06-17 Catherine Moore <clm@codesourcery.com>
Catherine Moore [Mon, 17 Jun 2013 22:59:10 +0000 (22:59 +0000)]
2013-06-17  Catherine Moore  <clm@codesourcery.com>
    Maciej W. Rozycki  <macro@codesourcery.com>
    Chao-Ying Fu  <fu@mips.com>

gas/testsuite/
* gas/mips/mips.exp: Run new tests.
* gas/mips/eva.d: New.
* gas/mips/eva.s: New.
* gas/mips/micromips@eva.d: New.

gas/
* config/tc-mips.c (mips_set_options): Add ase_eva.
(mips_set_options mips_opts): Add ase_eva.
(file_ase_eva): Declare.
(ISA_SUPPORTS_EVA_ASE): Define.
(IS_SEXT_9BIT_NUM): Define.
(MIPS_CPU_ASE_EVA): Define.
(is_opcode_valid): Add support for ase_eva.
(macro_build): Likewise.
(macro): Likewise.
(validate_mips_insn): Likewise.
(validate_micromips_insn): Likewise.
(mips_ip): Likewise.
(options): Add OPTION_EVA and OPTION_NO_EVA.
(md_longopts): Add -meva and -mno-eva.
(md_parse_option): Process new options.
(mips_after_parse_args): Check for valid EVA combinations.
(s_mipsset): Likewise.

include/
* opcode/mips.h (OP_SH_EVAOFFSET): Define.
(OP_MASK_EVAOFFSET): Define.
(INSN_ASE_MASK): Delete.
(ASE_EVA): Define.
(M_CACHEE_AB, M_CACHEE_OB): New.
(M_LBE_OB, M_LBE_AB): New.
(M_LBUE_OB, M_LBUE_AB): New.
(M_LHE_OB, M_LHE_AB): New.
(M_LHUE_OB, M_LHUE_AB): New.
(M_LLE_AB, M_LLE_OB): New.
(M_LWE_OB, M_LWE_AB): New.
(M_LWLE_AB, M_LWLE_OB): New.
(M_LWRE_AB, M_LWRE_OB): New.
(M_PREFE_AB, M_PREFE_OB): New.
(M_SCE_AB, M_SCE_OB): New.
(M_SBE_OB, M_SBE_AB): New.
(M_SHE_OB, M_SHE_AB): New.
(M_SWE_OB, M_SWE_AB): New.
(M_SWLE_AB, M_SWLE_OB): New.
(M_SWRE_AB, M_SWRE_OB): New.
(MICROMIPSOP_SH_EVAOFFSET): Define.
(MICROMIPSOP_MASK_EVAOFFSET): Define.

opcodes/
* micromips-opc.c (EVA): Define.
(TLBINV): Define.
(micromips_opcodes): Add EVA opcodes.
* mips-dis.c (mips_arch_choices): Update for ASE_EVA.
(print_insn_args): Handle EVA offsets.
(print_insn_micromips): Likewise.
* mips-opc.c (EVA): Define.
(TLBINV): Define.
(mips_builtin_opcodes): Add EVA opcodes.

11 years ago * Makefile.am (mips-opc.lo): Add rules to create automatic
Alan Modra [Mon, 17 Jun 2013 11:51:13 +0000 (11:51 +0000)]
* Makefile.am (mips-opc.lo): Add rules to create automatic
dependency files.  Pass archdefs.
(micromips-opc.lo, mips16-opc.lo): Likewise.
* Makefile.in: Regenerate.

11 years agold/testsuite: Enable ifunc tests on AArch64 big-endian.
Will Newton [Mon, 17 Jun 2013 09:08:52 +0000 (09:08 +0000)]
ld/testsuite: Enable ifunc tests on AArch64 big-endian.

ld/testsuite/ChangeLog:

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

* ld-aarch64/ifunc-1-local.d: Enable test on aarch64_be.
* ld-aarch64/ifunc-1.d: Likewise.
* ld-aarch64/ifunc-10.d: Likewise.
* ld-aarch64/ifunc-11.d: Likewise.
* ld-aarch64/ifunc-12.d: Likewise.
* ld-aarch64/ifunc-13.d: Likewise.
* ld-aarch64/ifunc-14a.d: Likewise.
* ld-aarch64/ifunc-14b.d: Likewise.
* ld-aarch64/ifunc-14c.d: Likewise.
* ld-aarch64/ifunc-14d.d: Likewise.
* ld-aarch64/ifunc-14e.d: Likewise.
* ld-aarch64/ifunc-14f.d: Likewise.
* ld-aarch64/ifunc-15.d: Likewise.
* ld-aarch64/ifunc-16.d: Likewise.
* ld-aarch64/ifunc-17a.d: Likewise.
* ld-aarch64/ifunc-17b.d: Likewise.
* ld-aarch64/ifunc-18a.d: Likewise.
* ld-aarch64/ifunc-18b.d: Likewise.
* ld-aarch64/ifunc-19a.d: Likewise.
* ld-aarch64/ifunc-19b.d: Likewise.
* ld-aarch64/ifunc-2-local.d: Likewise.
* ld-aarch64/ifunc-2.d: Likewise.
* ld-aarch64/ifunc-20.d: Likewise.
* ld-aarch64/ifunc-3a.d: Likewise.
* ld-aarch64/ifunc-3b.d: Likewise.
* ld-aarch64/ifunc-4.d: Likewise.
* ld-aarch64/ifunc-4a.d: Likewise.
* ld-aarch64/ifunc-5a-local.d: Likewise.
* ld-aarch64/ifunc-5a.d: Likewise.
* ld-aarch64/ifunc-5b-local.d: Likewise.
* ld-aarch64/ifunc-5b.d: Likewise.
* ld-aarch64/ifunc-5r-local.d: Likewise.
* ld-aarch64/ifunc-6a.d: Likewise.
* ld-aarch64/ifunc-6b.d: Likewise.
* ld-aarch64/ifunc-7a.d: Likewise.
* ld-aarch64/ifunc-7b.d: Likewise.
* ld-aarch64/ifunc-8.d: Likewise.
* ld-aarch64/ifunc-9.d: Likewise.
* ld-ifunc/ifunc.exp: Likewise.

11 years ago * corelow.c (core_open): Print GDB signal name instead of target
Pierre Muller [Mon, 17 Jun 2013 06:14:24 +0000 (06:14 +0000)]
* corelow.c (core_open): Print GDB signal name instead of target
signal number.

11 years agosim: bfin: tweak run-tests for parallel usage
Mike Frysinger [Mon, 17 Jun 2013 04:58:56 +0000 (04:58 +0000)]
sim: bfin: tweak run-tests for parallel usage

11 years agosim: bfin: add helpful info for generating test tables
Mike Frysinger [Mon, 17 Jun 2013 04:47:26 +0000 (04:47 +0000)]
sim: bfin: add helpful info for generating test tables

11 years agosim: bfin: drop RET[ENI] setup
Mike Frysinger [Mon, 17 Jun 2013 04:45:54 +0000 (04:45 +0000)]
sim: bfin: drop RET[ENI] setup

Since these insns run in usermode, there should be no need to setup
RET[ENI] to safe values.  They won't be dereferenced, and any insn
that returns via them are valid only in supervisor mode.  Since this
is in the main exception code path, saving any insn at all is good
as it gets multiplied quickly (as in O(n^2) times).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agosim: bfin: add flush/HWERR todo
Mike Frysinger [Mon, 17 Jun 2013 04:43:22 +0000 (04:43 +0000)]
sim: bfin: add flush/HWERR todo

11 years agogdb: ignore generated gcore
Mike Frysinger [Mon, 17 Jun 2013 04:39:15 +0000 (04:39 +0000)]
gdb: ignore generated gcore

11 years ago*** empty log message ***
gdbadmin [Mon, 17 Jun 2013 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Mon, 17 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sun, 16 Jun 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years ago*** empty log message ***
gdbadmin [Sun, 16 Jun 2013 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

11 years agogas/testsuite/
Richard Sandiford [Sat, 15 Jun 2013 13:47:37 +0000 (13:47 +0000)]
gas/testsuite/
* gas/mips/loc-swap-3.d: Require -32.

11 years agodaily update
Alan Modra [Sat, 15 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago*** empty log message ***
gdbadmin [Sat, 15 Jun 2013 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

11 years agogold/
Cary Coutant [Fri, 14 Jun 2013 20:07:18 +0000 (20:07 +0000)]
gold/
* resolve.cc (Symbol::override_base): Don't override st_type
from plugin placeholder symbols.
(Symbol_table::resolve): Likewise.
(Symbol_table::should_override): Don't complain about TLS mismatch
if the TO symbol is a plugin placeholder.
* testsuite/Makefile.am (plugin_test_tls): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/plugin_test_tls.sh: New test script.
* testsuite/two_file_test_2_tls.cc: New test source.
* testsuite/two_file_test_tls.cc: New test source.

11 years ago* rx-decode.opc (rx_decode_opcode): Bit operations on
DJ Delorie [Fri, 14 Jun 2013 19:57:10 +0000 (19:57 +0000)]
* rx-decode.opc (rx_decode_opcode): Bit operations on
registers are 32-bit operations, not 8-bit operations.
* rx-decode.c: Regenerate.

11 years agobfd/
Yufeng Zhang [Fri, 14 Jun 2013 16:07:20 +0000 (16:07 +0000)]
bfd/

* elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
R_AARCH64_GOT_LD_PREL19.

ld/testsuite/

* ld-aarch64/aarch64-elf.exp: Add 'ifunc-7c'.
* ld-aarch64/ifunc-7c.d: New test.

11 years agold/
Yufeng Zhang [Fri, 14 Jun 2013 15:55:36 +0000 (15:55 +0000)]
ld/

* emulparams/aarch64elf.sh: Add IREL_IN_PLT.

ld/testsuite/

* ld-aarch64/ifunc-1-local.d: Replace hard-coded immediate offset
with regexp.
* ld-aarch64/ifunc-1.d: Likewise.
* ld-aarch64/ifunc-2-local.d: Likewise.
* ld-aarch64/ifunc-2.d: Likewise.
* ld-aarch64/ifunc-3a.d: Likewise.
* ld-aarch64/ifunc-2-local.s: Change not to declare __GI_foo and foo
global.

11 years agogas/
Richard Sandiford [Fri, 14 Jun 2013 13:30:28 +0000 (13:30 +0000)]
gas/
* dwarf2dbg.h (dwarf2_move_insn): Declare.
* dwarf2dbg.c (line_subseg): Add pmove_tail.
(get_line_subseg): Add create_p argument.  Initialize pmove_tail.
(dwarf2_gen_line_info_1): Update call accordingly.
(dwarf2_move_insn): New function.
* config/tc-mips.c (append_insn): Use dwarf2_move_insn.

gas/testsuite/
* gas/mips/loc-swap-3.d, gas/mips/loc-swap-3.s: New test.
* gas/mips/mips.exp: Run it.

11 years agogas/
Richard Sandiford [Fri, 14 Jun 2013 13:24:41 +0000 (13:24 +0000)]
gas/
Revert:

2011-09-05  Richard Sandiford  <rdsandiford@googlemail.com>

PR gas/13024
* dwarf2dbg.c (pending_lines, pending_lines_tail): New variables.
(dwarf2_gen_line_info_1): Delete.
(dwarf2_push_line, dwarf2_flush_pending_lines): New functions.
(dwarf2_gen_line_info, dwarf2_emit_label): Use them.
(dwarf2_consume_line_info): Call dwarf2_flush_pending_lines.
(dwarf2_directive_loc): Push previous .locs instead of generating
them immediately.

11 years ago*** empty log message ***
gdbadmin [Fri, 14 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Fri, 14 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago * dwarf2read.c (try_open_dwop_file): Work around behaviour of
Doug Evans [Thu, 13 Jun 2013 23:01:37 +0000 (23:01 +0000)]
* dwarf2read.c (try_open_dwop_file): Work around behaviour of
OPF_TRY_CWD_FIRST to not search path if the file contains a '/'.

11 years ago2013-06-13 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Thu, 13 Jun 2013 21:04:33 +0000 (21:04 +0000)]
2013-06-13  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* gas/mips/micromips@virt.d: New file.
* gas/mips/micromips@virt64.d: New file.
* gas/mips/mips.exp: Enable virt and virt64 tests for micromips.

11 years ago2013-06-13 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Thu, 13 Jun 2013 21:01:44 +0000 (21:01 +0000)]
2013-06-13  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* micromips-opc.c (IVIRT): New define.
(IVIRT64): New define.
(micromips_opcodes): Add dmfgc0, dmtgc0, hypcall, mfgc0, mtgc0,
tlbginv, tlbginvf, tlbgp, tlbgr, tlbgwi, tlbgwr VIRT instructions.

* mips-dis.c (print_insn_micromips): Handle mfgc0, mtgc0, dmfgc0,
dmtgc0 to print cp0 names.

11 years ago2013-06-13 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
Chao-ying Fu [Thu, 13 Jun 2013 20:58:44 +0000 (20:58 +0000)]
2013-06-13  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>

* config/tc-mips.c (ISA_SUPPORTS_VIRT_ASE): Support micromips.
(ISA_SUPPORTS_VIRT64_ASE): Support 64-bit micromips.

11 years ago PR ld/15302
Nick Clifton [Thu, 13 Jun 2013 12:36:02 +0000 (12:36 +0000)]
PR ld/15302
* elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
supports thumb instructions.

PR ld/15302
* ld-arm/branch-lks-sym.ld: New script.
* ld-arm/thumb-b-lks-sym.s: New test.
* ld-arm/thumb-b-lks-sym.d: Expected disassembly.
* ld-arm/thumb-bl-lks-sym.s: New test.
* ld-arm/thumb-bl-lks-sym.d: Expected disassembly.
* ld-arm/arm-elf.exp: Run the new tests.

11 years ago PR gas/15602
Nick Clifton [Thu, 13 Jun 2013 08:53:35 +0000 (08:53 +0000)]
PR gas/15602
* config/tc-m68k.h (TC_CHECK_ADJUSTED_BROKEN_DOT_WORD): Define.
* config/tc-m68k.c (tc_m68k_check_adjusted_broken_word): New
function.  Generates an error if the adjusted offset is out of a
16-bit range.

11 years ago*** empty log message ***
gdbadmin [Thu, 13 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

11 years agodaily update
Alan Modra [Thu, 13 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago2013-06-12 Sandra Loosemore <sandra@codesourcery.com>
Sandra Loosemore [Wed, 12 Jun 2013 23:11:57 +0000 (23:11 +0000)]
2013-06-12  Sandra Loosemore  <sandra@codesourcery.com>

gas/
* config/tc-nios2.c (md_apply_fix):  Mask constant
BFD_RELOC_NIOS2_HIADJ16 value to 16 bits.

gas/testsuite/
* gas/nios2/movia.s: Add additional test case with negative
constant value.
* gas/nios2/movia.d: Likewise.

11 years ago2013-06-12 Sandra Loosemore <sandra@codesourcery.com>
Sandra Loosemore [Wed, 12 Jun 2013 23:03:21 +0000 (23:03 +0000)]
2013-06-12  Sandra Loosemore  <sandra@codesourcery.com>

include/opcode/
* nios2.h (OP_MATCH_ERET): Correct eret encoding.

gas/testsuite/
* gas/nios2/tret.d: Correct eret encoding.

11 years ago[GDBserver] Fix gdb.threads/siginfo-threads.exp, gdb.base/siginfo-obj.exp regressions.
Pedro Alves [Wed, 12 Jun 2013 16:05:39 +0000 (16:05 +0000)]
[GDBserver] Fix gdb.threads/siginfo-threads.exp, gdb.base/siginfo-obj.exp regressions.

This fixes the regressions reported at
<http://sourceware.org/ml/gdb-patches/2013-06/msg00280.html>:

 $ runtest-gdbserver gdb.base/siginfo-obj.exp gdb.base/siginfo-thread.exp gdb.threads/siginfo-threads.exp
 Running ./gdb.base/siginfo-thread.exp ...
 FAIL: gdb.base/siginfo-thread.exp: p ssi_addr
 Running ./gdb.threads/siginfo-threads.exp ...
 FAIL: gdb.threads/siginfo-threads.exp: signal 0 si_pid
 FAIL: gdb.threads/siginfo-threads.exp: signal 1 si_pid
 FAIL: gdb.threads/siginfo-threads.exp: signal 2 si_pid
 FAIL: gdb.threads/siginfo-threads.exp: signal 3 si_pid
 Running ./gdb.base/siginfo-obj.exp ...
 FAIL: gdb.base/siginfo-obj.exp: p ssi_addr
 FAIL: gdb.base/siginfo-obj.exp: p ssi_addr

The multi-arch patch made GDBserver do the the wrong siginfo layout
conversion, because most uses of `linux_is_elf64' were removed, and it
ended up never set.  A global really is the wrong thing to use as
elf64-ness is a per-process property; `linux_is_elf64' was just
accidentally left behind.

Tested on x86_64 Fedora 17.

gdb/gdbserver/
2013-06-12  Pedro Alves  <palves@redhat.com>

* linux-x86-low.c (linux_is_elf64): Delete global.
(x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
with local linux_pid_exe_is_elf_64_file use.

11 years ago2013-06-12 Phil Muldoon <pmuldoon@redhat.com>
Phil Muldoon [Wed, 12 Jun 2013 12:16:47 +0000 (12:16 +0000)]
2013-06-12  Phil Muldoon  <pmuldoon@redhat.com>

* stack.c (backtrace_command_1): Fix indentation.

11 years agooops - omitted
Nick Clifton [Wed, 12 Jun 2013 07:52:38 +0000 (07:52 +0000)]
oops - omitted

11 years ago * ldcref.c (output_one_cref): Place common definitions after
Nick Clifton [Wed, 12 Jun 2013 07:48:32 +0000 (07:48 +0000)]
* ldcref.c (output_one_cref): Place common definitions after
ordinary definitions but before references.

11 years agodaily update
Alan Modra [Wed, 12 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago*** empty log message ***
gdbadmin [Wed, 12 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

11 years ago* elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
DJ Delorie [Tue, 11 Jun 2013 19:16:07 +0000 (19:16 +0000)]
* elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.

11 years agoLazily allocate 'struct regsets_info'::disabled_regsets.
Pedro Alves [Tue, 11 Jun 2013 18:05:57 +0000 (18:05 +0000)]
Lazily allocate 'struct regsets_info'::disabled_regsets.

There's no need for every arch to pre-allocate disabled_regsets.
Chances are the array won't be used.

(I have a hunch that with some more work we could dispense with
initialize_regsets_info.)

Tested on x86_64 Fedora 17 w/ -lmcheck.

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

* linux-low.c (regset_disabled, disable_regset): New functions.
(regsets_fetch_inferior_registers)
(regsets_store_inferior_registers): Use them.
(initialize_regsets_info); Don't allocate the disabled_regsets
array here.
* linux-low.h (struct regsets_info) <disabled_regsets>: Extend
comment.

11 years agoFix regression from multi-arch patch.
Pedro Alves [Tue, 11 Jun 2013 17:26:25 +0000 (17:26 +0000)]
Fix regression from multi-arch patch.

This fixes the regression reported at
<http://sourceware.org/ml/gdb-patches/2013-06/msg00185.html>.

GDBserver was reaching:

static int
regsets_fetch_inferior_registers (struct regsets_info *regsets_info,
  struct regcache *regcache)
{
  struct regset_info *regset;
  int saw_general_regs = 0;
  int pid;
  struct iovec iov;

  regset = regsets_info->regsets;

  pid = lwpid_of (get_thread_lwp (current_inferior));
  while (regset->size >= 0)
    {
      void *buf, *data;
      int nt_type, res;

      if (regset->size == 0
  || regsets_info->disabled_regsets[regset - regsets_info->regsets])
{
>>>>>>>   regset ++;      <<<<<<<  HERE
  continue;
}

Because info->disabled_regsets[] was not being initialized, and that
causes all sorts of wrong.

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

* linux-low.c (initialize_regsets_info): Use xcalloc instead of
xmalloc.

11 years ago[GDBserver] Initialize the x32 avx target description.
Pedro Alves [Tue, 11 Jun 2013 13:32:52 +0000 (13:32 +0000)]
[GDBserver] Initialize the x32 avx target description.

All target descriptions must be initialized at startup, but this one was forgotten.

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

* linux-x86-low.c (initialize_low_arch): Call
init_registers_x32_avx_linux.

11 years agowindows-nat.c:thread_rec: Add missing empty line after var declaration.
Joel Brobecker [Tue, 11 Jun 2013 11:03:42 +0000 (11:03 +0000)]
windows-nat.c:thread_rec: Add missing empty line after var declaration.

gdb/ChangeLog:

        * window-nat.c (thread_rec): Add missing empty line after
        local variable declaration.

11 years ago[windows] Fix accidental change of %u -> %d in SuspendThread warning.
Joel Brobecker [Tue, 11 Jun 2013 11:01:46 +0000 (11:01 +0000)]
[windows] Fix accidental change of %u -> %d in SuspendThread warning.

While enhancing the warning printed in when SuspendThread fails,
I accidently changed the format used to print the error code
from %u to %d. This patch reverts it back.

gdb/ChangeLog:

        * windows-nat.c (thread_rec): Revert format used to print
        error code returned by SuspendThread from %d back to %u.

11 years agowindows: Prefix thread ID values with "0x" in debug traces
Joel Brobecker [Tue, 11 Jun 2013 10:20:24 +0000 (10:20 +0000)]
windows: Prefix thread ID values with "0x" in debug traces

The windows-nat.c debug traces print the thread ID in base 16,
but give no indication of it. So, in a trace like the following...

    gdb: kernel event for pid=4816 tid=720 code=CREATE_THREAD_DEBUG_EVENT)

... where tid is "720", it's easy to be confused and think that
the thread ID is 720 rather than 0x720.  This patch avoids the
confusion by adding the usual "0x" prefix used for hexadecimal
values.

gdb/ChangeLog:

        * windows-nat.c (windows_continue): Add "0x" prefix for thread
        ID in debug trace.
        (get_windows_debug_event): Likewise, for all debug traces.

11 years agowindows: Add thread ID in SuspendThread error warning message.
Joel Brobecker [Tue, 11 Jun 2013 10:20:11 +0000 (10:20 +0000)]
windows: Add thread ID in SuspendThread error warning message.

This patch adds the thread ID to a warning printed when a call to
SuspendThread fails. It will help investigate issues, particularly
when correlated with the various debug traces provided by the
windows-nat module.

For the record, the output has been changed from...

    warning: SuspendThread failed. (winerr 6)

... to ...

    warning: SuspendThread (tid=0x720) failed. (winerr 6)

gdb/ChangeLog:

        * window-nat.c (thread_rec): Add thread ID in SuspendThread
        warning message.

11 years agobfd/elf64-aarch64.c: Use ELF64_R_SYM instead of ELF32_R_SYM.
Will Newton [Tue, 11 Jun 2013 09:25:53 +0000 (09:25 +0000)]
bfd/elf64-aarch64.c: Use ELF64_R_SYM instead of ELF32_R_SYM.

Fix incorrect usage of ELF32_R_SYM introduced in ifunc changes.

bfd/ChangeLog:

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

* elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
ELF64_R_SYM instead of ELF32_R_SYM.

11 years ago * elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
Nick Clifton [Tue, 11 Jun 2013 07:21:40 +0000 (07:21 +0000)]
* elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
checks if the dynamic sections have been created and relaxation
has not been performed.

11 years agodaily update
Alan Modra [Tue, 11 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago*** empty log message ***
gdbadmin [Tue, 11 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

11 years ago gas/
Maciej W. Rozycki [Mon, 10 Jun 2013 18:15:48 +0000 (18:15 +0000)]
gas/
* config/tc-mips.c (append_insn): Don't do branch relaxation for
MIPS-3D instructions either.
(md_convert_frag): Update the COPx branch mask accordingly.

* config/tc-mips.c (md_show_usage): Document --[no-]relax-branch
option.
* doc/as.texinfo (Overview): Add --relax-branch and
--no-relax-branch.
* doc/c-mips.texi (MIPS Opts): Document --relax-branch and
--no-relax-branch.

gas/testsuite/
* gas/mips/relax-bc1any.l: New test.
* gas/mips/relax-bc1any.s: New test source.
* gas/mips/mips.exp: Run the new test.

11 years ago PR ld/15598
Nick Clifton [Mon, 10 Jun 2013 11:59:44 +0000 (11:59 +0000)]
PR ld/15598
* ld.texinfo (Source Code Reference): Fix typos.