This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

PATCH: restore value of remote_timeout


Back in August, I discovered that the default value of remote_timeout
had been changed from 2 to 20 because GDB's Hitachi e-7000 ICE target
used the remote debug protocol's timeout variable instead of creating
a new variable specific for that target, and the e-7000 needed a long
timeout.  

I complained that this change was particularly annoying to folks using
the remote protocol.  Stan replied:

    Stan> Since this is clearly a case of Cygnus making everbody's lives
    Stan> miserable for the sake of E7000-using customers :-), I'm
    Stan> amenable to bumping the default down to a more reasonable level.
    Stan> It would be even more clever to add the default timeout to the
    Stan> target vector, but I'll leave that as an exercise for the
    Stan> energetic.

Not being energetic, I submitted the enclosed patch.

        --jtc

1999-08-23  J.T. Conklin  <jtc@redback.com>

        * top.c (remote_timeout): Change default to 2.  Add comment
        explaining history of changes to the default value.
        * remote.c (_initialize_remote): Remove code that adds set/ 
        show remotetimeout, as that's also done in top.c

Index: remote.c
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/remote.c,v
retrieving revision 1.1.1.28
retrieving revision 1.19
diff -c -r1.1.1.28 -r1.19
*** remote.c	2000/02/04 21:24:02	1.1.1.28
--- remote.c	2000/02/04 23:52:40	1.19
***************
*** 245,259 ****
  
  static struct target_ops extended_async_remote_ops;
  
- /* This was 5 seconds, which is a long time to sit and wait.
-    Unless this is going though some terminal server or multiplexer or
-    other form of hairy serial connection, I would think 2 seconds would
-    be plenty.  */
- 
- /* Changed to allow option to set timeout value.
-    was static int remote_timeout = 2; */
- extern int remote_timeout;
- 
  /* FIXME: cagney/1999-09-23: Even though getpkt was called with
     ``forever'' still use the normal timeout mechanism.  This is
     currently used by the ASYNC code to guarentee that target reads
--- 245,250 ----
***************
*** 5515,5527 ****
  response packet.  GDB supplies the initial `$' character, and the\n\
  terminating `#' character and checksum.",
  	   &maintenancelist);
- 
-   add_show_from_set
-     (add_set_cmd ("remotetimeout", no_class,
- 		  var_integer, (char *) &remote_timeout,
- 		  "Set timeout value for remote read.\n",
- 		  &setlist),
-      &showlist);
  
    add_show_from_set
      (add_set_cmd ("remotebreak", no_class,
--- 5510,5515 ----
Index: top.c
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/top.c,v
retrieving revision 1.1.1.23
retrieving revision 1.15
diff -c -r1.1.1.23 -r1.15
*** top.c	2000/02/04 21:23:10	1.1.1.23
--- top.c	2000/02/04 23:52:42	1.15
***************
*** 308,314 ****
  
  /* Timeout limit for response from target. */
  
! int remote_timeout = 20;	/* Set default to 20 */
  
  /* Non-zero tells remote* modules to output debugging info.  */
  
--- 308,332 ----
  
  /* Timeout limit for response from target. */
  
! /* The default value has been changed many times over the years.  It 
!    was originally 5 seconds.  But that was thought to be a long time 
!    to sit and wait, so it was changed to 2 seconds.  That was thought
!    to be plenty unless the connection was going through some terminal 
!    server or multiplexer or other form of hairy serial connection.
! 
!    In mid-1996, remote_timeout was moved from remote.c to top.c and 
!    it began being used in other remote-* targets.  It appears that the
!    default was changed to 20 seconds at that time, perhaps because the
!    Hitachi E7000 ICE didn't always respond in a timely manner.
! 
!    But if 5 seconds is a long time to sit and wait for retransmissions,
!    20 seconds is far worse.  This demonstrates the difficulty of using 
!    a single variable for all protocol timeouts.
! 
!    As remote.c is used much more than remote-e7000.c, it was changed 
!    back to 2 seconds in 1999. */
! 
! int remote_timeout = 2;
  
  /* Non-zero tells remote* modules to output debugging info.  */
  



-- 
J.T. Conklin
RedBack Networks

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]