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. 290a839c9ab3d33d2a1b42431154b65624a81b0a


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  290a839c9ab3d33d2a1b42431154b65624a81b0a (commit)
       via  91256dc2fb82e6f68dce9b577e26cd89695b6c21 (commit)
       via  b5262cd094e73112fb86297df9052ff0560f68a4 (commit)
      from  74183dabc3e3c253f171e6765a8753709005b44b (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=290a839c9ab3d33d2a1b42431154b65624a81b0a

commit 290a839c9ab3d33d2a1b42431154b65624a81b0a
Author: Yao Qi <yao@codesourcery.com>
Date:   Sat Apr 26 10:14:52 2014 +0800

    Partially available/unavailable data in requested range
    
    In gdb.trace/unavailable.exp, an action is defined to collect
    struct_b.struct_a.array[2] and struct_b.struct_a.array[100],
    
    struct StructB
    {
      int d, ef;
      StructA struct_a;
      int s:1;
      static StructA static_struct_a;
      const char *string;
    };
    
    and the other files are not collected.
    
    When GDB examine traceframe collected by the action, "struct_b" is
    unavailable completely, which is wrong.
    
    (gdb) p struct_b
    $1 = <unavailable>
    
    When GDB reads 'struct_b', it will request to read memory at struct_b's address
    of length LEN.  Since struct_b.d is not collected, no 'M' block
    includes the first part of the desired range, so tfile_xfer_partial returns
    TARGET_XFER_UNAVAILABLE and GDB thinks the whole requested range is unavailable.
    
    In order to fix this problem, in the iteration to 'M' blocks, we record the
    lowest address of blocks within the request range.  If it has, the requested
    range isn't unavailable completely.  This applies to ctf too.  With this patch
    applied, the result looks good and fails in unavailable.exp is fixed.
    
    (gdb) p struct_b
    $1 = {d = <unavailable>, ef = <unavailable>, struct_a = {a = <unavailable>, b = <unavailable>, array = {<unavailable>,
    <unavailable>, -1431655766, <unavailable> <repeats 97 times>, -1431655766, <unavailable> <repeats 9899 times>}, ptr = <unavailable>, bitfield = <unavailable>}, s = <unavailable>,   static static_struct_a = {a = <unavailable>, b = <unavailable>, array = {<unavailable> <repeats 10000 times>}, ptr = <unavailable>,
    bitfield = <unavailable>}, string = <unavailable>}
    
    gdb:
    
    2014-05-05  Yao Qi  <yao@codesourcery.com>
    	    Pedro Alves  <palves@redhat.com>
    
    	* tracefile-tfile.c (tfile_xfer_partial): Record the lowest
    	address of blocks that intersects the requested range.  Trim
    	LEN up to LOW_ADDR_AVAILABLE if read from executable read-only
    	sections.
    	* ctf.c (ctf_xfer_partial): Likewise.
    
    gdb/testsuite:
    
    2014-05-05  Yao Qi  <yao@codesourcery.com>
    
    	* gdb.trace/unavailable.exp (gdb_collect_args_test): Save
    	traceframes into tfile and ctf trace files.  Read data from
    	trace file and test collected data.
    	(gdb_collect_locals_test): Likewise.
    	(gdb_unavailable_registers_test): Likewise.
    	(gdb_unavailable_floats): Likewise.
    	(gdb_collect_globals_test): Likewise.
    	(top-level): Append "ctf" to trace_file_targets if GDB
    	supports.

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

commit 91256dc2fb82e6f68dce9b577e26cd89695b6c21
Author: Yao Qi <yao@codesourcery.com>
Date:   Sat Apr 26 08:47:33 2014 +0800

    Show new created display
    
    When I run refactored unavailable.exp, I find
    command display behaves a little different on live inferior and on
    examining traceframes.  In live inferior, when command "display argc"
    is typed, the value of "argc" is shown.
    
    (gdb) display argc
    1: argc = 1 '\001'
    
    however, on tfile target, when command "display argc" is typed, the
    value of "argc" is not shown.
    
    (gdb) tfind
    Found trace frame 0, tracepoint 1
        at ../../../../git/gdb/testsuite/gdb.trace/unavailable.cc:198
    198       i =  (int) argc + argi + argf + argd + argstruct.memberi + argarray[1];
    (gdb) display argc
    
    I also notice that on "core" target, the value of "argc" isn't shown
    either.  This difference is caused by the code below in printcmd.c:display_command,
    
          if (from_tty && target_has_execution)
            do_one_display (new);
    
    Looks the value of each display is shown if the target has execution.
    Source code archaeology doesn't tell much about this requirement.
    However, if we type command "display" then on "core" or "tfile"
    target, the value of "argc" is still displayed,
    
    for "core" target,
    (gdb) display argc
    (gdb) display
    1: argc = 1 '\001'
    
    for "tfile" target,
    (gdb) display argc
    (gdb) display
    1: argc = <unavailable>
    
    I feel that it is not necessary to have such "target has execution"
    requirement to show the value of new created display.  Auto-display is
    a feature to show the value of expression frequently, has nothing to
    do with whether target has execution or not.  On the other hand, GDB
    has the requirement for new created display, but command "display" can
    still show them, this is an inconsistency, which should be fixed.
    
    This patch is to remove the checking to target_has_execution from the
    condition.
    
    gdb:
    
    2014-05-05  Yao Qi  <yao@codesourcery.com>
    
    	* printcmd.c (display_command): Remove the check to
    	target_has_execution.

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

commit b5262cd094e73112fb86297df9052ff0560f68a4
Author: Yao Qi <yao@codesourcery.com>
Date:   Fri Apr 25 16:18:52 2014 +0800

    Move traceframe checking out of traceframe generation
    
    This patch moves traceframe checking code out of traceframe generation,
    so that we can generation traceframe once, and do the checking in multiple
    times (with target remote, tfile and ctf respectively).  This is a
    pure refactor, not functional changes in unavailable.exp.
    
    gdb/testsuite:
    
    2014-05-05  Yao Qi  <yao@codesourcery.com>
    
    	* gdb.trace/unavailable.exp (gdb_collect_args_test): Move some
    	code to ...
    	(gdb_collect_args_test_1): ... it.  New proc.
    	(gdb_collect_locals_test): Move some code to ...
    	(gdb_collect_locals_test_1): ... it.  New proc.
    	(gdb_unavailable_registers_test): Move some code to ...
    	(gdb_unavailable_registers_test_1): ... it.  New proc.
    	(gdb_unavailable_floats): Move some code to ...
    	(gdb_unavailable_floats_1): ... it.  New proc.

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

Summary of changes:
 gdb/ChangeLog                           |   14 +
 gdb/ctf.c                               |   11 +-
 gdb/printcmd.c                          |    2 +-
 gdb/testsuite/ChangeLog                 |   24 +
 gdb/testsuite/gdb.trace/unavailable.exp |  758 +++++++++++++++++++------------
 gdb/tracefile-tfile.c                   |   11 +-
 6 files changed, 520 insertions(+), 300 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]