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. 09635af7cdc14b7a9dc11010de4cb0d556e2a4a8


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  09635af7cdc14b7a9dc11010de4cb0d556e2a4a8 (commit)
      from  2bdd10b78e7e5b33c488af6fcb01255269e8a498 (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=09635af7cdc14b7a9dc11010de4cb0d556e2a4a8

commit 09635af7cdc14b7a9dc11010de4cb0d556e2a4a8
Author: Maciej W. Rozycki <macro@codesourcery.com>
Date:   Tue Sep 9 16:17:38 2014 +0100

    gdbserver-support: Handle gdbserver start failures
    
    As it happens we have a board that fails a gdb.base/gcore-relro.exp
    test case reproducibly and moreover the case appears to trigger a
    kernel bug making the it less than usable.  Specifically the board
    remains responsive to some extent, however processes do not appear
    to be able to successfully complete termination anymore and perhaps
    more importantly further gdbserver processes can be started, but they
    never reach the stage of listening on the RSP socket.
    
    This change handles timeouts in gdbserver start properly, by throwing
    a TCL error exception when gdbserver does not report listening on the
    RSP socket in time.  This is then caught at the outer level and
    reported, and 2 rather than 1 is returned so that the caller may tell
    the failure to start gdbserver and other issues apart and act
    accordingly (or do nothing).
    
    I thought letting the exception unwind further on might be a good idea
    for any test harnesses out there to break outright where a gdbserver
    start error is silently ignored right now, however I figured out the
    calls to gdbserver-support.exp are buried down too deep in the GDB test
    suite for such a change to be made easily.  I think returning a distinct
    return value is good enough (the API says "non-zero", so 2 is as good as
    1) and we can always make the error harder in a later step if required.
    
    With config/gdbserver.exp being used this change remains transparent
    to the target board, the return value is passed up by gdb_reload and
    the error exception unwinds through gdbserver_gdb_load and is caught
    and handled by mi_gdb_target_load.  A call to perror is still made,
    reporting the timeout, and in the case of mi_gdb_target_load the
    procedure returns a value denoting unsuccessful completion.  An
    unsuccessful completion of gdb_reload is already handled elsewhere.
    
    An alternative gdbserver board configuration can interpret the return
    value in its gdb_reload implementation and catch the error in
    gdbserver_gdb_load in an attempt to recover a target board that has
    gone astray, for example by rebooting the board somehow.  This has
    proved effective with our failing board, that now completes the
    remaining test cases with no further hiccups.
    
    	* lib/gdbserver-support.exp (gdbserver_start): Throw an error
    	exception on timeout.
    	(gdbserver_run): Catch any `gdbserver_spawn' error exceptions.
    	(gdbserver_start_extended): Catch any `gdbserver_start' error
    	exceptions.
    	(gdbserver_start_multi, mi_gdbserver_start_multi): Likewise.
    	* lib/mi-support.exp (mi_gdb_target_load): Catch any
    	`gdbserver_gdb_load' error exceptions.

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

Summary of changes:
 gdb/testsuite/ChangeLog                 |   11 +++++++++++
 gdb/testsuite/lib/gdbserver-support.exp |   26 +++++++++++++++++++++-----
 gdb/testsuite/lib/mi-support.exp        |    5 ++++-
 3 files changed, 36 insertions(+), 6 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]