command QCatchSyscalls
Format: ‘QCatchSyscalls:1 [;sysno]…’ ‘QCatchSyscalls:0’
Meaning: Enable (‘QCatchSyscalls:1’) or disable (‘QCatchSyscalls:0’) catching syscalls from the inferior process.
For ‘QCatchSyscalls:1’, each listed syscall sysno (encoded in hex) should be reported to GDB. If no syscall sysno is listed, every system call should be reported.
Note that if a syscall not in the list is reported, GDB will still filter the event according to its own list from all corresponding catch syscall commands. However, it is more efficient to only report the requested syscalls.
Multiple ‘QCatchSyscalls:1’ packets do not combine; any earlier ‘QCatchSyscalls:1’ list is completely replaced by the new list.
If the inferior process execs, the state of ‘QCatchSyscalls’ is kept for the new process too. On targets where exec may affect syscall numbers, for example with exec between 32 and 64-bit processes, the client should send a new packet with the new syscall list.
This packet is not probed by default; the remote stub must request it, by supplying an appropriate ‘qSupported’ response.
Reply:
OK