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


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  dca325b370730f8cfd3b63ac848569bf58d8746c (commit)
       via  5854b38a00f8f5021e6d9b075e882aafcf2e91ed (commit)
       via  463bb9571be732fdbd3101bd6edd104c99ea4883 (commit)
       via  3dd170be2528487b4c200b531d7abda38d64634f (commit)
       via  5ecaaa66e0d056412ca95b3ac2e385b3e470a95c (commit)
       via  1612e0c0f973f3defdfb2e74b09ec93f3d819c79 (commit)
       via  c451ebe5dd0c38617c74e0b6f0d5ef3188c25d56 (commit)
       via  1d42e4c4d85cb12ce07a5349b1b2e11dce2d077d (commit)
       via  9f1f738adae6b28c4f7db7e3607b4c224f1f7612 (commit)
       via  3c8452d46ac23d455c30438d0885a738e02b56e1 (commit)
       via  4ad88275f81a586e32e86351cc415a97d58ef448 (commit)
       via  80180f796d366d230822c07a15aa68971abf9d77 (commit)
      from  41f1ada5d2d4cff7a235644661ec30de156fd038 (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=dca325b370730f8cfd3b63ac848569bf58d8746c

commit dca325b370730f8cfd3b63ac848569bf58d8746c
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Fri Nov 15 12:48:00 2013 +0000

    test: add mi vla test
    
    testsuite/ChangeLog:
    
    	* gdb.mi/mi-vla-c99.exp: New file.
    	* gdb.mi/vla.c: New file.

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

commit 5854b38a00f8f5021e6d9b075e882aafcf2e91ed
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Fri Nov 15 12:47:47 2013 +0000

    test: basic c99 vla tests for C primitives
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/vla-datatypes.c: New file.
    	* gdb.base/vla-datatypes.exp: New file.

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

commit 463bb9571be732fdbd3101bd6edd104c99ea4883
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Fri Nov 15 12:47:44 2013 +0000

    test: evaluate pointers to C99 vla correctly.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/vla-ptr.c: New file.
    	* gdb.base/vla-ptr.exp: New file.

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

commit 3dd170be2528487b4c200b531d7abda38d64634f
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Tue Nov 26 14:47:16 2013 +0000

    test: cover subranges with present DW_AT_count attribute
    
    The dwarf attribute DW_AT_count specifies the elements of a subrange.
    This test covers subranges with present count but absent upper bound
    attribute, both with static and dynamic attribute values.
    
    testsuite/ChangeLog:
    
    	* gdb.dwarf2/count.exp: New file.

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

commit 5ecaaa66e0d056412ca95b3ac2e385b3e470a95c
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Wed Feb 5 16:22:08 2014 +0000

    vla: evaluate operand of sizeof if its type is a vla
    
    The c99 standard in "6.5.3.4 The sizeof operator" states:
    
     If the type of the operand is a variable length array type, the operand
     is evaluated;[...]
    
    This patch mirrors the following c99 semantic in gdb:
    
     1| int vla[n][m];
     2| int i = 1;
     3| sizeof(vla[i++][0]); // No sideffect
     4| assert (i == 1);
     5| sizeof(vla[i++]);    // With sideffect
     6| assert (i == 2);
    
    Note: ptype/whatis still do not allow any sideeffects.
    
    This patch was motivated by:
    
      https://sourceware.org/ml/gdb-patches/2014-01/msg00732.html
    
    gdb/ChangeLog:
    
    	* eval.c (evaluate_subexp_for_sizeof): Add enum noside argument.
    	(evaluate_subexp_standard): Pass noside argument.
    	(evaluate_subexp_for_sizeof) <BINOP_SUBSCRIPT>: Handle subscript case
    	if noside equals EVAL_NORMAL. If the subscript yields a vla type
    	re-evaluate subscript operation with EVAL_NORMAL to enable sideffects.
    	* gdbtypes.c (resolve_dynamic_bounds): Mark bound as evaluated.
    	* gdbtypes.h (enum range_flags): Add RANGE_EVALUATED case.
    
    testsuite/ChangeLog:
    
    	* gdb.base/vla-sideeffect.c: New file.
    	* gdb.base/vla-sideeffect.exp: New file.

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

commit 1612e0c0f973f3defdfb2e74b09ec93f3d819c79
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Tue Nov 26 14:35:43 2013 +0000

    vla: resolve dynamic bounds if value contents is a constant byte-sequence
    
    A variable location might be a constant value and therefore no inferior memory
    access is needed to read the content. In this case try to resolve the type
    bounds.
    
    gdb/ChangeLog:
    
    	* findvar.c (default_read_var_value): Resolve dynamic bounds if location
    	points to a constant blob.

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

commit c451ebe5dd0c38617c74e0b6f0d5ef3188c25d56
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Tue Nov 19 12:54:24 2013 +0000

    vla: support for DW_AT_count
    
    This patch adds support for DW_AT_count as requested in the code review:
    
      https://sourceware.org/ml/gdb-patches/2013-11/msg00200.html
    
    gdb/ChangeLog:
    
    	* dwarf2read.c (read_subrange_type): Convert DW_AT_count to a dynamic
    	property and store it as the high bound and flag the range accordingly.
    	* gdbtypes.c (resolve_dynamic_bounds): If range is flagged as
    	RANGE_UPPER_BOUND_IS_COUNT assign low + high - 1 as the new high bound.
    	* gdbtypes.h (enum range_flags): New enum.
    	(struct range_bounds): Add flags member.

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

commit 1d42e4c4d85cb12ce07a5349b1b2e11dce2d077d
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Thu Nov 14 09:55:52 2013 +0000

    vla: print "variable length" for unresolved dynamic bounds
    
    1| void foo (size_t n) {
    2|   int vla[n];
    3| }
    
    Given the following expression
    
      (gdb) ptype &vla
    
    Gdb evaluates the expression with EVAL_AVOID_SIDE_EFFECTS and thus
    does not resolve the bounds information and misinterprets the high
    bound as a constant. The current output is:
    
      type = int (*)[1289346]
    
    this patch deals with this case and prints:
    
      type = int (*)[variable length]
    
    instead.
    
    gdb/ChangeLog:
    
    	* c-typeprint.c (c_type_print_varspec_suffix): Added
    	check for not yet resolved high bound. If unresolved, print
    	"variable length" string to the console instead of random
    	length.

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

commit 9f1f738adae6b28c4f7db7e3607b4c224f1f7612
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Mon Oct 14 08:36:13 2013 +0100

    vla: update type from newly created value
    
    Constructing a value based on a type and address might change the type
    of the newly constructed value. Thus re-fetch type via value_type to ensure
    we have the correct type at hand.
    
    gdb/ChangeLog
    
    	* ada-lang.c (ada_value_primitive_packed_val): Re-fetch type from value.
    	(ada_template_to_fixed_record_type_1): Likewise.
    	(ada_to_fixed_type_1): Likewise.
    	* cp-valprint.c (cp_print_value_fields_rtti): Likewise.
    	(cp_print_value): Likewise.
    	* d-valprint.c (dynamic_array_type): Likewise.
    	* findvar.c (address_of_variable): Likewise.
    	* jv-valprint.c (java_value_print): Likewise.
    	* valops.c (value_ind): Likewise.
    	* value.c (coerce_ref): Likewise.

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

commit 3c8452d46ac23d455c30438d0885a738e02b56e1
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Sat Oct 12 12:36:16 2013 +0100

    vla: enable sizeof operator for indirection
    
    This patch enables the sizeof operator for indirections:
    
    1| void foo (size_t n) {
    2|   int vla[n];
    3|   int *vla_ptr = &vla;
    4| }
    
    (gdb) p sizeof(*vla_ptr)
    
    yields sizeof (size_t) * n.
    
    gdb/ChangeLog:
    
    	* eval.c (evaluate_subexp_for_sizeof) <UNOP_IND>: Create an indirect
    	value and retrieve the dynamic type size.

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

commit 4ad88275f81a586e32e86351cc415a97d58ef448
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Wed Oct 9 15:28:22 2013 +0100

    vla: enable sizeof operator to work with variable length arrays
    
    In C99 the sizeof operator computes the size of a variable length array
    at runtime (6.5.3.4 The sizeof operator). This patch reflects the semantic
    change in the debugger.
    
    We now are able to get the size of a vla:
    
    1| void foo (size_t n) {
    2|   int vla[n];
    3| }
    
    (gdb) p sizeof(vla)
    
    yields N * sizeof(int).
    
    gdb/ChangeLog:
    
    	* eval.c (evaluate_subexp_for_sizeof) <OP_VAR_VALUE>: If the type
    	passed to sizeof is dynamic evaluate the argument to compute the length.

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

commit 80180f796d366d230822c07a15aa68971abf9d77
Author: Sanimir Agovic <sanimir.agovic@intel.com>
Date:   Wed Oct 9 15:28:22 2013 +0100

    type: add c99 variable length array support
    
    The dwarf standard allow certain attributes to be expressed as dwarf
    expressions rather than constants. For instance upper-/lowerbound attributes.
    In case of a c99 variable length array the upperbound is a dynamic attribute.
    
    With this change c99 vla behave the same as with static arrays.
    
    1| void foo (size_t n) {
    2|   int ary[n];
    3|   memset(ary, 0, sizeof(ary));
    4| }
    
    (gdb) print ary
    $1 = {0 <repeats 42 times>}
    
    gdb/ChangeLog:
    
    	* dwarf2loc.c (dwarf2_locexpr_baton_eval): New function.
    	(dwarf2_evaluate_property): New function.
    	* dwarf2loc.h (dwarf2_evaluate_property): New function prototype.
    	* dwarf2read.c (attr_to_dynamic_prop): New function.
    	(read_subrange_type): Use attr_to_dynamic_prop to read high bound
    	attribute.
    	* gdbtypes.c: Include dwarf2loc.h.
    	(is_dynamic_type): New function.
    	(resolve_dynamic_type): New function.
    	(resolve_dynamic_bounds): New function.
    	(get_type_length): New function.
    	(check_typedef): Use get_type_length to compute type length.
    	* gdbtypes.h (TYPE_HIGH_BOUND_KIND): New macro.
    	(TYPE_LOW_BOUND_KIND): New macro.
    	(is_dynamic_type): New function prototype.
    	* value.c (value_from_contents_and_address): Call resolve_dynamic_type
    	to resolve dynamic properties of the type. Update comment.
    	* valops.c (get_value_at, value_at, value_at_lazy): Update comment.

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

Summary of changes:
 gdb/ChangeLog                             |   77 ++++++++++
 gdb/ada-lang.c                            |   13 ++-
 gdb/c-typeprint.c                         |    6 +-
 gdb/cp-valprint.c                         |    2 +
 gdb/d-valprint.c                          |    1 +
 gdb/dwarf2loc.c                           |  119 +++++++++++++++
 gdb/dwarf2loc.h                           |   28 ++++
 gdb/dwarf2read.c                          |  122 +++++++++++-----
 gdb/eval.c                                |   55 +++++++-
 gdb/findvar.c                             |   12 ++-
 gdb/gdbtypes.c                            |  225 ++++++++++++++++++++++-------
 gdb/gdbtypes.h                            |   20 +++
 gdb/jv-valprint.c                         |    1 +
 gdb/testsuite/ChangeLog                   |   24 +++
 gdb/testsuite/gdb.base/vla-datatypes.c    |   86 +++++++++++
 gdb/testsuite/gdb.base/vla-datatypes.exp  |  139 ++++++++++++++++++
 gdb/testsuite/gdb.base/vla-ptr.c          |   58 ++++++++
 gdb/testsuite/gdb.base/vla-ptr.exp        |   41 ++++++
 gdb/testsuite/gdb.base/vla-sideeffect.c   |   42 ++++++
 gdb/testsuite/gdb.base/vla-sideeffect.exp |   89 ++++++++++++
 gdb/testsuite/gdb.dwarf2/count.exp        |  125 ++++++++++++++++
 gdb/testsuite/gdb.mi/mi-vla-c99.exp       |   82 +++++++++++
 gdb/testsuite/gdb.mi/vla.c                |   37 +++++
 gdb/valops.c                              |   19 ++-
 gdb/value.c                               |   20 ++-
 25 files changed, 1336 insertions(+), 107 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/vla-datatypes.c
 create mode 100644 gdb/testsuite/gdb.base/vla-datatypes.exp
 create mode 100644 gdb/testsuite/gdb.base/vla-ptr.c
 create mode 100644 gdb/testsuite/gdb.base/vla-ptr.exp
 create mode 100644 gdb/testsuite/gdb.base/vla-sideeffect.c
 create mode 100644 gdb/testsuite/gdb.base/vla-sideeffect.exp
 create mode 100644 gdb/testsuite/gdb.dwarf2/count.exp
 create mode 100644 gdb/testsuite/gdb.mi/mi-vla-c99.exp
 create mode 100644 gdb/testsuite/gdb.mi/vla.c


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]