From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: gdb-patches@cygnus.com Subject: Re: Patch to support NACK packet from stub Date: Thu, 01 Apr 1999 00:00:00 -0000 Message-id: <36F0273C.D418EEF3@cygnus.com> References: <5mu2vqw2co.fsf.cygnus.patches.gdb@jtc.redbacknetworks.com> X-SW-Source: 1999-q1/msg00114.html "J.T. Conklin" wrote: > > I discovered that the putpkt() routine does not handle NACK ('-') > packets from remote stub, instead the NACK is junked and putpkt() > waits until the subsequent read times out. This is a big penalty > (the default value of remote_timeout is 20 seconds) that can be > easily avoided. > > However, I had the '-' case fall through to SERIAL_TIMEOUT so the > number of attempts a packet is sent is the same as timeouts. If we > wanted to add a remote_debug for the SERIAL_TIMEOUT case, that code > needs to duplicated. (Thanks for comments from Fernando Nasser and Michael Snyder) I think it would be best if we leave this one out of 4.18 and have a hard think about it for devo. If you get rid of the timeout there is a chance that other nastier things can happen. Remembering that the remote GDB protocol is only robust against data overrun what can happen is a sequence like: -> <- NACK -> <- NACK It is probably safer to just drain the target like the code is currently doing. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: gdb-patches@cygnus.com Subject: Re: Patch to support NACK packet from stub Date: Wed, 17 Mar 1999 14:05:00 -0000 Message-ID: <36F0273C.D418EEF3@cygnus.com> References: <5mu2vqw2co.fsf.cygnus.patches.gdb@jtc.redbacknetworks.com> X-SW-Source: 1999-03/msg00060.html Message-ID: <19990317140500.Lwd6yc9Fgg_NiiRk3CBB4FoUgAnhPMHhz6d4tFo6Gfc@z> "J.T. Conklin" wrote: > > I discovered that the putpkt() routine does not handle NACK ('-') > packets from remote stub, instead the NACK is junked and putpkt() > waits until the subsequent read times out. This is a big penalty > (the default value of remote_timeout is 20 seconds) that can be > easily avoided. > > However, I had the '-' case fall through to SERIAL_TIMEOUT so the > number of attempts a packet is sent is the same as timeouts. If we > wanted to add a remote_debug for the SERIAL_TIMEOUT case, that code > needs to duplicated. (Thanks for comments from Fernando Nasser and Michael Snyder) I think it would be best if we leave this one out of 4.18 and have a hard think about it for devo. If you get rid of the timeout there is a chance that other nastier things can happen. Remembering that the remote GDB protocol is only robust against data overrun what can happen is a sequence like: -> <- NACK -> <- NACK It is probably safer to just drain the target like the code is currently doing. Andrew