binutils-gdb.git
11 years ago[AArch64, ILP32] Really add ld/emulparams/aarch64elf32.sh that was missed
Yufeng Zhang [Wed, 26 Jun 2013 10:59:17 +0000 (10:59 +0000)]
[AArch64, ILP32] Really add ld/emulparams/aarch64elf32.sh that was missed
from the previous commit

ld/

* emulparams/aarch64elf32.sh: New file.

11 years ago[AArch64, ILP32] 6/6 Add big-endian targets
Yufeng Zhang [Wed, 26 Jun 2013 10:56:05 +0000 (10:56 +0000)]
[AArch64, ILP32] 6/6 Add big-endian targets

ld/

* Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64elf32b.c.
(eaarch64elf32b.c): New dependency and rule.
* Makefile.in: Re-generated.
* configure.tgt (aarch64-*-elf): Add aarch64elf32b.
(aarch64_be-*-elf, aarch64_be-*-linux*, aarch64-*-linux*): Likewise.
* emulparams/aarch64elf32b.sh: New file.

11 years ago[AArch64, ILP32] 5/6 Improve the debugging experience with the generated file
Yufeng Zhang [Wed, 26 Jun 2013 10:52:12 +0000 (10:52 +0000)]
[AArch64, ILP32] 5/6 Improve the debugging experience with the generated file

bfd/

* Makefile.am (elf32-aarch64.c): Add a #line cpp directive at the
beginning of the generated file.
(elf64-aarch64.c): Likewise.
* Makefile.in: Re-generated.

11 years ago[AArch64, ILP32] 4/6 Split elfnn-aarch64.c to elfxx-aarch64.c
Yufeng Zhang [Wed, 26 Jun 2013 10:49:29 +0000 (10:49 +0000)]
[AArch64, ILP32] 4/6 Split elfnn-aarch64.c to elfxx-aarch64.c

bfd/

* Makefile.am (BFD64_BACKENDS): Add elfxx-aarch64.c.
(BFD64_BACKENDS_CFILES): Add elfxx-aarch64.lo.
* Makefile.in: Re-generated.
* configure.in (bfd_elf64_bigaarch64_vec): Add elfxx-aarch64.lo.
(bfd_elf64_littleaarch64_vec): Likewise.
(bfd_elf32_bigaarch64_vec): Likewise.
(bfd_elf32_littleaarch64_vec): Likewise.
* configure: Re-generated.
* elfxx-aarch64.c: New file; split from elf64-aarch64.c.
* elfxx-aarch64.h: New file.
* elfnn-aarch64.c: Include "elfxx-aarch64.h"; move the following
stuff to elfxx-aarch64.c.
(bfd_elf_aarch64_put_addend): Removed.
(PG_OFFSET, PG): Likewise.
(elfNN_aarch64_small_plt0_entry): Support ELF32.
(elfNN_aarch64_tlsdesc_small_plt_entry): Likewise.
(elf64_aarch64_grok_prstatus): Removed.
(elf_backend_grok_prstatus): Removed.
(insn32): Likewise.
(aarch64_unsigned_overflow): Likewise.
(aarch64_signed_overflow): Likewise.
(aarch64_resolve_relocation): Likewise.
(MASK): Likewise.
(decode_branch_ofs_26): Likewise.
(decode_cond_branch_ofs_19): Likewise.
(decode_ld_lit_ofs_19): Likewise.
(decode_tst_branch_ofs_14): Likewise.
(decode_movw_imm): Likewise.
(decode_adr_imm): Likewise.
(decode_add_imm): Likewise.
(reencode_branch_ofs_26): Likewise.
(reencode_cond_branch_ofs_19): Likewise.
(reencode_ld_lit_ofs_19): Likewise.
(reencode_tst_branch_ofs_14): Likewise.
(reencode_movw_imm): Likewise.
(reencode_adr_imm): Likewise.
(reencode_ldst_pos_imm): Likewise.
(reencode_add_imm): Likewise.
(reencode_movzn_to_movz): Likewise.
(reencode_movzn_to_movn): Likewise.
(aarch64_relocate): Update to call the new function names in
elfxx-aarch64.c.
(aarch64_calculate_got_entry_vma): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(elf64_aarch64_update_plt_entry): Likewise; change the type of the
parameter 'r_type' to bfd_reloc_code_real_type; rename to ...
(elf_aarch64_update_plt_entry): ... this.
(elfNN_aarch64_create_small_pltn_entry): Update.
(elfNN_aarch64_init_small_plt0_entry): Remove plt_got_base; add
bfd_vma plt_got_2nd_ent; update to call elf_aarch64_update_plt_entry.
(elfNN_aarch64_finish_dynamic_sections): Add plt_entry; update to
call elf_aarch64_update_plt_entry.

11 years ago[AArch64, ILP32] 3/6 Support for ELF32 relocs and refactor reloc handling
Yufeng Zhang [Wed, 26 Jun 2013 10:47:06 +0000 (10:47 +0000)]
[AArch64, ILP32] 3/6 Support for ELF32 relocs and refactor reloc handling

bfd/

* bfd-in2.h: Re-generated.
* elfnn-aarch64.c (HOWTO64, HOWTO32): New define.
(IS_AARCH64_TLS_RELOC): Change to be based on the
bfd reloc enumerators.
(IS_AARCH64_TLSDESC_RELOC): Likewise.
(PG, PG_OFFSET): Cast literal to bfd_vma.
(elf64_aarch64_howto_table): Removed.
(elf64_aarch64_howto_dynrelocs): Removed.
(elf64_aarch64_tls_howto_table): Removed.
(elf64_aarch64_tlsdesc_howto_table): Removed.
(elfNN_aarch64_howto_table): New table to host all howto entires..
(R_AARCH64_*): Replaced by AARCH64_R (*) and AARCH64_R_STR (*).
(elfNN_aarch64_bfd_reloc_from_howto): New function.
(elfNN_aarch64_bfd_reloc_from_type): Ditto.
(struct elf_aarch64_reloc_map): New.
(elf_aarch64_reloc_map): New table.
(elfNN_aarch64_howto_from_bfd_reloc): New function.
(elfNN_aarch64_howto_from_type): Update to look up the new table
elfNN_aarch64_howto_table.
(struct elf64_aarch64_reloc_map): Remove.
(elf64_aarch64_reloc_map): Remove.
(elfNN_aarch64_reloc_type_lookup): Change to call
elfNN_aarch64_howto_from_bfd_reloc.
(elfNN_aarch64_reloc_name_lookup): Change to look up the new table
elfNN_aarch64_howto_table.
(aarch64_resolve_relocation): Refactor to switch on the bfd
reloc enumerators.
(bfd_elf_aarch64_put_addend): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(aarch64_tls_transition_without_check): Likewise.
(aarch64_reloc_got_type): Likewise.
(aarch64_can_relax_tls): Likewise.
(aarch64_tls_transition): Likewise.
(elfNN_aarch64_tls_relax): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
(aarch64_tls_transition): Change to return a bfd reloc enumerator.
* libbfd.h: Re-generated.
* reloc.c: Re-order the AArch64 bfd reloc enumerators.
(BFD_RELOC_AARCH64_RELOC_START)
(BFD_RELOC_AARCH64_RELOC_END)
(BFD_RELOC_AARCH64_LD_GOT_LO12_NC)
(BFD_RELOC_AARCH64_LD32_GOT_LO12_NC)
(BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC)
(BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC)
(BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC)
(BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC)
(BFD_RELOC_AARCH64_IRELATIVE): New relocs.

gas/

* config/tc-aarch64.c (reloc_table): Replace
BFD_RELOC_AARCH64_LD64_GOT_LO12_NC with
BFD_RELOC_AARCH64_LD_GOT_LO12_NC; likewise to
BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC and
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC.
(md_apply_fix): Handle BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC and
BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC.
(aarch64_force_relocation): Likewise.

gas/testsuite/

* gas/aarch64/ilp32-basic.d: New file.
* gas/aarch64/ilp32-basic.s: New file.

include/elf/

* aarch64.h: Add ELF32 reloc codes and remove fake ELF64 ones.
(R_AARCH64_IRELATIVE): New reloc.

11 years ago[AArch64, ILP32] 2/6 Parametrize elfnn-aarch64.c and add basic support in ld
Yufeng Zhang [Wed, 26 Jun 2013 10:41:42 +0000 (10:41 +0000)]
[AArch64, ILP32] 2/6 Parametrize elfnn-aarch64.c and add basic support in ld
and gas.

bfd/

* Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo.
(BUILD_CFILES): Add elf32-aarch64.c.
(elf32-aarch64.c): New rule for generating from elfnn-aarch64.c.
* Makefile.in: Re-generated.
* archures.c (bfd_mach_aarch64_ilp32): New define.
* bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration.
(bfd_elf32_aarch64_set_options): Ditto.
(elf32_aarch64_setup_section_lists): Ditto.
(elf32_aarch64_next_input_section): Ditto.
(elf32_aarch64_size_stubs): Ditto.
(elf32_aarch64_build_stubs): Ditto.
* bfd-in2.h: Re-generated.
* config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec
and bfd_elf32_bigaarch64_vec.
(aarch64-*-linux*): Likewise.
(aarch64_be-*-elf): Likewise.
(aarch64_be-*-linux*): Likewise.
* configure.in (bfd_elf32_bigaarch64_vec)
(bfd_elf32_littleaarch64_vec): New.
* configure: Re-generated.
* cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with
lp64 ones.
(bfd_aarch64_arch_ilp32): New.
(bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32.
* elfnn-aarch64.c (ARCH_SIZE): New define.
(AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines.
(GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8).
(elf64_aarch64_*): Rename to elfNN_aarch64_*.
(ELF64_R_*): Rename to ELFNN_R_*.
Plus other paramaterization.
* targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec):
New declarations.
(_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and
bfd_elf32_littleaarch64_vec.

gas/

* config/tc-aarch64.c (ilp32_p): New static variable.
(elf64_aarch64_target_format): Return the target according to the
value of 'ilp32_p'.
(md_begin): Determine 'mach' according to the value of 'ilp32_p'.
(aarch64_opts): Add support for options '-milp32' and '-mlp64'.
(aarch64_dwarf2_addr_size): New function.
* config/tc-aarch64.h (aarch64_dwarf2_addr_size): New declaration.
(DWARF2_ADDR_SIZE): New define.

ld/

* Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64elf32.c.
(eaarch64elf32.c): New dependency and rule.
* Makefile.in: Re-generated.
* configure.tgt (aarch64-*-elf): Add aarch64elf32.
(aarch64_be-*-elf, aarch64_be-*-linux*, aarch64-*-linux*): Likewise.
* emulparams/aarch64elf32.sh: New file.

11 years ago[AArch64, ILP32] 1/6 Rename elf64-aarch64.c to elfnn-aarch64.c
Yufeng Zhang [Wed, 26 Jun 2013 10:37:46 +0000 (10:37 +0000)]
[AArch64, ILP32] 1/6 Rename elf64-aarch64.c to elfnn-aarch64.c

bfd/

* Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-aarch64.c.
(BUILD_CFILES): Add elf64-aarch64.c.
(elf64-aarch64.c): New rule for generating from elfnn-aarch64.c.
* Makefile.in: Re-generated.
* elf64-aarch64.c: Rename to ...
* elfnn-aarch64.c: ... this.

11 years ago * rx-decode.opc (rx_decode_opcode): Check sd field as well as ss
Nick Clifton [Wed, 26 Jun 2013 10:31:38 +0000 (10:31 +0000)]
* rx-decode.opc (rx_decode_opcode): Check sd field as well as ss
field when checking for type 2 nop.
* rx-decode.c: Regenerate.

11 years agogdb/testsuite/
Yao Qi [Wed, 26 Jun 2013 08:28:27 +0000 (08:28 +0000)]
gdb/testsuite/

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

* gdb.trace/mi-trace-frame-collected.exp: New.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 08:17:27 +0000 (08:17 +0000)]
gdb/

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

* gdb.texinfo (GDB/MI Tracepoint Commands): Document
-trace-frame-collected.
gdb:

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

* mi/mi-cmds.c (mi_cmds): Register -trace-frame-collected.
* mi/mi-cmds.h (mi_cmd_trace_frame_collected): Declare.
* mi/mi-main.c (print_variable_or_computed): New function.
(mi_cmd_trace_frame_collected): New function.
* tracepoint.c (find_trace_state_variable_by_number): New.
(struct traceframe_info): Move to tracepoint.h
(struct collection_list): Likewise.
(do_collect_symbol): Include locals and arguments in the wholly
collected variables list.
(clear_collection_list): Clear wholly collected variables list
and computed variables list.
(append_exp): New function.
(encode_actions_1): Include variables in the wholly
collected variables list.  Include memory ranges and
full-fledged expressions in the computed expressions list.
(encode_actions): Move some code to ...
Return the cleanup chain.
(encode_actions_rsp): ... here.  New function.
(get_traceframe_location, get_traceframe_info): Remove static.
* tracepoint.h (struct memrange): Moved from tracepoint.c.
(struct collection_list): Moved from tracepoint.c.  Add two
new fields 'wholly_collected' and 'computed'.
(find_trace_state_variable_by_number): Declare.
(encode_actions): Adjust declaration.
(encode_actions_rsp): Declare.
(get_traceframe_info, get_traceframe_location): Declare.

* NEWS: Mention new MI command -trace-frame-collected.

11 years agogas/
Richard Sandiford [Wed, 26 Jun 2013 08:04:00 +0000 (08:04 +0000)]
gas/
* doc/c-mips.texi: Use ISA instead of @sc{isa}.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 08:01:57 +0000 (08:01 +0000)]
gdb/

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

* ctf.c (ctf_traceframe_info): Push trace state variables
present in the trace data into the traceframe info object.
* breakpoint.c (DEF_VEC_I): Remove.
* common/filestuff.c (DEF_VEC_I): Likewise.
* dwarf2loc.c (DEF_VEC_I): Likewise.
* mi/mi-main.c (DEF_VEC_I): Likewise.
* common/gdb_vecs.h (DEF_VEC_I): Define vector for int.
* features/traceframe-info.dtd: Add tvar element and its
attributes.
* tracepoint.c (free_traceframe_info): Free vector 'tvars'.
(build_traceframe_info): Push trace state variables present in the
trace data into the traceframe info object.
(traceframe_info_start_tvar): New function.
(tvar_attributes): New.
(traceframe_info_children): Add "tvar" element.
* tracepoint.h (struct traceframe_info) <tvars>: New field.

* NEWS: Mention the change in GDB and GDBserver.

gdb/doc:

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

* gdb.texinfo (Traceframe Info Format): Document tvar element and
its attributes.

gdb/gdbserver:

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

* tracepoint.c (build_traceframe_info_xml): Output trace state
variables present in the trace buffer.

11 years agoinclude/opcode/
Richard Sandiford [Wed, 26 Jun 2013 07:04:57 +0000 (07:04 +0000)]
include/opcode/
* mips.h: Fix comment for "1": it is now STYPE rather than SHAMT.
Use "source" rather than "destination" for microMIPS "G".

gas/
* config/tc-mips.c (validate_mips_insn): Use STYPE rather than SHAMT.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 05:35:45 +0000 (05:35 +0000)]
gdb/

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

* tracepoint.c (trace_dump_command): Move code to ...
(get_traceframe_location): ... here.  New.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 05:28:01 +0000 (05:28 +0000)]
gdb/

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

* tracepoint.c (trace_dump_command): GDB emits an error
 instead of a warning when a traceframe is not selected.

11 years agogdb/
Yao Qi [Wed, 26 Jun 2013 05:25:28 +0000 (05:25 +0000)]
gdb/

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

* tracepoint.c (tracepoint_list, stepping_list): Remove.
(clear_collection_list): Free fields 'aexpre_list' and 'list'
in collection_list.
(do_clear_collection_list, init_collection_list): New.
(encode_actions): Add local variables 'tracepoint_list' and
'stepping_list'.  Call init_collection_list and make cleanup
which calls do_clear_collection_list.  Don't call
clear_collection_list.
(_initialize_tracepoint): Delete references to
'tracepoint_list' and 'stepping_list'.

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

11 years ago bfd/
Maciej W. Rozycki [Tue, 25 Jun 2013 18:02:34 +0000 (18:02 +0000)]
bfd/
* elfxx-mips.h (_bfd_mips_elf_insn32): New prototype.
* elfxx-mips.c (mips_elf_link_hash_table): Add insn32 member.
(STUB_MOVE32_MICROMIPS, STUB_JALR32_MICROMIPS): New macros.
(MICROMIPS_INSN32_FUNCTION_STUB_NORMAL_SIZE): Likewise.
(MICROMIPS_INSN32_FUNCTION_STUB_BIG_SIZE): Likewise.
(micromips_insn32_o32_exec_plt0_entry): New variable.
(micromips_insn32_o32_exec_plt_entry): Likewise.
(_bfd_mips_elf_adjust_dynamic_symbol): Handle insn32 mode.
(mips_elf_estimate_stub_size): Likewise.
(_bfd_mips_elf_size_dynamic_sections): Likewise.
(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
(mips_finish_exec_plt): Likewise.
(_bfd_mips_elf_relax_section): Likewise.
(_bfd_mips_elf_insn32): New function.
(_bfd_mips_elf_get_synthetic_symtab): Handle insn32 PLT.

gas/
* config/tc-mips.c (mips_set_options): Add insn32 member.
(mips_opts): Initialize it.
(NOP_INSN, NOP_INSN_SIZE): Handle insn32 mode.
(options): Add OPTION_INSN32 and OPTION_NO_INSN32 enum values.
(md_longopts): Add "minsn32" and "mno-insn32" options.
(is_size_valid): Handle insn32 mode.
(md_assemble): Pass instruction string down to macro.
(brk_fmt): Add second dimension and insn32 mode initializers.
(mfhl_fmt): Likewise.
(BRK_FMT, MFHL_FMT): Handle insn32 mode.
(macro_build) <'c'>: Handle microMIPS 32-bit BREAK encoding.
(macro_build_jalr, move_register): Handle insn32 mode.
(macro_build_branch_rs): Likewise.
(macro): Handle insn32 mode.
<M_JRADDIUSP>, <M_JRC>, <M_MOVEP>: New cases.
(mips_ip): Handle insn32 mode.
(md_parse_option): Handle OPTION_INSN32 and OPTION_NO_INSN32.
(s_mipsset): Handle "insn32" and "noinsn32" pseudo-ops.
(mips_handle_align): Handle insn32 mode.
(md_show_usage): Add -minsn32 and -mno-insn32.

* doc/as.texinfo (Target MIPS options): Add -minsn32 and
-mno-insn32 options.
(-minsn32, -mno-insn32): New options.
* doc/c-mips.texi (MIPS Opts): Add -minsn32 and -mno-insn32
options.
(MIPS assembly options): New node.  Document .set insn32 and
.set noinsn32.
(MIPS-Dependent): List the new node.

gas/testsuite/
* gas/mips/micromips-insn32.d: New test.
* gas/mips/micromips-noinsn32.d: Likewise.
* gas/mips/micromips.l: Rename to...
* gas/mips/micromips-warn.l: ... this.
* gas/mips/micromips.d: Update accordingly.
* gas/mips/micromips-trap.d: Likewise.
* gas/mips/micromips.l: New list test.
* gas/mips/micromips.s: Add conditionals.
* gas/mips/mips.exp: Run the new tests.

include/opcode/
* mips.h: Add M_JRADDIUSP, M_JRC and M_MOVEP anonymous enum
values.

ld/
* emultempl/mipself.em (insn32): New variable.
(mips_create_output_section_statements): Handle insn32 mode.
(PARSE_AND_LIST_PROLOGUE): New macro.
(PARSE_AND_LIST_LONGOPTS): Likewise.
(PARSE_AND_LIST_OPTIONS): Likewise.

* gen-doc.texi: Set MIPS.
* ld.texinfo: Likewise.
(Options specific to MIPS targets): New section.
(ld and MIPS family): New node.
(Top, Machine Dependent): List the new node.

opcodes/
* micromips-opc.c (micromips_opcodes): Add "jraddiusp", "jrc"
and "movep" macros.

11 years ago * common/create-version.sh (date): Use "$", not "$$" in sed
Tom Tromey [Tue, 25 Jun 2013 16:04:54 +0000 (16:04 +0000)]
* common/create-version.sh (date): Use "$", not "$$" in sed
expression.

11 years ago * NEWS (New targets): Add entry for TI MSP430.
Kevin Buettner [Tue, 25 Jun 2013 15:55:12 +0000 (15:55 +0000)]
* NEWS (New targets): Add entry for TI MSP430.

11 years agoUpload tsv earlier in remote_start_remote
Yao Qi [Tue, 25 Jun 2013 13:01:28 +0000 (13:01 +0000)]
Upload tsv earlier in remote_start_remote

In extended-remote, when GDB connects the target, but target is not
running, the TSVs are not uploaded.  When GDB attaches to a process,
the TSVs are not uploaded either.  However, GDBserver has some
builtin or predefined TSV to upload, such as $trace_timestamp.  This
bug causes $trace_timestamp is never uploaded.

gdb/

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

        * remote.c (remote_start_remote): Move code to upload tsv
        earlier.

gdb/testsuite/

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

* boards/native-extended-gdbserver.exp: Set board_info
'gdb,predefined_tsv'.
* boards/native-gdbserver.exp: Likewise.
* boards/native-stdio-gdbserver.exp: Likewise.
* gdb.server/ext-attach.exp: Load trace-support.exp.  Check
uploaded TSVs if target supports tracing.
* gdb.trace/tsv.exp: Check uploaded TSVs if target supports
tracing and target has predefined tsv.

gdb/doc/

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

* gdbint.texinfo (Testsuite): Document 'gdb,predefined_tsv'.

11 years ago2013-06-25 Yao Qi <yao@codesourcery.com>
Hui Zhu [Tue, 25 Jun 2013 11:37:48 +0000 (11:37 +0000)]
2013-06-25  Yao Qi  <yao@codesourcery.com>
    Hui Zhu  <hui@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

PR breakpoints/15075
PR breakpoints/15434
* breakpoint.c (bpstat_stop_status): Call
b->ops->after_condition_true.
(update_dprintf_command_list): Don't append "continue" command
to the command list of dprintf breakpoint.
(base_breakpoint_after_condition_true): New function.
(base_breakpoint_ops): Add base_breakpoint_after_condition_true.
(dprintf_after_condition_true): New function.
(initialize_breakpoint_ops): Set dprintf_after_condition_true.
* breakpoint.h (breakpoint_ops): Add after_condition_true.

2013-06-25  Yao Qi  <yao@codesourcery.com>
    Hui Zhu  <hui@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

PR breakpoints/15075
PR breakpoints/15434
* gdb.base/dprintf-next.c: New file.
* gdb.base/dprintf-next.exp: New file.
* gdb.base/dprintf-non-stop.c: New file.
* gdb.base/dprintf-non-stop.exp: New file.
* gdb.base/dprintf.exp: Don't check "continue" in the output
of "info breakpoints".
* gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify):
Don't check "continue" in script field.

11 years ago * config/tc-msp430.c (msp430_srcoperand): Do not allow the use of
Nick Clifton [Tue, 25 Jun 2013 08:21:43 +0000 (08:21 +0000)]
* config/tc-msp430.c (msp430_srcoperand): Do not allow the use of
the PC in indirect addressing on 430xv2 parts.
(msp430_operands): Add version test to hardware bug encoding
restrictions.

11 years ago * Makefile.in (ALL_TARGET_OBS): Add msp430-tdep.o.
Kevin Buettner [Tue, 25 Jun 2013 01:16:31 +0000 (01:16 +0000)]
* Makefile.in (ALL_TARGET_OBS): Add msp430-tdep.o.
(ALLDEPFILES): Add msp430-tdep.c.
* configure.tgt (msp430*-*-elf): New target.
* msp430-tdep.c: New file.

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

11 years ago bfd/
Maciej W. Rozycki [Mon, 24 Jun 2013 23:55:46 +0000 (23:55 +0000)]
bfd/
* elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New
prototype.
* elf32-mips.c (elf_backend_plt_sym_val): Remove macro.
(bfd_elf32_get_synthetic_symtab): New macro.
* elfxx-mips.c (plt_entry): New structure.
(mips_elf_link_hash_entry): Add use_plt_entry member.
(mips_elf_link_hash_table): Rename plt_entry_size member to
plt_mips_entry_size.  Add plt_comp_entry_size, plt_mips_offset,
plt_comp_offset, plt_got_index entries and plt_header_is_comp
members.
(STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros.
(STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise.
(STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise.
(STUB_LI16S_MICROMIPS): Likewise.
(MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise.
(MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
(micromips_o32_exec_plt0_entry): New variable.
(mips16_o32_exec_plt_entry): Likewise.
(micromips_o32_exec_plt_entry): Likewise.
(mips_elf_link_hash_newfunc): Initialize use_plt_entry.
(mips_elf_output_extsym): Update to use gotplt_union's plist
member rather than offset.
(mips_elf_gotplt_index): Likewise.  Remove the VxWorks
restriction.  Use MIPS_ELF_GOT_SIZE to calculate GOT address.
(mips_elf_count_got_symbols): Update to use gotplt_union's plist
member rather than offset.
(mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT
entries.
(_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes
here.
(mips_elf_make_plt_record): New function.
(_bfd_mips_elf_check_relocs): Update comment.  Record occurences
of JAL relocations that might need a PLT entry.
(_bfd_mips_elf_adjust_dynamic_symbol): Update to use
gotplt_union's plist member rather than offset.  Set individual
PLT entry sizes here.  Handle MIPS16/microMIPS PLT entries.
Don't set the symbol's value in the symbol table for PLT
references here.  Don't set the PLT or PLT GOT section sizes
here.
(mips_elf_estimate_stub_size): Handle microMIPS stubs.
(mips_elf_allocate_lazy_stub): Likewise.
(mips_elf_lay_out_lazy_stubs): Likewise.  Define a _MIPS_STUBS_
magic symbol.
(mips_elf_set_plt_sym_value): New function.
(_bfd_mips_elf_size_dynamic_sections): Set PLT header size and
PLT and PLT GOT section sizes here.  Set the symbol values in
the symbol table for PLT references here.  Handle microMIPS
annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol.
(_bfd_mips_elf_finish_dynamic_symbol): Update to use
gotplt_union's plist member rather than offset.  Handle
MIPS16/microMIPS PLT entries.  Handle microMIPS stubs.
(_bfd_mips_vxworks_finish_dynamic_symbol): Update to use
gotplt_union's plist member rather than offset.  Use
MIPS_ELF_GOT_SIZE to calculate GOT address.
(mips_finish_exec_plt): Handle microMIPS PLT.  Return status.
(_bfd_mips_elf_finish_dynamic_sections): Handle result from
mips_finish_exec_plt.
(_bfd_mips_elf_link_hash_table_create): Update to use
gotplt_union's plist member rather than offset.
(_bfd_mips_elf_get_synthetic_symtab): New function.

include/elf/
* mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting.
(ELF_ST_SET_MIPS_PLT): Likewise.

gdb/
* mips-tdep.c (mips_elf_make_msymbol_special): Handle MIPS16 and
microMIPS synthetic symbols.

ld/
* emulparams/elf32btsmip.sh: Arrange for .got.plt to be placed
as close to .plt as possible.
* scripttempl/elf.sc: Handle $INITIAL_READWRITE_SECTIONS and
$PLT_NEXT_DATA variables.

ld/testsuite/
* ld-mips-elf/jalx-2.dd: Update for microMIPS PLT support.
* ld-mips-elf/pic-and-nonpic-3a.dd: Update for the _MIPS_STUBS_
magic symbol.
* ld-mips-elf/pic-and-nonpic-3b.dd: Likewise.
* ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise.
* ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise.
* ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise.
* ld-mips-elf/stub-dynsym-1-10000.d: Likewise.
* ld-mips-elf/stub-dynsym-1-2fe80.d: Likewise.
* ld-mips-elf/stub-dynsym-1-7fff.d: Likewise.
* ld-mips-elf/stub-dynsym-1-8000.d: Likewise.
* ld-mips-elf/stub-dynsym-1-fff0.d: Likewise.
* ld-mips-elf/tlslib-o32.d: Likewise.

opcodes/
* mips-dis.c (is_mips16_plt_tail): New function.
(print_insn_mips16): Handle MIPS16 PLT entry's GOT slot address
word.
(is_compressed_mode_p): Handle MIPS16/microMIPS PLT entries.

11 years agoAdapt sim to new version number & date locations.
Joel Brobecker [Mon, 24 Jun 2013 23:41:35 +0000 (23:41 +0000)]
Adapt sim to new version number & date locations.

This change is required now that gdb/version.in has been moved to
gdb/common/version.in and now that the date needs to be fetched
from bfd/version.h.

sim/common/ChangeLog:

        * create-version.sh: New script. Adapted from
        gdb/commong/create-version.sh.
        * Make-common.in (version.c): Update rule dependencies,
        and re-implement using create-version.sh.

sim/ppc/ChangeLog:

        * Makefile.in (srccom): New variable.
        (version.c): Update rule dependencies, and re-implement using
        sim/common/create-version.sh.

11 years agogas/
Roland McGrath [Mon, 24 Jun 2013 23:13:00 +0000 (23:13 +0000)]
gas/
* config/tc-arm.c (parse_reg_list): Use skip_past_char for '}',
so it skips whitespace before it.
(s_arm_unwind_save_mmxwr, s_arm_unwind_save_mmxwcg): Likewise.

gas/testsuite/
* gas/arm/macro-vld1.s: Add a case with whitespace before '}'.
* gas/arm/macro-vld1.d: Update.

11 years ago * objfiles.h (pc_in_section): New prototype.
Maciej W. Rozycki [Mon, 24 Jun 2013 22:18:32 +0000 (22:18 +0000)]
* objfiles.h (pc_in_section): New prototype.
(in_plt_section): Remove name argument, replace prototype with
static inline function.
* mips-tdep.h: Include "objfiles.h".
(in_mips_stubs_section): New function.
* hppa-tdep.h (gdbarch_tdep): Remove name argument of
in_solib_call_trampoline member.
(hppa_in_solib_call_trampoline): Remove name argument.
* objfiles.c (pc_in_section): New function.
(in_plt_section): Remove function.
* mips-linux-tdep.c: Include "objfiles.h".
(mips_linux_in_dynsym_stub): Call in_mips_stubs_section.  Remove
name argument.  Return 1 rather than the low 16-bit halfword of
any instruction examined.
(mips_linux_in_dynsym_resolve_code): Update
mips_linux_in_dynsym_stub call accordingly.
* mips-tdep.c (mips_stub_frame_sniffer): Use in_mips_stubs_section
rather than an equivalent hand-coded sequence.
* hppa-hpux-tdep.c (in_opd_section): Remove function.
(hppa32_hpux_in_solib_call_trampoline): Remove name argument.
(hppa64_hpux_in_solib_call_trampoline): Likewise.
(hppa64_hpux_find_global_pointer): Use pc_in_section rather than
in_opd_section.
* hppa-tdep.c (hppa_stub_unwind_sniffer): Remove name argument
on call to tdep->in_solib_call_trampoline.
(hppa_in_solib_call_trampoline): Remove name argument, update
according to in_plt_section change.
(hppa_skip_trampoline_code): Update according to in_plt_section
change.
* aarch64-tdep.c (aarch64_stub_unwind_sniffer): Likewise.
* arm-symbian-tdep.c (arm_symbian_skip_trampoline_code):
Likewise.
* arm-tdep.c (arm_stub_unwind_sniffer): Likewise.
* hppa-linux-tdep.c (hppa_linux_find_global_pointer): Likewise.
* hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
* nios2-tdep.c (nios2_stub_frame_sniffer): Likewise.
* nto-tdep.c (nto_relocate_section_addresses): Likewise.
* s390-tdep.c (s390_stub_frame_sniffer): Likewise.
* sh-tdep.c (sh_stub_unwind_sniffer): Likewise.
* solib-dsbt.c (dsbt_in_dynsym_resolve_code): Likewise.
* solib-frv.c (frv_in_dynsym_resolve_code): Likewise.
* solib-svr4.c (svr4_in_dynsym_resolve_code): Likewise.
* solib-target.c (solib_target_in_dynsym_resolve_code): Likewise.
* sparc-tdep.c (sparc_analyze_prologue): Likewise.
* tic6x-tdep.c (tic6x_stub_unwind_sniffer): Likewise.

11 years agoFix host_name and target_name generation by common/create-version.sh.
Joel Brobecker [Mon, 24 Jun 2013 22:03:51 +0000 (22:03 +0000)]
Fix host_name and target_name generation by common/create-version.sh.

This new script has one small snafoo, which prevented the $host_alias
and $target_alias from being expanded during the generation of the
version.c file.  As a result, the version info yields:

    This GDB was configured as "--host=$host_alias --target=$target_alias".
                                       ^^^^^^^^^^^          ^^^^^^^^^^^^^

This patch fixes this issue.

gdb/ChangeLog:

        * common/create-version.sh: Fix expansion of $host_alias
        and $target_alias in generation of HOST_NAME and TARGET_NAME
        (resp.).

11 years agogas/
Roland McGrath [Mon, 24 Jun 2013 21:05:30 +0000 (21:05 +0000)]
gas/
* config/tc-arm.c (arm_symbol_chars): Include '{' and '}'.
(arm_reg_parse_multi): Skip whitespace first.
(parse_reg_list): Likewise.
(parse_vfp_reg_list): Likewise.
(s_arm_unwind_save_mmxwcg): Likewise.

gas/testsuite/
* gas/arm/macro-pld.s: Add a 'push {r0}' case.
* gas/arm/macro-pld.d: Update expected output.
* gas/arm/macro-vld1.s: New file.
* gas/arm/macro-vld1.d: New file.

11 years ago PR gas/15623
Nick Clifton [Mon, 24 Jun 2013 15:38:53 +0000 (15:38 +0000)]
PR gas/15623
* config/tc-arm.c (do_t_smc): Mark as ending an IT block.

11 years agodon't keep a gdb-specific date
Tom Tromey [Mon, 24 Jun 2013 15:06:27 +0000 (15:06 +0000)]
don't keep a gdb-specific date

Right now there are two nightly commits to update a file in the tree
with the current date.  One commit is for BFD, one is for gdb.

It seems unnecessary to me to do this twice.  We can make do with a
single such commit.

This patch changes gdb in a minimal way to reuse the BFD date -- it
extracts it from bfd/version.h and changes version.in to use the
placeholder string "DATE" for those times when a date is wanted.

I propose removing the cron job that updates the version on trunk, and
then check in this patch.

For release branches, we can keep the cron job, but just tell it to
rewrite bfd/version.h.  I believe this is a simple change in the
crontab -- the script will work just fine on this file.

This also moves version.in and version.h into common/, to reflect
their shared status; and updates gdbserver to use version.h besides.

* common/create-version.sh: New file.
* Makefile.in (version.c): Use bfd/version.h, common/version.in,
create-version.sh.
(HFILES_NO_SRCDIR): Use common/version.h.
* version.in: Move to ...
* common/version.in: ... here.  Replace date with "DATE".
* version.h: Move to ...
* common/version.h: ... here.
gdbserver:
* Makefile.in (version.c): Use bfd/version.h, common/version.in,
create-version.sh.
(version.o): Remove.
* gdbreplay.c: Include version.h.
(version, host_name): Don't declare.
* server.h: Include version.h.
(version, host_name): Don't declare.
doc:
* Makefile.in (POD2MAN1, POD2MAN5): Use version.subst.
(GDBvn.texi): Use version.subst.
(version.subst): New target.
(mostlyclean): Remove version.subst.

11 years ago PR 15657
Nick Clifton [Mon, 24 Jun 2013 14:28:17 +0000 (14:28 +0000)]
PR 15657
* hash.c (_bfd_stringtab_add): Copy the string if COPY is true.

11 years agosim: bfin: note missing parallel handling of SEARCH
Mike Frysinger [Mon, 24 Jun 2013 02:06:32 +0000 (02:06 +0000)]
sim: bfin: note missing parallel handling of SEARCH

The SEARCH insn is an oddball when it comes to parallel usage.  It places a
big limit on what other insns it can run in parallel with, but we don't
currently track the amount of state needed to verify this (since no other insn
really requires this).  Add a note for now in case we get around to it.

11 years agosim: bfin: handle invalid HLs encoding in dsp shift insns
Mike Frysinger [Mon, 24 Jun 2013 02:03:03 +0000 (02:03 +0000)]
sim: bfin: handle invalid HLs encoding in dsp shift insns

For many of the 32bit dsp shift related insns, we were just ignoring the HLs
field.  The hardware does not though and will reject the insn if it's set
incorrectly.  Update the sim to match.

11 years agosim: bfin: run-tests.sh: fix typo in usage exit
Mike Frysinger [Mon, 24 Jun 2013 01:59:10 +0000 (01:59 +0000)]
sim: bfin: run-tests.sh: fix typo in usage exit

11 years agosim: bfin: se_all32bitopcodes: skip debug insns under the sim
Mike Frysinger [Mon, 24 Jun 2013 01:52:33 +0000 (01:52 +0000)]
sim: bfin: se_all32bitopcodes: skip debug insns under the sim

Since the sim has a few fake debug insns that the hardware does not, we
need to check for those before attempting to run them.  Otherwise we'll
randomly trigger the sim debug asserts/aborts/halts insns.  On the
hardware, these are proper invalid insns, and the table catches that.

11 years agosim: bfin: speed up all insn testcases slightly
Mike Frysinger [Mon, 24 Jun 2013 01:44:55 +0000 (01:44 +0000)]
sim: bfin: speed up all insn testcases slightly

The main body of the "all insn" test is executed once per tested insn, and
we test millions of insns here.  Any shrinkage we can do in this loop will
speed things up nicely (since it's multiplied per tested insn).

To that end, simplify the end-of-table test into one less insn, and omit
the SSYNC when we build for the sim.  When we build to run on the hardware,
this insn matters, but the sim doesn't have write store buffers in the chip
that might get in the way (memory writes are atomic).

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

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

11 years agoinclude/opcode/
Richard Sandiford [Sun, 23 Jun 2013 20:12:53 +0000 (20:12 +0000)]
include/opcode/
* mips.h: Fix comment typo: "G" is _RS rather than _RD for microMIPS.

gas/
* config/tc-mips.c (mips_ip): Fix swapped bit numbers in comments.

11 years agobfd/
Richard Sandiford [Sun, 23 Jun 2013 20:08:23 +0000 (20:08 +0000)]
bfd/
* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Move MIPS ELF
files to...
(BFD64_BACKENDS, BFD64_BACKENDS_CFILES): ...here.
* Makefile.in: Regenerate.
* config.bfd: Enclose all MIPS ELF targets in #ifdef BFD64.
Set want64 to true for them at the end.
* targets.c (_bfd_target_vector): Protect MIPS ELF targets with
#ifdef BFD64.

gas/
* config/tc-mips.c: Assert that offsetT and valueT are at least
8 bytes in size.
(GPR_SMIN, GPR_SMAX): New macros.
(macro, mips_ip): Remove code for 4-byte valueT and offsetT.

ld/
* Makefile.am (ALL_EMULATION_SOURCES): Move MIPS ELF emulations to...
(ALL_64_EMULATION_SOURCES): ...here.
* Makefile.in: Regenerate.

11 years agosim: bfin: trim trailing whitespace
Mike Frysinger [Sun, 23 Jun 2013 06:23:54 +0000 (06:23 +0000)]
sim: bfin: trim trailing whitespace

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

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

11 years ago2013-06-22 Sandra Loosemore <sandra@codesourcery.com>
Sandra Loosemore [Sat, 22 Jun 2013 19:57:42 +0000 (19:57 +0000)]
2013-06-22  Sandra Loosemore  <sandra@codesourcery.com>

bfd/
* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Don't
set sh_entsize for PLT section.

11 years agogas/testsuite/
Richard Sandiford [Sat, 22 Jun 2013 16:57:42 +0000 (16:57 +0000)]
gas/testsuite/
* gas/mips/mips.exp: Remove "LOSE" comments.
(run_dump_test_arch): Remove format selector support.
(run_dump_test_arches): Remove associated upvars.
(elf, ecoff, aout, no_mips16, no_micromips): Remove variables.
Remove all conditions based on them, on the assumption that $elf
is true and the others are false.  Rename "elf-jal" to "jal".
(tmips): Set to "t" for *bsd targets.
* gas/mips/elf-jal.d: Rename to...
* gas/mips/jal.d: ...this, replacing the old file.
* gas/mips/micromips@elf-jal.d: Rename to...
* gas/mips/micromips@jal.d: ...this.
* gas/mips/at-1.d, gas/mips/ld.d, gas/mips/l_d.d, gas/mips/lui.d,
gas/mips/mips1@l_d.d, gas/mips/mips1@ld-forward.d, gas/mips/mips1@ld.d,
gas/mips/mips1@s_d.d, gas/mips/s_d.d, gas/mips/sd.d: Remove ECOFF
relocation names.  Do not allow any offset on the symbol.

11 years agogas/testsuite/
Richard Sandiford [Sat, 22 Jun 2013 16:51:44 +0000 (16:51 +0000)]
gas/testsuite/
* gas/mips/lineno.d: Remove ellipsis.

11 years agogas/
Richard Sandiford [Sat, 22 Jun 2013 16:49:08 +0000 (16:49 +0000)]
gas/
* config/tc-mips.c: Remove OBJ_ELF, OBJ_MAYBE_ELF and IS_ELF
conditions.  Remove any code deselected by them.
(s_mips_frame, s_mips_mask): Handle ECOFF_DEBUGGING case first.

11 years ago * configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
Richard Sandiford [Sat, 22 Jun 2013 16:44:16 +0000 (16:44 +0000)]
* configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
(mips*-*-ecoff*, mips*-*-pe*, mips*-*-irix* [v4 and earlier])
(mips*-*-lnews*, mips*-*-riscos*): Add gas and ld to noconfigdirs.
* configure: Regenerate.

gas/
* NEWS: Note removal of ECOFF support.
* doc/as.texinfo (--emulation): Update for the removal of MIPS ECOFF.
* Makefile.am (TARG_ENV_HFILES): Remove config/te-lnews.h.
(MULTI_CFILES): Remove config/e-mipsecoff.c.
* Makefile.in: Regenerate.
* configure.in: Remove MIPS ECOFF references.
(mips-sony-bsd*, mips-*-bsd*, mips-*-lnews*-ecoff, mips-*-*-ecoff):
Delete cases.
(mips-*-irix5*-*, mips*-*-linux*-*, mips*-*-freebsd*)
(mips*-*-kfreebsd*-gnu, mips-*-*-elf): Fold into...
(mips-*-*): ...this single case.
(mipsbecoff, mipslecoff, mipsecoff): Remove emulations.  Expect
MIPS emulations to be e-mipself*.
* configure: Regenerate.
* configure.tgt (mips-sony-bsd*, mips-*-ultrix*, mips-*-osf*)
(mips-*-ecoff*, mips-*-pe*, mips-*-irix*, ips-*-lnews*, mips-*-riscos*)
(mips-*-sysv*): Remove coff and ecoff cases.
* as.c (mipsbecoff, mipslecoff, mipsecoff): Remove.
* ecoff.c: Remove reference to MIPS ECOFF.
* config/e-mipsecoff.c, config/te-lnews.h: Delete files.
* config/tc-mips.c (ECOFF_LITTLE_FORMAT): Delete.
(RDATA_SECTION_NAME, mips_target_form): Remove COFF and ECOFF cases.
(mips_hi_fixup): Tweak comment.
(append_insn): Require a howto.
(mips_after_parse_args): Remove OBJ_MAYBE_ECOFF code.

gas/testsuite/
* gas/all/gas.exp: Remove reference to mips-ecoff.
* gas/mips/branch-misc-1.d, gas/mips/branch-misc-2.d,
gas/mips/branch-misc-2-64.d, gas/mips/branch-misc-2pic.d,
gas/mips/branch-misc-2pic-64.d, gas/mips/branch-swap.d: Remove
skips for mips-*-ecoff.

ld/
* NEWS: Document the removal of MIPS ECOFF targets.
* ld.texinfo (--gpsize=@var{value}): Use MIPS ELF rather than
MIPS ECOFF as an example of a target that supports small data.
* ldmain.c (g_switch_value): Likewise.
* configure.tgt (mips*-*-pe, mips*-dec-ultrix*, mips*-dec-osf*)
(mips*-sgi-irix* [v4 and earlier], mips*el-*-ecoff*, mips*-*-ecoff*)
(mips*-*-bsd*, mips*-*-lnews*): Remove cases.
* Makefile.am (ALL_EMULATION_SOURCES): Remove emipsbig.c, emipsbsd.c,
emipsidt.c, emipsidtl.c, emipslit.c, emipslnews.c and emipspe.c.
(emipsbig.c, emipsbsd.c, emipsidt.c, emipsidtl.c, emipslit.c)
(emipslnews.c, emipspe.c): Delete rules.
* Makefile.in: Regenerate.
* emulparams/mipsbig.sh, emulparams/mipsbsd.sh, emulparams/mipsidt.sh,
emulparams/mipsidtl.sh, emulparams/mipslit.sh, emulparams/mipslnews.sh,
emulparams/mipspe.sh, emultempl/mipsecoff.em: Delete.
* emultempl/m68kcoff.em: Update comment to say that MIPS ECOFF support
has now been removed.
* emultempl/pe.em: Remove TARGET_IS_mipspe checks.

11 years agogas/
Richard Sandiford [Sat, 22 Jun 2013 16:18:45 +0000 (16:18 +0000)]
gas/
* doc/as.texinfo: Use MIPS rather than @sc{mips} throughout.
Use "CPU" instead of "cpu".
* doc/c-mips.texi: Likewise.
(MIPS Opts): Rename to MIPS Options.
(MIPS option stack): Rename to MIPS Option Stack.
(MIPS ASE instruction generation overrides): Rename to
MIPS ASE Instruction Generation Overrides (for now).
(MIPS floating-point): Rename to MIPS Floating-Point.

11 years agogas/
Richard Sandiford [Sat, 22 Jun 2013 16:09:55 +0000 (16:09 +0000)]
gas/
* doc/c-mips.texi (MIPS Macros): New section.
(MIPS Object): Replace with...
(MIPS Small Data): ...this new section.

11 years agogas/
Richard Sandiford [Sat, 22 Jun 2013 16:02:24 +0000 (16:02 +0000)]
gas/
* doc/c-mips.texi (MIPS symbol sizes): Move section further up file.
Capitalize name.  Use @kindex instead of @cindex for .set entries.

11 years agogas/
Richard Sandiford [Sat, 22 Jun 2013 15:58:59 +0000 (15:58 +0000)]
gas/
* doc/c-mips.texi (MIPS Stabs): Remove section.

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

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

11 years agoUpdate dates in relevant gdb/gnulib/ copyright headers
Joel Brobecker [Fri, 21 Jun 2013 17:55:07 +0000 (17:55 +0000)]
Update dates in relevant gdb/gnulib/ copyright headers

This patch is the result of re-running the copyright.py script
in GDB, after we modified it to stop ignoring some files in
gdb/gnulib that should have been updated earlier this year.

gdb/ChangeLog:

        * gdb/gnulib/Makefile.in: Update date in copyright header.
        * gdb/gnulib/configure.ac: Ditto.
        * gdb/gnulib/update-gnulib.sh: Ditto.

11 years agocopyright.py: Handle files in gdb/gnulib owned by GDB.
Joel Brobecker [Fri, 21 Jun 2013 17:54:58 +0000 (17:54 +0000)]
copyright.py: Handle files in gdb/gnulib owned by GDB.

The script was excluding all of gdb/gnulib but this is no longer
correct, ever since we moved the imported files to gdb/gnulib/import.
As a result, a number of files (Makefile, etc, including this script
itself) did not have their copyright header updated. This fixes
the problem.

gdb/ChangeLog:

        * copyright.py (EXCLUDE_LIST): Replace "gdb/gnulib" by
        "gdb/gnulib/import".

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.