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. c40cc657bcc930b83ec42e071fe419073bd199f5


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  c40cc657bcc930b83ec42e071fe419073bd199f5 (commit)
      from  2abf49e11e603ecc002fa27704a978733c601386 (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=c40cc657bcc930b83ec42e071fe419073bd199f5

commit c40cc657bcc930b83ec42e071fe419073bd199f5
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Oct 9 12:37:17 2014 -0400

    [Ada] Error adding/subtracting pointer value to/from integral.
    
    When trying to evaluate an expression which adds a pointer and
    an integral, the evaluation succeeds if the pointer is on
    the left handside of the operator, but not when it is on the right
    handside:
    
        (gdb) p something'address + 0
        $1 = (system.address) 0x613418 <pck.something>
        (gdb) p 0 + something'address
        Argument to arithmetic operation not a number or boolean.
    
    Same issue when doing subtractions:
    
        (gdb) p something'address - 0
        $2 = (system.address) 0x613418 <pck.something>
        (gdb) p 0 - something'address
        Argument to arithmetic operation not a number or boolean.
    
    This patch enhances the Ada expression evaluator to handle
    these two situations.
    
    gdb/ChangeLog:
    
            * ada-lang.c (ada_evaluate_subexp) <BINOP_ADD>: Add handling
            of the case where the second operand is a pointer.
            <BINOP_SUB>: Likewise.
    
    gdb/testsuite/ChangeLog:
    
            * gdb.ada/addr_arith: New testcase.
    
    Tested on x86_64-linux.

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

Summary of changes:
 gdb/ChangeLog                                     |    6 +++
 gdb/ada-lang.c                                    |    8 ++++
 gdb/testsuite/ChangeLog                           |    4 ++
 gdb/testsuite/gdb.ada/addr_arith.exp              |   42 +++++++++++++++++++++
 gdb/testsuite/gdb.ada/addr_arith/foo_na07_019.adb |   21 ++++++++++
 gdb/testsuite/gdb.ada/addr_arith/pck.adb          |   21 ++++++++++
 gdb/testsuite/gdb.ada/addr_arith/pck.ads          |   19 +++++++++
 7 files changed, 121 insertions(+), 0 deletions(-)
 create mode 100644 gdb/testsuite/gdb.ada/addr_arith.exp
 create mode 100644 gdb/testsuite/gdb.ada/addr_arith/foo_na07_019.adb
 create mode 100644 gdb/testsuite/gdb.ada/addr_arith/pck.adb
 create mode 100644 gdb/testsuite/gdb.ada/addr_arith/pck.ads


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]