binutils-gdb/gdb/syscalls/linux-defaults.xml.in

244 lines
11 KiB
XML
Raw Normal View History

Implement catch syscall group Implement support to add catchpoints for a group of related syscalls using the syntax: (gdb) catch syscall group:<group> or (gdb) catch syscall g:<group> Several groups are predefined in the xml files for all architectures supported by GDB over Linux. They are based on the groups defined by strace. gdb/ * xml-syscall.c (get_syscalls_by_group): New. (get_syscall_group_names): New. (struct syscall_group_desc): New structure to store group data. (struct syscalls_info): Include field to store the group list. (sysinfo_free_syscall_group_desc): New. (free_syscalls_info): Free group list. (syscall_group_create_syscall_group_desc): New. (syscall_group_add_syscall): New. (syscall_create_syscall_desc): Add syscall to its groups. (syscall_start_syscall): Load group attribute. (syscall_group_get_group_by_name): New. (xml_list_syscalls_by_group): New. (xml_list_of_groups): New. * xml-syscall.h (get_syscalls_by_group): Export function to retrieve a list of syscalls filtered by the group name. (get_syscall_group_names): Export function to retrieve the list of syscall groups. * break-catch-syscall.c (catch_syscall_split_args): Verify if argument is a syscall group and expand it to a list of syscalls when creating catchpoints. (catch_syscall_completer): Add word completion for system call groups. * configure.ac: Include dependency for xsltproc when building in maintainer-mode. * break-catch-syscall.c (_initialize_breakpoint): Update catch syscall command documentation. * NEWS: Include section about catching groups of syscalls. * configure: Regenerate. * data-directory/Makefile.in: Generate syscall xml when building in maintainer mode. * syscalls/gdb-syscalls.dtd: Include group attribute to the syscall element. * syscalls/apply-defaults.xsl: New. * syscalls/linux-defaults.xml.in: New. * syscalls/aarch64-linux.xml: Rename to aarch64-linux.xml.in. * syscalls/amd64-linux.xml: Rename to amd64-linux.xml.in. * syscalls/arm-linux.xml: Rename to arm-linux.xml.in. * syscalls/bfin-linux.xml: Rename to bfin-linux.xml.in. * syscalls/i386-linux.xml: Rename to i386-linux.xml.in. * syscalls/mips-n32-linux.xml: Rename to mips-n32-linux.xml.in. * syscalls/mips-n64-linux.xml: Rename to mips-n64-linux.xml.in. * syscalls/mips-o32-linux.xml: Rename to mips-o32-linux.xml.in. * syscalls/ppc-linux.xml: Rename to ppc-linux.xml.in. * syscalls/ppc64-linux.xml: Rename to ppc64-linux.xml.in. * syscalls/s390-linux.xml: Rename to s390-linux.xml.in. * syscalls/s390x-linux.xml: Rename to s390x-linux.xml.in. * syscalls/sparc-linux.xml: Rename to sparc-linux.xml.in. * syscalls/sparc64-linux.xml: Rename to sparc64-linux.xml.in. * syscalls/aarch64-linux.xml: Regenerate. * syscalls/amd64-linux.xml: Regenerate. * syscalls/arm-linux.xml: Regenerate. * syscalls/i386-linux.xml: Regenerate. * syscalls/mips-n32-linux.xml: Regenerate. * syscalls/mips-n64-linux.xml: Regenerate. * syscalls/mips-o32-linux.xml: Regenerate. * syscalls/ppc-linux.xml: Regenerate. * syscalls/ppc64-linux.xml: Regenerate. * syscalls/s390-linux.xml: Regenerate. * syscalls/s390x-linux.xml: Regenerate. * syscalls/sparc-linux.xml: Regenerate. * syscalls/sparc64-linux.xml: Regenerate. gdb/testsuite/ * gdb.base/catch-syscall.exp (do_syscall_tests): Add call to test_catch_syscall_group. (test_catch_syscall_group): New. gdb/doc/ * gdb.texinfo (Set Catchpoints): Add 'group' argument to catch syscall.
2016-07-23 23:38:24 +02:00
<?xml version="1.0"?>
<!-- Copyright (C) 2009-2018 Free Software Foundation, Inc.
Implement catch syscall group Implement support to add catchpoints for a group of related syscalls using the syntax: (gdb) catch syscall group:<group> or (gdb) catch syscall g:<group> Several groups are predefined in the xml files for all architectures supported by GDB over Linux. They are based on the groups defined by strace. gdb/ * xml-syscall.c (get_syscalls_by_group): New. (get_syscall_group_names): New. (struct syscall_group_desc): New structure to store group data. (struct syscalls_info): Include field to store the group list. (sysinfo_free_syscall_group_desc): New. (free_syscalls_info): Free group list. (syscall_group_create_syscall_group_desc): New. (syscall_group_add_syscall): New. (syscall_create_syscall_desc): Add syscall to its groups. (syscall_start_syscall): Load group attribute. (syscall_group_get_group_by_name): New. (xml_list_syscalls_by_group): New. (xml_list_of_groups): New. * xml-syscall.h (get_syscalls_by_group): Export function to retrieve a list of syscalls filtered by the group name. (get_syscall_group_names): Export function to retrieve the list of syscall groups. * break-catch-syscall.c (catch_syscall_split_args): Verify if argument is a syscall group and expand it to a list of syscalls when creating catchpoints. (catch_syscall_completer): Add word completion for system call groups. * configure.ac: Include dependency for xsltproc when building in maintainer-mode. * break-catch-syscall.c (_initialize_breakpoint): Update catch syscall command documentation. * NEWS: Include section about catching groups of syscalls. * configure: Regenerate. * data-directory/Makefile.in: Generate syscall xml when building in maintainer mode. * syscalls/gdb-syscalls.dtd: Include group attribute to the syscall element. * syscalls/apply-defaults.xsl: New. * syscalls/linux-defaults.xml.in: New. * syscalls/aarch64-linux.xml: Rename to aarch64-linux.xml.in. * syscalls/amd64-linux.xml: Rename to amd64-linux.xml.in. * syscalls/arm-linux.xml: Rename to arm-linux.xml.in. * syscalls/bfin-linux.xml: Rename to bfin-linux.xml.in. * syscalls/i386-linux.xml: Rename to i386-linux.xml.in. * syscalls/mips-n32-linux.xml: Rename to mips-n32-linux.xml.in. * syscalls/mips-n64-linux.xml: Rename to mips-n64-linux.xml.in. * syscalls/mips-o32-linux.xml: Rename to mips-o32-linux.xml.in. * syscalls/ppc-linux.xml: Rename to ppc-linux.xml.in. * syscalls/ppc64-linux.xml: Rename to ppc64-linux.xml.in. * syscalls/s390-linux.xml: Rename to s390-linux.xml.in. * syscalls/s390x-linux.xml: Rename to s390x-linux.xml.in. * syscalls/sparc-linux.xml: Rename to sparc-linux.xml.in. * syscalls/sparc64-linux.xml: Rename to sparc64-linux.xml.in. * syscalls/aarch64-linux.xml: Regenerate. * syscalls/amd64-linux.xml: Regenerate. * syscalls/arm-linux.xml: Regenerate. * syscalls/i386-linux.xml: Regenerate. * syscalls/mips-n32-linux.xml: Regenerate. * syscalls/mips-n64-linux.xml: Regenerate. * syscalls/mips-o32-linux.xml: Regenerate. * syscalls/ppc-linux.xml: Regenerate. * syscalls/ppc64-linux.xml: Regenerate. * syscalls/s390-linux.xml: Regenerate. * syscalls/s390x-linux.xml: Regenerate. * syscalls/sparc-linux.xml: Regenerate. * syscalls/sparc64-linux.xml: Regenerate. gdb/testsuite/ * gdb.base/catch-syscall.exp (do_syscall_tests): Add call to test_catch_syscall_group. (test_catch_syscall_group): New. gdb/doc/ * gdb.texinfo (Set Catchpoints): Add 'group' argument to catch syscall.
2016-07-23 23:38:24 +02:00
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!-- The group field information was based on strace. -->
<syscalls_defaults>
<syscall name="read" groups="descriptor"/>
<syscall name="write" groups="descriptor"/>
<syscall name="open" groups="descriptor,file"/>
<syscall name="close" groups="descriptor"/>
<syscall name="stat" groups="file"/>
<syscall name="fstat" groups="descriptor"/>
<syscall name="lstat" groups="file"/>
<syscall name="poll" groups="descriptor"/>
<syscall name="lseek" groups="descriptor"/>
<syscall name="mmap" groups="descriptor,memory"/>
<syscall name="mprotect" groups="memory"/>
<syscall name="munmap" groups="memory"/>
<syscall name="brk" groups="memory"/>
<syscall name="rt_sigaction" groups="signal"/>
<syscall name="rt_sigprocmask" groups="signal"/>
<syscall name="rt_sigreturn" groups="signal"/>
<syscall name="ioctl" groups="descriptor"/>
<syscall name="pread64" groups="descriptor"/>
<syscall name="pwrite64" groups="descriptor"/>
<syscall name="readv" groups="descriptor"/>
<syscall name="writev" groups="descriptor"/>
<syscall name="access" groups="file"/>
<syscall name="pipe" groups="descriptor"/>
<syscall name="select" groups="descriptor"/>
<syscall name="mremap" groups="memory"/>
<syscall name="msync" groups="memory"/>
<syscall name="mincore" groups="memory"/>
<syscall name="madvise" groups="memory"/>
<syscall name="shmget" groups="ipc"/>
<syscall name="shmat" groups="ipc,memory"/>
<syscall name="shmctl" groups="ipc"/>
<syscall name="dup" groups="descriptor"/>
<syscall name="dup2" groups="descriptor"/>
<syscall name="pause" groups="signal"/>
<syscall name="sendfile" groups="descriptor,network"/>
<syscall name="socket" groups="network"/>
<syscall name="connect" groups="network"/>
<syscall name="accept" groups="network"/>
<syscall name="sendto" groups="network"/>
<syscall name="recvfrom" groups="network"/>
<syscall name="sendmsg" groups="network"/>
<syscall name="recvmsg" groups="network"/>
<syscall name="shutdown" groups="network"/>
<syscall name="bind" groups="network"/>
<syscall name="listen" groups="network"/>
<syscall name="getsockname" groups="network"/>
<syscall name="getpeername" groups="network"/>
<syscall name="socketpair" groups="network"/>
<syscall name="setsockopt" groups="network"/>
<syscall name="getsockopt" groups="network"/>
<syscall name="clone" groups="process"/>
<syscall name="fork" groups="process"/>
<syscall name="vfork" groups="process"/>
<syscall name="execve" groups="file,process"/>
<syscall name="execv" groups="file,process"/>
<syscall name="exit" groups="process"/>
<syscall name="wait4" groups="process"/>
<syscall name="kill" groups="signal"/>
<syscall name="semget" groups="ipc"/>
<syscall name="semop" groups="ipc"/>
<syscall name="semctl" groups="ipc"/>
<syscall name="shmdt" groups="ipc,memory"/>
<syscall name="msgget" groups="ipc"/>
<syscall name="msgsnd" groups="ipc"/>
<syscall name="msgrcv" groups="ipc"/>
<syscall name="msgctl" groups="ipc"/>
<syscall name="fcntl" groups="descriptor"/>
<syscall name="flock" groups="descriptor"/>
<syscall name="fsync" groups="descriptor"/>
<syscall name="fdatasync" groups="descriptor"/>
<syscall name="truncate" groups="file"/>
<syscall name="ftruncate" groups="descriptor"/>
<syscall name="getdents" groups="descriptor"/>
<syscall name="getcwd" groups="file"/>
<syscall name="chdir" groups="file"/>
<syscall name="fchdir" groups="descriptor"/>
<syscall name="rename" groups="file"/>
<syscall name="mkdir" groups="file"/>
<syscall name="rmdir" groups="file"/>
<syscall name="creat" groups="descriptor,file"/>
<syscall name="link" groups="file"/>
<syscall name="unlink" groups="file"/>
<syscall name="symlink" groups="file"/>
<syscall name="readlink" groups="file"/>
<syscall name="chmod" groups="file"/>
<syscall name="fchmod" groups="descriptor"/>
<syscall name="chown" groups="file"/>
<syscall name="fchown" groups="descriptor"/>
<syscall name="lchown" groups="file"/>
<syscall name="rt_sigpending" groups="signal"/>
<syscall name="rt_sigtimedwait" groups="signal"/>
<syscall name="rt_sigqueueinfo" groups="signal"/>
<syscall name="rt_sigsuspend" groups="signal"/>
<syscall name="sigaltstack" groups="signal"/>
<syscall name="utime" groups="file"/>
<syscall name="mknod" groups="file"/>
<syscall name="uselib" groups="file"/>
<syscall name="statfs" groups="file"/>
<syscall name="fstatfs" groups="descriptor"/>
<syscall name="mlock" groups="memory"/>
<syscall name="munlock" groups="memory"/>
<syscall name="mlockall" groups="memory"/>
<syscall name="munlockall" groups="memory"/>
<syscall name="pivot_root" groups="file"/>
<syscall name="arch_prctl" groups="process"/>
<syscall name="chroot" groups="file"/>
<syscall name="acct" groups="file"/>
<syscall name="mount" groups="file"/>
<syscall name="umount" groups="file"/>
<syscall name="umount2" groups="file"/>
<syscall name="swapon" groups="file"/>
<syscall name="swapoff" groups="file"/>
<syscall name="quotactl" groups="file"/>
<syscall name="readahead" groups="descriptor"/>
<syscall name="setxattr" groups="file"/>
<syscall name="lsetxattr" groups="file"/>
<syscall name="fsetxattr" groups="descriptor"/>
<syscall name="getxattr" groups="file"/>
<syscall name="lgetxattr" groups="file"/>
<syscall name="fgetxattr" groups="descriptor"/>
<syscall name="listxattr" groups="file"/>
<syscall name="llistxattr" groups="file"/>
<syscall name="flistxattr" groups="descriptor"/>
<syscall name="removexattr" groups="file"/>
<syscall name="lremovexattr" groups="file"/>
<syscall name="fremovexattr" groups="descriptor"/>
<syscall name="tkill" groups="signal"/>
<syscall name="epoll_create" groups="descriptor"/>
<syscall name="remap_file_pages" groups="memory"/>
<syscall name="getdents64" groups="descriptor"/>
<syscall name="semtimedop" groups="ipc"/>
<syscall name="fadvise64" groups="descriptor"/>
<syscall name="exit_group" groups="process"/>
<syscall name="epoll_wait" groups="descriptor"/>
<syscall name="epoll_ctl" groups="descriptor"/>
<syscall name="tgkill" groups="signal"/>
<syscall name="utimes" groups="file"/>
<syscall name="mbind" groups="memory"/>
<syscall name="set_mempolicy" groups="memory"/>
<syscall name="get_mempolicy" groups="memory"/>
<syscall name="waitid" groups="process"/>
<syscall name="inotify_init" groups="descriptor"/>
<syscall name="inotify_add_watch" groups="descriptor"/>
<syscall name="inotify_rm_watch" groups="descriptor"/>
<syscall name="migrate_pages" groups="memory"/>
<syscall name="openat" groups="descriptor,file"/>
<syscall name="mkdirat" groups="descriptor,file"/>
<syscall name="mknodat" groups="descriptor,file"/>
<syscall name="fchownat" groups="descriptor,file"/>
<syscall name="futimesat" groups="descriptor,file"/>
<syscall name="newfstatat" groups="descriptor,file"/>
<syscall name="unlinkat" groups="descriptor,file"/>
<syscall name="renameat" groups="descriptor,file"/>
<syscall name="linkat" groups="descriptor,file"/>
<syscall name="symlinkat" groups="descriptor,file"/>
<syscall name="readlinkat" groups="descriptor,file"/>
<syscall name="fchmodat" groups="descriptor,file"/>
<syscall name="faccessat" groups="descriptor,file"/>
<syscall name="pselect6" groups="descriptor"/>
<syscall name="ppoll" groups="descriptor"/>
<syscall name="unshare" groups="process"/>
<syscall name="splice" groups="descriptor"/>
<syscall name="tee" groups="descriptor"/>
<syscall name="sync_file_range" groups="descriptor"/>
<syscall name="vmsplice" groups="descriptor"/>
<syscall name="move_pages" groups="memory"/>
<syscall name="utimensat" groups="descriptor,file"/>
<syscall name="epoll_pwait" groups="descriptor"/>
<syscall name="signalfd" groups="descriptor,signal"/>
<syscall name="timerfd_create" groups="descriptor"/>
<syscall name="eventfd" groups="descriptor"/>
<syscall name="fallocate" groups="descriptor"/>
<syscall name="timerfd_settime" groups="descriptor"/>
<syscall name="timerfd_gettime" groups="descriptor"/>
<syscall name="accept4" groups="network"/>
<syscall name="signalfd4" groups="descriptor,signal"/>
<syscall name="eventfd2" groups="descriptor"/>
<syscall name="epoll_create1" groups="descriptor"/>
<syscall name="dup3" groups="descriptor"/>
<syscall name="pipe2" groups="descriptor"/>
<syscall name="inotify_init1" groups="descriptor"/>
<syscall name="preadv" groups="descriptor"/>
<syscall name="pwritev" groups="descriptor"/>
<syscall name="send" groups="network"/>
<syscall name="recv" groups="network"/>
<syscall name="statfs64" groups="file"/>
<syscall name="fstatfs64" groups="descriptor"/>
<syscall name="sendfile64" groups="descriptor,network"/>
<syscall name="rt_tgsigqueueinfo" groups="process,signal"/>
<syscall name="perf_event_open" groups="descriptor"/>
<syscall name="recvmmsg" groups="network"/>
<syscall name="fanotify_init" groups="descriptor"/>
<syscall name="fanotify_mark" groups="descriptor,file"/>
<syscall name="fchown32" groups="descriptor"/>
<syscall name="chown32" groups="file"/>
<syscall name="fcntl64" groups="descriptor"/>
<syscall name="mmap2" groups="descriptor,memory"/>
<syscall name="truncate64" groups="file"/>
<syscall name="ftruncate64" groups="descriptor"/>
<syscall name="stat64" groups="file"/>
<syscall name="lstat64" groups="file"/>
<syscall name="fstat64" groups="descriptor"/>
<syscall name="lchown32" groups="file"/>
<syscall name="name_to_handle_at" groups="descriptor,file"/>
<syscall name="open_by_handle_at" groups="descriptor"/>
<syscall name="_llseek" groups="descriptor"/>
<syscall name="syncfs" groups="descriptor"/>
<syscall name="sendmmsg" groups="network"/>
<syscall name="setns" groups="descriptor"/>
<syscall name="finit_module" groups="descriptor"/>
<syscall name="oldstat" groups="file"/>
<syscall name="sigaction" groups="signal"/>
<syscall name="sigreturn" groups="signal"/>
<syscall name="sigsuspend" groups="signal"/>
<syscall name="sigpending" groups="signal"/>
<syscall name="sigprocmask" groups="signal"/>
<syscall name="ipc" groups="ipc"/>
<syscall name="readdir" groups="descriptor"/>
<syscall name="socketcall" groups="descriptor"/>
<syscall name="break" groups="memory"/>
<syscall name="oldfstat" groups="descriptor"/>
<syscall name="signal" groups="signal"/>
<syscall name="sgetmask" groups="signal"/>
<syscall name="ssetmask" groups="signal"/>
<syscall name="oldlstat" groups="file"/>
<syscall name="waitpid" groups="process"/>
<syscall name="pread" groups="descriptor"/>
<syscall name="pwrite" groups="descriptor"/>
<syscall name="fadvise64_64" groups="descriptor"/>
<syscall name="fstatat64" groups="descriptor,file"/>
<syscall name="_newselect" groups="descriptor"/>
<syscall name="timerfd" groups="descriptor"/>
</syscalls_defaults>