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. 4875ffdbdaf7793524464c99baea1d8eb0cb7e34


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  4875ffdbdaf7793524464c99baea1d8eb0cb7e34 (commit)
      from  b138b7a9ed2564a8b1420f338d9f71cc3cf28880 (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=4875ffdbdaf7793524464c99baea1d8eb0cb7e34

commit 4875ffdbdaf7793524464c99baea1d8eb0cb7e34
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Sep 4 12:12:41 2014 +0100

    Regression for i686 gdb.dwarf2/pieces-optimized-out.exp
    
    Git 9a0dc9e3 regressed gdb.dwarf2/pieces-optimized-out.exp, visible on
    i686 (the test doesn't run on x86_64):
    
     (gdb) p s
     -$1 = {a = 5, b = <optimized out>, c = <optimized out>, d = <optimized out>}
     +$1 = {a = 5, b = <optimized out>, c = 0, d = 0}
     -(gdb) PASS: gdb.dwarf2/pieces-optimized-out.exp: print s
     +(gdb) FAIL: gdb.dwarf2/pieces-optimized-out.exp: print s
    
    The regression was caused by this removal in cp-valprint.c:
    
      @@ -293,12 +293,6 @@ cp_print_value_fields (struct type *type, struct type *real_type,
    		  {
    		    fputs_filtered (_("<synthetic pointer>"), stream);
    		  }
      -             else if (!value_bits_valid (val,
      -                                         TYPE_FIELD_BITPOS (type, i),
      -                                         TYPE_FIELD_BITSIZE (type, i)))
      -               {
      -                 val_print_optimized_out (val, stream);
      -               }
    		else
    		  {
    		    struct value_print_options opts = *options;
    
    The idea was that we'd just fallback to calling value_field_bitfield,
    which handles unavailable values (in unpack_value_bits_as_long_1) so
    should be able to handle optimized out values too.  Alas, it doesn't.
    This is currently a bit too messy.  Instead of teaching
    unpack_value_bits_as_long_1 about optimized out bits, let's bite the
    bullet and teach the value code to handle partially optimized out
    bitfield, by having it unpack a bitfield and then propagate the range
    metadata.  Turns out the resulting code looks simpler and clearer.
    
    Tested on x86_64 Fedora 20, -m64/-m32.
    
    gdb/ChangeLog:
    
    	* value.c (value_ranges_copy_adjusted): New function, factored out
    	from ...
    	(value_contents_copy_raw): ... here.
    	(unpack_value_bits_as_long_1): Rename back to ...
    	(unpack_bits_as_long): ... this.  Remove 'original_value' and
    	'result' parameters.  Change return type to LONGEST.
    	(unpack_value_bits_as_long): Delete.
    	(unpack_value_field_as_long_1): Delete.
    	(unpack_value_field_as_long, unpack_field_as_long): Reimplement.
    	(unpack_value_bitfield): New function.
    	(value_field_bitfield): Reimplement using unpack_value_bitfield.
    	(value_fetch_lazy): Use unpack_value_bitfield.
    	* value.h (unpack_value_bits_as_long): Delete declaration.

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

Summary of changes:
 gdb/ChangeLog |   16 ++++
 gdb/value.c   |  227 +++++++++++++++++++++++++++-----------------------------
 gdb/value.h   |    7 --
 3 files changed, 125 insertions(+), 125 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]