public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: John Baldwin <jhb@FreeBSD.org>, Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 2/3] Add an optional "alias" attribute to syscall entries.
Date: Wed, 28 Nov 2018 12:19:00 -0000	[thread overview]
Message-ID: <34fcc769-4533-31bf-d258-36c6110037e0@redhat.com> (raw)
In-Reply-To: <650590ef-3036-57a8-6cd5-abaa5654add3@FreeBSD.org>

On 11/27/2018 09:53 PM, John Baldwin wrote:
> +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
> +

I'd suggest replacing "FreeBSD's system call XML file includes" with
something else that isn't so implementor-speak.  Users needn't
be aware of the XML file.  Maybe something along the lines of
"GDB is aware of aliases for compatibility system calls that
are used to catch ..."  Or maybe remove the sentence altogether.
Maybe simplify it a bit further, as users don't really need
to be told that that's what FreeBSD does for all new syscalls,
just that some syscalls are like that.  I think.  Thus, something
like this is enough, IMHO:


On some operating systems, a system call name may map to more than one
system call number.  

For example, FreeBSD 12 introduced a new variant of the @code{kevent} system
call, and included a compatibility system call using the old ABI and number.
As convenience, both system calls are caught when catching the @code{kevent}
system call by name:

@smallexample
(@value{GDBP}) catch syscall kevent
Catchpoint 1 (syscalls 'freebsd11_kevent' [363] 'kevent' [560])
(@value{GDBP})
@end smallexample

Thanks,
Pedro Alves

  parent reply	other threads:[~2018-11-28 12:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 20:04 [PATCH v3 0/3] Update FreeBSD's syscall table John Baldwin
2018-11-09 20:04 ` [PATCH v3 1/3] Change get_syscalls_by_group to append to an existing vector of integers John Baldwin
2018-11-09 20:04 ` [PATCH v3 3/3] Update the FreeBSD system call table to match FreeBSD 12.0 John Baldwin
2018-11-09 20:04 ` [PATCH v3 2/3] Add an optional "alias" attribute to syscall entries John Baldwin
2018-11-09 20:18   ` Eli Zaretskii
2018-11-16 17:44     ` John Baldwin
2018-11-16 19:37       ` Eli Zaretskii
2018-11-27 17:13     ` Pedro Alves
2018-11-27 21:54       ` John Baldwin
2018-11-28  6:31         ` Eli Zaretskii
2018-11-28 12:19         ` Pedro Alves [this message]
2018-11-28 17:22           ` John Baldwin
2018-11-28 17:44             ` Eli Zaretskii
2018-11-28 18:00               ` John Baldwin
2018-11-28 18:31                 ` Eli Zaretskii
2018-11-28 18:34                 ` Pedro Alves
2018-11-28 19:15                   ` John Baldwin
2018-11-28 19:21                   ` Eli Zaretskii
2018-11-26 20:31 ` [PATCH v3 0/3] Update FreeBSD's syscall table John Baldwin
2018-11-27 17:20   ` Pedro Alves
2018-11-27 20:00     ` John Baldwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34fcc769-4533-31bf-d258-36c6110037e0@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).