public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] Update FreeBSD's syscall table
Date: Wed, 03 Oct 2018 17:30:00 -0000	[thread overview]
Message-ID: <20181003173005.19581-1-jhb@FreeBSD.org> (raw)

Mostly this patch just updates the list of syscalls to match FreeBSD 12.
However, it also adds an alias feature to try to provide the right user
experience given the way that FreeBSD handles ABI changes to syscalls,
which is to allocate new system calls if the ABI changes and name the
old syscall 'freebsdN_foo' where N is the last major release that used
the older ABI.  12 has several new system calls in this category since
the layout of both 'struct kevent' and 'struct stat' was changed.
I make use of aliases so that the compat system calls have an alias
of the original syscall name.  This means that 'catch syscall kevent'
will register a catchpoint for both freebsd11_kevent and the new
kevent system call in 12 for example, and will thus work fine for
any FreeBSD binary that calls 'kevent' regardless of the target OS
version.  I didn't want to use the 'group' stuff for this as I plan to
use groups for syscalls on FreeBSD eventually, and it would also make
the UI somewhat confusing I think (you would have to know to use
'catch syscall group kevent').

John Baldwin (2):
  Add an optional "alias" attribute to syscall entries.
  Update the FreeBSD system call table to match FreeBSD 12.0.

 gdb/ChangeLog                  |  26 ++++++++
 gdb/break-catch-syscall.c      |  11 ++--
 gdb/gdbarch.h                  |   3 -
 gdb/gdbarch.sh                 |   3 -
 gdb/syscalls/freebsd.xml       | 107 ++++++++++++++++++++++++++-------
 gdb/syscalls/gdb-syscalls.dtd  |   1 +
 gdb/syscalls/update-freebsd.sh |  77 ++++++++++++++++++++++++
 gdb/xml-syscall.c              |  49 ++++++++-------
 gdb/xml-syscall.h              |   8 +--
 9 files changed, 226 insertions(+), 59 deletions(-)
 create mode 100755 gdb/syscalls/update-freebsd.sh

-- 
2.18.0

             reply	other threads:[~2018-10-03 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:30 John Baldwin [this message]
2018-10-03 17:30 ` [PATCH 1/2] Add an optional "alias" attribute to syscall entries John Baldwin
2018-10-12  6:13   ` Kevin Buettner
2018-10-17 18:49     ` John Baldwin
2018-10-13  1:52   ` Sergio Durigan Junior
2018-10-17 19:13     ` John Baldwin
2018-10-03 17:30 ` [PATCH 2/2] Update the FreeBSD system call table to match FreeBSD 12.0 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=20181003173005.19581-1-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.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).