From: John Baldwin Date: Thu, 13 Dec 2018 19:36:42 +0000 (-0800) Subject: Update the FreeBSD system call table to match FreeBSD 12.0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64fdde094a2747e9aa729dfa4f1568c3d24ab80b;p=binutils-gdb.git Update the FreeBSD system call table to match FreeBSD 12.0. Add a script to generate the FreeBSD XML system call table from the sys/sys/syscall.h file in the kernel source tree. For ABI compatiblity system calls used by older binaries (such as freebsd11_kevent()), the original system call name is used as an alias. Run this script against the current syscall.h file in FreeBSD's head branch which is expected to be the file used in 12.0 (head is currently in code freeze as part of the 12.0 release process). gdb/ChangeLog: * syscalls/update-freebsd.sh: New file. * syscalls/freebsd.xml: Regenerate. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2a1a6e25184..07c436fb08e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-12-13 John Baldwin + + * syscalls/update-freebsd.sh: New file. + * syscalls/freebsd.xml: Regenerate. + 2018-12-13 John Baldwin * NEWS: Add entry documenting system call aliases. diff --git a/gdb/syscalls/freebsd.xml b/gdb/syscalls/freebsd.xml index 810258a8507..418a1ea838d 100644 --- a/gdb/syscalls/freebsd.xml +++ b/gdb/syscalls/freebsd.xml @@ -1,4 +1,5 @@ - + + + + + + + + + + +EOF + +awk ' +/MAXSYSCALL/ { + next +} +/^#define/ { + sub(/^SYS_/,"",$2); + printf " \n" +} +/\/\* [0-9]* is obsolete [a-z_]* \*\// { + printf " \n", $5, $2 +} +/\/\* [0-9]* is freebsd[0-9]* [a-z_]* \*\// { + printf " \n", $4, $5, $2, $5 +}' $1 >> freebsd.xml.tmp + +cat >> freebsd.xml.tmp < +EOF + +../../move-if-change freebsd.xml.tmp freebsd.xml