[PATCH v2 2/3] Add an optional "alias" attribute to syscall entries.

Simon Marchi simon.marchi@polymtl.ca
Fri Nov 9 15:28:00 GMT 2018


On 2018-11-06 12:54, John Baldwin wrote:
> When setting a syscall catchpoint by name, catch syscalls whose name
> or alias matches the requested string.
> 
> When the ABI of a system call is changed in the FreeBSD kernel, this
> is implemented by leaving a compatibility system call using the old
> ABI at the existing "slot" and allocating a new system call for the
> version using the new ABI.  For example, new fields were added to the
> 'struct kevent' used by the kevent() system call in FreeBSD 12.  The
> previous kevent() system call in FreeBSD 12 kernels is now called
> freebsd11_kevent() and is still used by older binaries compiled
> against the older ABI.  The freebsd11_kevent() system call can be
> tagged with an "alias" attribute of "kevent" permitting 'catch syscall
> kevent' to catch both system calls and providing the expected user
> behavior for both old and new binaries.  It also provides the expected
> behavior if GDB is compiled on an older host (such as a FreeBSD 11
> host).

Will we ever need to provide more than one alias to a syscall?

Simon



More information about the Gdb-patches mailing list