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]

[PATCH 0/2] Update FreeBSD's syscall table


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


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