Skip to content
Snippets Groups Projects
  1. May 08, 2014
    • Stefan Kristiansson's avatar
      or1k: add support for l.swa/l.lwa atomic instructions · 999b995d
      Stefan Kristiansson authored
      This adds support for the load-link/store-conditional
      l.lwa/l.swa atomic instructions.
      The support is added in such way, that the cpu description not
      only describes the mnemonics, but also the functionality.
      
      A couple of fixes to typos in nearby/related code are also snuck
      into this.
      
      cpu/
      	* or1korbis.cpu (h-atomic-reserve): New hardware.
      	(h-atomic-address): Likewise.
      	(insn-opcode): Add opcodes for LWA and SWA.
      	(atomic-reserve): New operand.
      	(atomic-address): Likewise.
      	(l-lwa, l-swa): New instructions.
      	(l-lbs): Fix typo in comment.
      	(store-insn): Clear atomic reserve on store to atomic-address.
      	Fix register names in fmt field.
      
      opcodes/
      	* or1k-desc.c: Regenerated.
      	* or1k-desc.h: Likewise.
      	* or1k-opc.c: Likewise.
      	* or1k-opc.h: Likewise.
      	* or1k-opinst.c: Likewise.
      999b995d
    • Alan Modra's avatar
      daily update · efefdd63
      Alan Modra authored
      efefdd63
    • Hans-Peter Nilsson's avatar
      52f4ea79
  2. May 07, 2014
    • Volodymyr Arbatov's avatar
      Use signed data type for R_XTENSA_DIFF* relocation offsets. · 1058c753
      Volodymyr Arbatov authored
      R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such.
      Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation
      changing sign during relaxation.
      
      2014-05-02  Volodymyr Arbatov  <arbatov@cadence.com>
      	    David Weatherford  <weath@cadence.com>
      	    Max Filippov  <jcmvbkbc@gmail.com>
      
      bfd/
        * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
        signed.
      
      gas/
        * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF*
        fixups as signed.
      
      ld/testsuite/
        * ld-xtensa/diff_overflow.exp, * ld-xtensa/diff_overflow1.s,
        * ld-xtensa/diff_overflow2.s: Add test for DIFF* relocation
        signedness and overflow checking.
      1058c753
    • Andreas Tobler's avatar
      Add proper arm config for *-*-freebsd*. · e59bc75b
      Andreas Tobler authored
      e59bc75b
    • Kyle McMartin's avatar
      aarch64: detect atomic sequences like other ll/sc architectures · 9404b58f
      Kyle McMartin authored
      gdb/Changelog:
      
              * aarch64-tdep.c (aarch64_software_single_step): New function.
              (aarch64_gdbarch_init): Handle single stepping of atomic sequences
              with aarch64_software_single_step.
      
      gdb/testsuite/ChangeLog:
      
              * gdb.arch/aarch64-atomic-inst.c: New file.
              * gdb.arch/aarch64-atomic-inst.exp: New file.
      9404b58f
    • Andrew Bennett's avatar
      Add MIPS r3 and r5 support. · ae52f483
      Andrew Bennett authored
      This patch firstly adds support for mips32r3 mips32r5, mips64r3
      and mips64r5.  Secondly it adds support for the eretnc instruction.
      
      ChangeLog:
      
      bfd/
      	* aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
      	mips32r5 and mips64r5.
      	* archures.c (bfd_architecture): Likewise.
      	* bfd-in2.h (bfd_architecture): Likewise.
      	* cpu-mips.c (arch_info_struct): Likewise.
      	* elfxx-mips.c (mips_set_isa_flags): Likewise.
      
      gas/
      	* tc-mips.c (ISA_SUPPORTS_MIPS16E): Add mips32r3, mips32r5, mips64r3
      	and mips64r5.
      	(ISA_HAS_64BIT_FPRS): Likewise.
      	(ISA_HAS_ROR): Likewise.
      	(ISA_HAS_ODD_SINGLE_FPR): Likewise.
      	(ISA_HAS_MXHC1): Likewise.
      	(hilo_interlocks): Likewise.
      	(md_longopts): Likewise.
      	(ISA_HAS_64BIT_REGS): Add mips64r3 and mips64r5.
      	(ISA_HAS_DROR): Likewise.
      	(options): Add OPTION_MIPS32R3, OPTION_MIPS32R5, OPTION_MIPS64R3, and
      	OPTION_MIPS64R5.
      	(mips_isa_rev): Add support for mips32r3, mips32r5, mips64r3 and
      	mips64r5.
      	(md_parse_option): Likewise.
      	(s_mipsset): Likewise.
      	(mips_cpu_info_table): Add entries for mips32r3, mips32r5, mips64r3
      	and mips64r5.  Also change p5600 entry to be mips32r5.
      	* configure.in: Add support for mips32r3, mips32r5, mips64r3 and
      	mips64r5.
      	* configure: Regenerate.
      	* doc/c-mips.texi: Document the -mips32r3, -mips32r5, -mips64r3 and
      	-mips64r5 command line options.
      	* doc/as.texinfo: Likewise.
      
      gas/testsuite/
      	* gas/mips/mips.exp: Add MIPS32r5 tests.  Also add the mips32r3,
      	mips32r5, mips64r3 and mips64r5 isas to the testsuite.
      	* gas/mips/r5.s: New test.
      	* gas/mips/r5.d: Likewise.
      
      include/opcode/
      	* mips.h (INSN_ISA_MASK): Updated.
      	(INSN_ISA32R3): New define.
      	(INSN_ISA32R5): New define.
      	(INSN_ISA64R3): New define.
      	(INSN_ISA64R5): New define.
      	(INSN_ISA64, INSN_ISA64R2, INSN_ISA3_32, INSN_ISA3_32R2, INSN_ISA4_32
      	INSN_ISA4_32R2, INSN_ISA5_32R2): Renumbered.
      	(mips_isa_table): Add entries for mips32r3, mips32r5, mips64r3 and
      	mips64r5.
      	(INSN_UPTO32R3): New define.
      	(INSN_UPTO32R5): New define.
      	(INSN_UPTO64R3): New define.
      	(INSN_UPTO64R5): New define.
      	(ISA_MIPS32R3): New define.
      	(ISA_MIPS32R5): New define.
      	(ISA_MIPS64R3): New define.
      	(ISA_MIPS64R5): New define.
      	(CPU_MIPS32R3): New define.
      	(CPU_MIPS32R5): New define.
      	(CPU_MIPS64R3): New define.
      	(CPU_MIPS64R5): New define.
      
      opcodes/
      	* mips-opc.c (mips_builtin_opcodes): Add MIPS32r5 eretnc instruction.
      	(I34): New define.
      	(I36): New define.
      	(I66): New define.
      	(I68): New define.
      	* mips-dis.c (mips_arch_choices): Add mips32r3, mips32r5, mips64r3 and
      	mips64r5.
      	(parse_mips_dis_option): Update MSA and virtualization support to
      	allow mips64r3 and mips64r5.
      ae52f483
    • Andrew Bennett's avatar
      Fix an issue with "Rearrange MIPS INSN* masks" patch. · f7730599
      Andrew Bennett authored
      This fixes an issue with Mark Shinwell's "Rearrange MIPS INSN* masks" patch
      (https://sourceware.org/ml/binutils/2007-11/msg00231.html).  In the patch
      the pref instruction had its membership flags changed from I4|I32|G3 to
      I4_32|G3.  Unfortunately G3 was defined as being I4, which made the actual
      expanded flags as: I4|I32|I4 and therefore the membership flags should have
      been I4_32.  Since the patch was committed G3 was redefined to be I4|EE.  This
      fix just removes I4 from G3 making the expanded membership flags for pref as
      I4_32|EE.
      
      ChangeLog:
      
      opcodes/
      	* mips-opc.c (G3): Remove I4.
      f7730599
    • Yao Qi's avatar
      Relax the pattern in dwzbuildid.exp · 5e45f04c
      Yao Qi authored
      Hi,
      I recently see the fail in dwzbuildid.exp below on some targets,
      
      (gdb) print the_int
      No symbol "the_int" in current context.
      (gdb) FAIL: gdb.dwarf2/dwzbuildid.exp: mismatch: print the_int
      
      Looks the pattern expects to see "No symbol table is loaded", which
      is emitted in c-exp.y,
      
      variable:       name_not_typename
      ....
                                    if (msymbol.minsym != NULL)
                                      write_exp_msymbol (pstate, msymbol);
                                    else if (!have_full_symbols () && !have_partial_symbols ())
                                      error (_("No symbol table is loaded.  Use the \"file\" command."));
                                    else
                                      error (_("No symbol \"%s\" in current context."),
                                             copy_name ($1.stoken));
      
      it is expected to have no full symbols nor partial symbols, but something
      brings full symbols or partial symbols in.  I added "maint info symtabs"
      and "maint info psymtabs" in dwzbuildid.exp, and it shows symbols are from
      ld.so, which has debug information.  Then, I reproduce the fail like this,
      
        $ make check RUNTESTFLAGS="CFLAGS_FOR_TARGET='-Wl,-rpath=${glibc_build}:${glibc_build}/math  -Wl,--dynamic-linker=${glibc_build}/elf/ld.so' dwzbuildid.exp"
      
      ${glibc_build} is the glibc build tree.  Debug information is not striped,
      so the test fail.  However, if I strip debug information from libc.so, libm.so
      and ld.so.  The test passes.
      
      This patch is to relax the pattern to match the both cases that glibc build
      has and has not debug information.
      
      gdb/testsuite:
      
      2014-05-07  Yao Qi  <yao@codesourcery.com>
      
      	* gdb.dwarf2/dwzbuildid.exp: Match output "No symbol "the_int" in
      	current context" too.
      5e45f04c
    • Alan Modra's avatar
      daily update · 1144861e
      Alan Modra authored
      1144861e
  3. May 06, 2014
    • Cary Coutant's avatar
      Fix issue where first reserved word of GOT is not initialized if there · 57b2284c
      Cary Coutant authored
      is no PLT.
      
      gold/
      	PR gold/16900
      	* i386.cc (Output_data_got_plt_i386): New class.
      	(Output_data_plt_i386::Output_data_plt_i386): Change type of got_plt
      	parameter. Change all callers.
      	(Output_data_plt_i386::layout_): Remove.
      	(Output_data_plt_i386::got_plt_): Change type.
      	(Target_i386::got_plt_): Change type. Change all references.
      	(Target_i386::got_section): Create instance of new class.
      	(Output_data_got_plt_i386::do_write): New function.
      	* x86_64.cc (Output_data_got_plt_x86_64): New class.
      	(Output_data_plt_x86_64::Output_data_plt_x86_64): Change type of got_plt
      	parameter. Change all callers.
      	(Output_data_plt_x86_64::layout_): Remove.
      	(Output_data_plt_x86_64::got_plt_): Change type.
      	(Target_x86_64::got_plt_): Change type. Change all references.
      	(Target_x86_64::got_section): Create instance of new class.
      	(Output_data_got_plt_x86_64::do_write): New function.
      	(Output_data_plt_x86_64::do_write): Don't write reserved words in GOT.
      	(Target_x86_64<size>::init_got_plt_for_update): Create instance of new
      	class.
      57b2284c
    • Richard Sandiford's avatar
      bfd/ · 757a636f
      Richard Sandiford authored
      	* elfxx-mips.h (elfxx-mips.h): Declare.
      	* elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
      	Tag_GNU_MIPS_ABI_FP mismatches.
      	(_bfd_mips_fp_abi_string): New function.
      757a636f
    • Alan Modra's avatar
      daily update · 5e824b35
      Alan Modra authored
      5e824b35
    • Cary Coutant's avatar
      Don't complain about the source language when we have pubnames/pubtypes info. · 6b97515d
      Cary Coutant authored
      gold/
      	* gdb-index.cc (Gdb_index_info_reader): Don't complain about language
      	if we have pubnames/pubtypes.
      6b97515d
    • Joel Brobecker's avatar
      Document the GDB 7.7.1 release in gdb/ChangeLog · 5e49ba57
      Joel Brobecker authored
      gdb/ChangeLog:
      
      	GDB 7.7.1 released.
      5e49ba57
  4. May 05, 2014
    • H.J. Lu's avatar
      Properly handle multiple opcode prefixes · 285ca992
      H.J. Lu authored
      This patch updates multiple opcode prefix processing:
      
      1. Always print prefix together with bad opcode.
      2. Since the last seen segment register prefix is active, we only print
      the active segment register in the memory operand.
      3. The 0xf2 and 0xf3 prefixes take precedence over the 0x66 prefix as the
      opcode prefix.  Also the last of the 0xf2 and 0xf3 prefixes wins.
      4. Ignore invalid 0xf2/0xf3 prefixes if they aren't mandatory.
      
      gas/testsuite/
      
      	PR binutils/16893
      	* gas/i386/katmai.d: Expect "gs" as prefix.
      
      	* gas/i386/long-1.s: Replace movapd with movss.
      	* gas/i386/x86-64-long-1.s: Likewise.
      	* gas/i386/long-1-intel.d: Updated.
      	* gas/i386/long-1.d: Likewise.
      	* gas/i386/x86-64-long-1-intel.d: Likewise.
      	* gas/i386/x86-64-long-1.d: Likewise.
      
      	* gas/i386/prefix.s: Add tests for multiple 0x66, 0x67, 0xf0,
      	0xf2 and 0xf3 prefixes.
      	* gas/i386/prefix.d: Updated.
      
      opcodes/
      
      	PR binutils/16893
      	* i386-dis.c (twobyte_has_mandatory_prefix): New variable.
      	(end_codep): Likewise.
      	(mandatory_prefix): Likewise.
      	(active_seg_prefix): Likewise.
      	(ckprefix): Set active_seg_prefix to the active segment register
      	prefix.
      	(seg_prefix): Removed.
      	(get_valid_dis386): Use the last of PREFIX_REPNZ and PREFIX_REPZ
      	for prefix index.  Ignore the index if it is invalid and the
      	mandatory prefix isn't required.
      	(print_insn): Set mandatory_prefix if the PREFIX_XXX prefix is
      	mandatory.  Don't set PREFIX_REPZ/PREFIX_REPNZ/PREFIX_LOCK bits
      	in used_prefixes here.  Don't print unused prefixes.  Check
      	active_seg_prefix for the active segment register prefix.
      	Restore the DFLAG bit in sizeflag if the data size prefix is
      	unused.  Check the unused mandatory PREFIX_XXX prefixes
      	(append_seg): Only print the segment register which gets used.
      	(OP_E_memory): Check active_seg_prefix for the segment register
      	prefix.
      	(OP_OFF): Likewise.
      	(OP_OFF64): Likewise.
      	(OP_DSreg): Set active_seg_prefix to PREFIX_DS if it is unset.
      285ca992
    • Keith Seitz's avatar
      Fix a dangling cleanup in linspec_parse_basic. · c888a17d
      Keith Seitz authored
      2014-05-05  Keith Seitz  <keiths@redhat.com>
      
      	* linespec.c (linespec_parse_basic): Run cleanups if a convenience
      	variable or history value is successfully parsed.
      
      2014-05-05  Keith Seitz  <keiths@redhat.com>
      
      	* gdb.linespec/ls-dollar.exp: Add test for linespec
      	file:convenience_variable.
      c888a17d
    • Yao Qi's avatar
      Partially available/unavailable data in requested range · 290a839c
      Yao Qi authored
      In gdb.trace/unavailable.exp, an action is defined to collect
      struct_b.struct_a.array[2] and struct_b.struct_a.array[100],
      
      struct StructB
      {
        int d, ef;
        StructA struct_a;
        int s:1;
        static StructA static_struct_a;
        const char *string;
      };
      
      and the other files are not collected.
      
      When GDB examine traceframe collected by the action, "struct_b" is
      unavailable completely, which is wrong.
      
      (gdb) p struct_b
      $1 = <unavailable>
      
      When GDB reads 'struct_b', it will request to read memory at struct_b's address
      of length LEN.  Since struct_b.d is not collected, no 'M' block
      includes the first part of the desired range, so tfile_xfer_partial returns
      TARGET_XFER_UNAVAILABLE and GDB thinks the whole requested range is unavailable.
      
      In order to fix this problem, in the iteration to 'M' blocks, we record the
      lowest address of blocks within the request range.  If it has, the requested
      range isn't unavailable completely.  This applies to ctf too.  With this patch
      applied, the result looks good and fails in unavailable.exp is fixed.
      
      (gdb) p struct_b
      $1 = {d = <unavailable>, ef = <unavailable>, struct_a = {a = <unavailable>, b = <unavailable>, array = {<unavailable>,
      <unavailable>, -1431655766, <unavailable> <repeats 97 times>, -1431655766, <unavailable> <repeats 9899 times>}, ptr = <unavailable>, bitfield = <unavailable>}, s = <unavailable>,   static static_struct_a = {a = <unavailable>, b = <unavailable>, array = {<unavailable> <repeats 10000 times>}, ptr = <unavailable>,
      bitfield = <unavailable>}, string = <unavailable>}
      
      gdb:
      
      2014-05-05  Yao Qi  <yao@codesourcery.com>
      	    Pedro Alves  <palves@redhat.com>
      
      	* tracefile-tfile.c (tfile_xfer_partial): Record the lowest
      	address of blocks that intersects the requested range.  Trim
      	LEN up to LOW_ADDR_AVAILABLE if read from executable read-only
      	sections.
      	* ctf.c (ctf_xfer_partial): Likewise.
      
      gdb/testsuite:
      
      2014-05-05  Yao Qi  <yao@codesourcery.com>
      
      	* gdb.trace/unavailable.exp (gdb_collect_args_test): Save
      	traceframes into tfile and ctf trace files.  Read data from
      	trace file and test collected data.
      	(gdb_collect_locals_test): Likewise.
      	(gdb_unavailable_registers_test): Likewise.
      	(gdb_unavailable_floats): Likewise.
      	(gdb_collect_globals_test): Likewise.
      	(top-level): Append "ctf" to trace_file_targets if GDB
      	supports.
      290a839c
    • Yao Qi's avatar
      Show new created display · 91256dc2
      Yao Qi authored
      When I run refactored unavailable.exp, I find
      command display behaves a little different on live inferior and on
      examining traceframes.  In live inferior, when command "display argc"
      is typed, the value of "argc" is shown.
      
      (gdb) display argc
      1: argc = 1 '\001'
      
      however, on tfile target, when command "display argc" is typed, the
      value of "argc" is not shown.
      
      (gdb) tfind
      Found trace frame 0, tracepoint 1
          at ../../../../git/gdb/testsuite/gdb.trace/unavailable.cc:198
      198       i =  (int) argc + argi + argf + argd + argstruct.memberi + argarray[1];
      (gdb) display argc
      
      I also notice that on "core" target, the value of "argc" isn't shown
      either.  This difference is caused by the code below in printcmd.c:display_command,
      
            if (from_tty && target_has_execution)
              do_one_display (new);
      
      Looks the value of each display is shown if the target has execution.
      Source code archaeology doesn't tell much about this requirement.
      However, if we type command "display" then on "core" or "tfile"
      target, the value of "argc" is still displayed,
      
      for "core" target,
      (gdb) display argc
      (gdb) display
      1: argc = 1 '\001'
      
      for "tfile" target,
      (gdb) display argc
      (gdb) display
      1: argc = <unavailable>
      
      I feel that it is not necessary to have such "target has execution"
      requirement to show the value of new created display.  Auto-display is
      a feature to show the value of expression frequently, has nothing to
      do with whether target has execution or not.  On the other hand, GDB
      has the requirement for new created display, but command "display" can
      still show them, this is an inconsistency, which should be fixed.
      
      This patch is to remove the checking to target_has_execution from the
      condition.
      
      gdb:
      
      2014-05-05  Yao Qi  <yao@codesourcery.com>
      
      	* printcmd.c (display_command): Remove the check to
      	target_has_execution.
      91256dc2
    • Yao Qi's avatar
      Move traceframe checking out of traceframe generation · b5262cd0
      Yao Qi authored
      This patch moves traceframe checking code out of traceframe generation,
      so that we can generation traceframe once, and do the checking in multiple
      times (with target remote, tfile and ctf respectively).  This is a
      pure refactor, not functional changes in unavailable.exp.
      
      gdb/testsuite:
      
      2014-05-05  Yao Qi  <yao@codesourcery.com>
      
      	* gdb.trace/unavailable.exp (gdb_collect_args_test): Move some
      	code to ...
      	(gdb_collect_args_test_1): ... it.  New proc.
      	(gdb_collect_locals_test): Move some code to ...
      	(gdb_collect_locals_test_1): ... it.  New proc.
      	(gdb_unavailable_registers_test): Move some code to ...
      	(gdb_unavailable_registers_test_1): ... it.  New proc.
      	(gdb_unavailable_floats): Move some code to ...
      	(gdb_unavailable_floats_1): ... it.  New proc.
      b5262cd0
    • Alan Modra's avatar
      daily update · 74183dab
      Alan Modra authored
      74183dab
  5. May 04, 2014
  6. May 03, 2014
    • Mark Kettenis's avatar
      Git sucks! · 6ddd353c
      Mark Kettenis authored
      6ddd353c
    • Mark Kettenis's avatar
      Enable rthreads support on OpenBSD/powerpc. · 07284463
      Mark Kettenis authored
      gdb/ChangeLog:
      
              * ppcobsd-nat.c: Include "obsd-nat.h".
              (_initialize_ppcobsd_nat): Call obsd_add_target instead of
              add_target.
              * config/powerpc/obsd.mh (NATDEPFILES): Add obsd-nat.o.
      07284463
    • Alan Modra's avatar
      daily update · 19a17075
      Alan Modra authored
      19a17075
    • Cary Coutant's avatar
      Fix handling of __ehdr_start when it cannot be defined. · d1bddd3c
      Cary Coutant authored
      2014-05-02  Cary Coutant  <ccoutant@google.com>
      
      	* defstd.cc (in_segment): Define __ehdr_start here...
      	* layout.cc (Layout::finalize): ...Instead of here.  Set the
      	output segment when known.
      	* resolve.cc (Symbol::override_base_with_special): Remember
      	the original binding.
      	* symtab.cc (Symbol::set_output_segment): New function.
      	(Symbol::set_undefined): New function.
      	* symtab.h (Symbol::is_weak_undefined): Check original undef
      	binding.
      	(Symbol::is_strong_undefined): New function.
      	(Symbol::set_output_segment): New function.
      	(Symbol::set_undefined): New function.
      	* target-reloc.h (is_strong_undefined): Remove.
      	(issue_undefined_symbol_error): Call Symbol::is_weak_undefined.
      	Check for hidden undefs.
      	(relocate_section): Call Symbol::is_strong_undefined.
      
      	* testsuite/Makefile.am (ehdr_start_test_1)
      	(ehdr_start_test_2, ehdr_start_test_3)
      	(ehdr_start_test_4, ehdr_start_test_5): New test cases.
      	* testsuite/Makefile.in: Regenerate.
      	* testsuite/ehdr_start_def.cc: New source file.
      	* testsuite/ehdr_start_test.cc: New source file.
      	* testsuite/ehdr_start_test.t: New linker script.
      	* testsuite/ehdr_start_test_4.sh: New shell script.
      d1bddd3c
  7. May 02, 2014
    • Sergio Durigan Junior's avatar
      Extend recognized types of SDT probe's arguments · 30a1e6cc
      Sergio Durigan Junior authored
      This commit is actually an update to make the parser in
      gdb/stap-probe.c be aware of all the possible prefixes that a probe
      argument can have.  According to the section "Argument Format" in:
      
        <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation>
      
      The bitness of the arguments can be 8, 16, 32 or 64 bits, signed or
      unsigned.  Currently GDB recognizes only 32 and 64-bit arguments.
      This commit extends this.  It also provides a testcase, only for
      x86_64 systems.
      
      gdb/
      2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* stap-probe.c (enum stap_arg_bitness): New enums to represent 8
      	and 16-bit signed and unsigned arguments.  Update comment.
      	(stap_parse_probe_arguments): Extend code to handle such
      	arguments.  Use warning instead of complaint to notify about
      	unrecognized bitness.
      
      gdb/testsuite/
      2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* gdb.arch/amd64-stap-optional-prefix.S (main): Add several
      	probes to test for bitness recognition.
      	* gdb.arch/amd64-stap-optional-prefix.exp
      	(test_probe_value_without_reg): New procedure.
      	Add code to test for different kinds of bitness.
      30a1e6cc
    • Sergio Durigan Junior's avatar
      Fix PR breakpoints/16889: gdb segfaults when printing ASM SDT arguments · f33da99a
      Sergio Durigan Junior authored
      This commit fixes PR breakpoints/16889, which is about a bug that
      triggers when GDB tries to parse probes whose arguments do not contain
      the initial (and optional) "N@" part.  For reference sake, the de
      facto format is described here:
      
        <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation>
      
      Anyway, this PR actually uncovered two bugs (related) that were
      happening while parsing the arguments.  The first one was that the
      parser *was* catching *some* arguments that were missing the "N@"
      part, but it wasn't correctly setting the argument's type.  This was
      causing a NULL pointer being dereferenced, ouch...
      
      The second bug uncovered was that the parser was not catching all of
      the cases for a probe which did not provide the "N@" part.  The fix
      for that was to simplify the check that the code was making to
      identify non-prefixed probes.  The code is simpler and easier to read
      now.
      
      I am also providing a testcase for this bug, only for x86_64
      architectures.
      
      gdb/
      2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	PR breakpoints/16889
      	* stap-probe.c (stap_parse_probe_arguments): Simplify
      	check for non-prefixed probes (i.e., probes whose
      	arguments do not start with "N@").  Always set the
      	argument type to a sane value.
      
      gdb/testsuite/
      2014-05-02  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	PR breakpoints/16889
      	* gdb.arch/amd64-stap-optional-prefix.S: New file.
      	* gdb.arch/amd64-stap-optional-prefix.exp: Likewise.
      f33da99a
    • H.J. Lu's avatar
      Move fwait test with prefix to prefix.s · 54cb4522
      H.J. Lu authored
      	* gas/i386/opcode-intel.d: Undo the last change.
      	* gas/i386/opcode-suffix.d: Likewise.
      	* gas/i386/opcode.d: Likewise.
      	* gas/i386/opcode.s: Likewise.
      
      	* gas/i386/prefix.s: Add test for fwait with prefix.
      	* gas/i386/prefix.d: Updated.
      54cb4522
    • H.J. Lu's avatar
      Use sigsetjmp/siglongjmp in opcodes · 8df14d78
      H.J. Lu authored
      sigsetjmp/siglongjmp without saving the signal mask is faster than
      setjmp/longjmp on systems where the signal mask is saved.  This patch
      uses sigsetjmp/siglongjmp without saving the signal mask if possible.
      
      	PR binutils/16886
      	* config.in: Regenerated.
      	* configure: Likewise.
      	* configure.in: Check if sigsetjmp is available.
      	* h8500-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
      	(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
      	(print_insn_h8500): Replace setjmp with OPCODES_SIGSETJMP.
      	* i386-dis.c (dis_private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
      	(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
      	(print_insn): Replace setjmp with OPCODES_SIGSETJMP.
      	* ns32k-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
      	(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
      	(print_insn_ns32k): Replace setjmp with OPCODES_SIGSETJMP.
      	* sysdep.h (OPCODES_SIGJMP_BUF): New macro.
      	(OPCODES_SIGSETJMP): Likewise.
      	(OPCODES_SIGLONGJMP): Likewise.
      	* vax-dis.c (private): Replace jmp_buf with OPCODES_SIGJMP_BUF.
      	(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
      	(print_insn_vax): Replace setjmp with OPCODES_SIGSETJMP.
      	* xtensa-dis.c (dis_private): Replace jmp_buf with
      	OPCODES_SIGJMP_BUF.
      	(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
      	(print_insn_xtensa): Replace setjmp with OPCODES_SIGSETJMP.
      	* z8k-dis.c(instr_data_s): Replace jmp_buf with OPCODES_SIGJMP_BUF.
      	(fetch_data): Replace longjmp with OPCODES_SIGLONGJMP.
      	(print_insn_z8k): Replace setjmp with OPCODES_SIGSETJMP.
      8df14d78
    • Alan Modra's avatar
      Sort target vectors to suit renaming · 2f67d686
      Alan Modra authored
      	* targets.c: Sort bfd_target vectors somewhat alphabetically.
      	* configure.in: Likewise.
      	* configure: Regenerate.
      2f67d686
    • Alan Modra's avatar
      bfd target vector rationalisation · 6d00b590
      Alan Modra authored
      This renames the bfd targets to <cpu>_<format>_<other>_<endian>_vec.
      So for example, bfd_elf32_ntradlittlemips_vec becomes
      mips_elf32_ntrad_le_vec and hp300bsd_vec becomes m68k_aout_hp300bsd_vec.
      
      bfd/
      	* aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
      	* aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
      	* cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
      	* coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
      	* coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
      	* coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
      	* coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
      	* coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
      	* coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
      	* coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
      	* demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
      	* elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
      	* elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
      	* elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
      	* elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
      	* elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
      	* elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
      	* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
      	* elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
      	* elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
      	* elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
      	* elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
      	* elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
      	* elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
      	* elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
      	* elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
      	* elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
      	* elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
      	* elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
      	* elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
      	* epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
      	* hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
      	* i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
      	* i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
      	* irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
      	* m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
      	* makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
      	* nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
      	* ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
      	* pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
      	* pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
      	* pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
      	* pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
      	* sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
      	* sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
      	* vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
      	* vms-alpha.c, * vms-lib.c: Rename bfd targets to
      	<cpu>_<format>_<other>_<endian>_vec.  Adjust associated MY macros
      	on aout targets.
      	* configure: Regenerate.
      binutils/
      	* emul_aix.c: Update bfd target vector naming.
      	* testsuite/binutils-all/objcopy.exp: Likewise.
      ld/
      	* emultempl/metagelf.em: Update bfd target vector naming.
      	* emultempl/nios2elf.em: Likewise.
      	* emultempl/spuelf.em: Likewise.
      	* emultempl/tic6xdsbt.em: Likewise.
      6d00b590
    • Alan Modra's avatar
      daily update · 4e608001
      Alan Modra authored
      4e608001
    • Pedro Alves's avatar
      gdb_load: Fix latent bugs · 5b80f00d
      Pedro Alves authored
      In a test I was writting, I needed a procedure that would connect to
      the target, and do "load", or equivalent.
      
      Years ago, boards would override gdb_load to implement that.  Then
      gdb_reload was added, and gdb_load was relaxed to allow boards avoid
      the spawing and connecting to the target.  This sped up gdbserver
      testing.  See
      https://www.sourceware.org/ml/gdb-patches/2007-02/msg00318.html.
      
      To actually spawn the target and load the executable on the target
      side, gdb_reload was born:
      
       # gdb_reload -- load a file into the target.  Called before "running",
       # either the first time or after already starting the program once,
       # for remote targets.  Most files that override gdb_load should now
       # override this instead.
      
       proc gdb_reload { } {
           # For the benefit of existing configurations, default to gdb_load.
           # Specifying no file defaults to the executable currently being
           # debugged.
           return [gdb_load ""]
       }
      
      Note the comment about specifying no file.  Indeed looking at
      config/sid.exp, or config/monitor.exp, we see examples of that.
      
      However, the default gdb_load itself doesn't handle the case of no
      file specified.  When passed no file, it just calls gdb_file_cmd with
      no file either, which ends up invocing the "file" command with no
      argument, which means unloading the file and its symbols...  That
      means calling gdb_reload when testing against native targets is
      broken.  We don't see that today because the only call to gdb_reload
      that exists today is guarded by target_info exists
      gdb,do_reload_on_run.
      
      The native-extended-gdbserver.exp board is likewise broken here.  When
      [gdb_load ""] is called, the board sets the remote exec-file to "" ...
      
      Tested on x86_64 Fedora 17, native, remote gdbserver and
      extended-remote gdbserver.
      
      testsuite/
      2014-05-01  Pedro Alves  <palves@redhat.com>
      
      	* lib/gdb.exp (gdb_load): Extend comment.  Skip calling
      	gdb_file_cmd if no file is specified.
      	* boards/native-extended-gdbserver.exp (gdb_load): Use the
      	last_loaded_file to set the remote exec-file.
      5b80f00d
    • Hans-Peter Nilsson's avatar
      ld/testsuite: · b46fa768
      Hans-Peter Nilsson authored
      	* ld-mmix/sec-11.d, ld-mmix/sec-11.ld, ld-mmix/sec-10.s,
      	ld-mmix/sec-10.d, ld-mmix/b-offlocmis.s, ld-mmix/sec-12.d: New
      	tests.
      	* ld-mmix/b-offloc.s: Correct address in comment.
      b46fa768
    • Hans-Peter Nilsson's avatar
      * mmo.c (mmo File layout documentation): Add note about low bits · 1218d67d
      Hans-Peter Nilsson authored
      	of address.
      	(mmo_write_chunk): When handling data remainder, assert that
      	previous remaining data is flushed.
      	(mmo_write_loc_chunk): Only look for trailing and leading zeros
      	when dealing with an aligned VMA and for aligned lengths.  Don't skip
      	the last 32-bit-word of zeros.
      	(mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
      	(mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
      	emitting data, not after updating it.
      	<case LOP_LOC>: Call mmo_decide_section with aligned vma.
      1218d67d
  8. May 01, 2014
    • Richard Sandiford's avatar
    • Richard Sandiford's avatar
      include/opcode/ · 3efe9ec5
      Richard Sandiford authored
      	* mips.h (mips_isa_table): Avoid hard-coding INSN_ISA* values.
      3efe9ec5
    • David Taylor's avatar
      compare-sections: New -r option. · 95cf3b38
      David Taylor authored
      When connecting to a remote system, we use the compare-sections
      command to verify that the box is running the code that we think it is
      running.  Since the system is up and running and *NOT* 'freshly
      downloaded without yet executing anything', read-write sections, of
      course, differ from what they were in the executable file.
      
      Comparing read-write sections takes time and more importantly the
      MIS-MATCHED output is confusing to some users.
      
      The compare-sections command compares all loadable sections including
      read-write sections.  This patch gives the user the option to compare
      just the loadable read-only sections.
      
      gdb/
      2014-05-01  David Taylor  <dtaylor@emc.com>
      
      	* remote.c (compare_sections_command): Add -r option to compare
      	all loadable read-only sections.
      
      gdb/doc/
      2014-05-01  David Taylor  <dtaylor@emc.com>
      
      	* gdb.texinfo (compare-sections): Document the new -r (read-only)
      	option.
      95cf3b38
    • H.J. Lu's avatar
      Handle prefixes before fwait · 86a80a50
      H.J. Lu authored
      0x9b (fwait) is both an instruction and an opcode prefix.  When 0x9b is
      treated as an instruction, we need to handle any prefixes before it.
      This patch handles it properly.
      
      gas/testsuite/
      
      	PR binutils/16891
      	* gas/i386/opcode.s: Add test for fwait with prefix.
      	* gas/i386/opcode-intel.d: Updated.
      	* gas/i386/opcode-suffix.d: Likewise.
      	* gas/i386/opcode.d: Likewise.
      
      opcodes/
      
      	PR binutils/16891
      	* i386-dis.c (print_insn): Handle prefixes before fwait.
      86a80a50
Loading