]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/xml-syscall.h
Change get_syscalls_by_group to append to an existing vector of integers.
[thirdparty/binutils-gdb.git] / gdb / xml-syscall.h
CommitLineData
fbbe92c5
SDJ
1/* Functions that provide the mechanism to parse a syscall XML file
2 and get its values.
3
e2882c85 4 Copyright (C) 2009-2018 Free Software Foundation, Inc.
fbbe92c5
SDJ
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21#ifndef XML_SYSCALL_H
22#define XML_SYSCALL_H 1
23
24/* Function used to set the name of the file which contains
25 information about the system calls present in the current
26 architecture.
27
28 This function *should* be called before anything else, otherwise
29 GDB won't be able to find the correct XML file to open and get
30 the syscalls definitions. */
31
458c8db8
SDJ
32void set_xml_syscall_file_name (struct gdbarch *gdbarch,
33 const char *name);
fbbe92c5
SDJ
34
35/* Function that retrieves the syscall name corresponding to the given
36 number. It puts the requested information inside 'struct syscall'. */
37
458c8db8
SDJ
38void get_syscall_by_number (struct gdbarch *gdbarch,
39 int syscall_number, struct syscall *s);
fbbe92c5
SDJ
40
41/* Function that retrieves the syscall number corresponding to the given
42 name. It puts the requested information inside 'struct syscall'. */
43
458c8db8
SDJ
44void get_syscall_by_name (struct gdbarch *gdbarch,
45 const char *syscall_name, struct syscall *s);
fbbe92c5
SDJ
46
47/* Function used to retrieve the list of syscalls in the system. This list
48 is returned as an array of strings. Returns the list of syscalls in the
49 system, or NULL otherwise. */
50
458c8db8 51const char **get_syscall_names (struct gdbarch *gdbarch);
fbbe92c5 52
e3487908 53/* Function used to retrieve the list of syscalls of a given group in
4794efbf
JB
54 the system. The syscall numbers are appended to SYSCALL_NUMBERS.
55 If the group doesn't exist, return false. */
e3487908 56
4794efbf
JB
57bool get_syscalls_by_group (struct gdbarch *gdbarch, const char *group,
58 std::vector<int> *syscall_numbers);
e3487908
GKB
59
60/* Function used to retrieve the list of syscall groups in the system.
61 Return an array of strings terminated by a NULL element. The list
62 must be freed by the caller. Return NULL if there is no syscall
63 information available. */
64
65const char **get_syscall_group_names (struct gdbarch *gdbarch);
66
fbbe92c5 67#endif /* XML_SYSCALL_H */