This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> Cc: gdb-patches@sourceware.org
> From: John Baldwin <jhb@FreeBSD.org>
> Date: Tue, 27 Nov 2018 13:53:54 -0800
> 
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 944a2c4383..ab4fad3c36 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -4683,6 +4683,22 @@ Catchpoint 2 (syscall 764)
>  (@value{GDBP})
>  @end smallexample
>  
> +On some operating systems, a system call name may map to more than one
> +system call number.  For example, the FreeBSD kernel allocates new
> +system call numbers when changing the ABI of an existing system call.
> +The kernel also includes a compatibility system call using the old ABI
> +and number.  FreeBSD's system call XML file includes aliases for
> +compatibility system calls that are used to catch all versions of a
> +system call.  For example, FreeBSD 12 introduced a new variant of the
> +@code{kevent} system call.  Both system calls are caught when catching
> +the @code{kevent} system call:
> +
> +@smallexample
> +(@value{GDBP}) catch syscall kevent
> +Catchpoint 1 (syscalls 'freebsd11_kevent' [363] 'kevent' [560])
> +(@value{GDBP})
> +@end smallexample

This text is okay, but is it likely that any other OS will use this
facility?  If not, we are better off describing it in the "Native"
section (adding a new subsection if needed), as a FreeBSD-only
feature.

Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]