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


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  f30b8b38d48949edc10344089d05015a659f87aa (commit)
       via  8e355c5d24da7a92110851de95ead5ccfa089fe9 (commit)
       via  4fbf5aa5f4c44b9bb56faee74c91bbb69829264f (commit)
       via  71855601a553755743aff19a36c53c62f3d63270 (commit)
       via  4eb27a304c5943962ba1afa90b6eaa6eb6b25a74 (commit)
       via  34b27950541eaf717bd02b31d460bab2edfbbbe6 (commit)
       via  079e459161edae487c667a7f976a6462957389ef (commit)
       via  8004dfd1cf9caaf8a65236ebe6a4a4b3f544ab7a (commit)
       via  760a2db02f0d160c7990c52903bd9aaa796bd815 (commit)
       via  3a92c861bbbd25cb894942f79d0c6f7f8bbd1de6 (commit)
       via  cd1630f983e42527bc1b68b2f430b41ffadd16c4 (commit)
       via  bdf779a0c5d06c958585c3ba9ca4613da163cda8 (commit)
      from  c0d4881122d0491f5dea9fa2c017ab5d2ae5fe89 (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=f30b8b38d48949edc10344089d05015a659f87aa

commit f30b8b38d48949edc10344089d05015a659f87aa
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Sat Jan 4 06:31:11 2014 +0400

    varobj/Ada: Missing children for interface-wide tagged types
    
    Consider the following code:
    
       type Element is abstract tagged null record;
       type GADataType is interface;
       type Data_Type is new Element and GADataType with record
          I : Integer := 42;
       end record;
       Result1 : Data_Type;
       GGG1    : GADataType'Class := GADataType'Class (Result1);
    
    When trying to create a varobj for variable ggg1, GDB currently
    returns an object which has no child:
    
        -var-create ggg1 * ggg1
        ^done,name="ggg1",numchild="0",[...]
    
    This is incorrect, it should return an object which has one child
    (field "i"). This is because tagged-type objects are dynamic, and
    we need to apply a small transformation in order to get their actual
    type. This is already done on the GDB/CLI side in ada-valprint,
    and it needs to be done on the ada-varobj side as well.
    
    gdb/ChangeLog:
    
            * ada-varobj.c (ada_varobj_adjust_for_child_access): Convert
            tagged type objects to their actual type.
    
    gdb/testsuite/ChangeLog:
    
            * gdb.ada/mi_interface: New testcase.

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

commit 8e355c5d24da7a92110851de95ead5ccfa089fe9
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 21:26:55 2013 +0400

    Ada: Fix missing call to pretty-printer for fields of records.
    
    Consider the following types:
    
       type Time_T is record
          Secs : Integer;
       end record;
       Before : Time_T := (Secs => 1384395743);
    
    In this example, we assume that type Time_T is the number of seconds
    since Epoch, and so added a Python pretty-printer, to print this
    type in a more human-friendly way. For instance:
    
        (gdb) print before
        $1 = Thu Nov 14 02:22:23 2013 (1384395743)
    
    However, we've noticed that things stop working when this type is
    embedded inside another record, and we try to print that record.
    For instance, with the following declarations:
    
       type Composite is record
          Id : Integer;
          T : Time_T;
       end record;
       Afternoon : Composite := (Id => 1, T => (Secs => 1384395865));
    
        (gdb) print afternoon
        $2 = (id => 1, t => (secs => 1384395865))
    
    We expected instead:
    
        (gdb) print afternoon
        $2 = (id => 1, t => Thu Nov 14 02:24:25 2013 (1384395865))
    
    This patch fixes the problem by making sure that we try to print
    each field via a call to val_print, rather than calling ada_val_print
    directly. We need to go through val_print, as the val_print
    handles all language-independent features such as calling the
    pretty-printer, knowing that ada_val_print will get called eventually
    if actual Ada-specific printing is required (which should be the
    most common scenario).
    
    And because val_print takes the language as parameter, we enhanced
    the print_field_values and print_variant_part to also take a language.
    As a bonus, this allows us to remove a couple of references to
    current_language.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (print_field_values): Add "language" parameter.
            Update calls to print_field_values and print_variant_part.
            Pass new parameter "language" in call to val_print instead
            of "current_language".  Replace call to ada_val_print by call
            to val_print.
            (print_variant_part): Add "language" parameter.
            (ada_val_print_struct_union): Update call to print_field_values.
    
    gdb/testsuite/ChangeLog:
    
            * gdb.ada/pp-rec-component.exp, gdb.ada/pp-rec-component.py,
            gdb.ada/pp-rec-component/foo.adb, gdb.ada/pp-rec-component/pck.adb,
            gdb.ada/pp-rec-component/pck.ads: New files.

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

commit 4fbf5aa5f4c44b9bb56faee74c91bbb69829264f
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 20:19:45 2013 +0400

    ada_print_floating: Remove use of statically sized buffer.
    
    ada_print_floating declares a char buffer with a size that we're hoping
    to always be large enough to hold any string representation of a float
    value.  But that's not really necessary, and also forces us to create
    a small wrapper (ui_memcpy) to perform the extraction from a temporary
    stream into this buffer.  This patches fixes both issues by relying on
    ui_file_xstrdup.  This forces us to make a few adjustments that are
    minor in nature, as we now need to defer the cleanup to the end of
    the function.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ui_memcpy): Delete.
            (ada_print_floating): Update documentation.  Add empty line
            between between function documentation and implementation.
            Delete variable "buffer".  Use ui_file_xstrdup in place of
            ui_file_put.  Minor adjustments following this change.

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

commit 71855601a553755743aff19a36c53c62f3d63270
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 20:06:46 2013 +0400

    Extract string-printing out of ada_val_print_array
    
    This patch creates a new function called "ada_val_print_string"
    whose code is directly extracted out of ada_val_print_array.
    The extracted code is then replaced by a call to this new function,
    followed by a "return". The return avoids the need for an "else"
    branch, with the associated block nesting. The latter is not really
    terrible in this case, but it seems more readable this way.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_string): New function,
            extracted from ada_val_print_array.
            (ada_val_print_array): Replace extracted code by call
            to ada_val_print_string followed by a return.  Move
            "else" branch to the function's top block.

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

commit 4eb27a304c5943962ba1afa90b6eaa6eb6b25a74
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 19:43:57 2013 +0400

    move ada_val_print_array down within other ada_val_print* functions
    
    This patch moves ada_val_print_array to group it with the other
    ada_val_print_* function which are being called by ada_val_print_1.
    Since this function is in the same situation, it is more logical
    to move it within that group.
    
    It also rationalizes the function's prototype to match the prototype
    of the other ada_val_print_* routines.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_array): Move implementation
            down.  Rename parameter "offset" and "val" into "offset_aligned"
            and "original_value" respectively.  Add parameter "offset".

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

commit 34b27950541eaf717bd02b31d460bab2edfbbbe6
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 19:26:27 2013 +0400

    rewrite ada_val_print_ref to reduce if/else block nesting depth
    
    The logic as currently implemented in this function was a little
    difficult to follow, due to the nested of if/else conditions,
    but most of the time, the "else" block was very simple. So this
    patch re-organizes the code to use fewer levels of nesting by
    using return statements, and writing the code as a sequence of
    "if something simple, then handle it and return" blocks.
    
    While touching this code, this patch changes the cryptic "???"
    printed when trying to print a reference pointing to an undefined
    type. This should only ever happen if the debugging information
    was corrupted or improperly read. But in case that happens, we now
    print "<ref to undefined type>" instead. This is more in line
    with how we print other conditions such as optimized out pieces,
    or synthetic pointers.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_ref): Rewrite by mostly
            re-organizing the code. Change the "???" message printed
            when target type is a TYPE_CODE_UNDEF into
            "<ref to undefined type>".

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

commit 079e459161edae487c667a7f976a6462957389ef
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 19:11:49 2013 +0400

    ada-valprint.c: Inline print_record inside ada_val_print_struct_union
    
    The function print_record is a fairly small and straightforward
    function which is only called from one location. So this patch
    inlines the code at the point of call.
    
    One small advantage is that the context of use of this patch has
    now become such that we can assume that TYPE is not a typedef,
    nor an enum. So thhe call to ada_check_typedef is unnecessary,
    and this patch removes it.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (print_record): Delete, implementation inlined...
            (ada_val_print_struct_union): ... here.  Remove call to
            ada_check_typedef in inlined implementation.

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

commit 8004dfd1cf9caaf8a65236ebe6a4a4b3f544ab7a
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 16:30:43 2013 +0400

    Split ada_val_print_1 into smaller functions
    
    The idea of this patch is that it's hard to have a global view of
    ada_val_print_1 because its body spans over too many lines. Also,
    each individual "case" block within the giant "switch" can be hard
    to isolate if spanning over multiple pages as well.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_gnat_array): New function,
            extracted from ada_val_print_1;
            (ada_val_print_ptr, ada_val_print_num, ada_val_print_enum)
            (ada_val_print_flt, ada_val_print_struct_union)
            (ada_val_print_ref): Likewise.
            (ada_val_print_1): Delete variables i and elttype.
            Replace extracted-out code by call to corresponding
            new functions.

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

commit 760a2db02f0d160c7990c52903bd9aaa796bd815
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 15:48:39 2013 +0400

    Remove call to gdb_flush at end of ada_val_print_1
    
    I am not sure why this function was called in the first place, but
    it disrupts the printing flow when in GDB/MI mode, ending the current
    console stream output, and starting a new one. It's not clear whether,
    with the code as currently written, the problem is actually visible
    or only latent. But, it becomes visible when we replace one of the
    "return" statements in the "switch" block just above by a "break"
    statement (this is something I'd like to do, and what made me realize
    the problem). With the gdb_flush call (after having replaced the
    "return" statement as explained above), we get:
    
            % gdb -q -i=mi ada_prg
            (gdb)
            print 1
            &"print 1\n"
      !! -> ~"$1 = 1"
      !! -> ~"\n"
            ^done
    
    With the gdb_flush call removed, we now get the entire output into
    a single stream.
    
            (gdb)
            print 1
            &"print 1\n"
            ~"$1 = 1"
            ~"\n"
            ^done
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_1): Remove call to gdb_flush.

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

commit 3a92c861bbbd25cb894942f79d0c6f7f8bbd1de6
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 15:27:00 2013 +0400

    ada_val_print_1: Go through val_print instead of recursive call to self.
    
    This is to standardize a little bit how printing is done, and in
    particular make sure that everyone goes through val_print when
    printing sub-objects.  This helps making sure that standard features
    handled by val_print get activated when expected.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_1): Replace calls to
            ada_val_print_1 by calls to val_print.

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

commit cd1630f983e42527bc1b68b2f430b41ffadd16c4
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 14:33:20 2013 +0400

    ada_val_print_1: Add language parameter
    
    This is to help calling val_print.  We would like to be more systematic
    in calling val_print when printing, because it allows us to make sure
    we take advantage of the standard features such as pretty-printing
    which are handled by val_print.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (ada_val_print_1): Add parameter "language".
            Update calls to self accordingly.  Replace calls to c_val_print
            by calls to val_print.

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

commit bdf779a0c5d06c958585c3ba9ca4613da163cda8
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Dec 19 14:05:16 2013 +0400

    ada-valprint.c: Reorder functions to reduce advance declarations.
    
    Advance function declarations add to the maintenance cost, since
    any update to the function prototype needs to be made twice.
    For static functions, this is not necessary, and this patch
    reorders the function so as to reduce the use of such advanche
    declarations.
    
    gdb/ChangeLog:
    
            * ada-valprint.c (print_record): Delete declaration.
            (adjust_type_signedness, ada_val_print_1): Likewise.
            (ada_val_print): Move function implementation down.
            (print_variant_part, print_field_values, print_record):
            Move function implementation up.

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

Summary of changes:
 gdb/ChangeLog                                  |   79 ++
 gdb/ada-valprint.c                             | 1035 +++++++++++++-----------
 gdb/ada-varobj.c                               |    9 +
 gdb/testsuite/ChangeLog                        |    6 +
 gdb/testsuite/gdb.ada/mi_interface.exp         |   52 ++
 gdb/testsuite/gdb.ada/mi_interface/foo.adb     |   23 +
 gdb/testsuite/gdb.ada/mi_interface/pck.adb     |   21 +
 gdb/testsuite/gdb.ada/mi_interface/pck.ads     |   28 +
 gdb/testsuite/gdb.ada/pp-rec-component.exp     |   40 +
 gdb/testsuite/gdb.ada/pp-rec-component.py      |   35 +
 gdb/testsuite/gdb.ada/pp-rec-component/foo.adb |   22 +
 gdb/testsuite/gdb.ada/pp-rec-component/pck.adb |   21 +
 gdb/testsuite/gdb.ada/pp-rec-component/pck.ads |   23 +
 13 files changed, 918 insertions(+), 476 deletions(-)
 create mode 100644 gdb/testsuite/gdb.ada/mi_interface.exp
 create mode 100644 gdb/testsuite/gdb.ada/mi_interface/foo.adb
 create mode 100644 gdb/testsuite/gdb.ada/mi_interface/pck.adb
 create mode 100644 gdb/testsuite/gdb.ada/mi_interface/pck.ads
 create mode 100644 gdb/testsuite/gdb.ada/pp-rec-component.exp
 create mode 100644 gdb/testsuite/gdb.ada/pp-rec-component.py
 create mode 100644 gdb/testsuite/gdb.ada/pp-rec-component/foo.adb
 create mode 100644 gdb/testsuite/gdb.ada/pp-rec-component/pck.adb
 create mode 100644 gdb/testsuite/gdb.ada/pp-rec-component/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]