1. 12 Feb, 2016 9 commits
    • Yao Qi's avatar
      [gdbserver, aarch64] Use linux_{set,get}_pc_{64,32}bit · a5652c21
      Yao Qi authored
      We can use shared functions linux_{set,get}_pc_{64,32}bit in
      linux-aarch64-low.c to write and read pc.
      2016-02-12  Yao Qi  <yao.qi@linaro.org>
      	* linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
      	or linux_get_pc_32bit.
      	(aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
    • Yao Qi's avatar
      [ARM] Software single step cross kernel helpers · 01113bc1
      Yao Qi authored
      GDB step cross kernel helpers only works if the kernel helpers are tail
      called, which is the case how it is used in glibc.  See __aeabi_read_tp
      in sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S.  In __aeabi_read_tp,
      branch/jump to the kernel helper is the last instruction, and the next
      instruction address is in LR, which is in caller function.  GDB can
      handle this correctly.  For example, glibc function __GI___ctype_init
      calls __aeabi_read_tp
         0xb6e19b30 <__GI___ctype_init+4>:	ldr	r3, [pc, #80]	;
         0xb6e19b34 <__GI___ctype_init+8>:	bl	0xb6e0a6e0 <__aeabi_read_tp>
         0xb6e19b38 <__GI___ctype_init+12>:	ldr	r3, [pc, r3]
      and __aeabi_read_tp calls kernel helper,
      (gdb) disassemble __aeabi_read_tp
         0xb6fef5d0 <+0>:	mvn	r0, #61440	; 0xf000
         0xb6fef5d4 <+4>:	sub	pc, r0, #31
      once GDB or GDBserver single step instruction on 0xb6fef5d4, LR is
      0xb6e19b38, which is right address of next instruction to set breakpoint
      However, if the kernel helpers are not tail-called, the LR is still the
      address in the caller function of kernel helper's caller, which isn't
      the right address of next instruction to set breakpoint on.  For example,
      we use kernel helper in main,
      (gdb) disassemble main
         0x00008624 <+32>:    mov     r3, #4064       ; 0xfe0^M
         0x00008628 <+36>:    movt    r3, #65535      ; 0xffff^M
         0x0000862c <+40>:    blx     r3
         0x00008630 <+44>:    ldr     r3, [r11, #-8]
      kernel helper is called on 0x0000862c and the expected next instruction
      address is 0x00008630, but the LR now is the return address of main.
      The problem here is LR may not have the right address because when we
      single step the instruction, it isn't executed yet, so the LR isn't
      updated.  This patch fix this problem by decoding instruction, if the
      instruction updates LR (BL and BLX), the next instruction address is
      PC + INSN_SIZE, otherwise, get the address of next instruction from LR.
      2016-02-12  Yao Qi  <yao.qi@linaro.org>
      	* arch/arm-linux.c (arm_linux_get_next_pcs_fixup): Calculate
      	nextpc according to instruction.
      2016-02-12  Yao Qi  <yao.qi@linaro.org>
      	* gdb.arch/arm-single-step-kernel-helper.c: New.
      	* gdb.arch/arm-single-step-kernel-helper.exp: New.
    • Yao Qi's avatar
      [ARM] Fixup PC in software single step · ed443b61
      Yao Qi authored
      When I exercise GDBserver software single step, I see the following
      error, which has been already handled by GDB properly.
      In GDBserver log, we can see, GDBserver tries to single step instruction
      on 0xb6e0a6e4, and destination address is 0xffff0fe0,
       stop pc is 0xb6e0a6e4
       Writing f001f0e7 to 0xffff0fe0 in process 7132
       Failed to insert breakpoint at 0xffff0fe0 (Input/output error).
       Failed to insert breakpoint at 0xffff0fe0 (-1).
      (gdb) disassemble __aeabi_read_tp,+8
      Dump of assembler code from 0xb6e0a6e0 to 0xb6e0a6e8:
         0xb6e0a6e0 <__aeabi_read_tp+0>:	mvn	r0, #61440	; 0xf000
         0xb6e0a6e4 <__aeabi_read_tp+4>:	sub	pc, r0, #31
      however, it fails inserting breakpoint there.  This problem has already
      fixed by GDB, see comments in arm-linux-tdep.c:arm_linux_software_single_step
            /* The Linux kernel offers some user-mode helpers in a high page.  We can
      	 not read this page (as of 2.6.23), and even if we could then we
      	 couldn't set breakpoints in it, and even if we could then the atomic
      	 operations would fail when interrupted.  They are all called as
      	 functions and return to the address in LR, so step to there
      	 instead.  */
      so we need to do the same thing in GDB side as well.  This patch adds
      a new field fixup in arm_get_next_pcs_ops, so that we can fix up PC
      for arm-linux target.  In this way, both GDB and GDBserver can single
      step instructions going to kernel helpers.
      2016-02-12  Yao Qi  <yao.qi@linaro.org>
      	* arch/arm-get-next-pcs.c (arm_get_next_pcs): Call
      	self->ops->fixup if it isn't NULL.
      	* arch/arm-get-next-pcs.h: Include gdb_vecs.h.
      	(struct arm_get_next_pcs_ops) <fixup>: New field.
      	* arch/arm-linux.c: Include common-regcache.h and
      	(arm_linux_get_next_pcs_fixup): New function.
      	* arch/arm-linux.h (arm_linux_get_next_pcs_fixup): Declare.
      	* arm-linux-tdep.c (arm_linux_get_next_pcs_ops): Initialize
      	it with arm_linux_get_next_pcs_fixup.
      	(arm_linux_software_single_step): Move code to
      	* arm-tdep.c (arm_get_next_pcs_ops): Initialize it.
      2016-02-12  Yao Qi  <yao.qi@linaro.org>
      	* linux-arm-low.c (get_next_pcs_ops): Initialize it with
    • Marcin Kościelnicki's avatar
      gdb.trace: Deduplicate write_inferior_data_ptr. · 020ecd38
      Marcin Kościelnicki authored
      This function is now basically identical to write_inferior_data_pointer,
      remove it and change all references.
      	* tracepoint.c (x_tracepoint_action_download): Change
      	write_inferior_data_ptr to write_inferior_data_pointer.
      	(cmd_qtstart): Likewise.
      	(write_inferior_data_ptr): Remove.
      	(download_agent_expr): Change write_inferior_data_ptr to
      	(download_tracepoint_1): Likewise.
      	(download_tracepoint): Likewise.
      	(download_trace_state_variables): Likewise.
    • Marcin Kościelnicki's avatar
      gdb: Fix build failure in xml-tdesc.c without expat. · d21b5f15
      Marcin Kościelnicki authored
      Introduced by 18d3cec5.
      	* xml-tdesc.c (target_fetch_description_xml) [!HAVE_LIBEXPAT]: Warn
      	and return NULL.
    • Markus Metzger's avatar
      btrace, frame: fix crash in get_frame_type · 33b4777c
      Markus Metzger authored
      In skip_artificial_frames we repeatedly call get_prev_frame_always until we get
      a non-inline and non-tailcall frame assuming that there must be such a frame
      For record targets, however, we may have a frame chain that consists only of
      artificial frames.  This leads to a crash in get_frame_type when dereferencing a
      NULL frame pointer.
      Change skip_artificial_frames and skip_tailcall_frames to return NULL in such a
      case and modify each caller to cope with a NULL return.
      In frame_unwind_caller_pc and frame_unwind_caller_arch, we simply assert that
      the returned value is not NULL.  Their caller was supposed to check
      frame_unwind_caller_id before calling those functions.
      In other cases, we thrown an error.
      In infcmd further move the skip_tailcall_frames call to the forward-stepping
      case since we don't need a frame for reverse execution and we don't want to fail
      because of that.  Reverse-finish does make sense for a tailcall frame.
      	* frame.h (skip_tailcall_frames): Update comment.
      	* frame.c (skip_artificial_frames, skip_tailcall_frames): Return NULL
      	if only	artificial frames are found.  Update comment.
      	(frame_unwind_caller_id): Handle NULL return.
      	(frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that
      	skip_artificial_frames does not return NULL.
      	(frame_pop): Add an error if only tailcall frames are found.
      	* infcmd.c (finish_command): Move skip_tailcall_frames call into forward-
      	execution case.  Add an error if only tailcall frames are found.
      	* gdb.btrace/tailcall-only.exp: New.
      	* gdb.btrace/tailcall-only.c: New.
      	* gdb.btrace/x86_64-tailcall-only.S: New.
      	* gdb.btrace/i686-tailcall-only.S: New.
    • Markus Metzger's avatar
      stack: check frame_unwind_caller_id · a038fa3e
      Markus Metzger authored
      Callers of frame_unwind_caller_* functions are supposed to check
      Add such a check to frame_info and treat an invalid caller ID as if the caller
      PC were not available.
      	* stack.c (frame_info): Check frame_unwind_caller_id.
    • Markus Metzger's avatar
      frame: add skip_tailcall_frames · 2f3ef606
      Markus Metzger authored
      Add a new function skip_tailcall_frames to skip TAILCALL_FRAME frames.
      	* frame.h (skip_tailcall_frames): New.
      	* frame.c (skip_tailcall_frames): New.
      	(frame_pop): Call skip_tailcall_frames.
      	* infcmd.c (finish_command): Call skip_tailcall_frames.
    • GDB Administrator's avatar
      Automatic date update in version.in · 95c00d15
      GDB Administrator authored
  2. 11 Feb, 2016 15 commits
    • H.J. Lu's avatar
      Fix a typo in ld/ChangeLog · ee5db48b
      H.J. Lu authored
    • H.J. Lu's avatar
      Add ChangeLog for PR ld/19615 fix · 21a90cf1
      H.J. Lu authored
    • H.J. Lu's avatar
      Enable -Bsymbolic and -Bsymbolic-functions to PIE · e20365c5
      H.J. Lu authored
      Before binutils 2.26, -Bsymbolic and -Bsymbolic-functions were also
      applied to PIE so that "ld -pie -Bsymbolic -E" can be used to export
      symbols in PIE with local binding.  This patch re-enables -Bsymbolic
      and -Bsymbolic-functions for PIE.
      	PR ld/19615
      	* ld.texinfo: Document -Bsymbolic and -Bsymbolic-functions for
      	* lexsup.c (parse_args): Enable -Bsymbolic and
      	-Bsymbolic-functions for PIE.
      	* testsuite/ld-i386/i386.exp: Run pr19175.
      	* testsuite/ld-i386/pr19615.d: New file.
      	* testsuite/ld-i386/pr19615.s: Likewise.
      	* testsuite/ld-x86-64/pr19615.d: Likewise.
      	* testsuite/ld-x86-64/pr19615.s: Likewise.
    • Wei-cheng Wang's avatar
      gdbserver: Remove tracepoint_action ops. · 7cae9051
      Wei-cheng Wang authored
      This patch removes 'ops' in tracepoint, and uses helper functions to
      call action handler instead.
      The object layout of tracepoint_action may differ in gdbserver and
      inferior depend on the alignment rule of target ABI, so gdbserver cannot
      simply copy the object from its memory to inferior memory.
      For example,
        struct collect_memory_action
          struct tracepoint_action base;
            #ifndef IN_PROCESS_AGENT
            const struct tracepoint_action_ops *ops;
        -   char type;
        | }
        | ULONGEST addr;
        | ULONGEST len;
        - int32_t basereg;
      and on PowerPC,
           Wihtout ops           with ops
            0   1   2   3         0   1   2   3
         0 |type| PADDING...    0 |ops-------------|
         4 .................    4 |type|PADDING....|
         8 |addr------------    8 |addr-------------
         c ----------------|    c -----------------|
        10 |len-------------   10 |len--------------
        14 ----------------|   14 -----------------|
        18 |basereg--------|   18 |basereg---------|
      so we cannot directly copy the object.
      In this patch, 'ops' is removed in order to make the objects identical.
      2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
      	    Marcin Kościelnicki  <koriakin@0x04.net>
      	* tracepoint.c (struct tracepoint_action_ops): Remove.
      	(struct tracepoint_action): Remove ops.
      	(m_tracepoint_action_download, r_tracepoint_action_download)
      	(x_tracepoint_action_download, l_tracepoint_action_download): Adjust
      	size and offset accordingly.
      	(m_tracepoint_action_ops, r_tracepoint_action_ops)
      	(x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
      	(tracepoint_action_send, tracepoint_action_download): New functions.
      	Helpers for trace action handlers.
      	(add_tracepoint_action): Remove setup actions ops.
      	(download_tracepoint_1, tracepoint_send_agent): Call helper functions.
    • Pedro Alves's avatar
      Add missing quotes to gdb/testsuite/README · acc23c11
      Pedro Alves authored
      2016-02-11  Pedro Alves  <palves@redhat.com>
      	* README (Parallel testing): Add missing double quotes.
    • Pedro Alves's avatar
      Support 'make check-parallel' in gdb's build dir · e352bf0a
      Pedro Alves authored
      Currently, you can cd to the gdb/testsuite/ dir and use
      make check-parallel, instead of using FORCE_PARALLEL:
       $ make -j8 check-parallel RUNTESTFLAGS="--target_board=native-gdbserver"
       $ make -j8 check RUNTESTFLAGS="--target_board=native-gdbserver" FORCE_PARALLEL=1
      But you can't do that in the build/gdb/ dir:
       $ make check-parallel RUNTESTFLAGS="--target_board=native-gdbserver"
       make: *** No rule to make target `check-parallel'.  Stop.
      I find check-parallel a bit more convenient, and more typo-proof, so
      this patch makes it work from the gdb build dir too.
      While documenting this in testsuite/README, I found that the parallel
      testing mode would better be pulled out to its own section and
      2016-02-11  Pedro Alves  <palves@redhat.com>
      	* Makefile.in (check-parallel): New rule.
      2016-02-11  Pedro Alves  <palves@redhat.com>
      	* README (Parallel testing): New section.
      	(GDB_PARALLEL): Rewrite.
      	(FORCE_PARALLEL): Document.
    • Simon Marchi's avatar
      arm-tdep.c: Remove unused variables · bec2ab5a
      Simon Marchi authored
      Just a little bit of cleanup.
      	* arm-tdep.c (arm_skip_prologue): Remove unused variables.
      	(arm_analyze_prologue): Likewise.
      	(arm_scan_prologue): Likewise.
      	(arm_m_exception_prev_register): Likewise.
      	(arm_copy_block_xfer): Likewise.
      	(thumb2_copy_block_xfer): Likewise.
      	(arm_decode_miscellaneous): Likewise.
      	(arm_decode_ld_st_word_ubyte): Likewise.
      	(arm_decode_svc_copro): Likewise.
      	(thumb2_decode_svc_copro): Likewise.
      	(thumb_copy_16bit_ldr_literal): Likewise.
      	(thumb_copy_pop_pc_16bit): Likewise.
      	(decode_thumb_32bit_ld_mem_hints): Likewise.
      	(arm_show_force_mode): Likewise.
      	(_initialize_arm_tdep): Likewise.
      	(arm_record_strx): Likewise.
      	(arm_record_extension_space): Likewise.
      	(arm_record_data_proc_misc_ld_str): Likewise.
      	(arm_record_exreg_ld_st_insn): Likewise.
      	(arm_record_vfp_data_proc_insn): Likewise.
      	(arm_record_coproc_data_proc): Likewise.
      	(thumb_record_misc): Likewise.
      	(thumb_record_ldm_stm_swi): Likewise.
      	(thumb2_record_ld_st_dual_ex_tbb): Likewise.
      	(thumb2_record_ld_mem_hints): Likewise.
      	(thumb2_record_lmul_lmla_div): Likewise.
      	(thumb2_record_asimd_struct_ld_st): Likewise.
      	(arm_process_record): Likewise.
    • Simon Marchi's avatar
      arm-tdep.c: Remove unused arm_displaced_step_copy_insn · 2ba163c8
      Simon Marchi authored
      This function is never used, since it is superseded by
      	* arm-tdep.c (arm_displaced_step_copy_insn): Remove.
      	(ARM displaced stepping support): Remove reference to
      	arm_displaced_step_copy_insn in comment.
      	* arm-tdep.h (arm_displaced_step_copy_insn): Remove.
      	* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Remove
      	reference to arm_displaced_step_copy_insn in comment.
    • Simon Marchi's avatar
      arm-tdep.c: Change type of insn parameters · 615234c1
      Simon Marchi authored
      Almost obvious... change the type of some insn parameters, so that it
      matches the rest of the code.
      	* arm-tdep.c (thumb_copy_unmodified_16bit): Change type of insn.
      	(thumb_copy_b): Likewise.
      	(arm_decode_b_bl_ldmstm): Likewise.
      	(thumb_copy_16bit_ldr_literal): Likewise.
      	(thumb_copy_pop_pc_16bit): Likewise.
    • Han Shen's avatar
      Remove info message for every erratum 843419 found and fixed. · e3dbf582
      Han Shen authored
      2016-02-11 Rahul Chaudhry  <rahulchaudhry@google.com>
      	* aarch64.cc (Target_aarch64::scan_erratum_843419_span):
      	Remove info message for every erratum 843419 found and fixed.
    • Nick Clifton's avatar
      Allow the .cfi_sections directive to be reissued provided that CFI generation has not yet started. · bd5608dc
      Nick Clifton authored
      	PR gas/19614
      	* dw2gencfi.c (cfi_sections_set): Delay setting this variable
      	until it is actually used.
      	(cfi_set_sections): Set cfi_sections_set to true.
      	(dot_cfi_startproc): Likewise.
      	(dot_cfi_endproc): Likewise.
      	(dot_cfi_fde_data): Likewise.
      	(cfi_finish): Likewise.
      	(dot_cfi_sections): Do not set cfi_sections_set.
      	* doc/as.texinfo (.cfi_sections): Note that targets can provide
      	their own cfi section name.  Also note that the directive can be
      	reissued provided that CFI generation has not started.
      	* testsuite/gas/mips/compact-eh-err2.s: Add .cfi_startproc and
      	.cfi_endproc directives so that the redefinition of .cfi_sections
      	will trigger the generation of the error message.
      	* testsuite/gas/mips/compact-eh-err2.l: Update expected line
      	number of error message.
    • Marcin Kościelnicki's avatar
      gdb.trace: Add a testcase for tdesc in tfile. · 9f5fed78
      Marcin Kościelnicki authored
      This tests whether $ymm15 can be correctly collected and printed from
      tfile.  It covers:
      - storing tdesc in tfile (without that, $ymm15 doesn't exist)
      - ax_pseudo_register_collect for x86 (without that, $ymm15 cannot be
      - register order in tfile_fetch_registers (without that, $ymm15h is
        fetched from wrong position)
      - off-by-one in tfile_fetch_registers (without that, $ymm15h is
        incorrectly considered to be out of bounds)
      - using proper tdesc in encoding tracepoint actions (without that,
        internal error happens due to $ymm15h being considered unavailable)
      	* gdb.trace/tfile-avx.c: New test.
      	* gdb.trace/tfile-avx.exp: New test.
    • Antoine Tremblay's avatar
      Use the target architecture when encoding tracepoint actions · 82e9becd
      Antoine Tremblay authored
      This patch uses the target architecture rather then the objfile
      architecture when encoding tracepoint actions.
      The target architecture may contain additional registers. E.g. ARM VFP
      registers. This information is needed to allow their collection. Since we
      can never know whether the registers numbers in the target match the
      binary's we have to use tdesc here.
      One note about combined debuggers / multi-inferior from Pedro Alves:
      In the combined debugger case taking Cell as the practical example that
      gdb supports currently:
      In that case, the main target_gdbarch() will be powerpc, but you may have set a
      tracepoint on _spu_ code, which has a different gdbarch.  so for that case,
      target_gdbarch would be wrong.  I think that in that case, we'd need to
      find __the_ target/tdesc gdbarch that is (bfd) compatible with the
      objfile's gdbarch.
      I think cell/spu gdbserver doesn't support tracepoints, so we can ignore
      this for now.
      The multi-inferior/process case is somewhat related, but its simpler.
      each inferior has its own gdbarch.
      That is, target_gdbarch depends on the current inferior selected.
      In fact, that just returns inferior->gdbarch nowaways.
      No regressions, tested on ubuntu 14.04 ARMv7 and x86.
      With gdbserver-{native,extended} / { -marm -mthumb }
      	* tracepoint.c (encode_actions_1): Use target_gdbarch () rather
      	than loc->gdbarch.
    • H.J. Lu's avatar
      Mask off the least significant bit in GOT offset · 32875eb1
      H.J. Lu authored
      The least significant bit in GOT offset is to record whether we have
      initialized the GOT entry in R_386_GOT32 processing.  We need to mask
      it off for R_386_GOT32X.
      	PR ld/19601
      	* elf32-i386.c (elf_i386_relocate_section): Mask off the least
      	significant bit in GOT offset for R_386_GOT32X.
    • GDB Administrator's avatar
      Automatic date update in version.in · cd7c1b9a
      GDB Administrator authored
  3. 10 Feb, 2016 14 commits
    • Marcin Kościelnicki's avatar
      gdb.trace: Read XML target description from tfile. · 5ac87a99
      Marcin Kościelnicki authored
      	* tracefile-tfile.c (trace_tdesc): New static variable.
      	(tfile_open): Clear trace_tdesc, call target_find_description.
      	(tfile_interp_line): Recognize tdesc lines.
      	(tfile_close): Clear trace_tdesc.
      	(tfile_xfer_partial_features): New function.
      	(tfile_xfer_partial): Call tfile_xfer_partial_features.
      	(tfile_append_tdesc_line): New function.
    • Marcin Kościelnicki's avatar
      gdb.trace: Save XML target description in tfile. · 18d3cec5
      Marcin Kościelnicki authored
      	* ctf.c (ctf_write_tdesc): New function.
      	(ctf_write_ops): Wire in ctf_write_tdesc.
      	* tracefile-tfile.c (tfile_write_tdesc): New function.
      	(tfile_write_ops): Wire in tfile_write_tdesc.
      	* tracefile.c (trace_save): Call write_tdesc method.
      	* tracefile.h (struct trace_file_write_ops): Add write_tdesc method.
      	* xml-tdesc.c (target_fetch_description_xml): New function.
      	* xml-tdesc.h: Add target_fetch_description_xml prototype.
    • Yao Qi's avatar
      Clear *VAL in regcache_raw_read_unsigned · 9f6a71b4
      Yao Qi authored
      We have function regcache_raw_read_unsigned defined in both GDB and
      GDBserver, so that it is used in common like this,
        ULONGEST value;
        status = regcache_raw_read_unsigned (regcache, regnum, &value);
      'value' is correctly set in GDB side, but may not be correctly set
      in GDBserver, because &value is passed in regcache_raw_read_unsigned
      but collect_register may only set part of the whole variable.  In my
      test, I see the top half of 'value' is garbage.  This patch fixes this
      problem by clearing *VAL before calling collect_register.
      2016-02-10  Yao Qi  <yao.qi@linaro.org>
      	* regcache.c (regcache_raw_read_unsigned): Clear *VAL.
    • Simon Marchi's avatar
      arm-tdep.c: Fix typo · 550dc4e2
      Simon Marchi authored
      unpriveleged -> unprivileged
      	* arm-tdep.c (arm_copy_extra_ld_st): Fix "unpriveleged" typo.
      	(arm_decode_dp_misc): Likewise.
    • Marcin Kościelnicki's avatar
      gdb/x86: Implement ax_pseudo_register_collect hook. · 62e5fd57
      Marcin Kościelnicki authored
      Makes "collect $ymm15" action work.
      	* amd64-tdep.c (amd64_ax_pseudo_register_collect): New function.
      	(amd64_init_abi): Fill ax_pseudo_register_collect hook.
      	* gdb/i386-tdep.c (i386_pseudo_register_read_into_value): Remove
      	misleading comment.
      	(i386_pseudo_register_write): Ditto.
      	(i386_ax_pseudo_register_collect): New function.
      	(i386_gdbarch_init): Fill ax_pseudo_register_collect hook.
      	* i386-tdep.h: Add i386_ax_pseudo_register_collect prototype.
    • Marcin Kościelnicki's avatar
      gdb.trace: Use g packet order in tfile_fetch_registers. · e909d859
      Marcin Kościelnicki authored
      tfile_fetch_registers currently wrongly fetches registers using
      gdb order instead of g packet order.  On x86_64 with AVX, this causes
      problems with ymm*h and orig_rax registers: gdb has ymm*h first, while
      g packet has orig_rax first.
      	* tracefile-tfile.c (tfile_fetch_registers): Use g packet order
      	instead of gdb order.
      	* gdb.texinfo (Trace File Format): Remove misleading information
      	about register block ordering.
    • Marcin Kościelnicki's avatar
      gdb.trace: Fix off-by-one in tfile_fetch_registers. · 473b99e5
      Marcin Kościelnicki authored
      This resulted in the last register being considered unavailable.
      On plain x86_64 (without AVX), this happened to be orig_rax.
      	* tracefile-tfile.c (tfile_fetch_registers): Fix off-by-one in bounds
    • Claudiu Zissulescu's avatar
      Add support for ARC instruction relaxation in the assembler. · 4670103e
      Claudiu Zissulescu authored
      2016-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
      	    Janek van Oirschot <jvanoirs@synopsys.com>
              * config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS)
              (arc_flags, arc_relax_type): New structure.
              * config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY)
      	(RELAX_TABLE_ENTRY_MAX): New define.
              (relaxation_state, md_relax_table, arc_relaxable_insns)
      	(arc_num_relaxable_ins): New variable.
      	(rlx_operand_type, arc_rlx_types): New enums.
      	(arc_relaxable_ins): New structure.
              (OPTION_RELAX): New option.
              (arc_insn): New relax member.
              (arc_flags): Remove.
              (relax_insn_p): New function.
              (apply_fixups): Likewise.
              (relaxable_operand): Likewise.
              (may_relax_expr): Likewise.
              (relaxable_flag): Likewise.
              (arc_pcrel_adjust): Likewise.
              (md_estimate_size_before_relax): Implement.
              (md_convert_frag): Likewise.
              (md_parse_option): Handle new mrelax option.
              (md_show_usage): Likewise.
              (assemble_insn): Set relax member.
              (emit_insn0): New function.
              (emit_insn1): Likewise.
              (emit_insn): Handle relaxation case.
      	* NEWS: Mention the new relaxation option.
      	* doc/c-arc.texi (ARC Options): Document new mrelax option.
      2016-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
              * gas/arc/relax-avoid1.d: New file.
              * gas/arc/relax-avoid1.s: Likewise.
              * gas/arc/relax-avoid2.d: Likewise.
              * gas/arc/relax-avoid2.s: Likewise.
              * gas/arc/relax-avoid3.d: Likewise.
              * gas/arc/relax-avoid3.s: Likewise.
      	* gas/arc/relax-b.d: Likewise.
              * gas/arc/relax-b.s: Likewise.
      2016-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
      	    Janek van Oirschot  <jvanoirs@synopsys.com>
              * arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes):
      2016-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
      	    Janek van Oirschot  <jvanoirs@synopsys.com>
              * arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New
    • Nick Clifton's avatar
      Correct assertion in NIOS2 linker to allow signed 16-buit immediate values. · 83da6e74
      Nick Clifton authored
      	PR 19405
      	* elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
      	immediate values.
      	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
      	number of messages about FDE encoding preventing .eh_frame_hdr
    • Nick Clifton's avatar
      Sync top level files with gcc. · 52cf9762
      Nick Clifton authored
      	Import these patches from the GCC mainline:
      	2016-01-12  Andris Pavenis  <andris.pavenis@iki.fi>
      	* configure.ac: Enable LTO for DJGPP
      	* configure: Regenerate
      	2016-01-24  Mikhail Maltsev  <maltsevm@gmail.com>
      	PR bootstrap/69329
      	* Makefile.tpl (BASE_FLAGS_TO_PASS): Add LSAN_OPTIONS.
      	* Makefile.in: Regenerate.
      	2016-01-25  Aditya Kumar  <aditya.k7@samsung.com>
      	            Sebastian Pop  <s.pop@samsung.com>
      	* Makefile.in: Regenerate.
      	* Makefile.tpl: Export ISLVER.
      	* configure: Regenerate.
      	* config/isl.m4: Detect isl-0.15.
      	2016-01-29  Sebastian Pop  <s.pop@samsung.com>
      	* config/isl.m4: Add comments about isl-0.16.
      	* configure: Regenerate.
    • Joel Brobecker's avatar
      Update NEWS post GDB 7.11 branch creation. · 1233c0ba
      Joel Brobecker authored
      	* NEWS: Create a new section for the next release branch.
      	Rename the section of the current branch, now that it has
      	been cut.
    • Joel Brobecker's avatar
      Bump version to 7.11.50.DATE-git. · d1dc0942
      Joel Brobecker authored
      Now that the GDB 7.11 branch has been created, we can
      bump the version number.
      	GDB 7.11 branch created (9ef9e6a6):
      	* version.in: Bump version to 7.11.50.DATE-git.
    • Keith Seitz's avatar
      breakpoints/19546: Fix crash after updating breakpoints · 9ef9e6a6
      Keith Seitz authored
      One of the last checks update_breakpoints_after_exec does while looping
      over the list of breakpoints is check that the breakpoint has a valid
      location spec. It uses event_location_empty_p to check if the location spec
      is "empty", and if it is, the breakpoint is deleted.
      momentary_breakpoint types rely on setting the breakpoint structure's
      location spec to NULL, thereby causing an update to delete the breakpoint.
      However, event_location_empty_p assumed that locations were never NULL.
      As a result, GDB would crash dereferencing a NULL pointer whenever
      update_breakpoints_after_exec would encounter a momentary_breakpoint.
      This patch creates a new wrapper/helper function which tests that the given
      breakpoint's location spec is non-NULL and if it is not "empty"
      or "unspecified."
      	PR breakpoints/19546
      	* breakpoint.c (breakpoint_event_location_empty_p): New function.
      	(update_breakpoints_after_exec, bkpt_re_set): Use this new function
      	instead of event_location_empty_p.
      	PR breakpoints/19546
      	* gdb.base/infcall-exec.c: New file.
      	* gdb.base/infcall-exec2.c: New file.
      	* gdb.base/infcall-exec.exp: New file.
    • GDB Administrator's avatar
      Automatic date update in version.in · 224c1b20
      GDB Administrator authored
  4. 09 Feb, 2016 2 commits
    • Keith Seitz's avatar
      Enable/update legacy linespecs in MI. · 39a67dc4
      Keith Seitz authored
      MI is currently using string_to_event_location to enable the use of legacy
      linespecs, but using this function (until this patchset) had the (as yet
      unnoticed) side effect of allowing both MI and CLI representation for
      explicit locations.
      This patch simply changes MI to use the same legacy linespec functions
      that the python and guile interpreters use.  This eliminates the CLI syntax
      for explicit locations (in MI).
      	* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Use
      	string_to_event_location_basic instead of string_to_event_location.
    • Keith Seitz's avatar
      Use string_to_event_location_basic in guile. · a96e36da
      Keith Seitz authored
      This patch, analogous to the previous python patch, implements proper
      legacy linespec support in guile code using the newly introduced
      	* guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
      	leading whitespace and use string_to_event_location_basic instead
      	of new_linespec_location.
      	* gdb.guile/scm-breakpoint.exp (test_bkpt_address): New procedure.
      	(toplevel): Call test_bkpt_address.