xml-syscall.h revision 1.3 1 1.1 christos /* Functions that provide the mechanism to parse a syscall XML file
2 1.1 christos and get its values.
3 1.1 christos
4 1.3 christos Copyright (C) 2009-2015 Free Software Foundation, Inc.
5 1.1 christos
6 1.1 christos This file is part of GDB.
7 1.1 christos
8 1.1 christos This program is free software; you can redistribute it and/or modify
9 1.1 christos it under the terms of the GNU General Public License as published by
10 1.1 christos the Free Software Foundation; either version 3 of the License, or
11 1.1 christos (at your option) any later version.
12 1.1 christos
13 1.1 christos This program is distributed in the hope that it will be useful,
14 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of
15 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 1.1 christos GNU General Public License for more details.
17 1.1 christos
18 1.1 christos You should have received a copy of the GNU General Public License
19 1.1 christos along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 1.1 christos
21 1.1 christos #ifndef XML_SYSCALL_H
22 1.1 christos #define XML_SYSCALL_H 1
23 1.1 christos
24 1.1 christos /* Function used to set the name of the file which contains
25 1.1 christos information about the system calls present in the current
26 1.1 christos architecture.
27 1.1 christos
28 1.1 christos This function *should* be called before anything else, otherwise
29 1.1 christos GDB won't be able to find the correct XML file to open and get
30 1.1 christos the syscalls definitions. */
31 1.1 christos
32 1.3 christos void set_xml_syscall_file_name (struct gdbarch *gdbarch,
33 1.3 christos const char *name);
34 1.1 christos
35 1.1 christos /* Function that retrieves the syscall name corresponding to the given
36 1.1 christos number. It puts the requested information inside 'struct syscall'. */
37 1.1 christos
38 1.3 christos void get_syscall_by_number (struct gdbarch *gdbarch,
39 1.3 christos int syscall_number, struct syscall *s);
40 1.1 christos
41 1.1 christos /* Function that retrieves the syscall number corresponding to the given
42 1.1 christos name. It puts the requested information inside 'struct syscall'. */
43 1.1 christos
44 1.3 christos void get_syscall_by_name (struct gdbarch *gdbarch,
45 1.3 christos const char *syscall_name, struct syscall *s);
46 1.1 christos
47 1.1 christos /* Function used to retrieve the list of syscalls in the system. This list
48 1.1 christos is returned as an array of strings. Returns the list of syscalls in the
49 1.1 christos system, or NULL otherwise. */
50 1.1 christos
51 1.3 christos const char **get_syscall_names (struct gdbarch *gdbarch);
52 1.1 christos
53 1.1 christos #endif /* XML_SYSCALL_H */
54