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. 859cf5d1dea467019bf0a822eeda059427ecf440


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  859cf5d1dea467019bf0a822eeda059427ecf440 (commit)
      from  25790f6fc128f0785a3568019727c0512adc079c (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=859cf5d1dea467019bf0a822eeda059427ecf440

commit 859cf5d1dea467019bf0a822eeda059427ecf440
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Jan 9 17:30:39 2014 +0400

    [Ada] Array bound incorrectly printed for array indexed by enum subrange
    
    Consider the following declarations:
    
       type Range_Type is (One, Two, Three);
       type Array_Type is array (Range_Type range One .. Two) of Integer;
       A : Array_Type := (1, 2);
    
    Trying to print A can yield:
    
       (gdb) print a
       $1 = (one => 1, 2)
    
    The bound of the first element should not have been printed, since
    "one" is the first enumerate of type Range_Type. Similarly, with
    the following declarations:
    
       type Array2_Type is array (Range_Type range Two .. Three) of Integer;
       A2 : Array2_Type := (2, 3);
    
    GDB is failing to print the bound of the first element of "A2":
    
       (gdb) print a2
       $2 = (2, 3)
    
    This is because the index type for both types Array_Type and Array2_Type
    are subranges (by DWARF definition for arrays), of an anonymous subrange
    type. When deciding whether to print the bound of the first element,
    we handle subranges, but only up to one level. This patch enhanced
    the code to handle any number of subrange levels.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (print_optional_low_bound): Get index_type's
            target type for as long as it is a TYPE_CODE_RANGE.
    
    No testcase with this patch, but this will be tested via the testcase
    of another patch, which uses the DWARF assembler to generate debugging
    info for an array indexed by an enum.

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

Summary of changes:
 gdb/ChangeLog      |    5 +++++
 gdb/ada-valprint.c |    2 +-
 2 files changed, 6 insertions(+), 1 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]