public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Update FreeBSD's syscall table
@ 2018-10-03 17:30 John Baldwin
  2018-10-03 17:30 ` [PATCH 1/2] Add an optional "alias" attribute to syscall entries John Baldwin
  2018-10-03 17:30 ` [PATCH 2/2] Update the FreeBSD system call table to match FreeBSD 12.0 John Baldwin
  0 siblings, 2 replies; 7+ messages in thread
From: John Baldwin @ 2018-10-03 17:30 UTC (permalink / raw)
  To: gdb-patches

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-17 19:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 17:30 [PATCH 0/2] Update FreeBSD's syscall table John Baldwin
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

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).