binutils-gdb/gdb/syscalls
Gabriel Krisman Bertazi e34879080d 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 18:38:24 -03:00
..
aarch64-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
aarch64-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
amd64-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
amd64-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
apply-defaults.xsl Implement catch syscall group 2016-07-23 18:38:24 -03:00
arm-linux.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
arm-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
arm-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
bfin-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
freebsd.xml Add support for catching system calls to native FreeBSD targets. 2016-06-24 10:46:03 -07:00
gdb-syscalls.dtd Implement catch syscall group 2016-07-23 18:38:24 -03:00
i386-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
i386-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
linux-defaults.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
mips-n32-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
mips-n32-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
mips-n64-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
mips-n64-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
mips-o32-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
mips-o32-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
ppc-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
ppc-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
ppc64-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
ppc64-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
s390-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
s390-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
s390x-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
s390x-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
sparc-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
sparc-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00
sparc64-linux.xml Implement catch syscall group 2016-07-23 18:38:24 -03:00
sparc64-linux.xml.in Implement catch syscall group 2016-07-23 18:38:24 -03:00