manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

D.9.5 The ‘Ctrl-C’ Message

If the ‘Ctrl-C’ flag is set in the No value for GDBN reply packet (see section The F Reply Packet), the target should behave as if it had gotten a break message. The meaning for the target is “system call interrupted by SIGINT”. Consequentially, the target should actually stop (as with a break message) and return to No value for GDBN with a T02 packet.

It's important for the target to know in which state the system call was interrupted. There are two possible cases:

These two states can be distinguished by the target by the value of the returned errno. If it's the protocol representation of EINTR, the system call hasn't been performed. This is equivalent to the EINTR handling on POSIX systems. In any other case, the target may presume that the system call has been finished — successfully or not — and should behave as if the break message arrived right after the system call.

No value for GDBN must behave reliably. If the system call has not been called yet, No value for GDBN may send the F reply immediately, setting EINTR as errno in the packet. If the system call on the host has been finished before the user requests a break, the full action must be finished by No value for GDBN. This requires sending M or X packets as necessary. The F packet may only be sent when either nothing has happened or the full action has been completed.


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.