This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and binutils branch master updated. 591a12a1d4c8843343eb999145d8bcc1efedf408


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  591a12a1d4c8843343eb999145d8bcc1efedf408 (commit)
       via  cc0e89c519912e0e4e75a2fc0d836f715cdc6806 (commit)
       via  52f548e41f085550d7740c350c1c8a239532af77 (commit)
       via  d4094b6a8883ae481c7644c5a210254efe92e9ad (commit)
       via  cd453cd072004d26ede355b850b3831acffaeddd (commit)
       via  0ff3e01fdc67a3842ee54224cf197e9a55f0a750 (commit)
       via  5b757e5ddbd9ad252d9c51103f1aa52b41c2e947 (commit)
       via  084ee54552f6c35d740e8b9bc81a4fe8d8bb178b (commit)
       via  6ed14ff33979bc48367c35b1b235fef8c5e2229b (commit)
       via  d63167affc2a56189e3ba2cc47dd9a3451208b59 (commit)
       via  e765b44c3853ed228506fc22c276becd63198238 (commit)
       via  36c24d95382572e9cf4095712a8613664d7165cc (commit)
      from  26fd922825675d652176675cb0a8fcf6143a8a5d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=591a12a1d4c8843343eb999145d8bcc1efedf408

commit 591a12a1d4c8843343eb999145d8bcc1efedf408
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:44:14 2014 +0100

    PowerPC64 ELFv2 ABI: skip global entry point code
    
    This patch handles another aspect of the ELFv2 ABI, which unfortunately
    requires common code changes.
    
    In ELFv2, functions may provide both a global and a local entry point.
    The global entry point (where the function symbol points to) is intended
    to be used for function-pointer or cross-module (PLT) calls, and requires
    r12 to be set up to the entry point address itself.   The local entry
    point (which is found at a fixed offset after the global entry point,
    as defined by bits in the symbol table entries' st_other field), instead
    expects r2 to be set up to the current TOC.
    
    Now, when setting a breakpoint on a function by name, you really want
    that breakpoint to trigger either way, no matter whether the function
    is called via its local or global entry point.  Since the global entry
    point will always fall through into the local entry point, the way to
    achieve that is to simply set the breakpoint at the local entry point.
    
    One way to do that would be to have prologue parsing skip the code
    sequence that makes up the global entry point.  Unfortunately, this
    does not work reliably, since -for optimized code- GDB these days
    will not actuall invoke the prologue parsing code but instead just
    set the breakpoint at the symbol address and rely on DWARF being
    correct at any point throughout the function ...
    
    Unfortunately, I don't really see any way to express the notion of
    local entry points with the current set of gdbarch callbacks.
    
    Thus this patch adds a new callback, skip_entrypoint, that is
    somewhat analogous to skip_prologue, but is called every time
    GDB needs to determine a function start address, even in those
    cases where GDB decides to not call skip_prologue.
    
    As a side effect, the skip_entrypoint implementation on ppc64
    does not need to perform any instruction parsing; it can simply
    rely on the local entry point flags in the symbol table entry.
    
    With this implemented, two test cases would still fail to set
    the breakpoint correctly, but that's because they use the construct:
    
     gdb_test "break *hello"
    
    Now, using "*hello" explicitly instructs GDB to set the breakpoint
    at the numerical value of "hello" treated as function pointer, so
    it will by definition only hit the global entry point.
    
    I think this behaviour is unavoidable, but acceptable -- most people
    do not use this construct, and if they do, they get what they
    asked for ...
    
    In one of those two test cases, use of this construct is really
    not appropriate.  I think this was added way back when as a means
    to work around prologue skipping problems on some platforms.  These
    days that shouldn't really be necessary any more ...
    
    For the other (step-bt), we really want to make sure backtracing
    works on the very first instruction of the routine.  To enable that
    test also on powerpc64le-linux, we can modify the code to call the
    test function via function pointer (which makes it use the global
    entry point in the ELFv2 ABI).
    
    gdb/ChangeLog:
    
    	* gdbarch.sh (skip_entrypoint): New callback.
    	* gdbarch.c, gdbarch.h: Regenerate.
    	* symtab.c (skip_prologue_sal): Call gdbarch_skip_entrypoint.
    	* infrun.c (fill_in_stop_func): Likewise.
    	* ppc-linux-tdep.c: Include "elf/ppc64.h".
    	(ppc_elfv2_elf_make_msymbol_special): New function.
    	(ppc_elfv2_skip_entrypoint): Likewise.
    	(ppc_linux_init_abi): Install them for ELFv2.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/sigbpt.exp: Do not use "*" when setting breakpoint
    	on a function.
    	* gdb.base/step-bt.c: Call hello via function pointer to make
    	sure its first instruction is executed on powerpc64le-linux.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cc0e89c519912e0e4e75a2fc0d836f715cdc6806

commit cc0e89c519912e0e4e75a2fc0d836f715cdc6806
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:42:35 2014 +0100

    PowerPC64 ELFv2 ABI: structure passing / return
    
    Another significant difference in the ELFv2 ABI is that "homogeneous"
    floating-point and vector aggregates, i.e. aggregates the consist
    (recursively) only of members of the same floating-point or vector type,
    are passed in a series of floating-point / vector registers, as if they
    were seperate parameters.  (This is similar to the ARM ABI.)  This
    applies to both calls and returns.
    
    In addition when returning any aggregate of up to 16 bytes, ELFv2 now
    used general-purpose registers.
    
    This patch adds support for these aspects of the ABI, which is relatively
    straightforward after the refactoring patch to ppc-sysv-tdep.c.
    
    gdb/ChangeLog:
    
    	* ppc-sysv-tdep.c (ppc64_aggregate_candidate): New routine.
    	(ppc64_elfv2_abi_homogeneous_aggregate): Likewise.
    	(ppc64_sysv_abi_push_param): Handle ELFv2 homogeneous structs.
    	(ppc64_sysv_abi_return_value): Likewise.  Also, handle small
    	structures returned in GPRs.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=52f548e41f085550d7740c350c1c8a239532af77

commit 52f548e41f085550d7740c350c1c8a239532af77
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:41:36 2014 +0100

    PowerPC64 ELFv2 ABI: stack frame layout changes
    
    This implementes another change in ELFv2: the stack frame no longer
    contains the reserved double words for linker and compiler use
    (which weren't really used for much of anything anyway).  This
    affects placement of on-stack parameters in inferior calls.
    
    gdb/ChangeLog:
    
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Use correct
    	offset to the stack parameter list for the ELFv2 ABI.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d4094b6a8883ae481c7644c5a210254efe92e9ad

commit d4094b6a8883ae481c7644c5a210254efe92e9ad
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:40:16 2014 +0100

    PowerPC64 ELFv2 ABI: no function descriptors
    
    This implements the most significant difference with the ELFv2 ABI:
    we no longer use function descriptors.  The patch consists mostly
    of switching off code to deal with descriptors :-)
    
    In addition, when calling an inferior function, we no longer need
    to provide its TOC in r2.  Instead, ELFv2 code expects to be called
    with r12 pointing to the code address itself.
    
    gdb/ChangeLog:
    
    	* ppc-linux-tdep.c (ppc_linux_init_abi): Only call
    	set_gdbarch_convert_from_func_ptr_addr and
    	set_gdbarch_elf_make_msymbol_special for ELFv1.
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_param): Only handle
    	function descriptors on ELFv1.
    	(ppc64_sysv_abi_push_dummy_call): Likewise.  On ELFv2,
    	set up r12 at function entry.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd453cd072004d26ede355b850b3831acffaeddd

commit cd453cd072004d26ede355b850b3831acffaeddd
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:38:56 2014 +0100

    PowerPC64 ELFv2 ABI: base support
    
    This is the first patch of a series to implement support for the
    PowerPC ELFv2 ABI.  While powerpc64le-linux will use ELFv2, and
    the existing powerpc64-linux code will continue to use ELFv1,
    in theory ELFv2 is also defined for big-endian systems (and
    ELFv1 was also defined for little-endian systems).
    
    Therefore this patch adds a new tdep->elf_abi variable to decide
    which ABI version to use.  This is detected from the ELF header
    e_flags value; if this is not present, we default to ELFv2 on
    little-endian and ELFv1 otherwise.
    
    This patch does not yet introduce any actual difference in GDB's
    handling of the two ABIs.  Those will be added by the remainder
    of this patch series.
    
    For an overview of the changes in ELFv2, have a look at the
    comments in the patch series that added ELFv2 to GCC, starting at:
    http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01144.html
    
    gdb/ChangeLog:
    
    	* ppc-tdep.h (enum powerpc_elf_abi): New data type.
    	(struct gdbarch_tdep): New member elf_abi.
    
    	* rs6000-tdep.c: Include "elf/ppc64.h".
    	(rs6000_gdbarch_init): Detect ELF ABI version.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0ff3e01fdc67a3842ee54224cf197e9a55f0a750

commit 0ff3e01fdc67a3842ee54224cf197e9a55f0a750
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:34:19 2014 +0100

    PowerPC64 little-endian fixes: 128-bit DFP parameters / registers
    
    The powerpc64le-linux ABI specifies that when a 128-bit DFP value is
    passed in a pair of floating-point registers, the first register holds
    the most-significant part of the value.  This is as opposed to the
    usual rule on little-endian systems, where the first register would
    hold the least-significant part.
    
    This affects two places in GDB, the read/write routines for the
    128-bit DFP pseudo-registers, and the function call / return
    sequence.  For the former, current code already distinguishes
    between big- and little-endian targets, but gets the latter
    wrong.  This is presumably because *GCC* also got it wrong,
    and GDB matches the old GCC behavior.  But GCC is now fixed:
    http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02145.html
    so GDB needs to be fixed too.  (Old code shouldn't really be
    an issue since there is no code "out there" so far that uses
    dfp128 on little-endian ...)
    
    gdb/ChangeLog:
    
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_freg): Use correct order
    	within a register pair holding a DFP 128-bit value on little-endian.
    	(ppc64_sysv_abi_return_value_base): Likewise.
    	* rs6000-tdep.c (dfp_pseudo_register_read): Likewise.
    	(dfp_pseudo_register_write): Likewise.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.arch/powerpc-d128-regs.exp: Enable on powerpc64*-*.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5b757e5ddbd9ad252d9c51103f1aa52b41c2e947

commit 5b757e5ddbd9ad252d9c51103f1aa52b41c2e947
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:33:04 2014 +0100

    PowerPC64 little-endian fixes: 32-bit DFP parameters
    
    Passing a 32-bit DFP in register needs to use the least-significant part
    of the register.  Like with a previous patch that addressed the same
    issue for small structs, this patch makes sure the appropriate offset
    is used on little-endian systems.
    
    gdb/ChangeLog:
    
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_freg): Use correct
    	offset on little-endian when passing _Decimal32.
    	(ppc64_sysv_abi_return_value_base): Likewise for return values.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=084ee54552f6c35d740e8b9bc81a4fe8d8bb178b

commit 084ee54552f6c35d740e8b9bc81a4fe8d8bb178b
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:31:38 2014 +0100

    PowerPC64 little-endian fixes: VSX tests and pseudo-regs
    
    Many VSX test were failing on powerpc64le-linux, since -as opposed to the
    AltiVec tests- there never were little-endian versions of the test patterns.
    
    This patch adds such patterns, along the lines of altivec-regs.exp.
    
    In addition, there is an actual code change required: For those VSX
    registers that overlap a floating-point register, the FP register
    overlaps the most-significant half of the VSX register both on big-
    and little-endian systems.  However, on little-endian systems, that
    half is stored at an offset of 8 bytes (not 0).  This works already
    for the "real" FP registers, but current code gets it wrong for
    the "extended" pseudo FP register GDB generates for the second
    half of the VSX register bank.
    
    This patch updates the corresponding pseudo read/write routines
    to take the appropriate offset into consideration.
    
    gdb/ChangeLog:
    
    	* rs6000-tdep.c (efpr_pseudo_register_read): Use correct offset
    	of the overlapped FP register within the VSX register on little-
    	endian platforms.
    	(efpr_pseudo_register_write): Likewise.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.arch/vsx-regs.exp: Check target endianness.  Provide variants
    	of the test patterns for use on little-endian systems.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ed14ff33979bc48367c35b1b235fef8c5e2229b

commit 6ed14ff33979bc48367c35b1b235fef8c5e2229b
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:28:24 2014 +0100

    PowerPC64 little-endian fixes: AltiVec tests
    
    A couple of AltiVec tests fail spuriously on powerpc64le-linux, because
    they compare against an incorrect pattern.  Note that those tests already
    contain little-endian variants of the patterns, but those seem to have
    bit-rotted a bit: when outputting a vector, GDB no longer omits trailing
    zero elements (as it used to do in the past).
    
    This patch updates the pattern to the new GDB output behavior.
    
    In addition, the patch updates the endian test to use the new
    gdb_test_multiple logic instead of gdb_expect.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.arch/altivec-regs.exp: Use gdb_test_multiple for endian test.
    	(decimal_vector): Fix for little-endian.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d63167affc2a56189e3ba2cc47dd9a3451208b59

commit d63167affc2a56189e3ba2cc47dd9a3451208b59
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:26:26 2014 +0100

    PowerPC64 little-endian fixes: structure passing
    
    When passing a small structure in a GPR, the ABI specifies that it
    should be passed in the least-significant bytes of the register
    (or stack slot).  On big-endian systems, this means the value
    needs to be stored at an offset, which is what current code does.
    
    However, on little-endian systems, the least-significant bytes are
    addresses with offset 0.  This patch fixes that.
    
    gdb/ChangeLog:
    
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_val): Use correct
    	offset on little-endian when passing small structures.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e765b44c3853ed228506fc22c276becd63198238

commit e765b44c3853ed228506fc22c276becd63198238
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:24:42 2014 +0100

    Refactor ppc64 function call and return value handling
    
    This patch refactors the ppc64 function call and return value handling code
    in ppc-sysv-tdep.c.  The main problem to be addressed by this refactoring
    is the code duplication caused by certain aggregate types:
    
    According to the ABI, some types are to be decomposed into component types
    for parameter and return value handling.  For example, complex types are
    to be passed as if the real and imaginary component were separate arguments.
    Similarly, certain OpenCL vector types are passed as if they were multiple
    separate arguments of the vector element type.  With the new ELFv2 ABI,
    there is another case: "homogeneous aggregates" (e.g. a struct containing
    4 floats) are passed in multiple floating point registers as well.
    
    Unfortunately, the current code is not structured to easily model these
    ABI properties.  For example, code to pass complex values re-implements
    code to pass the underlying (floating-point) type.  This has already
    led to some unfortunate code duplication, and with the addition of
    ELFv2 ABI support, I would have had to add yet more such duplication.
    
    To avoid that, I've decided to refactor the code in order to re-use
    subroutines that handle the "base" types when handling those aggregate
    types.  This was not intended to cause any difference on current
    (ELFv1) ABI code, but in fact it fixes a bug:
    
    FAIL: gdb.base/varargs.exp: print find_max_float_real(4, fc1, fc2, fc3, fc4)
    
    This was caused by the old code in ppc64_sysv_abi_push_float incorrectly
    handling floating-point arguments to vararg routines, which just happens
    to work out correctly automatically in the refactored code ...
    
    gdb/ChangeLog:
    
    	* ppc-sysv-tdep.c (get_decimal_float_return_value): Update comment.
    	(struct ppc64_sysv_argpos): New data structure.
    	(ppc64_sysv_abi_push_float): Remove.
    	(ppc64_sysv_abi_push_val): New function.
    	(ppc64_sysv_abi_push_integer): Likewise.
    	(ppc64_sysv_abi_push_freg): Likewise.
    	(ppc64_sysv_abi_push_vreg): Likewise.
    	(ppc64_sysv_abi_push_param): Likewise.
    	(ppc64_sysv_abi_push_dummy_call): Refactor to use those new routines.
    	(ppc64_sysv_abi_return_value_base): New function.
    	(ppc64_sysv_abi_return_value): Refactor to use it.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=36c24d95382572e9cf4095712a8613664d7165cc

commit 36c24d95382572e9cf4095712a8613664d7165cc
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Tue Feb 4 18:19:51 2014 +0100

    Document support for powerpc64le-*-linux* target
    
    gdb/ChangeLog:
    
    	* NEWS: Document new target powerpc64le-*-linux*.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                                |   86 ++
 gdb/NEWS                                     |    3 +
 gdb/gdbarch.c                                |   33 +
 gdb/gdbarch.h                                |   18 +
 gdb/gdbarch.sh                               |   13 +
 gdb/infrun.c                                 |    4 +
 gdb/ppc-linux-tdep.c                         |   72 ++-
 gdb/ppc-sysv-tdep.c                          | 1456 ++++++++++++++------------
 gdb/ppc-tdep.h                               |   11 +
 gdb/rs6000-tdep.c                            |   55 +-
 gdb/symtab.c                                 |    2 +
 gdb/testsuite/ChangeLog                      |   21 +
 gdb/testsuite/gdb.arch/altivec-regs.exp      |   13 +-
 gdb/testsuite/gdb.arch/powerpc-d128-regs.exp |    2 +-
 gdb/testsuite/gdb.arch/vsx-regs.exp          |   38 +-
 gdb/testsuite/gdb.base/sigbpt.exp            |    2 +-
 gdb/testsuite/gdb.base/step-bt.c             |   11 +-
 17 files changed, 1113 insertions(+), 727 deletions(-)


hooks/post-receive
-- 
gdb and binutils


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]