[rfa/doc] Add section on interrupts to remote protocol documentation

Steven Johnson sjohnson@sakuraindustries.com
Fri Nov 18 15:33:00 GMT 2005


Eli Zaretskii wrote:

>>Date: Fri, 18 Nov 2005 16:04:58 +1100
>>From: Steven Johnson <sjohnson@sakuraindustries.com>
>>
>>Otherwise, ^C is ignored as a special character.  What does "interrupt" 
>>mean when you are not doing anything that can be interrupted?
>>    
>>
>Isn't this what Kevin's text says?  Here's the relevant fragment:
>
>   Interrupts received while the program is stopped will be discarded.
>
>
>  
>
I think we are talking at cross purposes.  I dont think anyone disputes 
Interrupting when the target is stopped means nothing (to either GDB or 
the target), and it makes sense to discard them if they are not within a 
packet, because ^C is not a valid start of packet character. 

What both Jim Blandy and I seem to be talking about is the apparent 
"new" requirement to escape ^C when its in a packet.  I fail to see why 
it requires to be escaped.  It is only valid at a very specific point in 
time, so why does it need to be escaped? 

It hasnt been escaped in the past, and im not aware of any problems that 
not escaping it introduces.

As Jim points out, the X packet never used to document ^C as requiring 
escaping, and he says it isnt escaped in the GDB code.  So if it is now 
going to be escaped, that will break stubs, that rely on the old 
behavior.  The old manual said that the only character escaped in the 
'X' packet was $, # and 0x7d.  But now we have added ^C to that list, 
and have broken backward compatibility by doing so.

If thats what you want to do, thats fine, but it is no longer compatible 
with any stub that supported the old behavior of the X packet.

At least thats how ive interpreted "{Ctrl-C} must not be sent as part of 
a packet as defined in the Overview section.".

Steven



More information about the Gdb-patches mailing list