This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
"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: -> <start><scrambled-data-looking-like-eop> <- NACK -> <more crambled data looking like another packet> <- NACK It is probably safer to just drain the target like the code is currently doing. Andrew