The File-I/O protocol uses the
F packet as the request as well
as reply packet. Since a File-I/O system call can only occur when
GDB is waiting for a response from the continuing or stepping target,
the File-I/O request is a reply that GDB has to expect as a result
of a previous ‘C’, ‘c’, ‘S’ or ‘s’ packet.
F packet contains all information needed to allow GDB
to call the appropriate host system call:
At this point, GDB has to perform the following actions.
mpacket request. This additional communication has to be expected by the target implementation and is handled as any other
Xpacket. This packet has to be expected by the target implementation and is handled as any other
Eventually GDB replies with another
F packet which contains all
necessary information for the target to continue. This at least contains
errno, if has been changed by the system call.
After having done the needed type and value coercion, the target continues the latest continue or step action.