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